Merge "Add bound checks to utf16_to_utf8" into nyc-mr1-dev
diff --git a/Android.mk b/Android.mk
index dec667e..8c39d19 100644
--- a/Android.mk
+++ b/Android.mk
@@ -308,6 +308,7 @@
 	core/java/com/android/internal/app/IEphemeralResolver.aidl \
 	core/java/com/android/internal/app/ISoundTriggerService.aidl \
 	core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl \
+	core/java/com/android/internal/app/IVoiceInteractionSessionListener.aidl \
 	core/java/com/android/internal/app/IVoiceInteractionSessionShowCallback.aidl \
 	core/java/com/android/internal/app/IVoiceInteractor.aidl \
 	core/java/com/android/internal/app/IVoiceInteractorCallback.aidl \
@@ -318,6 +319,7 @@
 	core/java/com/android/internal/appwidget/IAppWidgetHost.aidl \
 	core/java/com/android/internal/backup/IBackupTransport.aidl \
 	core/java/com/android/internal/backup/IObbBackupService.aidl \
+	core/java/com/android/internal/inputmethod/IInputContentUriToken.aidl \
 	core/java/com/android/internal/policy/IKeyguardDrawnCallback.aidl \
 	core/java/com/android/internal/policy/IKeyguardExitCallback.aidl \
 	core/java/com/android/internal/policy/IKeyguardService.aidl \
@@ -341,6 +343,7 @@
 	core/java/com/android/internal/view/IInputMethodManager.aidl \
 	core/java/com/android/internal/view/IInputMethodSession.aidl \
 	core/java/com/android/internal/view/IInputSessionCallback.aidl \
+	core/java/com/android/internal/widget/ICheckCredentialProgressCallback.aidl \
 	core/java/com/android/internal/widget/ILockSettings.aidl \
 	core/java/com/android/internal/widget/IRemoteViewsFactory.aidl \
 	core/java/com/android/internal/widget/IRemoteViewsAdapterConnection.aidl \
@@ -467,6 +470,9 @@
 	../../system/update_engine/binder_bindings/android/os/IUpdateEngine.aidl \
 	../../system/update_engine/binder_bindings/android/os/IUpdateEngineCallback.aidl \
 
+LOCAL_SRC_FILES +=  \
+	../../system/netd/server/binder/android/net/INetd.aidl \
+
 LOCAL_AIDL_INCLUDES += system/update_engine/binder_bindings
 
 # FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk
@@ -699,6 +705,7 @@
 	frameworks/base/core/java/android/service/quicksettings/Tile.aidl \
 	frameworks/native/aidl/binder/android/os/PersistableBundle.aidl \
 	system/netd/server/binder/android/net/UidRange.aidl \
+	frameworks/base/telephony/java/android/telephony/PcoData.aidl \
 
 gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
 $(gen): PRIVATE_SRC_FILES := $(aidl_files)
@@ -1055,6 +1062,42 @@
 		-title "Android SDK" \
 		-proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
 		-sdkvalues $(OUT_DOCS) \
+		-hdf android.whichdoc offline
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-dev
+
+include $(BUILD_DROIDDOC)
+
+static_doc_index_redirect := $(out_dir)/index.html
+$(static_doc_index_redirect): \
+	$(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
+	$(hide) mkdir -p $(dir $@)
+	$(hide) $(ACP) $< $@
+
+$(full_target): $(static_doc_index_redirect)
+$(full_target): $(framework_built)
+
+
+# ====  static html in the sdk ==================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
+LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
+LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
+LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
+LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
+LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
+LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
+
+LOCAL_MODULE := offline-sdk-referenceonly
+
+LOCAL_DROIDDOC_OPTIONS:=\
+		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+		-offlinemode \
+		-title "Android SDK" \
+		-proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
+		-sdkvalues $(OUT_DOCS) \
 		-hdf android.whichdoc offline \
 		-referenceonly
 
@@ -1096,7 +1139,7 @@
 		-hdf android.hasSamples true \
 		-samplesdir $(samples_dir)
 
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-dev
 
 include $(BUILD_DROIDDOC)
 
diff --git a/api/current.txt b/api/current.txt
index 4f12ad4..d5f36bd 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -397,6 +397,7 @@
     field public static final int colorPressedHighlight = 16843661; // 0x101038d
     field public static final int colorPrimary = 16843827; // 0x1010433
     field public static final int colorPrimaryDark = 16843828; // 0x1010434
+    field public static final int colorSecondary = 16844080; // 0x1010530
     field public static final int columnCount = 16843639; // 0x1010377
     field public static final int columnDelay = 16843215; // 0x10101cf
     field public static final int columnOrderPreserved = 16843640; // 0x1010378
@@ -420,7 +421,9 @@
     field public static final int contentInsetStart = 16843859; // 0x1010453
     field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522
     field public static final int contextClickable = 16844007; // 0x10104e7
+    field public static final int contextDescription = 16844078; // 0x101052e
     field public static final int contextPopupMenuStyle = 16844033; // 0x1010501
+    field public static final int contextUri = 16844077; // 0x101052d
     field public static final int controlX1 = 16843772; // 0x10103fc
     field public static final int controlX2 = 16843774; // 0x10103fe
     field public static final int controlY1 = 16843773; // 0x10103fd
@@ -1039,6 +1042,7 @@
     field public static final int rotation = 16843558; // 0x1010326
     field public static final int rotationX = 16843559; // 0x1010327
     field public static final int rotationY = 16843560; // 0x1010328
+    field public static final int roundIcon = 16844076; // 0x101052c
     field public static final int rowCount = 16843637; // 0x1010375
     field public static final int rowDelay = 16843216; // 0x10101d0
     field public static final int rowEdgeFlags = 16843329; // 0x1010241
@@ -1106,11 +1110,16 @@
     field public static final int shareInterpolator = 16843195; // 0x10101bb
     field public static final int sharedUserId = 16842763; // 0x101000b
     field public static final int sharedUserLabel = 16843361; // 0x1010261
+    field public static final int shortcutDisabledMessage = 16844075; // 0x101052b
+    field public static final int shortcutId = 16844072; // 0x1010528
+    field public static final int shortcutLongLabel = 16844074; // 0x101052a
+    field public static final int shortcutShortLabel = 16844073; // 0x1010529
     field public static final int shouldDisableView = 16843246; // 0x10101ee
     field public static final int showAsAction = 16843481; // 0x10102d9
     field public static final int showDefault = 16843258; // 0x10101fa
     field public static final int showDividers = 16843561; // 0x1010329
     field public static final int showForAllUsers = 16844015; // 0x10104ef
+    field public static final int showMetadataInPreview = 16844079; // 0x101052f
     field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9
     field public static final int showSilent = 16843259; // 0x10101fb
     field public static final int showText = 16843949; // 0x10104ad
@@ -3696,6 +3705,7 @@
     method public void moveTaskToFront(int, int);
     method public void moveTaskToFront(int, int, android.os.Bundle);
     method public deprecated void restartPackage(java.lang.String);
+    method public static void setVrThread(int);
     method public void setWatchHeapLimit(long);
     field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
     field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1
@@ -5037,12 +5047,14 @@
     method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
     method public java.lang.CharSequence getCancelLabel();
     method public java.lang.CharSequence getConfirmLabel();
+    method public boolean getHintDisplayActionInline();
     method public boolean getHintLaunchesActivity();
     method public java.lang.CharSequence getInProgressLabel();
     method public boolean isAvailableOffline();
     method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
     method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
     method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
+    method public android.app.Notification.Action.WearableExtender setHintDisplayActionInline(boolean);
     method public android.app.Notification.Action.WearableExtender setHintLaunchesActivity(boolean);
     method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
   }
@@ -5756,7 +5768,10 @@
     method public android.content.pm.ServiceInfo getServiceInfo();
     method public java.lang.String getServiceName();
     method public java.lang.String getSettingsActivity();
+    method public boolean getShowMetadataInPreview();
     method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
+    method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
+    method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
     method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
     method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
     method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
@@ -6484,11 +6499,13 @@
     method public android.content.res.Configuration getConfiguration();
     method public int getEventType();
     method public java.lang.String getPackageName();
+    method public java.lang.String getShortcutId();
     method public long getTimeStamp();
     field public static final int CONFIGURATION_CHANGE = 5; // 0x5
     field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
     field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
     field public static final int NONE = 0; // 0x0
+    field public static final int SHORTCUT_INVOCATION = 8; // 0x8
     field public static final int USER_INTERACTION = 7; // 0x7
   }
 
@@ -8191,6 +8208,7 @@
     field public static final java.lang.String RESTRICTIONS_SERVICE = "restrictions";
     field public static final java.lang.String SEARCH_SERVICE = "search";
     field public static final java.lang.String SENSOR_SERVICE = "sensor";
+    field public static final java.lang.String SHORTCUT_SERVICE = "shortcut";
     field public static final java.lang.String STORAGE_SERVICE = "storage";
     field public static final java.lang.String SYSTEM_HEALTH_SERVICE = "systemhealth";
     field public static final java.lang.String TELECOM_SERVICE = "telecom";
@@ -9500,13 +9518,20 @@
 
   public class LauncherApps {
     method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
+    method public android.graphics.drawable.Drawable getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, int);
+    method public android.graphics.drawable.Drawable getShortcutIconDrawable(android.content.pm.ShortcutInfo, int);
+    method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
+    method public boolean hasShortcutHostPermission();
     method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
     method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
+    method public void pinShortcuts(java.lang.String, java.util.List<java.lang.String>, android.os.UserHandle);
     method public void registerCallback(android.content.pm.LauncherApps.Callback);
     method public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler);
     method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
     method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
     method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
+    method public void startShortcut(java.lang.String, java.lang.String, android.graphics.Rect, android.os.Bundle, android.os.UserHandle);
+    method public void startShortcut(android.content.pm.ShortcutInfo, android.graphics.Rect, android.os.Bundle);
     method public void unregisterCallback(android.content.pm.LauncherApps.Callback);
   }
 
@@ -9519,6 +9544,20 @@
     method public void onPackagesSuspended(java.lang.String[], android.os.UserHandle);
     method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
     method public void onPackagesUnsuspended(java.lang.String[], android.os.UserHandle);
+    method public void onShortcutsChanged(java.lang.String, java.util.List<android.content.pm.ShortcutInfo>, android.os.UserHandle);
+  }
+
+  public static class LauncherApps.ShortcutQuery {
+    ctor public LauncherApps.ShortcutQuery();
+    method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
+    method public android.content.pm.LauncherApps.ShortcutQuery setChangedSince(long);
+    method public android.content.pm.LauncherApps.ShortcutQuery setPackage(java.lang.String);
+    method public android.content.pm.LauncherApps.ShortcutQuery setQueryFlags(int);
+    method public android.content.pm.LauncherApps.ShortcutQuery setShortcutIds(java.util.List<java.lang.String>);
+    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
+    field public static final int FLAG_MATCH_DYNAMIC = 1; // 0x1
+    field public static final int FLAG_MATCH_MANIFEST = 8; // 0x8
+    field public static final int FLAG_MATCH_PINNED = 2; // 0x2
   }
 
   public class PackageInfo implements android.os.Parcelable {
@@ -10019,6 +10058,63 @@
     field public java.lang.String permission;
   }
 
+  public final class ShortcutInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public android.content.ComponentName getActivity();
+    method public java.util.Set<java.lang.String> getCategories();
+    method public java.lang.CharSequence getDisabledMessage();
+    method public android.os.PersistableBundle getExtras();
+    method public java.lang.String getId();
+    method public android.content.Intent getIntent();
+    method public long getLastChangedTimestamp();
+    method public java.lang.CharSequence getLongLabel();
+    method public java.lang.String getPackage();
+    method public int getRank();
+    method public java.lang.CharSequence getShortLabel();
+    method public android.os.UserHandle getUserHandle();
+    method public boolean hasKeyFieldsOnly();
+    method public boolean isDeclaredInManifest();
+    method public boolean isDynamic();
+    method public boolean isEnabled();
+    method public boolean isImmutable();
+    method public boolean isPinned();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.content.pm.ShortcutInfo> CREATOR;
+    field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
+  }
+
+  public static class ShortcutInfo.Builder {
+    ctor public ShortcutInfo.Builder(android.content.Context, java.lang.String);
+    method public android.content.pm.ShortcutInfo build();
+    method public android.content.pm.ShortcutInfo.Builder setActivity(android.content.ComponentName);
+    method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.Set<java.lang.String>);
+    method public android.content.pm.ShortcutInfo.Builder setDisabledMessage(java.lang.CharSequence);
+    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
+    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
+    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
+    method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence);
+    method public android.content.pm.ShortcutInfo.Builder setRank(int);
+    method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence);
+  }
+
+  public class ShortcutManager {
+    method public boolean addDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+    method public void disableShortcuts(java.util.List<java.lang.String>);
+    method public void disableShortcuts(java.util.List<java.lang.String>, java.lang.CharSequence);
+    method public void enableShortcuts(java.util.List<java.lang.String>);
+    method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
+    method public int getIconMaxHeight();
+    method public int getIconMaxWidth();
+    method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
+    method public int getMaxShortcutCountPerActivity();
+    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
+    method public void removeAllDynamicShortcuts();
+    method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
+    method public void reportShortcutUsed(java.lang.String);
+    method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+    method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+  }
+
   public class Signature implements android.os.Parcelable {
     ctor public Signature(byte[]);
     ctor public Signature(java.lang.String);
@@ -28268,6 +28364,7 @@
     field public static final int LOLLIPOP_MR1 = 22; // 0x16
     field public static final int M = 23; // 0x17
     field public static final int N = 24; // 0x18
+    field public static final int N_MR1 = 25; // 0x19
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
@@ -29259,6 +29356,7 @@
     method public android.os.Bundle getUserRestrictions();
     method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
     method public boolean hasUserRestriction(java.lang.String);
+    method public boolean isDemoUser();
     method public boolean isQuietModeEnabled(android.os.UserHandle);
     method public boolean isSystemUser();
     method public boolean isUserAGoat();
@@ -29498,6 +29596,7 @@
     method public boolean isObbMounted(java.lang.String);
     method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
     method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
+    field public static final java.lang.String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
   }
 
   public final class StorageVolume implements android.os.Parcelable {
@@ -30640,6 +30739,7 @@
   public static class CallLog.Calls implements android.provider.BaseColumns {
     ctor public CallLog.Calls();
     method public static java.lang.String getLastOutgoingCall(android.content.Context);
+    field public static final int ANSWERED_EXTERNALLY_TYPE = 7; // 0x7
     field public static final int BLOCKED_TYPE = 6; // 0x6
     field public static final java.lang.String CACHED_FORMATTED_NUMBER = "formatted_number";
     field public static final java.lang.String CACHED_LOOKUP_URI = "lookup_uri";
@@ -30662,6 +30762,7 @@
     field public static final java.lang.String DURATION = "duration";
     field public static final java.lang.String EXTRA_CALL_TYPE_FILTER = "android.provider.extra.CALL_TYPE_FILTER";
     field public static final java.lang.String FEATURES = "features";
+    field public static final int FEATURES_PULLED_EXTERNALLY = 2; // 0x2
     field public static final int FEATURES_VIDEO = 1; // 0x1
     field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
     field public static final int INCOMING_TYPE = 1; // 0x1
@@ -32367,6 +32468,7 @@
     field public static final java.lang.String DATA_ROAMING = "data_roaming";
     field public static final java.lang.String DEBUG_APP = "debug_app";
     field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
+    field public static final java.lang.String DEVICE_NAME = "device_name";
     field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
     field public static final java.lang.String HTTP_PROXY = "http_proxy";
     field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
@@ -32952,6 +33054,7 @@
     field public static final java.lang.String ACTION_NEW_VOICEMAIL = "android.intent.action.NEW_VOICEMAIL";
     field public static final java.lang.String ACTION_SYNC_VOICEMAIL = "android.provider.action.SYNC_VOICEMAIL";
     field public static final java.lang.String AUTHORITY = "com.android.voicemail";
+    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.provider.extra.PHONE_ACCOUNT_HANDLE";
     field public static final java.lang.String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
     field public static final java.lang.String PARAM_KEY_SOURCE_PACKAGE = "source_package";
   }
@@ -32960,6 +33063,9 @@
     method public static android.net.Uri buildSourceUri(java.lang.String);
     field public static final java.lang.String CONFIGURATION_STATE = "configuration_state";
     field public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2; // 0x2
+    field public static final int CONFIGURATION_STATE_CONFIGURING = 3; // 0x3
+    field public static final int CONFIGURATION_STATE_DISABLED = 5; // 0x5
+    field public static final int CONFIGURATION_STATE_FAILED = 4; // 0x4
     field public static final int CONFIGURATION_STATE_NOT_CONFIGURED = 1; // 0x1
     field public static final int CONFIGURATION_STATE_OK = 0; // 0x0
     field public static final android.net.Uri CONTENT_URI;
@@ -32984,6 +33090,7 @@
     field public static final int QUOTA_UNAVAILABLE = -1; // 0xffffffff
     field public static final java.lang.String SETTINGS_URI = "settings_uri";
     field public static final java.lang.String SOURCE_PACKAGE = "source_package";
+    field public static final java.lang.String SOURCE_TYPE = "source_type";
     field public static final java.lang.String VOICEMAIL_ACCESS_URI = "voicemail_access_uri";
   }
 
@@ -35936,9 +36043,14 @@
     method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
     method public void playDtmfTone(char);
     method public void postDialContinue(boolean);
+    method public void pullExternalCall();
+    method public final void putExtras(android.os.Bundle);
     method public void registerCallback(android.telecom.Call.Callback);
     method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
     method public void reject(boolean, java.lang.String);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
+    method public void sendCallEvent(java.lang.String, android.os.Bundle);
     method public void splitFromConference();
     method public void stopDtmfTone();
     method public void swapConference();
@@ -35952,6 +36064,7 @@
     field public static final int STATE_DISCONNECTING = 10; // 0xa
     field public static final int STATE_HOLDING = 3; // 0x3
     field public static final int STATE_NEW = 0; // 0x0
+    field public static final int STATE_PULLING_CALL = 11; // 0xb
     field public static final int STATE_RINGING = 2; // 0x2
     field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
   }
@@ -35962,6 +36075,7 @@
     method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
     method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
     method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
+    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
     method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
     method public void onParentChanged(android.telecom.Call, android.telecom.Call);
     method public void onPostDialWait(android.telecom.Call, java.lang.String);
@@ -35992,6 +36106,7 @@
     method public static java.lang.String propertiesToString(int);
     field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 4194304; // 0x400000
     field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
+    field public static final int CAPABILITY_CAN_PULL_CALL = 8388608; // 0x800000
     field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
     field public static final int CAPABILITY_HOLD = 1; // 0x1
     field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
@@ -36011,7 +36126,9 @@
     field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
     field public static final int PROPERTY_ENTERPRISE_CALL = 32; // 0x20
     field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
+    field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 128; // 0x80
     field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
+    field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
     field public static final int PROPERTY_WIFI = 8; // 0x8
   }
 
@@ -36062,6 +36179,7 @@
     method public final android.telecom.CallAudioState getCallAudioState();
     method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
     method public final int getConnectionCapabilities();
+    method public final int getConnectionProperties();
     method public final long getConnectionTime();
     method public final java.util.List<android.telecom.Connection> getConnections();
     method public final android.telecom.DisconnectCause getDisconnectCause();
@@ -36074,6 +36192,7 @@
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
     method public void onConnectionAdded(android.telecom.Connection);
     method public void onDisconnect();
+    method public void onExtrasChanged(android.os.Bundle);
     method public void onHold();
     method public void onMerge(android.telecom.Connection);
     method public void onMerge();
@@ -36082,10 +36201,14 @@
     method public void onStopDtmfTone();
     method public void onSwap();
     method public void onUnhold();
+    method public final void putExtras(android.os.Bundle);
     method public final void removeConnection(android.telecom.Connection);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
     method public final void setActive();
     method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
     method public final void setConnectionCapabilities(int);
+    method public final void setConnectionProperties(int);
     method public final void setConnectionTime(long);
     method public final void setDialing();
     method public final void setDisconnected(android.telecom.DisconnectCause);
@@ -36115,6 +36238,7 @@
     method public final android.telecom.Conference getConference();
     method public final java.util.List<android.telecom.Conferenceable> getConferenceables();
     method public final int getConnectionCapabilities();
+    method public final int getConnectionProperties();
     method public final android.telecom.DisconnectCause getDisconnectCause();
     method public final android.os.Bundle getExtras();
     method public final int getState();
@@ -36125,16 +36249,24 @@
     method public void onAnswer(int);
     method public void onAnswer();
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
+    method public void onCallEvent(java.lang.String, android.os.Bundle);
     method public void onDisconnect();
+    method public void onExtrasChanged(android.os.Bundle);
     method public void onHold();
     method public void onPlayDtmfTone(char);
     method public void onPostDialContinue(boolean);
+    method public void onPullExternalCall();
     method public void onReject();
     method public void onReject(java.lang.String);
     method public void onSeparate();
     method public void onStateChanged(int);
     method public void onStopDtmfTone();
     method public void onUnhold();
+    method public static java.lang.String propertiesToString(int);
+    method public final void putExtras(android.os.Bundle);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
+    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
     method public final void setActive();
     method public final void setAddress(android.net.Uri, int);
     method public final void setAudioModeIsVoip(boolean);
@@ -36142,6 +36274,7 @@
     method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
     method public final void setConferenceables(java.util.List<android.telecom.Conferenceable>);
     method public final void setConnectionCapabilities(int);
+    method public final void setConnectionProperties(int);
     method public final void setDialing();
     method public final void setDisconnected(android.telecom.DisconnectCause);
     method public final void setExtras(android.os.Bundle);
@@ -36150,6 +36283,7 @@
     method public final void setNextPostDialChar(char);
     method public final void setOnHold();
     method public final void setPostDialWait(java.lang.String);
+    method public final void setPulling();
     method public final void setRingbackRequested(boolean);
     method public final void setRinging();
     method public final void setStatusHints(android.telecom.StatusHints);
@@ -36158,6 +36292,7 @@
     method public static java.lang.String stateToString(int);
     field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000
     field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
+    field public static final int CAPABILITY_CAN_PULL_CALL = 16777216; // 0x1000000
     field public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 4194304; // 0x400000
     field public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 524288; // 0x80000
     field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
@@ -36175,15 +36310,21 @@
     field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
     field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
     field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
+    field public static final java.lang.String EVENT_CALL_MERGE_FAILED = "android.telecom.event.CALL_MERGE_FAILED";
+    field public static final java.lang.String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
+    field public static final java.lang.String EXTRA_ANSWERING_DROPS_FG_CALL = "android.telecom.extra.ANSWERING_DROPS_FG_CALL";
     field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
     field public static final java.lang.String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS";
     field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
+    field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 32; // 0x20
+    field public static final int PROPERTY_IS_EXTERNAL_CALL = 16; // 0x10
     field public static final int STATE_ACTIVE = 4; // 0x4
     field public static final int STATE_DIALING = 3; // 0x3
     field public static final int STATE_DISCONNECTED = 6; // 0x6
     field public static final int STATE_HOLDING = 5; // 0x5
     field public static final int STATE_INITIALIZING = 0; // 0x0
     field public static final int STATE_NEW = 1; // 0x1
+    field public static final int STATE_PULLING_CALL = 7; // 0x7
     field public static final int STATE_RINGING = 2; // 0x2
   }
 
@@ -36261,7 +36402,9 @@
     method public java.lang.String getReason();
     method public int getTone();
     method public void writeToParcel(android.os.Parcel, int);
+    field public static final int ANSWERED_ELSEWHERE = 11; // 0xb
     field public static final int BUSY = 7; // 0x7
+    field public static final int CALL_PULLED = 12; // 0xc
     field public static final int CANCELED = 4; // 0x4
     field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
     field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
@@ -36297,6 +36440,7 @@
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
     method public void onCallRemoved(android.telecom.Call);
     method public void onCanAddCallChanged(boolean);
+    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
     method public void onSilenceRinger();
     method public final void setAudioRoute(int);
     method public final void setMuted(boolean);
@@ -36419,6 +36563,7 @@
     method public void onConferenceableConnectionsChanged(android.telecom.RemoteConference, java.util.List<android.telecom.RemoteConnection>);
     method public void onConnectionAdded(android.telecom.RemoteConference, android.telecom.RemoteConnection);
     method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConference, int);
+    method public void onConnectionPropertiesChanged(android.telecom.RemoteConference, int);
     method public void onConnectionRemoved(android.telecom.RemoteConference, android.telecom.RemoteConnection);
     method public void onDestroyed(android.telecom.RemoteConference);
     method public void onDisconnected(android.telecom.RemoteConference, android.telecom.DisconnectCause);
@@ -36437,6 +36582,7 @@
     method public android.telecom.RemoteConference getConference();
     method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
     method public int getConnectionCapabilities();
+    method public int getConnectionProperties();
     method public android.telecom.DisconnectCause getDisconnectCause();
     method public final android.os.Bundle getExtras();
     method public int getState();
@@ -36448,6 +36594,7 @@
     method public boolean isVoipAudioMode();
     method public void playDtmfTone(char);
     method public void postDialContinue(boolean);
+    method public void pullExternalCall();
     method public void registerCallback(android.telecom.RemoteConnection.Callback);
     method public void registerCallback(android.telecom.RemoteConnection.Callback, android.os.Handler);
     method public void reject();
@@ -36464,6 +36611,8 @@
     method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
     method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
     method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
+    method public void onConnectionEvent(android.telecom.RemoteConnection, java.lang.String, android.os.Bundle);
+    method public void onConnectionPropertiesChanged(android.telecom.RemoteConnection, int);
     method public void onDestroyed(android.telecom.RemoteConnection);
     method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
     method public void onExtrasChanged(android.telecom.RemoteConnection, android.os.Bundle);
@@ -36560,6 +36709,7 @@
     field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
     field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
     field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+    field public static final java.lang.String METADATA_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS";
     field public static final java.lang.String METADATA_IN_CALL_SERVICE_RINGING = "android.telecom.IN_CALL_SERVICE_RINGING";
     field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
     field public static final int PRESENTATION_ALLOWED = 1; // 0x1
@@ -36614,9 +36764,11 @@
     field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
     field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
     field public static final java.lang.String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
+    field public static final java.lang.String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call";
     field public static final java.lang.String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
     field public static final java.lang.String KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL = "allow_emergency_video_calls_bool";
     field public static final java.lang.String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
+    field public static final java.lang.String KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL = "allow_merge_wifi_calls_when_vowifi_off_bool";
     field public static final java.lang.String KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL = "allow_non_emergency_calls_in_ecm_bool";
     field public static final java.lang.String KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL = "always_show_emergency_alert_onoff_bool";
     field public static final java.lang.String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
@@ -36648,6 +36800,7 @@
     field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool";
     field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string";
     field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool";
+    field public static final java.lang.String KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL = "drop_video_call_when_answering_audio_call_bool";
     field public static final java.lang.String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
     field public static final java.lang.String KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT = "duration_blocking_disabled_after_emergency_int";
     field public static final java.lang.String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
@@ -36705,6 +36858,7 @@
     field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
     field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
     field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
+    field public static final java.lang.String KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL = "treat_downgraded_video_calls_as_video_calls_bool";
     field public static final java.lang.String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
     field public static final java.lang.String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
     field public static final java.lang.String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
@@ -37289,12 +37443,15 @@
     field public static final int NETWORK_TYPE_EVDO_A = 6; // 0x6
     field public static final int NETWORK_TYPE_EVDO_B = 12; // 0xc
     field public static final int NETWORK_TYPE_GPRS = 1; // 0x1
+    field public static final int NETWORK_TYPE_GSM = 16; // 0x10
     field public static final int NETWORK_TYPE_HSDPA = 8; // 0x8
     field public static final int NETWORK_TYPE_HSPA = 10; // 0xa
     field public static final int NETWORK_TYPE_HSPAP = 15; // 0xf
     field public static final int NETWORK_TYPE_HSUPA = 9; // 0x9
     field public static final int NETWORK_TYPE_IDEN = 11; // 0xb
+    field public static final int NETWORK_TYPE_IWLAN = 18; // 0x12
     field public static final int NETWORK_TYPE_LTE = 13; // 0xd
+    field public static final int NETWORK_TYPE_TD_SCDMA = 17; // 0x11
     field public static final int NETWORK_TYPE_UMTS = 3; // 0x3
     field public static final int NETWORK_TYPE_UNKNOWN = 0; // 0x0
     field public static final int PHONE_TYPE_CDMA = 2; // 0x2
@@ -40095,7 +40252,10 @@
     method public boolean equals(android.util.DisplayMetrics);
     method public void setTo(android.util.DisplayMetrics);
     method public void setToDefaults();
+    field public static final int DENSITY_260 = 260; // 0x104
     field public static final int DENSITY_280 = 280; // 0x118
+    field public static final int DENSITY_300 = 300; // 0x12c
+    field public static final int DENSITY_340 = 340; // 0x154
     field public static final int DENSITY_360 = 360; // 0x168
     field public static final int DENSITY_400 = 400; // 0x190
     field public static final int DENSITY_420 = 420; // 0x1a4
@@ -41425,6 +41585,10 @@
     field public static final int KEYCODE_SWITCH_CHARSET = 95; // 0x5f
     field public static final int KEYCODE_SYM = 63; // 0x3f
     field public static final int KEYCODE_SYSRQ = 120; // 0x78
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_DOWN = 281; // 0x119
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_LEFT = 282; // 0x11a
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_RIGHT = 283; // 0x11b
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_UP = 280; // 0x118
     field public static final int KEYCODE_T = 48; // 0x30
     field public static final int KEYCODE_TAB = 61; // 0x3d
     field public static final int KEYCODE_TV = 170; // 0xaa
@@ -44515,6 +44679,7 @@
     method public boolean clearMetaKeyStates(int);
     method public void closeConnection();
     method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public boolean commitText(java.lang.CharSequence, int);
     method public boolean deleteSurroundingText(int, int);
@@ -44624,6 +44789,7 @@
     field public static final int IME_NULL = 0; // 0x0
     field public int actionId;
     field public java.lang.CharSequence actionLabel;
+    field public java.lang.String[] contentMimeTypes;
     field public android.os.Bundle extras;
     field public int fieldId;
     field public java.lang.String fieldName;
@@ -44683,6 +44849,7 @@
     method public abstract boolean clearMetaKeyStates(int);
     method public abstract void closeConnection();
     method public abstract boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public abstract boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public abstract boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public abstract boolean commitText(java.lang.CharSequence, int);
     method public abstract boolean deleteSurroundingText(int, int);
@@ -44708,6 +44875,7 @@
     field public static final int CURSOR_UPDATE_MONITOR = 2; // 0x2
     field public static final int GET_EXTRACTED_TEXT_MONITOR = 1; // 0x1
     field public static final int GET_TEXT_WITH_STYLES = 1; // 0x1
+    field public static final int INPUT_CONTENT_GRANT_READ_URI_PERMISSION = 1; // 0x1
   }
 
   public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
@@ -44716,6 +44884,7 @@
     method public boolean clearMetaKeyStates(int);
     method public void closeConnection();
     method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public boolean commitText(java.lang.CharSequence, int);
     method public boolean deleteSurroundingText(int, int);
@@ -44740,6 +44909,19 @@
     method public void setTarget(android.view.inputmethod.InputConnection);
   }
 
+  public final class InputContentInfo implements android.os.Parcelable {
+    ctor public InputContentInfo(android.net.Uri, android.content.ClipDescription);
+    ctor public InputContentInfo(android.net.Uri, android.content.ClipDescription, android.net.Uri);
+    method public int describeContents();
+    method public android.net.Uri getContentUri();
+    method public android.content.ClipDescription getDescription();
+    method public android.net.Uri getLinkUri();
+    method public void releasePermission();
+    method public void requestPermission();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR;
+  }
+
   public abstract interface InputMethod {
     method public abstract void attachToken(android.os.IBinder);
     method public abstract void bindInput(android.view.inputmethod.InputBinding);
diff --git a/api/system-current.txt b/api/system-current.txt
index d1c0394..16c75cc 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -504,6 +504,7 @@
     field public static final int colorPressedHighlight = 16843661; // 0x101038d
     field public static final int colorPrimary = 16843827; // 0x1010433
     field public static final int colorPrimaryDark = 16843828; // 0x1010434
+    field public static final int colorSecondary = 16844080; // 0x1010530
     field public static final int columnCount = 16843639; // 0x1010377
     field public static final int columnDelay = 16843215; // 0x10101cf
     field public static final int columnOrderPreserved = 16843640; // 0x1010378
@@ -527,7 +528,9 @@
     field public static final int contentInsetStart = 16843859; // 0x1010453
     field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522
     field public static final int contextClickable = 16844007; // 0x10104e7
+    field public static final int contextDescription = 16844078; // 0x101052e
     field public static final int contextPopupMenuStyle = 16844033; // 0x1010501
+    field public static final int contextUri = 16844077; // 0x101052d
     field public static final int controlX1 = 16843772; // 0x10103fc
     field public static final int controlX2 = 16843774; // 0x10103fe
     field public static final int controlY1 = 16843773; // 0x10103fd
@@ -1146,6 +1149,7 @@
     field public static final int rotation = 16843558; // 0x1010326
     field public static final int rotationX = 16843559; // 0x1010327
     field public static final int rotationY = 16843560; // 0x1010328
+    field public static final int roundIcon = 16844076; // 0x101052c
     field public static final int rowCount = 16843637; // 0x1010375
     field public static final int rowDelay = 16843216; // 0x10101d0
     field public static final int rowEdgeFlags = 16843329; // 0x1010241
@@ -1217,11 +1221,16 @@
     field public static final int shareInterpolator = 16843195; // 0x10101bb
     field public static final int sharedUserId = 16842763; // 0x101000b
     field public static final int sharedUserLabel = 16843361; // 0x1010261
+    field public static final int shortcutDisabledMessage = 16844075; // 0x101052b
+    field public static final int shortcutId = 16844072; // 0x1010528
+    field public static final int shortcutLongLabel = 16844074; // 0x101052a
+    field public static final int shortcutShortLabel = 16844073; // 0x1010529
     field public static final int shouldDisableView = 16843246; // 0x10101ee
     field public static final int showAsAction = 16843481; // 0x10102d9
     field public static final int showDefault = 16843258; // 0x10101fa
     field public static final int showDividers = 16843561; // 0x1010329
     field public static final int showForAllUsers = 16844015; // 0x10104ef
+    field public static final int showMetadataInPreview = 16844079; // 0x101052f
     field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9
     field public static final int showSilent = 16843259; // 0x10101fb
     field public static final int showText = 16843949; // 0x10104ad
@@ -3832,6 +3841,7 @@
     method public void moveTaskToFront(int, int);
     method public void moveTaskToFront(int, int, android.os.Bundle);
     method public deprecated void restartPackage(java.lang.String);
+    method public static void setVrThread(int);
     method public void setWatchHeapLimit(long);
     field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
     field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1
@@ -5185,12 +5195,14 @@
     method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
     method public java.lang.CharSequence getCancelLabel();
     method public java.lang.CharSequence getConfirmLabel();
+    method public boolean getHintDisplayActionInline();
     method public boolean getHintLaunchesActivity();
     method public java.lang.CharSequence getInProgressLabel();
     method public boolean isAvailableOffline();
     method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
     method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
     method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
+    method public android.app.Notification.Action.WearableExtender setHintDisplayActionInline(boolean);
     method public android.app.Notification.Action.WearableExtender setHintLaunchesActivity(boolean);
     method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
   }
@@ -5904,7 +5916,10 @@
     method public android.content.pm.ServiceInfo getServiceInfo();
     method public java.lang.String getServiceName();
     method public java.lang.String getSettingsActivity();
+    method public boolean getShowMetadataInPreview();
     method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
+    method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
+    method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
     method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
     method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
     method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
@@ -6767,11 +6782,13 @@
     method public android.content.res.Configuration getConfiguration();
     method public int getEventType();
     method public java.lang.String getPackageName();
+    method public java.lang.String getShortcutId();
     method public long getTimeStamp();
     field public static final int CONFIGURATION_CHANGE = 5; // 0x5
     field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
     field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
     field public static final int NONE = 0; // 0x0
+    field public static final int SHORTCUT_INVOCATION = 8; // 0x8
     field public static final int USER_INTERACTION = 7; // 0x7
   }
 
@@ -8515,6 +8532,7 @@
     field public static final java.lang.String RESTRICTIONS_SERVICE = "restrictions";
     field public static final java.lang.String SEARCH_SERVICE = "search";
     field public static final java.lang.String SENSOR_SERVICE = "sensor";
+    field public static final java.lang.String SHORTCUT_SERVICE = "shortcut";
     field public static final java.lang.String STORAGE_SERVICE = "storage";
     field public static final java.lang.String SYSTEM_HEALTH_SERVICE = "systemhealth";
     field public static final java.lang.String TELECOM_SERVICE = "telecom";
@@ -9855,13 +9873,20 @@
 
   public class LauncherApps {
     method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
+    method public android.graphics.drawable.Drawable getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, int);
+    method public android.graphics.drawable.Drawable getShortcutIconDrawable(android.content.pm.ShortcutInfo, int);
+    method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
+    method public boolean hasShortcutHostPermission();
     method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
     method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
+    method public void pinShortcuts(java.lang.String, java.util.List<java.lang.String>, android.os.UserHandle);
     method public void registerCallback(android.content.pm.LauncherApps.Callback);
     method public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler);
     method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
     method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
     method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
+    method public void startShortcut(java.lang.String, java.lang.String, android.graphics.Rect, android.os.Bundle, android.os.UserHandle);
+    method public void startShortcut(android.content.pm.ShortcutInfo, android.graphics.Rect, android.os.Bundle);
     method public void unregisterCallback(android.content.pm.LauncherApps.Callback);
   }
 
@@ -9874,6 +9899,20 @@
     method public void onPackagesSuspended(java.lang.String[], android.os.UserHandle);
     method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
     method public void onPackagesUnsuspended(java.lang.String[], android.os.UserHandle);
+    method public void onShortcutsChanged(java.lang.String, java.util.List<android.content.pm.ShortcutInfo>, android.os.UserHandle);
+  }
+
+  public static class LauncherApps.ShortcutQuery {
+    ctor public LauncherApps.ShortcutQuery();
+    method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
+    method public android.content.pm.LauncherApps.ShortcutQuery setChangedSince(long);
+    method public android.content.pm.LauncherApps.ShortcutQuery setPackage(java.lang.String);
+    method public android.content.pm.LauncherApps.ShortcutQuery setQueryFlags(int);
+    method public android.content.pm.LauncherApps.ShortcutQuery setShortcutIds(java.util.List<java.lang.String>);
+    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
+    field public static final int FLAG_MATCH_DYNAMIC = 1; // 0x1
+    field public static final int FLAG_MATCH_MANIFEST = 8; // 0x8
+    field public static final int FLAG_MATCH_PINNED = 2; // 0x2
   }
 
   public class PackageInfo implements android.os.Parcelable {
@@ -10444,6 +10483,63 @@
     field public java.lang.String permission;
   }
 
+  public final class ShortcutInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public android.content.ComponentName getActivity();
+    method public java.util.Set<java.lang.String> getCategories();
+    method public java.lang.CharSequence getDisabledMessage();
+    method public android.os.PersistableBundle getExtras();
+    method public java.lang.String getId();
+    method public android.content.Intent getIntent();
+    method public long getLastChangedTimestamp();
+    method public java.lang.CharSequence getLongLabel();
+    method public java.lang.String getPackage();
+    method public int getRank();
+    method public java.lang.CharSequence getShortLabel();
+    method public android.os.UserHandle getUserHandle();
+    method public boolean hasKeyFieldsOnly();
+    method public boolean isDeclaredInManifest();
+    method public boolean isDynamic();
+    method public boolean isEnabled();
+    method public boolean isImmutable();
+    method public boolean isPinned();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.content.pm.ShortcutInfo> CREATOR;
+    field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
+  }
+
+  public static class ShortcutInfo.Builder {
+    ctor public ShortcutInfo.Builder(android.content.Context, java.lang.String);
+    method public android.content.pm.ShortcutInfo build();
+    method public android.content.pm.ShortcutInfo.Builder setActivity(android.content.ComponentName);
+    method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.Set<java.lang.String>);
+    method public android.content.pm.ShortcutInfo.Builder setDisabledMessage(java.lang.CharSequence);
+    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
+    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
+    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
+    method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence);
+    method public android.content.pm.ShortcutInfo.Builder setRank(int);
+    method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence);
+  }
+
+  public class ShortcutManager {
+    method public boolean addDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+    method public void disableShortcuts(java.util.List<java.lang.String>);
+    method public void disableShortcuts(java.util.List<java.lang.String>, java.lang.CharSequence);
+    method public void enableShortcuts(java.util.List<java.lang.String>);
+    method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
+    method public int getIconMaxHeight();
+    method public int getIconMaxWidth();
+    method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
+    method public int getMaxShortcutCountPerActivity();
+    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
+    method public void removeAllDynamicShortcuts();
+    method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
+    method public void reportShortcutUsed(java.lang.String);
+    method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+    method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+  }
+
   public class Signature implements android.os.Parcelable {
     ctor public Signature(byte[]);
     ctor public Signature(java.lang.String);
@@ -25916,6 +26012,33 @@
 
 package android.net.metrics {
 
+  public final class ApfProgramEvent implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.metrics.ApfProgramEvent> CREATOR;
+    field public static final int FLAG_HAS_IPV4_ADDRESS = 1; // 0x1
+    field public static final int FLAG_MULTICAST_FILTER_ON = 0; // 0x0
+    field public final int currentRas;
+    field public final int filteredRas;
+    field public final int flags;
+    field public final long lifetime;
+    field public final int programLength;
+  }
+
+  public final class ApfStats implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.metrics.ApfStats> CREATOR;
+    field public final int droppedRas;
+    field public final long durationMs;
+    field public final int matchingRas;
+    field public final int maxProgramSize;
+    field public final int parseErrors;
+    field public final int programUpdates;
+    field public final int receivedRas;
+    field public final int zeroLifetimeRas;
+  }
+
   public final class DefaultNetworkEvent implements android.os.Parcelable {
     method public int describeContents();
     method public static void logEvent(int, int[], int, boolean, boolean);
@@ -25933,6 +26056,7 @@
     method public static void logStateEvent(java.lang.String, java.lang.String);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator<android.net.metrics.DhcpClientEvent> CREATOR;
+    field public final int durationMs;
     field public final java.lang.String ifName;
     field public final java.lang.String msg;
   }
@@ -26024,6 +26148,18 @@
     field public final int netId;
   }
 
+  public final class RaEvent implements android.os.Parcelable {
+    method public int describeContents();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.net.metrics.RaEvent> CREATOR;
+    field public final long dnsslLifetime;
+    field public final long prefixPreferredLifetime;
+    field public final long prefixValidLifetime;
+    field public final long rdnssLifetime;
+    field public final long routeInfoLifetime;
+    field public final long routerLifetime;
+  }
+
   public final class ValidationProbeEvent implements android.os.Parcelable {
     method public int describeContents();
     method public static void logEvent(int, long, int, int);
@@ -30709,6 +30845,7 @@
     field public static final int LOLLIPOP_MR1 = 22; // 0x16
     field public static final int M = 23; // 0x17
     field public static final int N = 24; // 0x18
+    field public static final int N_MR1 = 25; // 0x19
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
@@ -31544,6 +31681,7 @@
     method public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException;
     method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException;
     method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException;
+    method public static void rebootWipeAb(android.content.Context, java.io.File, java.lang.String) throws java.io.IOException;
     method public static void rebootWipeCache(android.content.Context) throws java.io.IOException;
     method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException;
     method public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException;
@@ -31784,6 +31922,7 @@
     method public android.os.Bundle getUserRestrictions();
     method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
     method public boolean hasUserRestriction(java.lang.String);
+    method public boolean isDemoUser();
     method public boolean isManagedProfile();
     method public boolean isManagedProfile(int);
     method public boolean isQuietModeEnabled(android.os.UserHandle);
@@ -32032,6 +32171,7 @@
     method public boolean isObbMounted(java.lang.String);
     method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
     method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
+    field public static final java.lang.String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
   }
 
   public final class StorageVolume implements android.os.Parcelable {
@@ -33213,6 +33353,7 @@
   public static class CallLog.Calls implements android.provider.BaseColumns {
     ctor public CallLog.Calls();
     method public static java.lang.String getLastOutgoingCall(android.content.Context);
+    field public static final int ANSWERED_EXTERNALLY_TYPE = 7; // 0x7
     field public static final int BLOCKED_TYPE = 6; // 0x6
     field public static final java.lang.String CACHED_FORMATTED_NUMBER = "formatted_number";
     field public static final java.lang.String CACHED_LOOKUP_URI = "lookup_uri";
@@ -33235,6 +33376,7 @@
     field public static final java.lang.String DURATION = "duration";
     field public static final java.lang.String EXTRA_CALL_TYPE_FILTER = "android.provider.extra.CALL_TYPE_FILTER";
     field public static final java.lang.String FEATURES = "features";
+    field public static final int FEATURES_PULLED_EXTERNALLY = 2; // 0x2
     field public static final int FEATURES_VIDEO = 1; // 0x1
     field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
     field public static final int INCOMING_TYPE = 1; // 0x1
@@ -35072,6 +35214,7 @@
     field public static final java.lang.String DATA_ROAMING = "data_roaming";
     field public static final java.lang.String DEBUG_APP = "debug_app";
     field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
+    field public static final java.lang.String DEVICE_NAME = "device_name";
     field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
     field public static final java.lang.String HTTP_PROXY = "http_proxy";
     field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
@@ -35660,6 +35803,7 @@
     field public static final java.lang.String ACTION_NEW_VOICEMAIL = "android.intent.action.NEW_VOICEMAIL";
     field public static final java.lang.String ACTION_SYNC_VOICEMAIL = "android.provider.action.SYNC_VOICEMAIL";
     field public static final java.lang.String AUTHORITY = "com.android.voicemail";
+    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.provider.extra.PHONE_ACCOUNT_HANDLE";
     field public static final java.lang.String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
     field public static final java.lang.String PARAM_KEY_SOURCE_PACKAGE = "source_package";
   }
@@ -35668,6 +35812,9 @@
     method public static android.net.Uri buildSourceUri(java.lang.String);
     field public static final java.lang.String CONFIGURATION_STATE = "configuration_state";
     field public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2; // 0x2
+    field public static final int CONFIGURATION_STATE_CONFIGURING = 3; // 0x3
+    field public static final int CONFIGURATION_STATE_DISABLED = 5; // 0x5
+    field public static final int CONFIGURATION_STATE_FAILED = 4; // 0x4
     field public static final int CONFIGURATION_STATE_NOT_CONFIGURED = 1; // 0x1
     field public static final int CONFIGURATION_STATE_OK = 0; // 0x0
     field public static final android.net.Uri CONTENT_URI;
@@ -35692,6 +35839,7 @@
     field public static final int QUOTA_UNAVAILABLE = -1; // 0xffffffff
     field public static final java.lang.String SETTINGS_URI = "settings_uri";
     field public static final java.lang.String SOURCE_PACKAGE = "source_package";
+    field public static final java.lang.String SOURCE_TYPE = "source_type";
     field public static final java.lang.String VOICEMAIL_ACCESS_URI = "voicemail_access_uri";
   }
 
@@ -38772,10 +38920,15 @@
     method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
     method public void playDtmfTone(char);
     method public void postDialContinue(boolean);
+    method public void pullExternalCall();
+    method public final void putExtras(android.os.Bundle);
     method public void registerCallback(android.telecom.Call.Callback);
     method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
     method public void reject(boolean, java.lang.String);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
     method public deprecated void removeListener(android.telecom.Call.Listener);
+    method public void sendCallEvent(java.lang.String, android.os.Bundle);
     method public void splitFromConference();
     method public void stopDtmfTone();
     method public void swapConference();
@@ -38790,6 +38943,7 @@
     field public static final int STATE_HOLDING = 3; // 0x3
     field public static final int STATE_NEW = 0; // 0x0
     field public static final deprecated int STATE_PRE_DIAL_WAIT = 8; // 0x8
+    field public static final int STATE_PULLING_CALL = 11; // 0xb
     field public static final int STATE_RINGING = 2; // 0x2
     field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
   }
@@ -38800,6 +38954,7 @@
     method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
     method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
     method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
+    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
     method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
     method public void onParentChanged(android.telecom.Call, android.telecom.Call);
     method public void onPostDialWait(android.telecom.Call, java.lang.String);
@@ -38830,6 +38985,7 @@
     method public static java.lang.String propertiesToString(int);
     field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 4194304; // 0x400000
     field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
+    field public static final int CAPABILITY_CAN_PULL_CALL = 8388608; // 0x800000
     field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
     field public static final int CAPABILITY_HOLD = 1; // 0x1
     field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
@@ -38849,7 +39005,9 @@
     field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
     field public static final int PROPERTY_ENTERPRISE_CALL = 32; // 0x20
     field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
+    field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 128; // 0x80
     field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
+    field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
     field public static final int PROPERTY_WIFI = 8; // 0x8
   }
 
@@ -38906,6 +39064,7 @@
     method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
     method public final deprecated long getConnectTimeMillis();
     method public final int getConnectionCapabilities();
+    method public final int getConnectionProperties();
     method public final long getConnectionTime();
     method public final java.util.List<android.telecom.Connection> getConnections();
     method public final android.telecom.DisconnectCause getDisconnectCause();
@@ -38920,6 +39079,7 @@
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
     method public void onConnectionAdded(android.telecom.Connection);
     method public void onDisconnect();
+    method public void onExtrasChanged(android.os.Bundle);
     method public void onHold();
     method public void onMerge(android.telecom.Connection);
     method public void onMerge();
@@ -38928,11 +39088,15 @@
     method public void onStopDtmfTone();
     method public void onSwap();
     method public void onUnhold();
+    method public final void putExtras(android.os.Bundle);
     method public final void removeConnection(android.telecom.Connection);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
     method public final void setActive();
     method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
     method public final deprecated void setConnectTimeMillis(long);
     method public final void setConnectionCapabilities(int);
+    method public final void setConnectionProperties(int);
     method public final void setConnectionTime(long);
     method public final void setDialing();
     method public final void setDisconnected(android.telecom.DisconnectCause);
@@ -38963,6 +39127,7 @@
     method public final android.telecom.Conference getConference();
     method public final java.util.List<android.telecom.Conferenceable> getConferenceables();
     method public final int getConnectionCapabilities();
+    method public final int getConnectionProperties();
     method public final android.telecom.DisconnectCause getDisconnectCause();
     method public final android.os.Bundle getExtras();
     method public final int getState();
@@ -38974,16 +39139,24 @@
     method public void onAnswer();
     method public deprecated void onAudioStateChanged(android.telecom.AudioState);
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
+    method public void onCallEvent(java.lang.String, android.os.Bundle);
     method public void onDisconnect();
+    method public void onExtrasChanged(android.os.Bundle);
     method public void onHold();
     method public void onPlayDtmfTone(char);
     method public void onPostDialContinue(boolean);
+    method public void onPullExternalCall();
     method public void onReject();
     method public void onReject(java.lang.String);
     method public void onSeparate();
     method public void onStateChanged(int);
     method public void onStopDtmfTone();
     method public void onUnhold();
+    method public static java.lang.String propertiesToString(int);
+    method public final void putExtras(android.os.Bundle);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
+    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
     method public final void setActive();
     method public final void setAddress(android.net.Uri, int);
     method public final void setAudioModeIsVoip(boolean);
@@ -38991,6 +39164,7 @@
     method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
     method public final void setConferenceables(java.util.List<android.telecom.Conferenceable>);
     method public final void setConnectionCapabilities(int);
+    method public final void setConnectionProperties(int);
     method public final void setDialing();
     method public final void setDisconnected(android.telecom.DisconnectCause);
     method public final void setExtras(android.os.Bundle);
@@ -38999,6 +39173,7 @@
     method public final void setNextPostDialChar(char);
     method public final void setOnHold();
     method public final void setPostDialWait(java.lang.String);
+    method public final void setPulling();
     method public final void setRingbackRequested(boolean);
     method public final void setRinging();
     method public final void setStatusHints(android.telecom.StatusHints);
@@ -39007,6 +39182,7 @@
     method public static java.lang.String stateToString(int);
     field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000
     field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
+    field public static final int CAPABILITY_CAN_PULL_CALL = 16777216; // 0x1000000
     field public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 4194304; // 0x400000
     field public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 524288; // 0x80000
     field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
@@ -39024,15 +39200,21 @@
     field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
     field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
     field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
+    field public static final java.lang.String EVENT_CALL_MERGE_FAILED = "android.telecom.event.CALL_MERGE_FAILED";
+    field public static final java.lang.String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
+    field public static final java.lang.String EXTRA_ANSWERING_DROPS_FG_CALL = "android.telecom.extra.ANSWERING_DROPS_FG_CALL";
     field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
     field public static final java.lang.String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS";
     field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
+    field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 32; // 0x20
+    field public static final int PROPERTY_IS_EXTERNAL_CALL = 16; // 0x10
     field public static final int STATE_ACTIVE = 4; // 0x4
     field public static final int STATE_DIALING = 3; // 0x3
     field public static final int STATE_DISCONNECTED = 6; // 0x6
     field public static final int STATE_HOLDING = 5; // 0x5
     field public static final int STATE_INITIALIZING = 0; // 0x0
     field public static final int STATE_NEW = 1; // 0x1
+    field public static final int STATE_PULLING_CALL = 7; // 0x7
     field public static final int STATE_RINGING = 2; // 0x2
   }
 
@@ -39110,7 +39292,9 @@
     method public java.lang.String getReason();
     method public int getTone();
     method public void writeToParcel(android.os.Parcel, int);
+    field public static final int ANSWERED_ELSEWHERE = 11; // 0xb
     field public static final int BUSY = 7; // 0x7
+    field public static final int CALL_PULLED = 12; // 0xc
     field public static final int CANCELED = 4; // 0x4
     field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
     field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
@@ -39147,6 +39331,7 @@
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
     method public void onCallRemoved(android.telecom.Call);
     method public void onCanAddCallChanged(boolean);
+    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
     method public deprecated void onPhoneCreated(android.telecom.Phone);
     method public deprecated void onPhoneDestroyed(android.telecom.Phone);
     method public void onSilenceRinger();
@@ -39184,14 +39369,16 @@
   }
 
   public class ParcelableCallAnalytics implements android.os.Parcelable {
-    ctor public ParcelableCallAnalytics(long, long, int, boolean, boolean, int, int, boolean, java.lang.String, boolean);
+    ctor public ParcelableCallAnalytics(long, long, int, boolean, boolean, int, int, boolean, java.lang.String, boolean, java.util.List<android.telecom.ParcelableCallAnalytics.AnalyticsEvent>, java.util.List<android.telecom.ParcelableCallAnalytics.EventTiming>);
     ctor public ParcelableCallAnalytics(android.os.Parcel);
+    method public java.util.List<android.telecom.ParcelableCallAnalytics.AnalyticsEvent> analyticsEvents();
     method public int describeContents();
     method public long getCallDurationMillis();
     method public int getCallTechnologies();
     method public int getCallTerminationCode();
     method public int getCallType();
     method public java.lang.String getConnectionService();
+    method public java.util.List<android.telecom.ParcelableCallAnalytics.EventTiming> getEventTimings();
     method public long getStartTimeMillis();
     method public boolean isAdditionalCall();
     method public boolean isCreatedFromExistingConnection();
@@ -39212,6 +39399,73 @@
     field public static final int THIRD_PARTY_PHONE = 16; // 0x10
   }
 
+  public static final class ParcelableCallAnalytics.AnalyticsEvent implements android.os.Parcelable {
+    ctor public ParcelableCallAnalytics.AnalyticsEvent(int, long);
+    method public int describeContents();
+    method public int getEventName();
+    method public long getTimeSinceLastEvent();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final int AUDIO_ROUTE_BT = 204; // 0xcc
+    field public static final int AUDIO_ROUTE_EARPIECE = 205; // 0xcd
+    field public static final int AUDIO_ROUTE_HEADSET = 206; // 0xce
+    field public static final int AUDIO_ROUTE_SPEAKER = 207; // 0xcf
+    field public static final int BIND_CS = 5; // 0x5
+    field public static final int BLOCK_CHECK_FINISHED = 105; // 0x69
+    field public static final int BLOCK_CHECK_INITIATED = 104; // 0x68
+    field public static final int CONFERENCE_WITH = 300; // 0x12c
+    field public static final android.os.Parcelable.Creator<android.telecom.ParcelableCallAnalytics.AnalyticsEvent> CREATOR;
+    field public static final int CS_BOUND = 6; // 0x6
+    field public static final int DIRECT_TO_VM_FINISHED = 103; // 0x67
+    field public static final int DIRECT_TO_VM_INITIATED = 102; // 0x66
+    field public static final int FILTERING_COMPLETED = 107; // 0x6b
+    field public static final int FILTERING_INITIATED = 106; // 0x6a
+    field public static final int FILTERING_TIMED_OUT = 108; // 0x6c
+    field public static final int MUTE = 202; // 0xca
+    field public static final int REMOTELY_HELD = 402; // 0x192
+    field public static final int REMOTELY_UNHELD = 403; // 0x193
+    field public static final int REQUEST_ACCEPT = 7; // 0x7
+    field public static final int REQUEST_HOLD = 400; // 0x190
+    field public static final int REQUEST_PULL = 500; // 0x1f4
+    field public static final int REQUEST_REJECT = 8; // 0x8
+    field public static final int REQUEST_UNHOLD = 401; // 0x191
+    field public static final int SCREENING_COMPLETED = 101; // 0x65
+    field public static final int SCREENING_SENT = 100; // 0x64
+    field public static final int SET_ACTIVE = 1; // 0x1
+    field public static final int SET_DIALING = 4; // 0x4
+    field public static final int SET_DISCONNECTED = 2; // 0x2
+    field public static final int SET_HOLD = 404; // 0x194
+    field public static final int SET_PARENT = 302; // 0x12e
+    field public static final int SET_SELECT_PHONE_ACCOUNT = 0; // 0x0
+    field public static final int SILENCE = 201; // 0xc9
+    field public static final int SKIP_RINGING = 200; // 0xc8
+    field public static final int SPLIT_CONFERENCE = 301; // 0x12d
+    field public static final int START_CONNECTION = 3; // 0x3
+    field public static final int SWAP = 405; // 0x195
+    field public static final int UNMUTE = 203; // 0xcb
+  }
+
+  public static final class ParcelableCallAnalytics.EventTiming implements android.os.Parcelable {
+    ctor public ParcelableCallAnalytics.EventTiming(int, long);
+    method public int describeContents();
+    method public int getName();
+    method public long getTime();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final int ACCEPT_TIMING = 0; // 0x0
+    field public static final int BIND_CS_TIMING = 6; // 0x6
+    field public static final int BLOCK_CHECK_FINISHED_TIMING = 9; // 0x9
+    field public static final android.os.Parcelable.Creator<android.telecom.ParcelableCallAnalytics.EventTiming> CREATOR;
+    field public static final int DIRECT_TO_VM_FINISHED_TIMING = 8; // 0x8
+    field public static final int DISCONNECT_TIMING = 2; // 0x2
+    field public static final int FILTERING_COMPLETED_TIMING = 10; // 0xa
+    field public static final int FILTERING_TIMED_OUT_TIMING = 11; // 0xb
+    field public static final int HOLD_TIMING = 3; // 0x3
+    field public static final int INVALID = 999999; // 0xf423f
+    field public static final int OUTGOING_TIME_TO_DIALING_TIMING = 5; // 0x5
+    field public static final int REJECT_TIMING = 1; // 0x1
+    field public static final int SCREENING_COMPLETED_TIMING = 7; // 0x7
+    field public static final int UNHOLD_TIMING = 4; // 0x4
+  }
+
   public final deprecated class Phone {
     method public final void addListener(android.telecom.Phone.Listener);
     method public final boolean canAddCall();
@@ -39324,6 +39578,7 @@
     method public void onConferenceableConnectionsChanged(android.telecom.RemoteConference, java.util.List<android.telecom.RemoteConnection>);
     method public void onConnectionAdded(android.telecom.RemoteConference, android.telecom.RemoteConnection);
     method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConference, int);
+    method public void onConnectionPropertiesChanged(android.telecom.RemoteConference, int);
     method public void onConnectionRemoved(android.telecom.RemoteConference, android.telecom.RemoteConnection);
     method public void onDestroyed(android.telecom.RemoteConference);
     method public void onDisconnected(android.telecom.RemoteConference, android.telecom.DisconnectCause);
@@ -39342,6 +39597,7 @@
     method public android.telecom.RemoteConference getConference();
     method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
     method public int getConnectionCapabilities();
+    method public int getConnectionProperties();
     method public android.telecom.DisconnectCause getDisconnectCause();
     method public final android.os.Bundle getExtras();
     method public int getState();
@@ -39353,6 +39609,7 @@
     method public boolean isVoipAudioMode();
     method public void playDtmfTone(char);
     method public void postDialContinue(boolean);
+    method public void pullExternalCall();
     method public void registerCallback(android.telecom.RemoteConnection.Callback);
     method public void registerCallback(android.telecom.RemoteConnection.Callback, android.os.Handler);
     method public void reject();
@@ -39370,6 +39627,8 @@
     method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
     method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
     method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
+    method public void onConnectionEvent(android.telecom.RemoteConnection, java.lang.String, android.os.Bundle);
+    method public void onConnectionPropertiesChanged(android.telecom.RemoteConnection, int);
     method public void onDestroyed(android.telecom.RemoteConnection);
     method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
     method public void onExtrasChanged(android.telecom.RemoteConnection, android.os.Bundle);
@@ -39423,6 +39682,41 @@
     field public static final android.os.Parcelable.Creator<android.telecom.StatusHints> CREATOR;
   }
 
+  public final class TelecomAnalytics implements android.os.Parcelable {
+    ctor public TelecomAnalytics(java.util.List<android.telecom.TelecomAnalytics.SessionTiming>, java.util.List<android.telecom.ParcelableCallAnalytics>);
+    method public int describeContents();
+    method public java.util.List<android.telecom.ParcelableCallAnalytics> getCallAnalytics();
+    method public java.util.List<android.telecom.TelecomAnalytics.SessionTiming> getSessionTimings();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.telecom.TelecomAnalytics> CREATOR;
+  }
+
+  public static final class TelecomAnalytics.SessionTiming implements android.os.Parcelable {
+    ctor public TelecomAnalytics.SessionTiming(int, long);
+    method public int describeContents();
+    method public java.lang.Integer getKey();
+    method public long getTime();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.telecom.TelecomAnalytics.SessionTiming> CREATOR;
+    field public static final int CSW_ADD_CONFERENCE_CALL = 108; // 0x6c
+    field public static final int CSW_HANDLE_CREATE_CONNECTION_COMPLETE = 100; // 0x64
+    field public static final int CSW_REMOVE_CALL = 106; // 0x6a
+    field public static final int CSW_SET_ACTIVE = 101; // 0x65
+    field public static final int CSW_SET_DIALING = 103; // 0x67
+    field public static final int CSW_SET_DISCONNECTED = 104; // 0x68
+    field public static final int CSW_SET_IS_CONFERENCED = 107; // 0x6b
+    field public static final int CSW_SET_ON_HOLD = 105; // 0x69
+    field public static final int CSW_SET_RINGING = 102; // 0x66
+    field public static final int ICA_ANSWER_CALL = 1; // 0x1
+    field public static final int ICA_CONFERENCE = 8; // 0x8
+    field public static final int ICA_DISCONNECT_CALL = 3; // 0x3
+    field public static final int ICA_HOLD_CALL = 4; // 0x4
+    field public static final int ICA_MUTE = 6; // 0x6
+    field public static final int ICA_REJECT_CALL = 2; // 0x2
+    field public static final int ICA_SET_AUDIO_ROUTE = 7; // 0x7
+    field public static final int ICA_UNHOLD_CALL = 5; // 0x5
+  }
+
   public class TelecomManager {
     method public void acceptRingingCall();
     method public void acceptRingingCall(int);
@@ -39432,7 +39726,7 @@
     method public deprecated void clearAccounts();
     method public void clearPhoneAccounts();
     method public android.content.Intent createManageBlockedNumbersIntent();
-    method public java.util.List<android.telecom.ParcelableCallAnalytics> dumpAnalytics();
+    method public android.telecom.TelecomAnalytics dumpAnalytics();
     method public void enablePhoneAccount(android.telecom.PhoneAccountHandle, boolean);
     method public boolean endCall();
     method public android.net.Uri getAdnUriForPhoneAccount(android.telecom.PhoneAccountHandle);
@@ -39493,6 +39787,7 @@
     field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
     field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
     field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+    field public static final java.lang.String METADATA_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS";
     field public static final java.lang.String METADATA_IN_CALL_SERVICE_RINGING = "android.telecom.IN_CALL_SERVICE_RINGING";
     field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
     field public static final int PRESENTATION_ALLOWED = 1; // 0x1
@@ -39549,9 +39844,11 @@
     field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
     field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
     field public static final java.lang.String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
+    field public static final java.lang.String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call";
     field public static final java.lang.String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
     field public static final java.lang.String KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL = "allow_emergency_video_calls_bool";
     field public static final java.lang.String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
+    field public static final java.lang.String KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL = "allow_merge_wifi_calls_when_vowifi_off_bool";
     field public static final java.lang.String KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL = "allow_non_emergency_calls_in_ecm_bool";
     field public static final java.lang.String KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL = "always_show_emergency_alert_onoff_bool";
     field public static final java.lang.String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
@@ -39583,6 +39880,7 @@
     field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool";
     field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string";
     field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool";
+    field public static final java.lang.String KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL = "drop_video_call_when_answering_audio_call_bool";
     field public static final java.lang.String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
     field public static final java.lang.String KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT = "duration_blocking_disabled_after_emergency_int";
     field public static final java.lang.String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
@@ -39640,6 +39938,7 @@
     field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
     field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
     field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
+    field public static final java.lang.String KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL = "treat_downgraded_video_calls_as_video_calls_bool";
     field public static final java.lang.String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
     field public static final java.lang.String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
     field public static final java.lang.String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
@@ -40135,6 +40434,26 @@
     method public void onSubscriptionsChanged();
   }
 
+  public final class TelephonyHistogram implements android.os.Parcelable {
+    ctor public TelephonyHistogram(int, int, int);
+    ctor public TelephonyHistogram(android.telephony.TelephonyHistogram);
+    ctor public TelephonyHistogram(android.os.Parcel);
+    method public void addTimeTaken(int);
+    method public int describeContents();
+    method public int getAverageTime();
+    method public int getBucketCount();
+    method public int[] getBucketCounters();
+    method public int[] getBucketEndPoints();
+    method public int getCategory();
+    method public int getId();
+    method public int getMaxTime();
+    method public int getMinTime();
+    method public int getSampleCount();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.telephony.TelephonyHistogram> CREATOR;
+    field public static final int TELEPHONY_CATEGORY_RIL = 1; // 0x1
+  }
+
   public class TelephonyManager {
     method public void answerRingingCall();
     method public void call(java.lang.String, java.lang.String);
@@ -40184,6 +40503,7 @@
     method public java.lang.String getSimSerialNumber();
     method public int getSimState();
     method public java.lang.String getSubscriberId();
+    method public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms();
     method public java.lang.String getVoiceMailAlphaTag();
     method public java.lang.String getVoiceMailNumber();
     method public int getVoiceNetworkType();
@@ -40272,12 +40592,15 @@
     field public static final int NETWORK_TYPE_EVDO_A = 6; // 0x6
     field public static final int NETWORK_TYPE_EVDO_B = 12; // 0xc
     field public static final int NETWORK_TYPE_GPRS = 1; // 0x1
+    field public static final int NETWORK_TYPE_GSM = 16; // 0x10
     field public static final int NETWORK_TYPE_HSDPA = 8; // 0x8
     field public static final int NETWORK_TYPE_HSPA = 10; // 0xa
     field public static final int NETWORK_TYPE_HSPAP = 15; // 0xf
     field public static final int NETWORK_TYPE_HSUPA = 9; // 0x9
     field public static final int NETWORK_TYPE_IDEN = 11; // 0xb
+    field public static final int NETWORK_TYPE_IWLAN = 18; // 0x12
     field public static final int NETWORK_TYPE_LTE = 13; // 0xd
+    field public static final int NETWORK_TYPE_TD_SCDMA = 17; // 0x11
     field public static final int NETWORK_TYPE_UMTS = 3; // 0x3
     field public static final int NETWORK_TYPE_UNKNOWN = 0; // 0x0
     field public static final int PHONE_TYPE_CDMA = 2; // 0x2
@@ -43095,7 +43418,10 @@
     method public boolean equals(android.util.DisplayMetrics);
     method public void setTo(android.util.DisplayMetrics);
     method public void setToDefaults();
+    field public static final int DENSITY_260 = 260; // 0x104
     field public static final int DENSITY_280 = 280; // 0x118
+    field public static final int DENSITY_300 = 300; // 0x12c
+    field public static final int DENSITY_340 = 340; // 0x154
     field public static final int DENSITY_360 = 360; // 0x168
     field public static final int DENSITY_400 = 400; // 0x190
     field public static final int DENSITY_420 = 420; // 0x1a4
@@ -44425,6 +44751,10 @@
     field public static final int KEYCODE_SWITCH_CHARSET = 95; // 0x5f
     field public static final int KEYCODE_SYM = 63; // 0x3f
     field public static final int KEYCODE_SYSRQ = 120; // 0x78
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_DOWN = 281; // 0x119
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_LEFT = 282; // 0x11a
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_RIGHT = 283; // 0x11b
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_UP = 280; // 0x118
     field public static final int KEYCODE_T = 48; // 0x30
     field public static final int KEYCODE_TAB = 61; // 0x3d
     field public static final int KEYCODE_TV = 170; // 0xaa
@@ -47518,6 +47848,7 @@
     method public boolean clearMetaKeyStates(int);
     method public void closeConnection();
     method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public boolean commitText(java.lang.CharSequence, int);
     method public boolean deleteSurroundingText(int, int);
@@ -47627,6 +47958,7 @@
     field public static final int IME_NULL = 0; // 0x0
     field public int actionId;
     field public java.lang.CharSequence actionLabel;
+    field public java.lang.String[] contentMimeTypes;
     field public android.os.Bundle extras;
     field public int fieldId;
     field public java.lang.String fieldName;
@@ -47686,6 +48018,7 @@
     method public abstract boolean clearMetaKeyStates(int);
     method public abstract void closeConnection();
     method public abstract boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public abstract boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public abstract boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public abstract boolean commitText(java.lang.CharSequence, int);
     method public abstract boolean deleteSurroundingText(int, int);
@@ -47711,6 +48044,7 @@
     field public static final int CURSOR_UPDATE_MONITOR = 2; // 0x2
     field public static final int GET_EXTRACTED_TEXT_MONITOR = 1; // 0x1
     field public static final int GET_TEXT_WITH_STYLES = 1; // 0x1
+    field public static final int INPUT_CONTENT_GRANT_READ_URI_PERMISSION = 1; // 0x1
   }
 
   public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
@@ -47719,6 +48053,7 @@
     method public boolean clearMetaKeyStates(int);
     method public void closeConnection();
     method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public boolean commitText(java.lang.CharSequence, int);
     method public boolean deleteSurroundingText(int, int);
@@ -47743,6 +48078,19 @@
     method public void setTarget(android.view.inputmethod.InputConnection);
   }
 
+  public final class InputContentInfo implements android.os.Parcelable {
+    ctor public InputContentInfo(android.net.Uri, android.content.ClipDescription);
+    ctor public InputContentInfo(android.net.Uri, android.content.ClipDescription, android.net.Uri);
+    method public int describeContents();
+    method public android.net.Uri getContentUri();
+    method public android.content.ClipDescription getDescription();
+    method public android.net.Uri getLinkUri();
+    method public void releasePermission();
+    method public void requestPermission();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR;
+  }
+
   public abstract interface InputMethod {
     method public abstract void attachToken(android.os.IBinder);
     method public abstract void bindInput(android.view.inputmethod.InputBinding);
diff --git a/api/test-current.txt b/api/test-current.txt
index a70e9e3..7fdbb64 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -397,6 +397,7 @@
     field public static final int colorPressedHighlight = 16843661; // 0x101038d
     field public static final int colorPrimary = 16843827; // 0x1010433
     field public static final int colorPrimaryDark = 16843828; // 0x1010434
+    field public static final int colorSecondary = 16844080; // 0x1010530
     field public static final int columnCount = 16843639; // 0x1010377
     field public static final int columnDelay = 16843215; // 0x10101cf
     field public static final int columnOrderPreserved = 16843640; // 0x1010378
@@ -420,7 +421,9 @@
     field public static final int contentInsetStart = 16843859; // 0x1010453
     field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522
     field public static final int contextClickable = 16844007; // 0x10104e7
+    field public static final int contextDescription = 16844078; // 0x101052e
     field public static final int contextPopupMenuStyle = 16844033; // 0x1010501
+    field public static final int contextUri = 16844077; // 0x101052d
     field public static final int controlX1 = 16843772; // 0x10103fc
     field public static final int controlX2 = 16843774; // 0x10103fe
     field public static final int controlY1 = 16843773; // 0x10103fd
@@ -1039,6 +1042,7 @@
     field public static final int rotation = 16843558; // 0x1010326
     field public static final int rotationX = 16843559; // 0x1010327
     field public static final int rotationY = 16843560; // 0x1010328
+    field public static final int roundIcon = 16844076; // 0x101052c
     field public static final int rowCount = 16843637; // 0x1010375
     field public static final int rowDelay = 16843216; // 0x10101d0
     field public static final int rowEdgeFlags = 16843329; // 0x1010241
@@ -1106,11 +1110,16 @@
     field public static final int shareInterpolator = 16843195; // 0x10101bb
     field public static final int sharedUserId = 16842763; // 0x101000b
     field public static final int sharedUserLabel = 16843361; // 0x1010261
+    field public static final int shortcutDisabledMessage = 16844075; // 0x101052b
+    field public static final int shortcutId = 16844072; // 0x1010528
+    field public static final int shortcutLongLabel = 16844074; // 0x101052a
+    field public static final int shortcutShortLabel = 16844073; // 0x1010529
     field public static final int shouldDisableView = 16843246; // 0x10101ee
     field public static final int showAsAction = 16843481; // 0x10102d9
     field public static final int showDefault = 16843258; // 0x10101fa
     field public static final int showDividers = 16843561; // 0x1010329
     field public static final int showForAllUsers = 16844015; // 0x10104ef
+    field public static final int showMetadataInPreview = 16844079; // 0x101052f
     field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9
     field public static final int showSilent = 16843259; // 0x10101fb
     field public static final int showText = 16843949; // 0x10104ad
@@ -3696,6 +3705,7 @@
     method public void moveTaskToFront(int, int);
     method public void moveTaskToFront(int, int, android.os.Bundle);
     method public deprecated void restartPackage(java.lang.String);
+    method public static void setVrThread(int);
     method public void setWatchHeapLimit(long);
     field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
     field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1
@@ -5038,12 +5048,14 @@
     method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
     method public java.lang.CharSequence getCancelLabel();
     method public java.lang.CharSequence getConfirmLabel();
+    method public boolean getHintDisplayActionInline();
     method public boolean getHintLaunchesActivity();
     method public java.lang.CharSequence getInProgressLabel();
     method public boolean isAvailableOffline();
     method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
     method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
     method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
+    method public android.app.Notification.Action.WearableExtender setHintDisplayActionInline(boolean);
     method public android.app.Notification.Action.WearableExtender setHintLaunchesActivity(boolean);
     method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
   }
@@ -5762,7 +5774,10 @@
     method public android.content.pm.ServiceInfo getServiceInfo();
     method public java.lang.String getServiceName();
     method public java.lang.String getSettingsActivity();
+    method public boolean getShowMetadataInPreview();
     method public java.lang.CharSequence loadAuthor(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
+    method public java.lang.CharSequence loadContextDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
+    method public android.net.Uri loadContextUri(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
     method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
     method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
     method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
@@ -6490,11 +6505,13 @@
     method public android.content.res.Configuration getConfiguration();
     method public int getEventType();
     method public java.lang.String getPackageName();
+    method public java.lang.String getShortcutId();
     method public long getTimeStamp();
     field public static final int CONFIGURATION_CHANGE = 5; // 0x5
     field public static final int MOVE_TO_BACKGROUND = 2; // 0x2
     field public static final int MOVE_TO_FOREGROUND = 1; // 0x1
     field public static final int NONE = 0; // 0x0
+    field public static final int SHORTCUT_INVOCATION = 8; // 0x8
     field public static final int USER_INTERACTION = 7; // 0x7
   }
 
@@ -8199,6 +8216,7 @@
     field public static final java.lang.String RESTRICTIONS_SERVICE = "restrictions";
     field public static final java.lang.String SEARCH_SERVICE = "search";
     field public static final java.lang.String SENSOR_SERVICE = "sensor";
+    field public static final java.lang.String SHORTCUT_SERVICE = "shortcut";
     field public static final java.lang.String STORAGE_SERVICE = "storage";
     field public static final java.lang.String SYSTEM_HEALTH_SERVICE = "systemhealth";
     field public static final java.lang.String TELECOM_SERVICE = "telecom";
@@ -9512,13 +9530,20 @@
   public class LauncherApps {
     ctor public LauncherApps(android.content.Context);
     method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
+    method public android.graphics.drawable.Drawable getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, int);
+    method public android.graphics.drawable.Drawable getShortcutIconDrawable(android.content.pm.ShortcutInfo, int);
+    method public java.util.List<android.content.pm.ShortcutInfo> getShortcuts(android.content.pm.LauncherApps.ShortcutQuery, android.os.UserHandle);
+    method public boolean hasShortcutHostPermission();
     method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
     method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
+    method public void pinShortcuts(java.lang.String, java.util.List<java.lang.String>, android.os.UserHandle);
     method public void registerCallback(android.content.pm.LauncherApps.Callback);
     method public void registerCallback(android.content.pm.LauncherApps.Callback, android.os.Handler);
     method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
     method public void startAppDetailsActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
     method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
+    method public void startShortcut(java.lang.String, java.lang.String, android.graphics.Rect, android.os.Bundle, android.os.UserHandle);
+    method public void startShortcut(android.content.pm.ShortcutInfo, android.graphics.Rect, android.os.Bundle);
     method public void unregisterCallback(android.content.pm.LauncherApps.Callback);
   }
 
@@ -9531,6 +9556,20 @@
     method public void onPackagesSuspended(java.lang.String[], android.os.UserHandle);
     method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
     method public void onPackagesUnsuspended(java.lang.String[], android.os.UserHandle);
+    method public void onShortcutsChanged(java.lang.String, java.util.List<android.content.pm.ShortcutInfo>, android.os.UserHandle);
+  }
+
+  public static class LauncherApps.ShortcutQuery {
+    ctor public LauncherApps.ShortcutQuery();
+    method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
+    method public android.content.pm.LauncherApps.ShortcutQuery setChangedSince(long);
+    method public android.content.pm.LauncherApps.ShortcutQuery setPackage(java.lang.String);
+    method public android.content.pm.LauncherApps.ShortcutQuery setQueryFlags(int);
+    method public android.content.pm.LauncherApps.ShortcutQuery setShortcutIds(java.util.List<java.lang.String>);
+    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
+    field public static final int FLAG_MATCH_DYNAMIC = 1; // 0x1
+    field public static final int FLAG_MATCH_MANIFEST = 8; // 0x8
+    field public static final int FLAG_MATCH_PINNED = 2; // 0x2
   }
 
   public class PackageInfo implements android.os.Parcelable {
@@ -10032,6 +10071,64 @@
     field public java.lang.String permission;
   }
 
+  public final class ShortcutInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public android.content.ComponentName getActivity();
+    method public java.util.Set<java.lang.String> getCategories();
+    method public java.lang.CharSequence getDisabledMessage();
+    method public android.os.PersistableBundle getExtras();
+    method public java.lang.String getId();
+    method public android.content.Intent getIntent();
+    method public long getLastChangedTimestamp();
+    method public java.lang.CharSequence getLongLabel();
+    method public java.lang.String getPackage();
+    method public int getRank();
+    method public java.lang.CharSequence getShortLabel();
+    method public android.os.UserHandle getUserHandle();
+    method public boolean hasKeyFieldsOnly();
+    method public boolean isDeclaredInManifest();
+    method public boolean isDynamic();
+    method public boolean isEnabled();
+    method public boolean isImmutable();
+    method public boolean isPinned();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.content.pm.ShortcutInfo> CREATOR;
+    field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
+  }
+
+  public static class ShortcutInfo.Builder {
+    ctor public ShortcutInfo.Builder(android.content.Context, java.lang.String);
+    method public android.content.pm.ShortcutInfo build();
+    method public android.content.pm.ShortcutInfo.Builder setActivity(android.content.ComponentName);
+    method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.Set<java.lang.String>);
+    method public android.content.pm.ShortcutInfo.Builder setDisabledMessage(java.lang.CharSequence);
+    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
+    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
+    method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent);
+    method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence);
+    method public android.content.pm.ShortcutInfo.Builder setRank(int);
+    method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence);
+  }
+
+  public class ShortcutManager {
+    ctor public ShortcutManager(android.content.Context);
+    method public boolean addDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+    method public void disableShortcuts(java.util.List<java.lang.String>);
+    method public void disableShortcuts(java.util.List<java.lang.String>, java.lang.CharSequence);
+    method public void enableShortcuts(java.util.List<java.lang.String>);
+    method public java.util.List<android.content.pm.ShortcutInfo> getDynamicShortcuts();
+    method public int getIconMaxHeight();
+    method public int getIconMaxWidth();
+    method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
+    method public int getMaxShortcutCountPerActivity();
+    method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
+    method public void removeAllDynamicShortcuts();
+    method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
+    method public void reportShortcutUsed(java.lang.String);
+    method public boolean setDynamicShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+    method public boolean updateShortcuts(java.util.List<android.content.pm.ShortcutInfo>);
+  }
+
   public class Signature implements android.os.Parcelable {
     ctor public Signature(byte[]);
     ctor public Signature(java.lang.String);
@@ -28337,6 +28434,7 @@
     field public static final int LOLLIPOP_MR1 = 22; // 0x16
     field public static final int M = 23; // 0x17
     field public static final int N = 24; // 0x18
+    field public static final int N_MR1 = 25; // 0x19
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
@@ -29329,6 +29427,7 @@
     method public android.os.Bundle getUserRestrictions();
     method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
     method public boolean hasUserRestriction(java.lang.String);
+    method public boolean isDemoUser();
     method public boolean isQuietModeEnabled(android.os.UserHandle);
     method public boolean isSystemUser();
     method public boolean isUserAGoat();
@@ -29568,6 +29667,7 @@
     method public boolean isObbMounted(java.lang.String);
     method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
     method public boolean unmountObb(java.lang.String, boolean, android.os.storage.OnObbStateChangeListener);
+    field public static final java.lang.String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
   }
 
   public final class StorageVolume implements android.os.Parcelable {
@@ -30713,6 +30813,7 @@
   public static class CallLog.Calls implements android.provider.BaseColumns {
     ctor public CallLog.Calls();
     method public static java.lang.String getLastOutgoingCall(android.content.Context);
+    field public static final int ANSWERED_EXTERNALLY_TYPE = 7; // 0x7
     field public static final int BLOCKED_TYPE = 6; // 0x6
     field public static final java.lang.String CACHED_FORMATTED_NUMBER = "formatted_number";
     field public static final java.lang.String CACHED_LOOKUP_URI = "lookup_uri";
@@ -30735,6 +30836,7 @@
     field public static final java.lang.String DURATION = "duration";
     field public static final java.lang.String EXTRA_CALL_TYPE_FILTER = "android.provider.extra.CALL_TYPE_FILTER";
     field public static final java.lang.String FEATURES = "features";
+    field public static final int FEATURES_PULLED_EXTERNALLY = 2; // 0x2
     field public static final int FEATURES_VIDEO = 1; // 0x1
     field public static final java.lang.String GEOCODED_LOCATION = "geocoded_location";
     field public static final int INCOMING_TYPE = 1; // 0x1
@@ -32440,6 +32542,7 @@
     field public static final java.lang.String DATA_ROAMING = "data_roaming";
     field public static final java.lang.String DEBUG_APP = "debug_app";
     field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
+    field public static final java.lang.String DEVICE_NAME = "device_name";
     field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned";
     field public static final java.lang.String HTTP_PROXY = "http_proxy";
     field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
@@ -33028,6 +33131,7 @@
     field public static final java.lang.String ACTION_NEW_VOICEMAIL = "android.intent.action.NEW_VOICEMAIL";
     field public static final java.lang.String ACTION_SYNC_VOICEMAIL = "android.provider.action.SYNC_VOICEMAIL";
     field public static final java.lang.String AUTHORITY = "com.android.voicemail";
+    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.provider.extra.PHONE_ACCOUNT_HANDLE";
     field public static final java.lang.String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
     field public static final java.lang.String PARAM_KEY_SOURCE_PACKAGE = "source_package";
   }
@@ -33036,6 +33140,9 @@
     method public static android.net.Uri buildSourceUri(java.lang.String);
     field public static final java.lang.String CONFIGURATION_STATE = "configuration_state";
     field public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2; // 0x2
+    field public static final int CONFIGURATION_STATE_CONFIGURING = 3; // 0x3
+    field public static final int CONFIGURATION_STATE_DISABLED = 5; // 0x5
+    field public static final int CONFIGURATION_STATE_FAILED = 4; // 0x4
     field public static final int CONFIGURATION_STATE_NOT_CONFIGURED = 1; // 0x1
     field public static final int CONFIGURATION_STATE_OK = 0; // 0x0
     field public static final android.net.Uri CONTENT_URI;
@@ -33060,6 +33167,7 @@
     field public static final int QUOTA_UNAVAILABLE = -1; // 0xffffffff
     field public static final java.lang.String SETTINGS_URI = "settings_uri";
     field public static final java.lang.String SOURCE_PACKAGE = "source_package";
+    field public static final java.lang.String SOURCE_TYPE = "source_type";
     field public static final java.lang.String VOICEMAIL_ACCESS_URI = "voicemail_access_uri";
   }
 
@@ -36013,9 +36121,14 @@
     method public void phoneAccountSelected(android.telecom.PhoneAccountHandle, boolean);
     method public void playDtmfTone(char);
     method public void postDialContinue(boolean);
+    method public void pullExternalCall();
+    method public final void putExtras(android.os.Bundle);
     method public void registerCallback(android.telecom.Call.Callback);
     method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
     method public void reject(boolean, java.lang.String);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
+    method public void sendCallEvent(java.lang.String, android.os.Bundle);
     method public void splitFromConference();
     method public void stopDtmfTone();
     method public void swapConference();
@@ -36029,6 +36142,7 @@
     field public static final int STATE_DISCONNECTING = 10; // 0xa
     field public static final int STATE_HOLDING = 3; // 0x3
     field public static final int STATE_NEW = 0; // 0x0
+    field public static final int STATE_PULLING_CALL = 11; // 0xb
     field public static final int STATE_RINGING = 2; // 0x2
     field public static final int STATE_SELECT_PHONE_ACCOUNT = 8; // 0x8
   }
@@ -36039,6 +36153,7 @@
     method public void onCannedTextResponsesLoaded(android.telecom.Call, java.util.List<java.lang.String>);
     method public void onChildrenChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
     method public void onConferenceableCallsChanged(android.telecom.Call, java.util.List<android.telecom.Call>);
+    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
     method public void onDetailsChanged(android.telecom.Call, android.telecom.Call.Details);
     method public void onParentChanged(android.telecom.Call, android.telecom.Call);
     method public void onPostDialWait(android.telecom.Call, java.lang.String);
@@ -36069,6 +36184,7 @@
     method public static java.lang.String propertiesToString(int);
     field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 4194304; // 0x400000
     field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
+    field public static final int CAPABILITY_CAN_PULL_CALL = 8388608; // 0x800000
     field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
     field public static final int CAPABILITY_HOLD = 1; // 0x1
     field public static final int CAPABILITY_MANAGE_CONFERENCE = 128; // 0x80
@@ -36088,7 +36204,9 @@
     field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 4; // 0x4
     field public static final int PROPERTY_ENTERPRISE_CALL = 32; // 0x20
     field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2
+    field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 128; // 0x80
     field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
+    field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
     field public static final int PROPERTY_WIFI = 8; // 0x8
   }
 
@@ -36139,6 +36257,7 @@
     method public final android.telecom.CallAudioState getCallAudioState();
     method public final java.util.List<android.telecom.Connection> getConferenceableConnections();
     method public final int getConnectionCapabilities();
+    method public final int getConnectionProperties();
     method public final long getConnectionTime();
     method public final java.util.List<android.telecom.Connection> getConnections();
     method public final android.telecom.DisconnectCause getDisconnectCause();
@@ -36151,6 +36270,7 @@
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
     method public void onConnectionAdded(android.telecom.Connection);
     method public void onDisconnect();
+    method public void onExtrasChanged(android.os.Bundle);
     method public void onHold();
     method public void onMerge(android.telecom.Connection);
     method public void onMerge();
@@ -36159,10 +36279,14 @@
     method public void onStopDtmfTone();
     method public void onSwap();
     method public void onUnhold();
+    method public final void putExtras(android.os.Bundle);
     method public final void removeConnection(android.telecom.Connection);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
     method public final void setActive();
     method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
     method public final void setConnectionCapabilities(int);
+    method public final void setConnectionProperties(int);
     method public final void setConnectionTime(long);
     method public final void setDialing();
     method public final void setDisconnected(android.telecom.DisconnectCause);
@@ -36192,6 +36316,7 @@
     method public final android.telecom.Conference getConference();
     method public final java.util.List<android.telecom.Conferenceable> getConferenceables();
     method public final int getConnectionCapabilities();
+    method public final int getConnectionProperties();
     method public final android.telecom.DisconnectCause getDisconnectCause();
     method public final android.os.Bundle getExtras();
     method public final int getState();
@@ -36202,16 +36327,24 @@
     method public void onAnswer(int);
     method public void onAnswer();
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
+    method public void onCallEvent(java.lang.String, android.os.Bundle);
     method public void onDisconnect();
+    method public void onExtrasChanged(android.os.Bundle);
     method public void onHold();
     method public void onPlayDtmfTone(char);
     method public void onPostDialContinue(boolean);
+    method public void onPullExternalCall();
     method public void onReject();
     method public void onReject(java.lang.String);
     method public void onSeparate();
     method public void onStateChanged(int);
     method public void onStopDtmfTone();
     method public void onUnhold();
+    method public static java.lang.String propertiesToString(int);
+    method public final void putExtras(android.os.Bundle);
+    method public final void removeExtras(java.util.List<java.lang.String>);
+    method public final void removeExtras(java.lang.String...);
+    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
     method public final void setActive();
     method public final void setAddress(android.net.Uri, int);
     method public final void setAudioModeIsVoip(boolean);
@@ -36219,6 +36352,7 @@
     method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>);
     method public final void setConferenceables(java.util.List<android.telecom.Conferenceable>);
     method public final void setConnectionCapabilities(int);
+    method public final void setConnectionProperties(int);
     method public final void setDialing();
     method public final void setDisconnected(android.telecom.DisconnectCause);
     method public final void setExtras(android.os.Bundle);
@@ -36227,6 +36361,7 @@
     method public final void setNextPostDialChar(char);
     method public final void setOnHold();
     method public final void setPostDialWait(java.lang.String);
+    method public final void setPulling();
     method public final void setRingbackRequested(boolean);
     method public final void setRinging();
     method public final void setStatusHints(android.telecom.StatusHints);
@@ -36235,6 +36370,7 @@
     method public static java.lang.String stateToString(int);
     field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000
     field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000
+    field public static final int CAPABILITY_CAN_PULL_CALL = 16777216; // 0x1000000
     field public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION = 4194304; // 0x400000
     field public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO = 524288; // 0x80000
     field public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE = 8192; // 0x2000
@@ -36252,15 +36388,21 @@
     field public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX = 2048; // 0x800
     field public static final int CAPABILITY_SUPPORT_HOLD = 2; // 0x2
     field public static final int CAPABILITY_SWAP_CONFERENCE = 8; // 0x8
+    field public static final java.lang.String EVENT_CALL_MERGE_FAILED = "android.telecom.event.CALL_MERGE_FAILED";
+    field public static final java.lang.String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
+    field public static final java.lang.String EXTRA_ANSWERING_DROPS_FG_CALL = "android.telecom.extra.ANSWERING_DROPS_FG_CALL";
     field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
     field public static final java.lang.String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS";
     field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
+    field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 32; // 0x20
+    field public static final int PROPERTY_IS_EXTERNAL_CALL = 16; // 0x10
     field public static final int STATE_ACTIVE = 4; // 0x4
     field public static final int STATE_DIALING = 3; // 0x3
     field public static final int STATE_DISCONNECTED = 6; // 0x6
     field public static final int STATE_HOLDING = 5; // 0x5
     field public static final int STATE_INITIALIZING = 0; // 0x0
     field public static final int STATE_NEW = 1; // 0x1
+    field public static final int STATE_PULLING_CALL = 7; // 0x7
     field public static final int STATE_RINGING = 2; // 0x2
   }
 
@@ -36338,7 +36480,9 @@
     method public java.lang.String getReason();
     method public int getTone();
     method public void writeToParcel(android.os.Parcel, int);
+    field public static final int ANSWERED_ELSEWHERE = 11; // 0xb
     field public static final int BUSY = 7; // 0x7
+    field public static final int CALL_PULLED = 12; // 0xc
     field public static final int CANCELED = 4; // 0x4
     field public static final int CONNECTION_MANAGER_NOT_SUPPORTED = 10; // 0xa
     field public static final android.os.Parcelable.Creator<android.telecom.DisconnectCause> CREATOR;
@@ -36374,6 +36518,7 @@
     method public void onCallAudioStateChanged(android.telecom.CallAudioState);
     method public void onCallRemoved(android.telecom.Call);
     method public void onCanAddCallChanged(boolean);
+    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
     method public void onSilenceRinger();
     method public final void setAudioRoute(int);
     method public final void setMuted(boolean);
@@ -36496,6 +36641,7 @@
     method public void onConferenceableConnectionsChanged(android.telecom.RemoteConference, java.util.List<android.telecom.RemoteConnection>);
     method public void onConnectionAdded(android.telecom.RemoteConference, android.telecom.RemoteConnection);
     method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConference, int);
+    method public void onConnectionPropertiesChanged(android.telecom.RemoteConference, int);
     method public void onConnectionRemoved(android.telecom.RemoteConference, android.telecom.RemoteConnection);
     method public void onDestroyed(android.telecom.RemoteConference);
     method public void onDisconnected(android.telecom.RemoteConference, android.telecom.DisconnectCause);
@@ -36514,6 +36660,7 @@
     method public android.telecom.RemoteConference getConference();
     method public java.util.List<android.telecom.RemoteConnection> getConferenceableConnections();
     method public int getConnectionCapabilities();
+    method public int getConnectionProperties();
     method public android.telecom.DisconnectCause getDisconnectCause();
     method public final android.os.Bundle getExtras();
     method public int getState();
@@ -36525,6 +36672,7 @@
     method public boolean isVoipAudioMode();
     method public void playDtmfTone(char);
     method public void postDialContinue(boolean);
+    method public void pullExternalCall();
     method public void registerCallback(android.telecom.RemoteConnection.Callback);
     method public void registerCallback(android.telecom.RemoteConnection.Callback, android.os.Handler);
     method public void reject();
@@ -36541,6 +36689,8 @@
     method public void onConferenceChanged(android.telecom.RemoteConnection, android.telecom.RemoteConference);
     method public void onConferenceableConnectionsChanged(android.telecom.RemoteConnection, java.util.List<android.telecom.RemoteConnection>);
     method public void onConnectionCapabilitiesChanged(android.telecom.RemoteConnection, int);
+    method public void onConnectionEvent(android.telecom.RemoteConnection, java.lang.String, android.os.Bundle);
+    method public void onConnectionPropertiesChanged(android.telecom.RemoteConnection, int);
     method public void onDestroyed(android.telecom.RemoteConnection);
     method public void onDisconnected(android.telecom.RemoteConnection, android.telecom.DisconnectCause);
     method public void onExtrasChanged(android.telecom.RemoteConnection, android.os.Bundle);
@@ -36637,6 +36787,7 @@
     field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
     field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
     field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
+    field public static final java.lang.String METADATA_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS";
     field public static final java.lang.String METADATA_IN_CALL_SERVICE_RINGING = "android.telecom.IN_CALL_SERVICE_RINGING";
     field public static final java.lang.String METADATA_IN_CALL_SERVICE_UI = "android.telecom.IN_CALL_SERVICE_UI";
     field public static final int PRESENTATION_ALLOWED = 1; // 0x1
@@ -36691,9 +36842,11 @@
     field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
     field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
     field public static final java.lang.String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
+    field public static final java.lang.String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call";
     field public static final java.lang.String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
     field public static final java.lang.String KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL = "allow_emergency_video_calls_bool";
     field public static final java.lang.String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
+    field public static final java.lang.String KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL = "allow_merge_wifi_calls_when_vowifi_off_bool";
     field public static final java.lang.String KEY_ALLOW_NON_EMERGENCY_CALLS_IN_ECM_BOOL = "allow_non_emergency_calls_in_ecm_bool";
     field public static final java.lang.String KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL = "always_show_emergency_alert_onoff_bool";
     field public static final java.lang.String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
@@ -36725,6 +36878,7 @@
     field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool";
     field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string";
     field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool";
+    field public static final java.lang.String KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL = "drop_video_call_when_answering_audio_call_bool";
     field public static final java.lang.String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
     field public static final java.lang.String KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT = "duration_blocking_disabled_after_emergency_int";
     field public static final java.lang.String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
@@ -36782,6 +36936,7 @@
     field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
     field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
     field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
+    field public static final java.lang.String KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL = "treat_downgraded_video_calls_as_video_calls_bool";
     field public static final java.lang.String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
     field public static final java.lang.String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
     field public static final java.lang.String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
@@ -37366,12 +37521,15 @@
     field public static final int NETWORK_TYPE_EVDO_A = 6; // 0x6
     field public static final int NETWORK_TYPE_EVDO_B = 12; // 0xc
     field public static final int NETWORK_TYPE_GPRS = 1; // 0x1
+    field public static final int NETWORK_TYPE_GSM = 16; // 0x10
     field public static final int NETWORK_TYPE_HSDPA = 8; // 0x8
     field public static final int NETWORK_TYPE_HSPA = 10; // 0xa
     field public static final int NETWORK_TYPE_HSPAP = 15; // 0xf
     field public static final int NETWORK_TYPE_HSUPA = 9; // 0x9
     field public static final int NETWORK_TYPE_IDEN = 11; // 0xb
+    field public static final int NETWORK_TYPE_IWLAN = 18; // 0x12
     field public static final int NETWORK_TYPE_LTE = 13; // 0xd
+    field public static final int NETWORK_TYPE_TD_SCDMA = 17; // 0x11
     field public static final int NETWORK_TYPE_UMTS = 3; // 0x3
     field public static final int NETWORK_TYPE_UNKNOWN = 0; // 0x0
     field public static final int PHONE_TYPE_CDMA = 2; // 0x2
@@ -40174,7 +40332,10 @@
     method public boolean equals(android.util.DisplayMetrics);
     method public void setTo(android.util.DisplayMetrics);
     method public void setToDefaults();
+    field public static final int DENSITY_260 = 260; // 0x104
     field public static final int DENSITY_280 = 280; // 0x118
+    field public static final int DENSITY_300 = 300; // 0x12c
+    field public static final int DENSITY_340 = 340; // 0x154
     field public static final int DENSITY_360 = 360; // 0x168
     field public static final int DENSITY_400 = 400; // 0x190
     field public static final int DENSITY_420 = 420; // 0x1a4
@@ -41504,6 +41665,10 @@
     field public static final int KEYCODE_SWITCH_CHARSET = 95; // 0x5f
     field public static final int KEYCODE_SYM = 63; // 0x3f
     field public static final int KEYCODE_SYSRQ = 120; // 0x78
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_DOWN = 281; // 0x119
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_LEFT = 282; // 0x11a
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_RIGHT = 283; // 0x11b
+    field public static final int KEYCODE_SYSTEM_NAVIGATION_UP = 280; // 0x118
     field public static final int KEYCODE_T = 48; // 0x30
     field public static final int KEYCODE_TAB = 61; // 0x3d
     field public static final int KEYCODE_TV = 170; // 0xaa
@@ -44594,6 +44759,7 @@
     method public boolean clearMetaKeyStates(int);
     method public void closeConnection();
     method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public boolean commitText(java.lang.CharSequence, int);
     method public boolean deleteSurroundingText(int, int);
@@ -44703,6 +44869,7 @@
     field public static final int IME_NULL = 0; // 0x0
     field public int actionId;
     field public java.lang.CharSequence actionLabel;
+    field public java.lang.String[] contentMimeTypes;
     field public android.os.Bundle extras;
     field public int fieldId;
     field public java.lang.String fieldName;
@@ -44762,6 +44929,7 @@
     method public abstract boolean clearMetaKeyStates(int);
     method public abstract void closeConnection();
     method public abstract boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public abstract boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public abstract boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public abstract boolean commitText(java.lang.CharSequence, int);
     method public abstract boolean deleteSurroundingText(int, int);
@@ -44787,6 +44955,7 @@
     field public static final int CURSOR_UPDATE_MONITOR = 2; // 0x2
     field public static final int GET_EXTRACTED_TEXT_MONITOR = 1; // 0x1
     field public static final int GET_TEXT_WITH_STYLES = 1; // 0x1
+    field public static final int INPUT_CONTENT_GRANT_READ_URI_PERMISSION = 1; // 0x1
   }
 
   public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
@@ -44795,6 +44964,7 @@
     method public boolean clearMetaKeyStates(int);
     method public void closeConnection();
     method public boolean commitCompletion(android.view.inputmethod.CompletionInfo);
+    method public boolean commitContent(android.view.inputmethod.InputContentInfo, int, android.os.Bundle);
     method public boolean commitCorrection(android.view.inputmethod.CorrectionInfo);
     method public boolean commitText(java.lang.CharSequence, int);
     method public boolean deleteSurroundingText(int, int);
@@ -44819,6 +44989,19 @@
     method public void setTarget(android.view.inputmethod.InputConnection);
   }
 
+  public final class InputContentInfo implements android.os.Parcelable {
+    ctor public InputContentInfo(android.net.Uri, android.content.ClipDescription);
+    ctor public InputContentInfo(android.net.Uri, android.content.ClipDescription, android.net.Uri);
+    method public int describeContents();
+    method public android.net.Uri getContentUri();
+    method public android.content.ClipDescription getDescription();
+    method public android.net.Uri getLinkUri();
+    method public void releasePermission();
+    method public void requestPermission();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.view.inputmethod.InputContentInfo> CREATOR;
+  }
+
   public abstract interface InputMethod {
     method public abstract void attachToken(android.os.IBinder);
     method public abstract void bindInput(android.view.inputmethod.InputBinding);
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 8ccd5d2e..d6c0058 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -723,10 +723,10 @@
                 System.out.println("Complete");
             }
             mRepeat--;
-            if (mRepeat > 1) {
+            if (mRepeat > 0) {
                 mAm.unhandledBack();
             }
-        } while (mRepeat > 1);
+        } while (mRepeat > 0);
     }
 
     private void runForceStop() throws Exception {
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index c597ed2..e849f4b 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -18,6 +18,9 @@
 #define LOG_TAG "BootAnimation"
 
 #include <stdint.h>
+#include <sys/inotify.h>
+#include <sys/poll.h>
+#include <sys/stat.h>
 #include <sys/types.h>
 #include <math.h>
 #include <fcntl.h>
@@ -57,23 +60,29 @@
 #include "BootAnimation.h"
 #include "AudioPlayer.h"
 
-#define OEM_BOOTANIMATION_FILE "/oem/media/bootanimation.zip"
-#define SYSTEM_BOOTANIMATION_FILE "/system/media/bootanimation.zip"
-#define SYSTEM_ENCRYPTED_BOOTANIMATION_FILE "/system/media/bootanimation-encrypted.zip"
-#define EXIT_PROP_NAME "service.bootanim.exit"
-
 namespace android {
 
+static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";
+static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
+static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
+static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
+static const char SYSTEM_TIME_DIR_NAME[] = "time";
+static const char SYSTEM_TIME_DIR_PATH[] = "/data/system/time";
+static const char LAST_TIME_CHANGED_FILE_NAME[] = "last_time_change";
+static const char LAST_TIME_CHANGED_FILE_PATH[] = "/data/system/time/last_time_change";
+static const char ACCURATE_TIME_FLAG_FILE_NAME[] = "time_is_accurate";
+static const char ACCURATE_TIME_FLAG_FILE_PATH[] = "/data/system/time/time_is_accurate";
+static const char EXIT_PROP_NAME[] = "service.bootanim.exit";
 static const int ANIM_ENTRY_NAME_MAX = 256;
 
 // ---------------------------------------------------------------------------
 
-BootAnimation::BootAnimation() : Thread(false), mClockEnabled(true) {
+BootAnimation::BootAnimation() : Thread(false), mClockEnabled(true), mTimeIsAccurate(false),
+        mTimeCheckThread(NULL) {
     mSession = new SurfaceComposerClient();
 }
 
-BootAnimation::~BootAnimation() {
-}
+BootAnimation::~BootAnimation() {}
 
 void BootAnimation::onFirstRef() {
     status_t err = mSession->linkToComposerDeath(this);
@@ -587,15 +596,15 @@
     // read all the data structures
     const size_t pcount = animation.parts.size();
     void *cookie = NULL;
-    ZipFileRO* mZip = animation.zip;
-    if (!mZip->startIteration(&cookie)) {
+    ZipFileRO* zip = animation.zip;
+    if (!zip->startIteration(&cookie)) {
         return false;
     }
 
     ZipEntryRO entry;
     char name[ANIM_ENTRY_NAME_MAX];
-    while ((entry = mZip->nextEntry(cookie)) != NULL) {
-        const int foundEntryName = mZip->getEntryFileName(entry, name, ANIM_ENTRY_NAME_MAX);
+    while ((entry = zip->nextEntry(cookie)) != NULL) {
+        const int foundEntryName = zip->getEntryFileName(entry, name, ANIM_ENTRY_NAME_MAX);
         if (foundEntryName > ANIM_ENTRY_NAME_MAX || foundEntryName == -1) {
             ALOGE("Error fetching entry file name");
             continue;
@@ -605,22 +614,29 @@
         const String8 path(entryName.getPathDir());
         const String8 leaf(entryName.getPathLeaf());
         if (leaf.size() > 0) {
-            for (size_t j=0 ; j<pcount ; j++) {
+            for (size_t j = 0; j < pcount; j++) {
                 if (path == animation.parts[j].path) {
                     uint16_t method;
                     // supports only stored png files
-                    if (mZip->getEntryInfo(entry, &method, NULL, NULL, NULL, NULL, NULL)) {
+                    if (zip->getEntryInfo(entry, &method, NULL, NULL, NULL, NULL, NULL)) {
                         if (method == ZipFileRO::kCompressStored) {
-                            FileMap* map = mZip->createEntryFileMap(entry);
+                            FileMap* map = zip->createEntryFileMap(entry);
                             if (map) {
                                 Animation::Part& part(animation.parts.editItemAt(j));
                                 if (leaf == "audio.wav") {
                                     // a part may have at most one audio file
                                     part.audioFile = map;
+                                } else if (leaf == "trim.txt") {
+                                    part.trimData.setTo((char const*)map->getDataPtr(),
+                                                        map->getDataLength());
                                 } else {
                                     Animation::Frame frame;
                                     frame.name = leaf;
                                     frame.map = map;
+                                    frame.trimWidth = animation.width;
+                                    frame.trimHeight = animation.height;
+                                    frame.trimX = 0;
+                                    frame.trimY = 0;
                                     part.frames.add(frame);
                                 }
                             }
@@ -631,18 +647,54 @@
         }
     }
 
-    mZip->endIteration(cookie);
+    // If there is trimData present, override the positioning defaults.
+    for (Animation::Part& part : animation.parts) {
+        const char* trimDataStr = part.trimData.string();
+        for (size_t frameIdx = 0; frameIdx < part.frames.size(); frameIdx++) {
+            const char* endl = strstr(trimDataStr, "\n");
+            // No more trimData for this part.
+            if (endl == NULL) {
+                break;
+            }
+            String8 line(trimDataStr, endl - trimDataStr);
+            const char* lineStr = line.string();
+            trimDataStr = ++endl;
+            int width = 0, height = 0, x = 0, y = 0;
+            if (sscanf(lineStr, "%dx%d+%d+%d", &width, &height, &x, &y) == 4) {
+                Animation::Frame& frame(part.frames.editItemAt(frameIdx));
+                frame.trimWidth = width;
+                frame.trimHeight = height;
+                frame.trimX = x;
+                frame.trimY = y;
+            } else {
+                ALOGE("Error parsing trim.txt, line: %s", lineStr);
+                break;
+            }
+        }
+    }
+
+    zip->endIteration(cookie);
 
     return true;
 }
 
 bool BootAnimation::movie()
 {
-
     Animation* animation = loadAnimation(mZipFileName);
     if (animation == NULL)
         return false;
 
+    bool anyPartHasClock = false;
+    for (size_t i=0; i < animation->parts.size(); i++) {
+        if(animation->parts[i].clockPosY >= 0) {
+            anyPartHasClock = true;
+            break;
+        }
+    }
+    if (!anyPartHasClock) {
+        mClockEnabled = false;
+    }
+
     // Blend required to draw time on top of animation frames.
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     glShadeModel(GL_FLAT);
@@ -664,7 +716,18 @@
         mClockEnabled = clockTextureInitialized;
     }
 
+    if (mClockEnabled && !updateIsTimeAccurate()) {
+        mTimeCheckThread = new TimeCheckThread(this);
+        mTimeCheckThread->run("BootAnimation::TimeCheckThread", PRIORITY_NORMAL);
+    }
+
     playAnimation(*animation);
+
+    if (mTimeCheckThread != NULL) {
+        mTimeCheckThread->requestExit();
+        mTimeCheckThread = NULL;
+    }
+
     releaseAnimation(animation);
 
     if (clockTextureInitialized) {
@@ -677,12 +740,9 @@
 bool BootAnimation::playAnimation(const Animation& animation)
 {
     const size_t pcount = animation.parts.size();
-    const int xc = (mWidth - animation.width) / 2;
-    const int yc = ((mHeight - animation.height) / 2);
     nsecs_t frameDuration = s2ns(1) / animation.fps;
-
-    Region clearReg(Rect(mWidth, mHeight));
-    clearReg.subtractSelf(Rect(xc, yc, xc+animation.width, yc+animation.height));
+    const int animationX = (mWidth - animation.width) / 2;
+    const int animationY = (mHeight - animation.height) / 2;
 
     for (size_t i=0 ; i<pcount ; i++) {
         const Animation::Part& part(animation.parts[i]);
@@ -729,23 +789,26 @@
                     initTexture(frame);
                 }
 
+                const int xc = animationX + frame.trimX;
+                const int yc = animationY + frame.trimY;
+                Region clearReg(Rect(mWidth, mHeight));
+                clearReg.subtractSelf(Rect(xc, yc, xc+frame.trimWidth, yc+frame.trimHeight));
                 if (!clearReg.isEmpty()) {
                     Region::const_iterator head(clearReg.begin());
                     Region::const_iterator tail(clearReg.end());
                     glEnable(GL_SCISSOR_TEST);
                     while (head != tail) {
                         const Rect& r2(*head++);
-                        glScissor(r2.left, mHeight - r2.bottom,
-                                r2.width(), r2.height());
+                        glScissor(r2.left, mHeight - r2.bottom, r2.width(), r2.height());
                         glClear(GL_COLOR_BUFFER_BIT);
                     }
                     glDisable(GL_SCISSOR_TEST);
                 }
-                // specify the y center as ceiling((mHeight - animation.height) / 2)
-                // which is equivalent to mHeight - (yc + animation.height)
-                glDrawTexiOES(xc, mHeight - (yc + animation.height),
-                              0, animation.width, animation.height);
-                if (mClockEnabled && part.clockPosY >= 0) {
+                // specify the y center as ceiling((mHeight - frame.trimHeight) / 2)
+                // which is equivalent to mHeight - (yc + frame.trimHeight)
+                glDrawTexiOES(xc, mHeight - (yc + frame.trimHeight),
+                              0, frame.trimWidth, frame.trimHeight);
+                if (mClockEnabled && mTimeIsAccurate && part.clockPosY >= 0) {
                     drawTime(mClock, part.clockPosY);
                 }
 
@@ -824,6 +887,132 @@
     mLoadedFiles.remove(fn);
     return animation;
 }
+
+bool BootAnimation::updateIsTimeAccurate() {
+    static constexpr long long MAX_TIME_IN_PAST =   60000LL * 60LL * 24LL * 30LL;  // 30 days
+    static constexpr long long MAX_TIME_IN_FUTURE = 60000LL * 90LL;  // 90 minutes
+
+    if (mTimeIsAccurate) {
+        return true;
+    }
+
+    struct stat statResult;
+    if(stat(ACCURATE_TIME_FLAG_FILE_PATH, &statResult) == 0) {
+        mTimeIsAccurate = true;
+        return true;
+    }
+
+    FILE* file = fopen(LAST_TIME_CHANGED_FILE_PATH, "r");
+    if (file != NULL) {
+      long long lastChangedTime = 0;
+      fscanf(file, "%lld", &lastChangedTime);
+      fclose(file);
+      if (lastChangedTime > 0) {
+        struct timespec now;
+        clock_gettime(CLOCK_REALTIME, &now);
+        // Match the Java timestamp format
+        long long rtcNow = (now.tv_sec * 1000LL) + (now.tv_nsec / 1000000LL);
+        if (lastChangedTime > rtcNow - MAX_TIME_IN_PAST
+            && lastChangedTime < rtcNow + MAX_TIME_IN_FUTURE) {
+            mTimeIsAccurate = true;
+        }
+      }
+    }
+
+    return mTimeIsAccurate;
+}
+
+BootAnimation::TimeCheckThread::TimeCheckThread(BootAnimation* bootAnimation) : Thread(false),
+    mInotifyFd(-1), mSystemWd(-1), mTimeWd(-1), mBootAnimation(bootAnimation) {}
+
+BootAnimation::TimeCheckThread::~TimeCheckThread() {
+    // mInotifyFd may be -1 but that's ok since we're not at risk of attempting to close a valid FD.
+    close(mInotifyFd);
+}
+
+bool BootAnimation::TimeCheckThread::threadLoop() {
+    bool shouldLoop = doThreadLoop() && !mBootAnimation->mTimeIsAccurate
+        && mBootAnimation->mClockEnabled;
+    if (!shouldLoop) {
+        close(mInotifyFd);
+        mInotifyFd = -1;
+    }
+    return shouldLoop;
+}
+
+bool BootAnimation::TimeCheckThread::doThreadLoop() {
+    static constexpr int BUFF_LEN (10 * (sizeof(struct inotify_event) + NAME_MAX + 1));
+
+    // Poll instead of doing a blocking read so the Thread can exit if requested.
+    struct pollfd pfd = { mInotifyFd, POLLIN, 0 };
+    ssize_t pollResult = poll(&pfd, 1, 1000);
+
+    if (pollResult == 0) {
+        return true;
+    } else if (pollResult < 0) {
+        ALOGE("Could not poll inotify events");
+        return false;
+    }
+
+    char buff[BUFF_LEN] __attribute__ ((aligned(__alignof__(struct inotify_event))));;
+    ssize_t length = read(mInotifyFd, buff, BUFF_LEN);
+    if (length == 0) {
+        return true;
+    } else if (length < 0) {
+        ALOGE("Could not read inotify events");
+        return false;
+    }
+
+    const struct inotify_event *event;
+    for (char* ptr = buff; ptr < buff + length; ptr += sizeof(struct inotify_event) + event->len) {
+        event = (const struct inotify_event *) ptr;
+        if (event->wd == mSystemWd && strcmp(SYSTEM_TIME_DIR_NAME, event->name) == 0) {
+            addTimeDirWatch();
+        } else if (event->wd == mTimeWd && (strcmp(LAST_TIME_CHANGED_FILE_NAME, event->name) == 0
+                || strcmp(ACCURATE_TIME_FLAG_FILE_NAME, event->name) == 0)) {
+            return !mBootAnimation->updateIsTimeAccurate();
+        }
+    }
+
+    return true;
+}
+
+void BootAnimation::TimeCheckThread::addTimeDirWatch() {
+        mTimeWd = inotify_add_watch(mInotifyFd, SYSTEM_TIME_DIR_PATH,
+                IN_CLOSE_WRITE | IN_MOVED_TO | IN_ATTRIB);
+        if (mTimeWd > 0) {
+            // No need to watch for the time directory to be created if it already exists
+            inotify_rm_watch(mInotifyFd, mSystemWd);
+            mSystemWd = -1;
+        }
+}
+
+status_t BootAnimation::TimeCheckThread::readyToRun() {
+    mInotifyFd = inotify_init();
+    if (mInotifyFd < 0) {
+        ALOGE("Could not initialize inotify fd");
+        return NO_INIT;
+    }
+
+    mSystemWd = inotify_add_watch(mInotifyFd, SYSTEM_DATA_DIR_PATH, IN_CREATE | IN_ATTRIB);
+    if (mSystemWd < 0) {
+        close(mInotifyFd);
+        mInotifyFd = -1;
+        ALOGE("Could not add watch for %s", SYSTEM_DATA_DIR_PATH);
+        return NO_INIT;
+    }
+
+    addTimeDirWatch();
+
+    if (mBootAnimation->updateIsTimeAccurate()) {
+        close(mInotifyFd);
+        mInotifyFd = -1;
+        return ALREADY_EXISTS;
+    }
+
+    return NO_ERROR;
+}
+
 // ---------------------------------------------------------------------------
 
 }
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index d49e1ec..a093c9b 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -51,6 +51,24 @@
     virtual void        onFirstRef();
     virtual void        binderDied(const wp<IBinder>& who);
 
+    bool                updateIsTimeAccurate();
+
+    class TimeCheckThread : public Thread {
+    public:
+        TimeCheckThread(BootAnimation* bootAnimation);
+        virtual ~TimeCheckThread();
+    private:
+        virtual status_t    readyToRun();
+        virtual bool        threadLoop();
+        bool                doThreadLoop();
+        void                addTimeDirWatch();
+
+        int mInotifyFd;
+        int mSystemWd;
+        int mTimeWd;
+        BootAnimation* mBootAnimation;
+    };
+
     struct Texture {
         GLint   w;
         GLint   h;
@@ -61,6 +79,10 @@
         struct Frame {
             String8 name;
             FileMap* map;
+            int trimX;
+            int trimY;
+            int trimWidth;
+            int trimHeight;
             mutable GLuint tid;
             bool operator < (const Frame& rhs) const {
                 return name < rhs.name;
@@ -72,6 +94,7 @@
             int clockPosY;  // The y position of the clock, in pixels, from the bottom of the
                             // display (the clock is centred horizontally). -1 to disable the clock
             String8 path;
+            String8 trimData;
             SortedVector<Frame> frames;
             bool playUntilComplete;
             float backgroundColor[3];
@@ -113,8 +136,10 @@
     sp<SurfaceControl> mFlingerSurfaceControl;
     sp<Surface> mFlingerSurface;
     bool        mClockEnabled;
+    bool        mTimeIsAccurate;
     String8     mZipFileName;
     SortedVector<String8> mLoadedFiles;
+    sp<TimeCheckThread> mTimeCheckThread;
 };
 
 // ---------------------------------------------------------------------------
diff --git a/cmds/bootanimation/FORMAT.md b/cmds/bootanimation/FORMAT.md
new file mode 100644
index 0000000..e4c52f7
--- /dev/null
+++ b/cmds/bootanimation/FORMAT.md
@@ -0,0 +1,127 @@
+# bootanimation format
+
+## zipfile paths
+
+The system selects a boot animation zipfile from the following locations, in order:
+
+    /system/media/bootanimation-encrypted.zip (if getprop("vold.decrypt") = '1')
+    /system/media/bootanimation.zip
+    /oem/media/bootanimation.zip
+
+## zipfile layout
+
+The `bootanimation.zip` archive file includes:
+
+    desc.txt - a text file
+    part0  \
+    part1   \  directories full of PNG frames
+    ...     /
+    partN  /
+
+## desc.txt format
+
+The first line defines the general parameters of the animation:
+
+    WIDTH HEIGHT FPS
+
+  * **WIDTH:** animation width (pixels)
+  * **HEIGHT:** animation height (pixels)
+  * **FPS:** frames per second, e.g. 60
+
+It is followed by a number of rows of the form:
+
+    TYPE COUNT PAUSE PATH [#RGBHEX CLOCK]
+
+  * **TYPE:** a single char indicating what type of animation segment this is:
+      + `p` -- this part will play unless interrupted by the end of the boot
+      + `c` -- this part will play to completion, no matter what
+  * **COUNT:** how many times to play the animation, or 0 to loop forever until boot is complete
+  * **PAUSE:** number of FRAMES to delay after this part ends
+  * **PATH:** directory in which to find the frames for this part (e.g. `part0`)
+  * **RGBHEX:** _(OPTIONAL)_ a background color, specified as `#RRGGBB`
+  * **CLOCK:** _(OPTIONAL)_ the y-coordinate at which to draw the current time (for watches)
+
+There is also a special TYPE, `$SYSTEM`, that loads `/system/media/bootanimation.zip`
+and plays that.
+
+## loading and playing frames
+
+Each part is scanned and loaded directly from the zip archive. Within a part directory, every file
+(except `trim.txt` and `audio.wav`; see next sections) is expected to be a PNG file that represents
+one frame in that part (at the specified resolution). For this reason it is important that frames be
+named sequentially (e.g. `part000.png`, `part001.png`, ...) and added to the zip archive in that
+order.
+
+## trim.txt
+
+To save on memory, textures may be trimmed by their background color.  trim.txt sequentially lists
+the trim output for each frame in its directory, so the frames may be properly positioned.
+Output should be of the form: `WxH+X+Y`. Example:
+
+    713x165+388+914
+    708x152+388+912
+    707x139+388+911
+    649x92+388+910
+
+If the file is not present, each frame is assumed to be the same size as the animation.
+
+## audio.wav
+
+Each part may optionally play a `wav` sample when it starts. To enable this for an animation,
+you must also include a `audio_conf.txt` file in the ZIP archive. Its format is as follows:
+
+    card=<ALSA card number>
+    device=<ALSA device number>
+    period_size=<period size>
+    period_count=<period count>
+
+This header is followed by zero or more mixer settings, each with the format:
+
+    mixer "<name>" = <value list>
+
+Here's an example `audio_conf.txt` from Shamu:
+
+    card=0
+    device=15
+    period_size=1024
+    period_count=4
+
+    mixer "QUAT_MI2S_RX Audio Mixer MultiMedia5" = 1
+    mixer "Playback Channel Map" = 0 220 157 195 0 0 0 0
+    mixer "QUAT_MI2S_RX Channels" = Two
+    mixer "BOOST_STUB Right Mixer right" = 1
+    mixer "BOOST_STUB Left Mixer left" = 1
+    mixer "Compress Playback 9 Volume" = 80 80
+
+You will probably need to get these mixer names and values out of `audio_platform_info.xml`
+and `mixer_paths.xml` for your device.
+
+## exiting
+
+The system will end the boot animation (first completing any incomplete or even entirely unplayed
+parts that are of type `c`) when the system is finished booting. (This is accomplished by setting
+the system property `service.bootanim.exit` to a nonzero string.)
+
+## protips
+
+### PNG compression
+
+Use `zopflipng` if you have it, otherwise `pngcrush` will do. e.g.:
+
+    for fn in *.png ; do
+        zopflipng -m ${fn}s ${fn}s.new && mv -f ${fn}s.new ${fn}
+        # or: pngcrush -q ....
+    done
+
+Some animations benefit from being reduced to 256 colors:
+
+    pngquant --force --ext .png *.png
+    # alternatively: mogrify -colors 256 anim-tmp/*/*.png
+
+### creating the ZIP archive
+
+    cd <path-to-pieces>
+    zip -0qry -i \*.txt \*.png \*.wav @ ../bootanimation.zip *.txt part*
+
+Note that the ZIP archive is not actually compressed! The PNG files are already as compressed
+as they can reasonably get, and there is unlikely to be any redundancy between files.
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index c6834f9..32a8088 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -922,6 +922,8 @@
                 flags |= UserInfo.FLAG_EPHEMERAL;
             } else if ("--guest".equals(opt)) {
                 flags |= UserInfo.FLAG_GUEST;
+            } else if ("--demo".equals(opt)) {
+                flags |= UserInfo.FLAG_DEMO;
             } else {
                 System.err.println("Error: unknown option " + opt);
                 return showUsage();
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index 7841d29..053ba7d 100644
--- a/core/java/android/animation/AnimatorSet.java
+++ b/core/java/android/animation/AnimatorSet.java
@@ -1064,15 +1064,15 @@
     /**
      * @hide
      * TODO: For animatorSet defined in XML, we can use a flag to indicate what the play order
-     * if defined (i.e. sequential or together), then we can use the flag instead of calculate
-     * dynamically.
+     * if defined (i.e. sequential or together), then we can use the flag instead of calculating
+     * dynamically. Note that when AnimatorSet is empty this method returns true.
      * @return whether all the animators in the set are supposed to play together
      */
     public boolean shouldPlayTogether() {
         updateAnimatorsDuration();
         createDependencyGraph();
         // All the child nodes are set out to play right after the delay animation
-        return mRootNode.mChildNodes.size() == mNodes.size() - 1;
+        return mRootNode.mChildNodes == null || mRootNode.mChildNodes.size() == mNodes.size() - 1;
     }
 
     @Override
diff --git a/core/java/android/animation/PropertyValuesHolder.java b/core/java/android/animation/PropertyValuesHolder.java
index 224823e..ba16e67 100644
--- a/core/java/android/animation/PropertyValuesHolder.java
+++ b/core/java/android/animation/PropertyValuesHolder.java
@@ -1095,8 +1095,12 @@
         }
         // TODO: We need a better way to get data out of keyframes.
         if (mKeyframes instanceof PathKeyframes.FloatKeyframesBase
-                || mKeyframes instanceof PathKeyframes.IntKeyframesBase) {
-            // property values will animate based on external data source (e.g. Path)
+                || mKeyframes instanceof PathKeyframes.IntKeyframesBase
+                || (mKeyframes.getKeyframes() != null && mKeyframes.getKeyframes().size() > 2)) {
+            // When a pvh has more than 2 keyframes, that means there are intermediate values in
+            // addition to start/end values defined for animators. Another case where such
+            // intermediate values are defined is when animator has a path to animate along. In
+            // these cases, a data source is needed to capture these intermediate values.
             values.dataSource = new PropertyValues.DataSource() {
                 @Override
                 public Object getValueAtFraction(float fraction) {
@@ -1108,6 +1112,13 @@
         }
     }
 
+    /**
+     * @hide
+     */
+    public Class getValueType() {
+        return mValueType;
+    }
+
     @Override
     public String toString() {
         return mPropertyName + ": " + mKeyframes.toString();
@@ -1178,6 +1189,15 @@
         }
 
         @Override
+        public void setProperty(Property property) {
+            if (property instanceof IntProperty) {
+                mIntProperty = (IntProperty) property;
+            } else {
+                super.setProperty(property);
+            }
+        }
+
+        @Override
         public void setIntValues(int... values) {
             super.setIntValues(values);
             mIntKeyframes = (Keyframes.IntKeyframes) mKeyframes;
@@ -1316,6 +1336,15 @@
         }
 
         @Override
+        public void setProperty(Property property) {
+            if (property instanceof FloatProperty) {
+                mFloatProperty = (FloatProperty) property;
+            } else {
+                super.setProperty(property);
+            }
+        }
+
+        @Override
         public void setFloatValues(float... values) {
             super.setFloatValues(values);
             mFloatKeyframes = (Keyframes.FloatKeyframes) mKeyframes;
@@ -1516,7 +1545,7 @@
                     }
                     propertyMap.put(mPropertyName, mJniSetter);
                 }
-           }
+            }
         }
     }
 
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index ae3e0ce..06a01fc 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4220,6 +4220,7 @@
     public void startActivityForResult(@RequiresPermission Intent intent, int requestCode,
             @Nullable Bundle options) {
         if (mParent == null) {
+            options = transferSpringboardActivityOptions(options);
             Instrumentation.ActivityResult ar =
                 mInstrumentation.execStartActivity(
                     this, mMainThread.getApplicationThread(), mToken, this,
@@ -4268,6 +4269,17 @@
         }
     }
 
+    private Bundle transferSpringboardActivityOptions(Bundle options) {
+        if (options == null && (mWindow != null && !mWindow.isActive())) {
+            final ActivityOptions activityOptions = getActivityOptions();
+            if (activityOptions != null &&
+                    activityOptions.getAnimationType() == ActivityOptions.ANIM_SCENE_TRANSITION) {
+                return activityOptions.toBundle();
+            }
+        }
+        return options;
+    }
+
     /**
      * @hide Implement to provide correct calling token.
      */
@@ -4283,6 +4295,7 @@
         if (mParent != null) {
             throw new RuntimeException("Can't be called from a child");
         }
+        options = transferSpringboardActivityOptions(options);
         Instrumentation.ActivityResult ar = mInstrumentation.execStartActivity(
                 this, mMainThread.getApplicationThread(), mToken, this, intent, requestCode,
                 options, user);
@@ -4318,6 +4331,7 @@
         if (mParent != null) {
             throw new RuntimeException("Can't be called from a child");
         }
+        options = transferSpringboardActivityOptions(options);
         Instrumentation.ActivityResult ar =
                 mInstrumentation.execStartActivity(
                         this, mMainThread.getApplicationThread(), mToken, this,
@@ -4350,6 +4364,7 @@
         if (mParent != null) {
             throw new RuntimeException("Can't be called from a child");
         }
+        options = transferSpringboardActivityOptions(options);
         Instrumentation.ActivityResult ar =
                 mInstrumentation.execStartActivityAsCaller(
                         this, mMainThread.getApplicationThread(), mToken, this,
@@ -4789,6 +4804,7 @@
      */
     public void startActivityFromChild(@NonNull Activity child, @RequiresPermission Intent intent,
             int requestCode, @Nullable Bundle options) {
+        options = transferSpringboardActivityOptions(options);
         Instrumentation.ActivityResult ar =
             mInstrumentation.execStartActivity(
                 this, mMainThread.getApplicationThread(), mToken, child,
@@ -4854,6 +4870,7 @@
         if (referrer != null) {
             intent.putExtra(Intent.EXTRA_REFERRER, referrer);
         }
+        options = transferSpringboardActivityOptions(options);
         Instrumentation.ActivityResult ar =
             mInstrumentation.execStartActivity(
                 this, mMainThread.getApplicationThread(), mToken, who,
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index c96bd39e..23fea71 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -3625,6 +3625,24 @@
     }
 
     /**
+     * Enable more aggressive scheduling for latency-sensitive low-runtime VR threads. Only one
+     * thread can be a VR thread in a process at a time, and that thread may be subject to
+     * restrictions on the amount of time it can run.
+     *
+     * To reset the VR thread for an application, a tid of 0 can be passed.
+     *
+     * @see android.os.Process#myTid()
+     * @param tid tid of the VR thread
+     */
+    public static void setVrThread(int tid) {
+        try {
+            ActivityManagerNative.getDefault().setVrThread(tid);
+        } catch (RemoteException e) {
+            // pass
+        }
+    }
+
+    /**
      * The AppTask allows you to manage your own application's tasks.
      * See {@link android.app.ActivityManager#getAppTasks()}
      */
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index 3a70a4c..6dd14fd 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -19,6 +19,9 @@
 import android.annotation.NonNull;
 import android.content.ComponentName;
 import android.content.IIntentSender;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Bundle;
 import android.os.IBinder;
 import android.service.voice.IVoiceInteractionSession;
 
@@ -151,4 +154,20 @@
      *  such as Power Save mode.
      */
     public abstract void setPendingIntentWhitelistDuration(IIntentSender target, long duration);
+
+    /**
+     * Updates and persists the {@link Configuration} for a given user.
+     *
+     * @param values the configuration to update
+     * @param userId the user to update the configuration for
+     */
+    public abstract void updatePersistentConfigurationForUser(@NonNull Configuration values,
+            int userId);
+
+    /**
+     * Create an {@link IIntentSender} to start an activity, as if {@code packageName} on
+     * user {@code userId} created it.
+     */
+    public abstract IIntentSender getActivityIntentSenderAsPackage(String packageName,
+            int userId, int requestCode, Intent intent, int flags, Bundle bOptions);
 }
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index dcac633..277348a 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -2371,7 +2371,8 @@
             data.enforceInterface(IActivityManager.descriptor);
             IUserSwitchObserver observer = IUserSwitchObserver.Stub.asInterface(
                     data.readStrongBinder());
-            registerUserSwitchObserver(observer);
+            String name = data.readString();
+            registerUserSwitchObserver(observer, name);
             reply.writeNoException();
             return true;
         }
@@ -2995,6 +2996,20 @@
             reply.writeInt(result);
             return true;
         }
+        case SET_VR_THREAD_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            final int tid = data.readInt();
+            setVrThread(tid);
+            reply.writeNoException();
+            return true;
+        }
+        case SET_RENDER_THREAD_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            final int tid = data.readInt();
+            setRenderThread(tid);
+            reply.writeNoException();
+            return true;
+        }
         }
 
         return super.onTransact(code, data, reply, flags);
@@ -6060,11 +6075,13 @@
         return result;
     }
 
-    public void registerUserSwitchObserver(IUserSwitchObserver observer) throws RemoteException {
+    public void registerUserSwitchObserver(IUserSwitchObserver observer,
+            String name) throws RemoteException {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeStrongBinder(observer != null ? observer.asBinder() : null);
+        data.writeString(name);
         mRemote.transact(REGISTER_USER_SWITCH_OBSERVER_TRANSACTION, data, reply, 0);
         reply.readException();
         data.recycle();
@@ -7028,5 +7045,32 @@
         return res;
     }
 
+    @Override
+    public void setVrThread(int tid)
+        throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeInt(tid);
+        mRemote.transact(SET_VR_THREAD_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+        return;
+    }
+
+    public void setRenderThread(int tid)
+        throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        data.writeInt(tid);
+        mRemote.transact(SET_RENDER_THREAD_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+        return;
+    }
+
     private IBinder mRemote;
 }
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 4c8ddc7..d9a4690 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -31,10 +31,13 @@
 import android.os.Parcelable;
 import android.os.RemoteException;
 import android.os.ResultReceiver;
+import android.transition.Transition;
+import android.transition.TransitionManager;
 import android.util.Pair;
 import android.util.Slog;
 import android.view.AppTransitionAnimationSpec;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.Window;
 
 import java.util.ArrayList;
@@ -190,6 +193,7 @@
             = "android:activity.exitCoordinatorIndex";
 
     private static final String KEY_USAGE_TIME_REPORT = "android:activity.usageTimeReport";
+    private static final String KEY_ROTATION_ANIMATION_HINT = "android:activity.rotationAnimationHint";
 
     /** @hide */
     public static final int ANIM_NONE = 0;
@@ -241,6 +245,7 @@
     private int mDockCreateMode = DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
     private boolean mTaskOverlay;
     private AppTransitionAnimationSpec mAnimSpecs[];
+    private int mRotationAnimationHint = -1;
 
     /**
      * Create an ActivityOptions specifying a custom animation to run when
@@ -640,10 +645,71 @@
     public static ActivityOptions makeSceneTransitionAnimation(Activity activity,
             Pair<View, String>... sharedElements) {
         ActivityOptions opts = new ActivityOptions();
-        if (!activity.getWindow().hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)) {
-            opts.mAnimationType = ANIM_DEFAULT;
+        makeSceneTransitionAnimation(activity, activity.getWindow(), opts,
+                activity.mExitTransitionListener, sharedElements);
+        return opts;
+    }
+
+    /**
+     * Call this immediately prior to startActivity to begin a shared element transition
+     * from a non-Activity. The window must support Window.FEATURE_ACTIVITY_TRANSITIONS.
+     * The exit transition will start immediately and the shared element transition will
+     * start once the launched Activity's shared element is ready.
+     * <p>
+     * When all transitions have completed and the shared element has been transfered,
+     * the window's decor View will have its visibility set to View.GONE.
+     *
+     * @hide
+     */
+    @SafeVarargs
+    public static ActivityOptions startSharedElementAnimation(Window window,
+            Pair<View, String>... sharedElements) {
+        ActivityOptions opts = new ActivityOptions();
+        final View decorView = window.getDecorView();
+        if (decorView == null) {
             return opts;
         }
+        final ExitTransitionCoordinator exit =
+                makeSceneTransitionAnimation(null, window, opts, null, sharedElements);
+        if (exit != null) {
+            HideWindowListener listener = new HideWindowListener(window, exit);
+            exit.setHideSharedElementsCallback(listener);
+            exit.startExit();
+        }
+        return opts;
+    }
+
+    /**
+     * This method should be called when the {@link #startSharedElementAnimation(Window, Pair[])}
+     * animation must be stopped and the Views reset. This can happen if there was an error
+     * from startActivity or a springboard activity and the animation should stop and reset.
+     *
+     * @hide
+     */
+    public static void stopSharedElementAnimation(Window window) {
+        final View decorView = window.getDecorView();
+        if (decorView == null) {
+            return;
+        }
+        final ExitTransitionCoordinator exit = (ExitTransitionCoordinator)
+                decorView.getTag(com.android.internal.R.id.cross_task_transition);
+        if (exit != null) {
+            exit.cancelPendingTransitions();
+            decorView.setTagInternal(com.android.internal.R.id.cross_task_transition, null);
+            TransitionManager.endTransitions((ViewGroup) decorView);
+            exit.resetViews();
+            exit.clearState();
+            decorView.setVisibility(View.VISIBLE);
+        }
+    }
+
+    static ExitTransitionCoordinator makeSceneTransitionAnimation(Activity activity, Window window,
+            ActivityOptions opts, SharedElementCallback callback,
+            Pair<View, String>[] sharedElements) {
+        if (!window.hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)) {
+            opts.mAnimationType = ANIM_DEFAULT;
+            return null;
+        }
         opts.mAnimationType = ANIM_SCENE_TRANSITION;
 
         ArrayList<String> names = new ArrayList<String>();
@@ -665,18 +731,22 @@
             }
         }
 
-        ExitTransitionCoordinator exit = new ExitTransitionCoordinator(activity, names, names,
-                views, false);
+        ExitTransitionCoordinator exit = new ExitTransitionCoordinator(activity, window,
+                callback, names, names, views, false);
         opts.mTransitionReceiver = exit;
         opts.mSharedElementNames = names;
-        opts.mIsReturning = false;
-        opts.mExitCoordinatorIndex =
-                activity.mActivityTransitionState.addExitTransitionCoordinator(exit);
-        return opts;
+        opts.mIsReturning = (activity == null);
+        if (activity == null) {
+            opts.mExitCoordinatorIndex = -1;
+        } else {
+            opts.mExitCoordinatorIndex =
+                    activity.mActivityTransitionState.addExitTransitionCoordinator(exit);
+        }
+        return exit;
     }
 
     /** @hide */
-    public static ActivityOptions makeSceneTransitionAnimation(Activity activity,
+    static ActivityOptions makeSceneTransitionAnimation(Activity activity,
             ExitTransitionCoordinator exitCoordinator, ArrayList<String> sharedElementNames,
             int resultCode, Intent resultData) {
         ActivityOptions opts = new ActivityOptions();
@@ -795,6 +865,7 @@
             mAnimationFinishedListener = IRemoteCallback.Stub.asInterface(
                     opts.getBinder(KEY_ANIMATION_FINISHED_LISTENER));
         }
+        mRotationAnimationHint = opts.getInt(KEY_ROTATION_ANIMATION_HINT);
     }
 
     /**
@@ -900,6 +971,16 @@
         return mIsReturning;
     }
 
+    /**
+     * Returns whether or not the ActivityOptions was created with
+     * {@link #startSharedElementAnimation(Window, Pair[])}.
+     *
+     * @hide
+     */
+    boolean isCrossTask() {
+        return mExitCoordinatorIndex < 0;
+    }
+
     /** @hide */
     public ArrayList<String> getSharedElementNames() {
         return mSharedElementNames;
@@ -1138,6 +1219,7 @@
         if (mAnimationFinishedListener != null) {
             b.putBinder(KEY_ANIMATION_FINISHED_LISTENER, mAnimationFinishedListener.asBinder());
         }
+        b.putInt(KEY_ROTATION_ANIMATION_HINT, mRotationAnimationHint);
 
         return b;
     }
@@ -1184,6 +1266,27 @@
         return null;
     }
 
+    /**
+     * Returns the rotation animation set by {@link setRotationAnimationHint} or -1
+     * if unspecified.
+     * @hide
+     */
+    public int getRotationAnimationHint() {
+        return mRotationAnimationHint;
+    }
+
+
+    /**
+     * Set a rotation animation to be used if launching the activity
+     * triggers an orientation change, or -1 to clear. See
+     * {@link android.view.WindowManager.LayoutParams} for rotation
+     * animation values.
+     * @hide
+     */
+    public void setRotationAnimationHint(int hint) {
+        mRotationAnimationHint = hint;
+    }
+
     /** @hide */
     @Override
     public String toString() {
@@ -1191,4 +1294,65 @@
                 + ", mAnimationType=" + mAnimationType + ", mStartX=" + mStartX + ", mStartY="
                 + mStartY + ", mWidth=" + mWidth + ", mHeight=" + mHeight;
     }
+
+    private static class HideWindowListener extends Transition.TransitionListenerAdapter
+        implements ExitTransitionCoordinator.HideSharedElementsCallback {
+        private final Window mWindow;
+        private final ExitTransitionCoordinator mExit;
+        private final boolean mWaitingForTransition;
+        private boolean mTransitionEnded;
+        private boolean mSharedElementHidden;
+        private ArrayList<View> mSharedElements;
+
+        public HideWindowListener(Window window, ExitTransitionCoordinator exit) {
+            mWindow = window;
+            mExit = exit;
+            mSharedElements = new ArrayList<>(exit.mSharedElements);
+            Transition transition = mWindow.getExitTransition();
+            if (transition != null) {
+                transition.addListener(this);
+                mWaitingForTransition = true;
+            } else {
+                mWaitingForTransition = false;
+            }
+            View decorView = mWindow.getDecorView();
+            if (decorView != null) {
+                if (decorView.getTag(com.android.internal.R.id.cross_task_transition) != null) {
+                    throw new IllegalStateException(
+                            "Cannot start a transition while one is running");
+                }
+                decorView.setTagInternal(com.android.internal.R.id.cross_task_transition, exit);
+            }
+        }
+
+        @Override
+        public void onTransitionEnd(Transition transition) {
+            mTransitionEnded = true;
+            hideWhenDone();
+            transition.removeListener(this);
+        }
+
+        @Override
+        public void hideSharedElements() {
+            mSharedElementHidden = true;
+            hideWhenDone();
+        }
+
+        private void hideWhenDone() {
+            if (mSharedElementHidden && (!mWaitingForTransition || mTransitionEnded)) {
+                mExit.resetViews();
+                int numSharedElements = mSharedElements.size();
+                for (int i = 0; i < numSharedElements; i++) {
+                    View view = mSharedElements.get(i);
+                    view.requestLayout();
+                }
+                View decorView = mWindow.getDecorView();
+                if (decorView != null) {
+                    decorView.setTagInternal(
+                            com.android.internal.R.id.cross_task_transition, null);
+                    decorView.setVisibility(View.GONE);
+                }
+            }
+        }
+    }
 }
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 0728bdf..3f15a75 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -236,6 +236,7 @@
     boolean mSystemThread = false;
     boolean mJitEnabled = false;
     boolean mSomeActivitiesChanged = false;
+    boolean mUpdatingSystemConfig = false;
 
     // These can be accessed by multiple threads; mPackages is the lock.
     // XXX For now we keep around information about all packages we have
@@ -1574,7 +1575,9 @@
                 case CONFIGURATION_CHANGED:
                     Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "configChanged");
                     mCurDefaultDisplayDpi = ((Configuration)msg.obj).densityDpi;
+                    mUpdatingSystemConfig = true;
                     handleConfigurationChanged((Configuration)msg.obj, null);
+                    mUpdatingSystemConfig = false;
                     Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
                     break;
                 case CLEAN_UP_CONTEXT:
@@ -4629,7 +4632,14 @@
             // onConfigurationChanged
             int diff = activity.mCurrentConfig.diff(newConfig);
             if (diff != 0) {
-                shouldChangeConfig = true;
+                // Always send the task-level config changes. For system-level configuration, if
+                // this activity doesn't handle any of the config changes, then don't bother
+                // calling onConfigurationChanged as we're going to destroy it.
+                if (!mUpdatingSystemConfig
+                        || (~activity.mActivityInfo.getRealConfigChanged() & diff) == 0
+                        || !reportToActivity) {
+                    shouldChangeConfig = true;
+                }
             }
         }
 
diff --git a/core/java/android/app/ActivityTransitionState.java b/core/java/android/app/ActivityTransitionState.java
index 02eb4d3..2219238 100644
--- a/core/java/android/app/ActivityTransitionState.java
+++ b/core/java/android/app/ActivityTransitionState.java
@@ -185,7 +185,12 @@
             activity.getWindow().getDecorView().setVisibility(View.VISIBLE);
         }
         mEnterTransitionCoordinator = new EnterTransitionCoordinator(activity,
-                resultReceiver, sharedElementNames, mEnterActivityOptions.isReturning());
+                resultReceiver, sharedElementNames, mEnterActivityOptions.isReturning(),
+                mEnterActivityOptions.isCrossTask());
+        if (mEnterActivityOptions.isCrossTask()) {
+            mExitingFrom = new ArrayList<>(mEnterActivityOptions.getSharedElementNames());
+            mExitingTo = new ArrayList<>(mEnterActivityOptions.getSharedElementNames());
+        }
 
         if (!mIsEnterPostponed) {
             startEnter();
@@ -275,7 +280,8 @@
     }
 
     private void restoreReenteringViews() {
-        if (mEnterTransitionCoordinator != null && mEnterTransitionCoordinator.isReturning()) {
+        if (mEnterTransitionCoordinator != null && mEnterTransitionCoordinator.isReturning() &&
+                !mEnterTransitionCoordinator.isCrossTask()) {
             mEnterTransitionCoordinator.forceViewsToAppear();
             mExitingFrom = null;
             mExitingTo = null;
@@ -302,8 +308,9 @@
                     }
                 }
 
-                mReturnExitCoordinator =
-                        new ExitTransitionCoordinator(activity, mEnteringNames, null, null, true);
+                mReturnExitCoordinator = new ExitTransitionCoordinator(activity,
+                        activity.getWindow(), activity.mEnterTransitionListener, mEnteringNames,
+                        null, null, true);
                 if (enterViewsTransition != null && decor != null) {
                     enterViewsTransition.resume(decor);
                 }
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 7824072..9928512 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -201,7 +201,7 @@
                 createContextThemeWrapper);
 
         mWindow.alwaysReadCloseOnTouchAttr();
-        mAlert = new AlertController(getContext(), this, getWindow());
+        mAlert = AlertController.create(getContext(), this, getWindow());
     }
 
     static int resolveDialogTheme(Context context, int themeResId) {
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index e6ca520..8f42467 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -185,15 +185,6 @@
     @GuardedBy("mSync")
     private File mCodeCacheDir;
 
-    @GuardedBy("mSync")
-    private File[] mExternalObbDirs;
-    @GuardedBy("mSync")
-    private File[] mExternalFilesDirs;
-    @GuardedBy("mSync")
-    private File[] mExternalCacheDirs;
-    @GuardedBy("mSync")
-    private File[] mExternalMediaDirs;
-
     // The system service cache for the system services that are cached per-ContextImpl.
     final Object[] mServiceCache = SystemServiceRegistry.createServiceCache();
 
@@ -562,17 +553,10 @@
     @Override
     public File[] getExternalFilesDirs(String type) {
         synchronized (mSync) {
-            if (mExternalFilesDirs == null) {
-                mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
-            }
-
-            // Splice in requested type, if any
-            File[] dirs = mExternalFilesDirs;
+            File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
             if (type != null) {
                 dirs = Environment.buildPaths(dirs, type);
             }
-
-            // Create dirs if needed
             return ensureExternalDirsExistOrFilter(dirs);
         }
     }
@@ -586,12 +570,8 @@
     @Override
     public File[] getObbDirs() {
         synchronized (mSync) {
-            if (mExternalObbDirs == null) {
-                mExternalObbDirs = Environment.buildExternalStorageAppObbDirs(getPackageName());
-            }
-
-            // Create dirs if needed
-            return ensureExternalDirsExistOrFilter(mExternalObbDirs);
+            File[] dirs = Environment.buildExternalStorageAppObbDirs(getPackageName());
+            return ensureExternalDirsExistOrFilter(dirs);
         }
     }
 
@@ -624,24 +604,16 @@
     @Override
     public File[] getExternalCacheDirs() {
         synchronized (mSync) {
-            if (mExternalCacheDirs == null) {
-                mExternalCacheDirs = Environment.buildExternalStorageAppCacheDirs(getPackageName());
-            }
-
-            // Create dirs if needed
-            return ensureExternalDirsExistOrFilter(mExternalCacheDirs);
+            File[] dirs = Environment.buildExternalStorageAppCacheDirs(getPackageName());
+            return ensureExternalDirsExistOrFilter(dirs);
         }
     }
 
     @Override
     public File[] getExternalMediaDirs() {
         synchronized (mSync) {
-            if (mExternalMediaDirs == null) {
-                mExternalMediaDirs = Environment.buildExternalStorageAppMediaDirs(getPackageName());
-            }
-
-            // Create dirs if needed
-            return ensureExternalDirsExistOrFilter(mExternalMediaDirs);
+            File[] dirs = Environment.buildExternalStorageAppMediaDirs(getPackageName());
+            return ensureExternalDirsExistOrFilter(dirs);
         }
     }
 
diff --git a/core/java/android/app/EnterTransitionCoordinator.java b/core/java/android/app/EnterTransitionCoordinator.java
index 8bf1e9a..5d12b0d 100644
--- a/core/java/android/app/EnterTransitionCoordinator.java
+++ b/core/java/android/app/EnterTransitionCoordinator.java
@@ -59,12 +59,14 @@
     private boolean mIsViewsTransitionStarted;
     private Transition mEnterViewsTransition;
     private OnPreDrawListener mViewsReadyListener;
+    private final boolean mIsCrossTask;
 
     public EnterTransitionCoordinator(Activity activity, ResultReceiver resultReceiver,
-            ArrayList<String> sharedElementNames, boolean isReturning) {
+            ArrayList<String> sharedElementNames, boolean isReturning, boolean isCrossTask) {
         super(activity.getWindow(), sharedElementNames,
-                getListener(activity, isReturning), isReturning);
+                getListener(activity, isReturning && !isCrossTask), isReturning);
         mActivity = activity;
+        mIsCrossTask = isCrossTask;
         setResultReceiver(resultReceiver);
         prepareEnter();
         Bundle resultReceiverBundle = new Bundle();
@@ -85,6 +87,10 @@
         }
     }
 
+    boolean isCrossTask() {
+        return mIsCrossTask;
+    }
+
     public void viewInstancesReady(ArrayList<String> accepted, ArrayList<String> localNames,
             ArrayList<View> localViews) {
         boolean remap = false;
@@ -325,7 +331,9 @@
         if (mActivity == null || decorView == null) {
             return;
         }
-        mActivity.overridePendingTransition(0, 0);
+        if (!isCrossTask()) {
+            mActivity.overridePendingTransition(0, 0);
+        }
         if (!mIsReturning) {
             mWasOpaque = mActivity.convertToTranslucent(null, null);
             Drawable background = decorView.getBackground();
diff --git a/core/java/android/app/ExitTransitionCoordinator.java b/core/java/android/app/ExitTransitionCoordinator.java
index 0404288..160c285 100644
--- a/core/java/android/app/ExitTransitionCoordinator.java
+++ b/core/java/android/app/ExitTransitionCoordinator.java
@@ -35,6 +35,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewTreeObserver;
+import android.view.Window;
 
 import java.util.ArrayList;
 
@@ -59,18 +60,20 @@
     private Bundle mExitSharedElementBundle;
     private boolean mIsExitStarted;
     private boolean mSharedElementsHidden;
+    private HideSharedElementsCallback mHideSharedElementsCallback;
 
-    public ExitTransitionCoordinator(Activity activity, ArrayList<String> names,
+    public ExitTransitionCoordinator(Activity activity, Window window,
+            SharedElementCallback listener, ArrayList<String> names,
             ArrayList<String> accepted, ArrayList<View> mapped, boolean isReturning) {
-        super(activity.getWindow(), names, getListener(activity, isReturning), isReturning);
+        super(window, names, listener, isReturning);
         viewsReady(mapSharedElements(accepted, mapped));
         stripOffscreenViews();
         mIsBackgroundReady = !isReturning;
         mActivity = activity;
     }
 
-    private static SharedElementCallback getListener(Activity activity, boolean isReturning) {
-        return isReturning ? activity.mEnterTransitionListener : activity.mExitTransitionListener;
+    void setHideSharedElementsCallback(HideSharedElementsCallback callback) {
+        mHideSharedElementsCallback = callback;
     }
 
     @Override
@@ -188,6 +191,9 @@
 
     private void hideSharedElements() {
         moveSharedElementsFromOverlay();
+        if (mHideSharedElementsCallback != null) {
+            mHideSharedElementsCallback.hideSharedElements();
+        }
         if (!mIsHidden) {
             hideViews(mSharedElements);
         }
@@ -207,7 +213,11 @@
             startTransition(new Runnable() {
                 @Override
                 public void run() {
-                    beginTransitions();
+                    if (mActivity != null) {
+                        beginTransitions();
+                    } else {
+                        startExitTransition();
+                    }
                 }
             });
         }
@@ -508,4 +518,8 @@
             return getWindow().getSharedElementExitTransition();
         }
     }
+
+    interface HideSharedElementsCallback {
+        void hideSharedElements();
+    }
 }
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 80ba3eb..4a4202a 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -512,7 +512,8 @@
     public int getLaunchedFromUid(IBinder activityToken) throws RemoteException;
     public String getLaunchedFromPackage(IBinder activityToken) throws RemoteException;
 
-    public void registerUserSwitchObserver(IUserSwitchObserver observer) throws RemoteException;
+    public void registerUserSwitchObserver(IUserSwitchObserver observer,
+            String name) throws RemoteException;
     public void unregisterUserSwitchObserver(IUserSwitchObserver observer) throws RemoteException;
 
     public void requestBugReport(int bugreportType) throws RemoteException;
@@ -657,6 +658,9 @@
             IIntentReceiver finishedReceiver, String requiredPermission, Bundle options)
             throws RemoteException;
 
+    public void setVrThread(int tid) throws RemoteException;
+    public void setRenderThread(int tid) throws RemoteException;
+
     /*
      * Private non-Binder interfaces
      */
@@ -1043,4 +1047,8 @@
     int START_CONFIRM_DEVICE_CREDENTIAL_INTENT = IBinder.FIRST_CALL_TRANSACTION + 374;
     int SEND_IDLE_JOB_TRIGGER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 375;
     int SEND_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 376;
+
+    // Start of N MR1 transactions
+    int SET_VR_THREAD_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 377;
+    int SET_RENDER_THREAD_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 378;
 }
diff --git a/core/java/android/app/IWallpaperManager.aidl b/core/java/android/app/IWallpaperManager.aidl
index a0762b9..9cd70e6 100644
--- a/core/java/android/app/IWallpaperManager.aidl
+++ b/core/java/android/app/IWallpaperManager.aidl
@@ -72,7 +72,7 @@
      * information about that wallpaper.  Otherwise, if it is a static image,
      * simply return null.
      */
-    WallpaperInfo getWallpaperInfo();
+    WallpaperInfo getWallpaperInfo(int userId);
 
     /**
      * Clear the system wallpaper.
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 7682af8..fa943f2 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1307,6 +1307,7 @@
             // Flags bitwise-ored to mFlags
             private static final int FLAG_AVAILABLE_OFFLINE = 0x1;
             private static final int FLAG_HINT_LAUNCHES_ACTIVITY = 1 << 1;
+            private static final int FLAG_HINT_DISPLAY_INLINE = 1 << 2;
 
             // Default value for flags integer
             private static final int DEFAULT_FLAGS = FLAG_AVAILABLE_OFFLINE;
@@ -1493,6 +1494,29 @@
             public boolean getHintLaunchesActivity() {
                 return (mFlags & FLAG_HINT_LAUNCHES_ACTIVITY) != 0;
             }
+
+            /**
+             * Set a hint that this Action should be displayed inline.
+             *
+             * @param hintDisplayInline {@code true} if action should be displayed inline, false
+             *        otherwise
+             * @return this object for method chaining
+             */
+            public WearableExtender setHintDisplayActionInline(
+                    boolean hintDisplayInline) {
+                setFlag(FLAG_HINT_DISPLAY_INLINE, hintDisplayInline);
+                return this;
+            }
+
+            /**
+             * Get a hint that this Action should be displayed inline.
+             *
+             * @return {@code true} if the Action should be displayed inline, {@code false} 
+             *         otherwise. The default value is {@code false} if this was never set.
+             */
+            public boolean getHintDisplayActionInline() {
+                return (mFlags & FLAG_HINT_DISPLAY_INLINE) != 0;
+            }
         }
     }
 
@@ -3237,6 +3261,7 @@
             contentView.setTextViewText(R.id.app_name_text, null);
             contentView.setViewVisibility(R.id.chronometer, View.GONE);
             contentView.setViewVisibility(R.id.header_text, View.GONE);
+            contentView.setTextViewText(R.id.header_text, null);
             contentView.setViewVisibility(R.id.header_text_divider, View.GONE);
             contentView.setViewVisibility(R.id.time_divider, View.GONE);
             contentView.setViewVisibility(R.id.time, View.GONE);
diff --git a/core/java/android/app/RetailDemoModeServiceInternal.java b/core/java/android/app/RetailDemoModeServiceInternal.java
new file mode 100644
index 0000000..7ca214a
--- /dev/null
+++ b/core/java/android/app/RetailDemoModeServiceInternal.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.app;
+
+/**
+ * Retail Demo Mode Service interface to be used locally inside system server
+ *
+ * @hide Only for use inside system server
+ */
+public interface RetailDemoModeServiceInternal {
+    /**
+     * Used to notify RetailDemoModeService of any user activity.
+     */
+    public void onUserActivity();
+}
\ No newline at end of file
diff --git a/core/java/android/app/TabActivity.java b/core/java/android/app/TabActivity.java
index 882e55a..637c8c1 100644
--- a/core/java/android/app/TabActivity.java
+++ b/core/java/android/app/TabActivity.java
@@ -28,23 +28,6 @@
  * {@link ActionBar#newTab() ActionBar.newTab()} and
  * related APIs for placing tabs within their action bar area.</p>
  *
- * <p>A replacement for TabActivity can also be implemented by directly using
- * TabHost.  You will need to define a layout that correctly uses a TabHost
- * with a TabWidget as well as an area in which to display your tab content.
- * A typical example would be:</p>
- *
- * {@sample development/samples/Support4Demos/res/layout/fragment_tabs.xml complete}
- *
- * <p>The implementation needs to take over responsibility for switching
- * the shown content when the user switches between tabs.
- *
- * {@sample development/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.java
- *      complete}
- *
- * <p>Also see the <a href="{@docRoot}resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabsPager.html">
- * Fragment Tabs Pager</a> sample for an example of using the support library's ViewPager to
- * allow the user to swipe the content to switch between tabs.</p>
- *
  * @deprecated New applications should use Fragments instead of this class;
  * to continue to run on older devices, you can use the v4 support library
  * which provides a version of the Fragment API that is compatible down to
diff --git a/core/java/android/app/WallpaperInfo.java b/core/java/android/app/WallpaperInfo.java
index 7db9fa8..9d40381f 100644
--- a/core/java/android/app/WallpaperInfo.java
+++ b/core/java/android/app/WallpaperInfo.java
@@ -31,6 +31,7 @@
 import android.content.res.TypedArray;
 import android.content.res.XmlResourceParser;
 import android.graphics.drawable.Drawable;
+import android.net.Uri;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.service.wallpaper.WallpaperService;
@@ -72,6 +73,10 @@
      */
     final int mDescriptionResource;
 
+    final int mContextUriResource;
+    final int mContextDescriptionResource;
+    final boolean mShowMetadataInPreview;
+
     /**
      * Constructor.
      * 
@@ -89,7 +94,10 @@
         int thumbnailRes = -1;
         int authorRes = -1;
         int descriptionRes = -1;
-        
+        int contextUriRes = -1;
+        int contextDescriptionRes = -1;
+        boolean showMetadataInPreview = false;
+
         XmlResourceParser parser = null;
         try {
             parser = si.loadXmlMetaData(pm, WallpaperService.SERVICE_META_DATA);
@@ -127,6 +135,15 @@
             descriptionRes = sa.getResourceId(
                     com.android.internal.R.styleable.Wallpaper_description,
                     -1);
+            contextUriRes = sa.getResourceId(
+                    com.android.internal.R.styleable.Wallpaper_contextUri,
+                    -1);
+            contextDescriptionRes = sa.getResourceId(
+                    com.android.internal.R.styleable.Wallpaper_contextDescription,
+                    -1);
+            showMetadataInPreview = sa.getBoolean(
+                    com.android.internal.R.styleable.Wallpaper_showMetadataInPreview,
+                    false);
 
             sa.recycle();
         } catch (NameNotFoundException e) {
@@ -140,6 +157,9 @@
         mThumbnailResource = thumbnailRes;
         mAuthorResource = authorRes;
         mDescriptionResource = descriptionRes;
+        mContextUriResource = contextUriRes;
+        mContextDescriptionResource = contextDescriptionRes;
+        mShowMetadataInPreview = showMetadataInPreview;
     }
 
     WallpaperInfo(Parcel source) {
@@ -147,6 +167,9 @@
         mThumbnailResource = source.readInt();
         mAuthorResource = source.readInt();
         mDescriptionResource = source.readInt();
+        mContextUriResource = source.readInt();
+        mContextDescriptionResource = source.readInt();
+        mShowMetadataInPreview = source.readInt() != 0;
         mService = ResolveInfo.CREATOR.createFromParcel(source);
     }
     
@@ -248,7 +271,60 @@
         return pm.getText(packageName, mDescriptionResource,
                 mService.serviceInfo.applicationInfo);
     }
-    
+
+    /**
+     * Returns an URI that specifies a link for further context about this wallpaper.
+     *
+     * @param pm An instance of {@link PackageManager} to retrieve the URI.
+     * @return The URI.
+     */
+    public Uri loadContextUri(PackageManager pm) throws NotFoundException {
+        if (mContextUriResource <= 0) throw new NotFoundException();
+        String packageName = mService.resolvePackageName;
+        ApplicationInfo applicationInfo = null;
+        if (packageName == null) {
+            packageName = mService.serviceInfo.packageName;
+            applicationInfo = mService.serviceInfo.applicationInfo;
+        }
+        String contextUriString = pm.getText(
+                packageName, mContextUriResource, applicationInfo).toString();
+        if (contextUriString == null) {
+            return null;
+        }
+        return Uri.parse(contextUriString);
+    }
+
+    /**
+     * Retrieves a title of the URI that specifies a link for further context about this wallpaper.
+     *
+     * @param pm An instance of {@link PackageManager} to retrieve the title.
+     * @return The title.
+     */
+    public CharSequence loadContextDescription(PackageManager pm) throws NotFoundException {
+        if (mContextDescriptionResource <= 0) throw new NotFoundException();
+        String packageName = mService.resolvePackageName;
+        ApplicationInfo applicationInfo = null;
+        if (packageName == null) {
+            packageName = mService.serviceInfo.packageName;
+            applicationInfo = mService.serviceInfo.applicationInfo;
+        }
+        return pm.getText(packageName, mContextDescriptionResource, applicationInfo).toString();
+    }
+
+    /**
+     * Queries whether any metadata should be shown when previewing the wallpaper. If this value is
+     * set to true, any component that shows a preview of this live wallpaper should also show
+     * accompanying information like {@link #loadLabel},
+     * {@link #loadDescription}, {@link #loadAuthor} and
+     * {@link #loadContextDescription(PackageManager)}, so the user gets to know further information
+     * about this wallpaper.
+     *
+     * @return Whether any metadata should be shown when previewing the wallpaper.
+     */
+    public boolean getShowMetadataInPreview() {
+        return mShowMetadataInPreview;
+    }
+
     /**
      * Return the class name of an activity that provides a settings UI for
      * the wallpaper.  You can launch this activity be starting it with
@@ -287,6 +363,9 @@
         dest.writeInt(mThumbnailResource);
         dest.writeInt(mAuthorResource);
         dest.writeInt(mDescriptionResource);
+        dest.writeInt(mContextUriResource);
+        dest.writeInt(mContextDescriptionResource);
+        dest.writeInt(mShowMetadataInPreview ? 1 : 0);
         mService.writeToParcel(dest, flags);
     }
 
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index 7f467f0..79f2a1e 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -51,6 +51,7 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.SystemProperties;
+import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.WindowManagerGlobal;
@@ -783,7 +784,7 @@
                 Log.w(TAG, "WallpaperService not running");
                 throw new RuntimeException(new DeadSystemException());
             } else {
-                return sGlobals.mService.getWallpaperInfo();
+                return sGlobals.mService.getWallpaperInfo(UserHandle.myUserId());
             }
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index 24647f38..a0da258 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -79,6 +79,13 @@
         public static final int USER_INTERACTION = 7;
 
         /**
+         * An event type denoting that an action equivalent to a ShortcutInfo is taken by the user.
+         *
+         * @see android.content.pm.ShortcutManager#reportShortcutUsed(String)
+         */
+        public static final int SHORTCUT_INVOCATION = 8;
+
+        /**
          * {@hide}
          */
         public String mPackage;
@@ -105,6 +112,13 @@
         public Configuration mConfiguration;
 
         /**
+         * ID of the shortcut.
+         * Only present for {@link #SHORTCUT_INVOCATION} event types.
+         * {@hide}
+         */
+        public String mShortcutId;
+
+        /**
          * The package name of the source of this event.
          */
         public String getPackageName() {
@@ -145,6 +159,16 @@
         public Configuration getConfiguration() {
             return mConfiguration;
         }
+
+        /**
+         * Returns the ID of a {@link android.content.pm.ShortcutInfo} for this event
+         * if the event is of type {@link #SHORTCUT_INVOCATION}, otherwise it returns null.
+         *
+         * @see android.content.pm.ShortcutManager#reportShortcutUsed(String)
+         */
+        public String getShortcutId() {
+            return mShortcutId;
+        }
     }
 
     // Only used when creating the resulting events. Not used for reading/unparceling.
@@ -276,8 +300,13 @@
         p.writeInt(event.mEventType);
         p.writeLong(event.mTimeStamp);
 
-        if (event.mEventType == Event.CONFIGURATION_CHANGE) {
-            event.mConfiguration.writeToParcel(p, flags);
+        switch (event.mEventType) {
+            case Event.CONFIGURATION_CHANGE:
+                event.mConfiguration.writeToParcel(p, flags);
+                break;
+            case Event.SHORTCUT_INVOCATION:
+                p.writeString(event.mShortcutId);
+                break;
         }
     }
 
@@ -301,11 +330,18 @@
         eventOut.mEventType = p.readInt();
         eventOut.mTimeStamp = p.readLong();
 
-        // Extract the configuration for configuration change events.
-        if (eventOut.mEventType == Event.CONFIGURATION_CHANGE) {
-            eventOut.mConfiguration = Configuration.CREATOR.createFromParcel(p);
-        } else {
-            eventOut.mConfiguration = null;
+        // Fill out the event-dependant fields.
+        eventOut.mConfiguration = null;
+        eventOut.mShortcutId = null;
+
+        switch (eventOut.mEventType) {
+            case Event.CONFIGURATION_CHANGE:
+                // Extract the configuration for configuration change events.
+                eventOut.mConfiguration = Configuration.CREATOR.createFromParcel(p);
+                break;
+            case Event.SHORTCUT_INVOCATION:
+                eventOut.mShortcutId = p.readString();
+                break;
         }
     }
 
diff --git a/core/java/android/app/usage/UsageStatsManagerInternal.java b/core/java/android/app/usage/UsageStatsManagerInternal.java
index b6f1567..a6f91fe 100644
--- a/core/java/android/app/usage/UsageStatsManagerInternal.java
+++ b/core/java/android/app/usage/UsageStatsManagerInternal.java
@@ -56,6 +56,17 @@
     public abstract void reportConfigurationChange(Configuration config, int userId);
 
     /**
+     * Reports that an action equivalent to a ShortcutInfo is taken by the user.
+     *
+     * @param packageName The package name of the shortcut publisher
+     * @param shortcutId The ID of the shortcut in question
+     * @param userId The user in which the content provider was accessed.
+     *
+     * @see android.content.pm.ShortcutManager#reportShortcutUsed(String)
+     */
+    public abstract void reportShortcutUsage(String packageName, String shortcutId, int userId);
+
+    /**
      * Reports that a content provider has been accessed by a foreground app.
      * @param name The authority of the content provider
      * @param pkgName The package name of the content provider
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index 2d9f4a7..cd14469 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -34,7 +34,6 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
-import android.os.SystemClock;
 import android.util.DisplayMetrics;
 import android.util.SparseArray;
 import android.util.TypedValue;
@@ -187,19 +186,28 @@
                 idsToUpdate[i] = mViews.keyAt(i);
             }
         }
-        List<RemoteViews> updatedViews;
-        int[] updatedIds = new int[idsToUpdate.length];
+        List<PendingHostUpdate> updates;
         try {
-            updatedViews = sService.startListening(
-                    mCallbacks, mContextOpPackageName, mHostId, idsToUpdate, updatedIds).getList();
+            updates = sService.startListening(
+                    mCallbacks, mContextOpPackageName, mHostId, idsToUpdate).getList();
         }
         catch (RemoteException e) {
             throw new RuntimeException("system server dead?", e);
         }
 
-        int N = updatedViews.size();
+        int N = updates.size();
         for (int i = 0; i < N; i++) {
-            updateAppWidgetView(updatedIds[i], updatedViews.get(i));
+            PendingHostUpdate update = updates.get(i);
+            switch (update.type) {
+                case PendingHostUpdate.TYPE_VIEWS_UPDATE:
+                    updateAppWidgetView(update.appWidgetId, update.views);
+                    break;
+                case PendingHostUpdate.TYPE_PROVIDER_CHANGED:
+                    onProviderChanged(update.appWidgetId, update.widgetInfo);
+                    break;
+                case PendingHostUpdate.TYPE_VIEW_DATA_CHANGED:
+                    viewDataChanged(update.appWidgetId, update.viewId);
+            }
         }
     }
 
diff --git a/core/java/android/appwidget/PendingHostUpdate.java b/core/java/android/appwidget/PendingHostUpdate.java
new file mode 100644
index 0000000..5780319
--- /dev/null
+++ b/core/java/android/appwidget/PendingHostUpdate.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.appwidget;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.widget.RemoteViews;
+
+/**
+ * @hide
+ */
+public class PendingHostUpdate implements Parcelable {
+
+    static final int TYPE_VIEWS_UPDATE = 0;
+    static final int TYPE_PROVIDER_CHANGED = 1;
+    static final int TYPE_VIEW_DATA_CHANGED = 2;
+
+    final int appWidgetId;
+    final int type;
+    RemoteViews views;
+    AppWidgetProviderInfo widgetInfo;
+    int viewId;
+
+    public static PendingHostUpdate updateAppWidget(int appWidgetId, RemoteViews views) {
+        PendingHostUpdate update = new PendingHostUpdate(appWidgetId, TYPE_VIEWS_UPDATE);
+        update.views = views;
+        return update;
+    }
+
+    public static PendingHostUpdate providerChanged(int appWidgetId, AppWidgetProviderInfo info) {
+        PendingHostUpdate update = new PendingHostUpdate(appWidgetId, TYPE_PROVIDER_CHANGED);
+        update.widgetInfo = info;
+        return update;
+    }
+
+    public static PendingHostUpdate viewDataChanged(int appWidgetId, int viewId) {
+        PendingHostUpdate update = new PendingHostUpdate(appWidgetId, TYPE_VIEW_DATA_CHANGED);
+        update.viewId = viewId;
+        return update;
+    }
+
+    private PendingHostUpdate(int appWidgetId, int type) {
+        this.appWidgetId = appWidgetId;
+        this.type = type;
+    }
+
+    private PendingHostUpdate(Parcel in) {
+        appWidgetId = in.readInt();
+        type = in.readInt();
+
+        switch (type) {
+            case TYPE_VIEWS_UPDATE:
+                if (0 != in.readInt()) {
+                    views = new RemoteViews(in);
+                }
+                break;
+            case TYPE_PROVIDER_CHANGED:
+                if (0 != in.readInt()) {
+                    widgetInfo = new AppWidgetProviderInfo(in);
+                }
+                break;
+            case TYPE_VIEW_DATA_CHANGED:
+                viewId = in.readInt();
+        }
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(appWidgetId);
+        dest.writeInt(type);
+        switch (type) {
+            case TYPE_VIEWS_UPDATE:
+                writeNullParcelable(views, dest, flags);
+                break;
+            case TYPE_PROVIDER_CHANGED:
+                writeNullParcelable(widgetInfo, dest, flags);
+                break;
+            case TYPE_VIEW_DATA_CHANGED:
+                dest.writeInt(viewId);
+                break;
+        }
+    }
+
+    private void writeNullParcelable(Parcelable p, Parcel dest, int flags) {
+        if (p != null) {
+            dest.writeInt(1);
+            p.writeToParcel(dest, flags);
+        } else {
+            dest.writeInt(0);
+        }
+    }
+
+    /**
+     * Parcelable.Creator that instantiates PendingHostUpdate objects
+     */
+    public static final Parcelable.Creator<PendingHostUpdate> CREATOR
+            = new Parcelable.Creator<PendingHostUpdate>() {
+        public PendingHostUpdate createFromParcel(Parcel parcel) {
+            return new PendingHostUpdate(parcel);
+        }
+
+        public PendingHostUpdate[] newArray(int size) {
+            return new PendingHostUpdate[size];
+        }
+    };
+}
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index f66b5ff..353c640 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -30,8 +30,11 @@
 import android.os.RemoteException;
 import android.util.Log;
 
+import com.android.internal.annotations.GuardedBy;
+
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 
 /**
@@ -114,7 +117,8 @@
 
     private Context mContext;
     private ServiceListener mServiceListener;
-    private IBluetoothA2dp mService;
+    private final ReentrantReadWriteLock mServiceLock = new ReentrantReadWriteLock();
+    @GuardedBy("mServiceLock") private IBluetoothA2dp mService;
     private BluetoothAdapter mAdapter;
 
     final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
@@ -122,25 +126,27 @@
                 public void onBluetoothStateChange(boolean up) {
                     if (DBG) Log.d(TAG, "onBluetoothStateChange: up=" + up);
                     if (!up) {
-                        if (VDBG) Log.d(TAG,"Unbinding service...");
-                        synchronized (mConnection) {
-                            try {
-                                mService = null;
-                                mContext.unbindService(mConnection);
-                            } catch (Exception re) {
-                                Log.e(TAG,"",re);
-                            }
+                        if (VDBG) Log.d(TAG, "Unbinding service...");
+                        try {
+                            mServiceLock.writeLock().lock();
+                            mService = null;
+                            mContext.unbindService(mConnection);
+                        } catch (Exception re) {
+                            Log.e(TAG, "", re);
+                        } finally {
+                            mServiceLock.writeLock().unlock();
                         }
                     } else {
-                        synchronized (mConnection) {
-                            try {
-                                if (mService == null) {
-                                    if (VDBG) Log.d(TAG,"Binding service...");
-                                    doBind();
-                                }
-                            } catch (Exception re) {
-                                Log.e(TAG,"",re);
+                        try {
+                            mServiceLock.readLock().lock();
+                            if (mService == null) {
+                                if (VDBG) Log.d(TAG,"Binding service...");
+                                doBind();
                             }
+                        } catch (Exception re) {
+                            Log.e(TAG,"",re);
+                        } finally {
+                            mServiceLock.readLock().unlock();
                         }
                     }
                 }
@@ -189,15 +195,16 @@
             }
         }
 
-        synchronized (mConnection) {
+        try {
+            mServiceLock.writeLock().lock();
             if (mService != null) {
-                try {
-                    mService = null;
-                    mContext.unbindService(mConnection);
-                } catch (Exception re) {
-                    Log.e(TAG,"",re);
-                }
+                mService = null;
+                mContext.unbindService(mConnection);
             }
+        } catch (Exception re) {
+            Log.e(TAG, "", re);
+        } finally {
+            mServiceLock.writeLock().unlock();
         }
     }
 
@@ -229,17 +236,20 @@
      */
     public boolean connect(BluetoothDevice device) {
         if (DBG) log("connect(" + device + ")");
-        if (mService != null && isEnabled() &&
-            isValidDevice(device)) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled() &&
+                isValidDevice(device)) {
                 return mService.connect(device);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return false;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return false;
     }
 
     /**
@@ -270,17 +280,20 @@
      */
     public boolean disconnect(BluetoothDevice device) {
         if (DBG) log("disconnect(" + device + ")");
-        if (mService != null && isEnabled() &&
-            isValidDevice(device)) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled() &&
+                isValidDevice(device)) {
                 return mService.disconnect(device);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return false;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return false;
     }
 
     /**
@@ -288,16 +301,19 @@
      */
     public List<BluetoothDevice> getConnectedDevices() {
         if (VDBG) log("getConnectedDevices()");
-        if (mService != null && isEnabled()) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()) {
                 return mService.getConnectedDevices();
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return new ArrayList<BluetoothDevice>();
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return new ArrayList<BluetoothDevice>();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return new ArrayList<BluetoothDevice>();
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return new ArrayList<BluetoothDevice>();
     }
 
     /**
@@ -305,16 +321,19 @@
      */
     public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
         if (VDBG) log("getDevicesMatchingStates()");
-        if (mService != null && isEnabled()) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()) {
                 return mService.getDevicesMatchingConnectionStates(states);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return new ArrayList<BluetoothDevice>();
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return new ArrayList<BluetoothDevice>();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return new ArrayList<BluetoothDevice>();
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return new ArrayList<BluetoothDevice>();
     }
 
     /**
@@ -322,17 +341,20 @@
      */
     public int getConnectionState(BluetoothDevice device) {
         if (VDBG) log("getState(" + device + ")");
-        if (mService != null && isEnabled()
-            && isValidDevice(device)) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()
+                && isValidDevice(device)) {
                 return mService.getConnectionState(device);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return BluetoothProfile.STATE_DISCONNECTED;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return BluetoothProfile.STATE_DISCONNECTED;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return BluetoothProfile.STATE_DISCONNECTED;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return BluetoothProfile.STATE_DISCONNECTED;
     }
 
     /**
@@ -352,21 +374,24 @@
      */
     public boolean setPriority(BluetoothDevice device, int priority) {
         if (DBG) log("setPriority(" + device + ", " + priority + ")");
-        if (mService != null && isEnabled()
-            && isValidDevice(device)) {
-            if (priority != BluetoothProfile.PRIORITY_OFF &&
-                priority != BluetoothProfile.PRIORITY_ON){
-              return false;
-            }
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()
+                && isValidDevice(device)) {
+                if (priority != BluetoothProfile.PRIORITY_OFF &&
+                    priority != BluetoothProfile.PRIORITY_ON) {
+                    return false;
+                }
                 return mService.setPriority(device, priority);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return false;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return false;
     }
 
     /**
@@ -385,17 +410,20 @@
     @RequiresPermission(Manifest.permission.BLUETOOTH)
     public int getPriority(BluetoothDevice device) {
         if (VDBG) log("getPriority(" + device + ")");
-        if (mService != null && isEnabled()
-            && isValidDevice(device)) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()
+                && isValidDevice(device)) {
                 return mService.getPriority(device);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return BluetoothProfile.PRIORITY_OFF;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return BluetoothProfile.PRIORITY_OFF;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return BluetoothProfile.PRIORITY_OFF;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return BluetoothProfile.PRIORITY_OFF;
     }
 
     /**
@@ -406,16 +434,19 @@
      */
     public boolean isAvrcpAbsoluteVolumeSupported() {
         if (DBG) Log.d(TAG, "isAvrcpAbsoluteVolumeSupported");
-        if (mService != null && isEnabled()) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()) {
                 return mService.isAvrcpAbsoluteVolumeSupported();
-            } catch (RemoteException e) {
-                Log.e(TAG, "Error talking to BT service in isAvrcpAbsoluteVolumeSupported()", e);
-                return false;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error talking to BT service in isAvrcpAbsoluteVolumeSupported()", e);
+            return false;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return false;
     }
 
     /**
@@ -433,16 +464,17 @@
      */
     public void adjustAvrcpAbsoluteVolume(int direction) {
         if (DBG) Log.d(TAG, "adjustAvrcpAbsoluteVolume");
-        if (mService != null && isEnabled()) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()) {
                 mService.adjustAvrcpAbsoluteVolume(direction);
-                return;
-            } catch (RemoteException e) {
-                Log.e(TAG, "Error talking to BT service in adjustAvrcpAbsoluteVolume()", e);
-                return;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error talking to BT service in adjustAvrcpAbsoluteVolume()", e);
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
     }
 
     /**
@@ -453,16 +485,17 @@
      */
     public void setAvrcpAbsoluteVolume(int volume) {
         if (DBG) Log.d(TAG, "setAvrcpAbsoluteVolume");
-        if (mService != null && isEnabled()) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()) {
                 mService.setAvrcpAbsoluteVolume(volume);
-                return;
-            } catch (RemoteException e) {
-                Log.e(TAG, "Error talking to BT service in setAvrcpAbsoluteVolume()", e);
-                return;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error talking to BT service in setAvrcpAbsoluteVolume()", e);
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
     }
 
     /**
@@ -473,17 +506,20 @@
      * @param device BluetoothDevice device
      */
     public boolean isA2dpPlaying(BluetoothDevice device) {
-        if (mService != null && isEnabled()
-            && isValidDevice(device)) {
-            try {
+        try {
+            mServiceLock.readLock().lock();
+            if (mService != null && isEnabled()
+                && isValidDevice(device)) {
                 return mService.isA2dpPlaying(device);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
-                return false;
             }
+            if (mService == null) Log.w(TAG, "Proxy not attached to service");
+            return false;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+            return false;
+        } finally {
+            mServiceLock.readLock().unlock();
         }
-        if (mService == null) Log.w(TAG, "Proxy not attached to service");
-        return false;
     }
 
     /**
@@ -534,7 +570,12 @@
     private final ServiceConnection mConnection = new ServiceConnection() {
         public void onServiceConnected(ComponentName className, IBinder service) {
             if (DBG) Log.d(TAG, "Proxy object connected");
-            mService = IBluetoothA2dp.Stub.asInterface(service);
+            try {
+                mServiceLock.writeLock().lock();
+                mService = IBluetoothA2dp.Stub.asInterface(service);
+            } finally {
+                mServiceLock.writeLock().unlock();
+            }
 
             if (mServiceListener != null) {
                 mServiceListener.onServiceConnected(BluetoothProfile.A2DP, BluetoothA2dp.this);
@@ -542,7 +583,12 @@
         }
         public void onServiceDisconnected(ComponentName className) {
             if (DBG) Log.d(TAG, "Proxy object disconnected");
-            mService = null;
+            try {
+                mServiceLock.writeLock().lock();
+                mService = null;
+            } finally {
+                mServiceLock.writeLock().unlock();
+            }
             if (mServiceListener != null) {
                 mServiceListener.onServiceDisconnected(BluetoothProfile.A2DP);
             }
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index 09a15de..f46a3b3 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -220,6 +220,46 @@
      * {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
      * {@link #ACTION_AUDIO_STATE_CHANGED} intent.
      */
+
+    /**
+     * Intent used to broadcast the headset's indicator status
+     *
+     * <p>This intent will have 3 extras:
+     * <ul>
+     *   <li> {@link #EXTRA_IND_ID} - The Assigned number of headset Indicator which is supported by
+                                        the headset ( as indicated by AT+BIND
+                                        command in the SLC sequence).or whose value
+                                        is changed (indicated by AT+BIEV command)</li>
+     *   <li> {@link #EXTRA_IND_VALUE}- The updated value of headset indicator. </li>
+     *   <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
+     * </ul>
+     * <p>{@link #EXTRA_IND_ID} is defined by Bluetooth SIG and each of the indicators are
+     * given an assigned number. Below shows the assigned number of Indicator added so far
+     * - Enhanced Safety - 1
+     * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+     * receive.
+     * @hide
+     */
+    public static final String ACTION_HF_INDICATORS_VALUE_CHANGED =
+            "android.bluetooth.headset.action.HF_INDICATORS_VALUE_CHANGED";
+
+    /**
+     * A String extra field in {@link #ACTION_HF_INDICATORS_VALUE_CHANGED}
+     * intents that contains the UUID of the headset  indicator (as defined by Bluetooth SIG)
+     * that is being sent.
+     * @hide
+     */
+    public static final String EXTRA_HF_INDICATORS_IND_ID =
+            "android.bluetooth.headset.extra.HF_INDICATORS_IND_ID";
+
+    /**
+     * A int  extra field in {@link #ACTION_HF_INDICATORS_VALUE_CHANGED}
+     * intents that contains the value of the Headset indicator that is being sent.
+     * @hide
+     */
+    public static final String EXTRA_HF_INDICATORS_IND_VALUE =
+            "android.bluetooth.headset.extra.HF_INDICATORS_IND_VALUE";
+
     public static final int STATE_AUDIO_CONNECTED = 12;
 
     private static final int MESSAGE_HEADSET_SERVICE_CONNECTED = 100;
@@ -969,6 +1009,29 @@
         return false;
     }
 
+    /**
+     * Send Headset the BIND response from AG to report change in the status of the
+     * HF indicators to the headset
+     *
+     * @param ind_id Assigned Number of the indicator (defined by SIG)
+     * @param ind_status
+     * possible values- false-Indicator is disabled, no value changes shall be sent for this indicator
+     *                  true-Indicator is enabled, value changes may be sent for this indicator
+     * @hide
+     */
+    public void bindResponse(int ind_id, boolean ind_status) {
+        if (mService != null && isEnabled()) {
+            try {
+                mService.bindResponse(ind_id, ind_status);
+            } catch (RemoteException e) {
+                Log.e(TAG, e.toString());
+            }
+        } else {
+            Log.w(TAG, "Proxy not attached to service");
+            if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
+        }
+    }
+
     private final IBluetoothProfileServiceConnection mConnection
             = new IBluetoothProfileServiceConnection.Stub()  {
         @Override
diff --git a/core/java/android/bluetooth/BluetoothSap.java b/core/java/android/bluetooth/BluetoothSap.java
index 014cb22..e70c936 100644
--- a/core/java/android/bluetooth/BluetoothSap.java
+++ b/core/java/android/bluetooth/BluetoothSap.java
@@ -138,7 +138,7 @@
     }
 
     boolean doBind() {
-        Intent intent = new Intent(IBluetoothMap.class.getName());
+        Intent intent = new Intent(IBluetoothSap.class.getName());
         ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
         intent.setComponent(comp);
         if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index ae12c88..ec01bef 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -532,22 +532,19 @@
                 if(length <= mMaxTxPacketSize) {
                     mSocketOS.write(b, offset, length);
                 } else {
-                    int tmpOffset = offset;
-                    int tmpLength = mMaxTxPacketSize;
-                    int endIndex = offset + length;
-                    boolean done = false;
                     if(DBG) Log.w(TAG, "WARNING: Write buffer larger than L2CAP packet size!\n"
                             + "Packet will be divided into SDU packets of size "
                             + mMaxTxPacketSize);
-                    do{
+                    int tmpOffset = offset;
+                    int bytesToWrite = length;
+                    while (bytesToWrite > 0) {
+                        int tmpLength = (bytesToWrite > mMaxTxPacketSize)
+                                ? mMaxTxPacketSize
+                                : bytesToWrite;
                         mSocketOS.write(b, tmpOffset, tmpLength);
-                        tmpOffset += mMaxTxPacketSize;
-                        if((tmpOffset + mMaxTxPacketSize) > endIndex) {
-                            tmpLength = endIndex - tmpOffset;
-                            done = true;
-                        }
-                    } while(!done);
-
+                        tmpOffset += tmpLength;
+                        bytesToWrite -= tmpLength;
+                    }
                 }
             } else {
                 mSocketOS.write(b, offset, length);
diff --git a/core/java/android/bluetooth/IBluetoothHeadset.aidl b/core/java/android/bluetooth/IBluetoothHeadset.aidl
index 0bb4088..6ad442b 100755
--- a/core/java/android/bluetooth/IBluetoothHeadset.aidl
+++ b/core/java/android/bluetooth/IBluetoothHeadset.aidl
@@ -59,4 +59,5 @@
                       String number, int type);
     boolean enableWBS();
     boolean disableWBS();
+    void bindResponse(int ind_id, boolean ind_status);
 }
diff --git a/core/java/android/bluetooth/IBluetoothManager.aidl b/core/java/android/bluetooth/IBluetoothManager.aidl
index 0b81ee8..2b853a3 100644
--- a/core/java/android/bluetooth/IBluetoothManager.aidl
+++ b/core/java/android/bluetooth/IBluetoothManager.aidl
@@ -37,6 +37,7 @@
     boolean enable();
     boolean enableNoAutoConnect();
     boolean disable(boolean persist);
+    int getState();
     IBluetoothGatt getBluetoothGatt();
 
     boolean bindBluetoothProfileService(int profile, IBluetoothProfileServiceConnection proxy);
diff --git a/core/java/android/content/ContentProviderClient.java b/core/java/android/content/ContentProviderClient.java
index 9221fbb..e49eb34 100644
--- a/core/java/android/content/ContentProviderClient.java
+++ b/core/java/android/content/ContentProviderClient.java
@@ -147,13 +147,7 @@
             if (cursor == null) {
                 return null;
             }
-
-            if ("com.google.android.gms".equals(mPackageName)) {
-                // They're casting to a concrete subclass, sigh
-                return cursor;
-            } else {
-                return new CursorWrapperInner(cursor);
-            }
+            return new CursorWrapperInner(cursor);
         } catch (DeadObjectException e) {
             if (!mStable) {
                 mContentResolver.unstableProviderDied(mContentProvider);
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index c8d8920..b3320d6 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -34,6 +34,7 @@
 import android.database.Cursor;
 import android.database.IContentObserver;
 import android.graphics.Point;
+import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.CancellationSignal;
@@ -51,6 +52,7 @@
 import android.util.Log;
 
 import com.android.internal.util.ArrayUtils;
+import com.android.internal.util.MimeIconUtils;
 import com.android.internal.util.Preconditions;
 
 import dalvik.system.CloseGuard;
@@ -2693,4 +2695,9 @@
     public int resolveUserId(Uri uri) {
         return ContentProvider.getUserIdFromUri(uri, mContext.getUserId());
     }
+
+    /** @hide */
+    public Drawable getTypeDrawable(String mimeType) {
+        return MimeIconUtils.loadMimeIcon(mContext, mimeType);
+    }
 }
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index bdf888f..3f18ea9 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3615,12 +3615,11 @@
     public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
 
     /**
-     * TODO Javadoc
+     * Use with {@link #getSystemService} to retrieve a
+     * {@link android.content.pm.ShortcutManager} for accessing the launcher shortcut service.
      *
      * @see #getSystemService
      * @see android.content.pm.ShortcutManager
-     *
-     * @hide
      */
     public static final String SHORTCUT_SERVICE = "shortcut";
 
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index ace54ba..c140f1bd5 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -3174,6 +3174,14 @@
     public static final String ACTION_MASTER_CLEAR = "android.intent.action.MASTER_CLEAR";
 
     /**
+     * Boolean intent extra to be used with {@link ACTION_MASTER_CLEAR} in order to force a factory
+     * reset even if {@link android.os.UserManager.DISALLOW_FACTORY_RESET} is set.
+     * @hide
+     */
+    public static final String EXTRA_FORCE_MASTER_CLEAR =
+            "android.intent.extra.FORCE_MASTER_CLEAR";
+
+    /**
      * Broadcast action: report that a settings element is being restored from backup.  The intent
      * contains three extras: EXTRA_SETTING_NAME is a string naming the restored setting,
      * EXTRA_SETTING_NEW_VALUE is the value being restored, and EXTRA_SETTING_PREVIOUS_VALUE
diff --git a/core/java/android/content/pm/EphemeralResolveInfo.java b/core/java/android/content/pm/EphemeralResolveInfo.java
index afb4c30..fc3b958 100644
--- a/core/java/android/content/pm/EphemeralResolveInfo.java
+++ b/core/java/android/content/pm/EphemeralResolveInfo.java
@@ -27,6 +27,7 @@
 import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 
 /**
  * Information about an ephemeral application.
@@ -37,10 +38,7 @@
     /** Algorithm that will be used to generate the domain digest */
     public static final String SHA_ALGORITHM = "SHA-256";
 
-    /** Full digest of the domain hash */
-    private final byte[] mDigestBytes;
-    /** The first 4 bytes of the domain hash */
-    private final int mDigestPrefix;
+    private final EphemeralDigest mDigest;
     private final String mPackageName;
     /** The filters used to match domain */
     private final List<IntentFilter> mFilters = new ArrayList<IntentFilter>();
@@ -55,29 +53,23 @@
             throw new IllegalArgumentException();
         }
 
-        mDigestBytes = generateDigest(uri);
-        mDigestPrefix =
-                mDigestBytes[0] << 24
-                | mDigestBytes[1] << 16
-                | mDigestBytes[2] << 8
-                | mDigestBytes[3] << 0;
+        mDigest = new EphemeralDigest(uri, 0xFFFFFFFF, -1);
         mFilters.addAll(filters);
         mPackageName = packageName;
     }
 
     EphemeralResolveInfo(Parcel in) {
-        mDigestBytes = in.createByteArray();
-        mDigestPrefix = in.readInt();
+        mDigest = in.readParcelable(null /*loader*/);
         mPackageName = in.readString();
         in.readList(mFilters, null /*loader*/);
     }
 
     public byte[] getDigestBytes() {
-        return mDigestBytes;
+        return mDigest.getDigestBytes()[0];
     }
 
     public int getDigestPrefix() {
-        return mDigestPrefix;
+        return mDigest.getDigestPrefix()[0];
     }
 
     public String getPackageName() {
@@ -88,16 +80,6 @@
         return mFilters;
     }
 
-    private static byte[] generateDigest(Uri uri) {
-        try {
-            final MessageDigest digest = MessageDigest.getInstance(SHA_ALGORITHM);
-            final byte[] hostBytes = uri.getHost().getBytes();
-            return digest.digest(hostBytes);
-        } catch (NoSuchAlgorithmException e) {
-            throw new IllegalStateException("could not find digest algorithm");
-        }
-    }
-
     @Override
     public int describeContents() {
         return 0;
@@ -105,8 +87,7 @@
 
     @Override
     public void writeToParcel(Parcel out, int flags) {
-        out.writeByteArray(mDigestBytes);
-        out.writeInt(mDigestPrefix);
+        out.writeParcelable(mDigest, flags);
         out.writeString(mPackageName);
         out.writeList(mFilters);
     }
@@ -136,4 +117,121 @@
             return mResolveInfo;
         }
     }
+
+    /**
+     * Helper class to generate and store each of the digests and prefixes
+     * sent to the Ephemeral Resolver.
+     * <p>
+     * Since intent filters may want to handle multiple hosts within a
+     * domain [eg “*.google.com”], the resolver is presented with multiple
+     * hash prefixes. For example, "a.b.c.d.e" generates digests for
+     * "d.e", "c.d.e", "b.c.d.e" and "a.b.c.d.e".
+     *
+     * @hide
+     */
+    public static final class EphemeralDigest implements Parcelable {
+        /** Full digest of the domain hashes */
+        private final byte[][] mDigestBytes;
+        /** The first 4 bytes of the domain hashes */
+        private final int[] mDigestPrefix;
+
+        public EphemeralDigest(@NonNull Uri uri, int digestMask, int maxDigests) {
+            if (uri == null) {
+                throw new IllegalArgumentException();
+            }
+            mDigestBytes = generateDigest(uri, maxDigests);
+            mDigestPrefix = new int[mDigestBytes.length];
+            for (int i = 0; i < mDigestBytes.length; i++) {
+                mDigestPrefix[i] =
+                        ((mDigestBytes[i][0] & 0xFF) << 24
+                                | (mDigestBytes[i][1] & 0xFF) << 16
+                                | (mDigestBytes[i][2] & 0xFF) << 8
+                                | (mDigestBytes[i][3] & 0xFF) << 0)
+                        & digestMask;
+            }
+        }
+
+        private static byte[][] generateDigest(Uri uri, int maxDigests) {
+            ArrayList<byte[]> digests = new ArrayList<>();
+            try {
+                final String host = uri.getHost().toLowerCase(Locale.ENGLISH);
+                final MessageDigest digest = MessageDigest.getInstance(SHA_ALGORITHM);
+                if (maxDigests <= 0) {
+                    final byte[] hostBytes = host.getBytes();
+                    digests.add(digest.digest(hostBytes));
+                } else {
+                    int prevDot = host.lastIndexOf('.');
+                    prevDot = host.lastIndexOf('.', prevDot - 1);
+                    // shortcut for short URLs
+                    if (prevDot < 0) {
+                        digests.add(digest.digest(host.getBytes()));
+                    } else {
+                        byte[] hostBytes = host.substring(prevDot + 1, host.length()).getBytes();
+                        digests.add(digest.digest(hostBytes));
+                        int digestCount = 1;
+                        while (prevDot >= 0 && digestCount < maxDigests) {
+                            prevDot = host.lastIndexOf('.', prevDot - 1);
+                            hostBytes = host.substring(prevDot + 1, host.length()).getBytes();
+                            digests.add(digest.digest(hostBytes));
+                            digestCount++;
+                        }
+                    }
+                }
+            } catch (NoSuchAlgorithmException e) {
+                throw new IllegalStateException("could not find digest algorithm");
+            }
+            return digests.toArray(new byte[digests.size()][]);
+        }
+
+        EphemeralDigest(Parcel in) {
+            final int digestCount = in.readInt();
+            if (digestCount == -1) {
+                mDigestBytes = null;
+            } else {
+                mDigestBytes = new byte[digestCount][];
+                for (int i = 0; i < digestCount; i++) {
+                    mDigestBytes[i] = in.createByteArray();
+                }
+            }
+            mDigestPrefix = in.createIntArray();
+        }
+
+        public byte[][] getDigestBytes() {
+            return mDigestBytes;
+        }
+
+        public int[] getDigestPrefix() {
+            return mDigestPrefix;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            if (mDigestBytes == null) {
+                out.writeInt(-1);
+            } else {
+                out.writeInt(mDigestBytes.length);
+                for (int i = 0; i < mDigestBytes.length; i++) {
+                    out.writeByteArray(mDigestBytes[i]);
+                }
+            }
+            out.writeIntArray(mDigestPrefix);
+        }
+
+        @SuppressWarnings("hiding")
+        public static final Parcelable.Creator<EphemeralDigest> CREATOR =
+                new Parcelable.Creator<EphemeralDigest>() {
+            public EphemeralDigest createFromParcel(Parcel in) {
+                return new EphemeralDigest(in);
+            }
+
+            public EphemeralDigest[] newArray(int size) {
+                return new EphemeralDigest[size];
+            }
+        };
+    }
 }
diff --git a/core/java/android/content/pm/ILauncherApps.aidl b/core/java/android/content/pm/ILauncherApps.aidl
index 430c7e7..c19e638 100644
--- a/core/java/android/content/pm/ILauncherApps.aidl
+++ b/core/java/android/content/pm/ILauncherApps.aidl
@@ -51,7 +51,7 @@
             in List shortcutIds, in ComponentName componentName, int flags, in UserHandle user);
     void pinShortcuts(String callingPackage, String packageName, in List<String> shortcutIds,
             in UserHandle user);
-    boolean startShortcut(String callingPackage, String packageName, String id,
+    void startShortcut(String callingPackage, String packageName, String id,
             in Rect sourceBounds, in Bundle startActivityOptions, int userId);
 
     int getShortcutIconResId(String callingPackage, String packageName, String id,
diff --git a/core/java/android/content/pm/IOtaDexopt.aidl b/core/java/android/content/pm/IOtaDexopt.aidl
index 8f38d6f..467bd5f 100644
--- a/core/java/android/content/pm/IOtaDexopt.aidl
+++ b/core/java/android/content/pm/IOtaDexopt.aidl
@@ -42,8 +42,21 @@
     boolean isDone();
 
     /**
+     * Return the progress (0..1) made in this session. When {@link #isDone() isDone} returns
+     * true, the progress value will be 1.
+     */
+    float getProgress();
+
+    /**
      * Optimize the next package. Note: this command is synchronous, that is, only returns after
      * the package has been dexopted (or dexopting failed).
+     *
+     * Note: this will be removed after a transition period. Use nextDexoptCommand instead.
      */
     void dexoptNextPackage();
+
+    /**
+     * Get the optimization parameters for the next package.
+     */
+    String nextDexoptCommand();
 }
diff --git a/core/java/android/content/pm/IShortcutService.aidl b/core/java/android/content/pm/IShortcutService.aidl
index 2ba24f6..1bf2ab0 100644
--- a/core/java/android/content/pm/IShortcutService.aidl
+++ b/core/java/android/content/pm/IShortcutService.aidl
@@ -28,6 +28,8 @@
 
     ParceledListSlice getDynamicShortcuts(String packageName, int userId);
 
+    ParceledListSlice getManifestShortcuts(String packageName, int userId);
+
     boolean addDynamicShortcuts(String packageName, in ParceledListSlice shortcutInfoList,
             int userId);
 
@@ -39,7 +41,12 @@
 
     boolean updateShortcuts(String packageName, in ParceledListSlice shortcuts, int userId);
 
-    int getMaxDynamicShortcutCount(String packageName, int userId);
+    void disableShortcuts(String packageName, in List shortcutIds, CharSequence disabledMessage,
+            int disabledMessageResId, int userId);
+
+    void enableShortcuts(String packageName, in List shortcutIds, int userId);
+
+    int getMaxShortcutCountPerActivity(String packageName, int userId);
 
     int getRemainingCallCount(String packageName, int userId);
 
@@ -47,6 +54,8 @@
 
     int getIconMaxDimensions(String packageName, int userId);
 
+    void reportShortcutUsed(String packageName, String shortcutId, int userId);
+
     void resetThrottling(); // system only API for developer opsions
 
     void onApplicationActive(String packageName, int userId); // system only API for sysUI
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 8ca27c5..528fe20 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -24,7 +24,13 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager.ApplicationInfoFlags;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.graphics.Rect;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
@@ -34,8 +40,10 @@
 import android.os.ServiceManager;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.util.DisplayMetrics;
 import android.util.Log;
 
+import java.io.IOException;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
@@ -163,11 +171,10 @@
          * as defined in {@link #hasShortcutHostPermission()}, will receive it.
          *
          * @param packageName The name of the package that has the shortcuts.
-         * @param shortcuts all shortcuts from the package (dynamic and/or pinned).  Only "key"
-         *    information will be provided, as defined in {@link ShortcutInfo#hasKeyFieldsOnly()}.
+         * @param shortcuts all shortcuts from the package (dynamic, manifest and/or pinned).
+         *    Only "key" information will be provided, as defined in
+         *    {@link ShortcutInfo#hasKeyFieldsOnly()}.
          * @param user The UserHandle of the profile that generated the change.
-         *
-         * @hide
          */
         public void onShortcutsChanged(@NonNull String packageName,
                 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) {
@@ -176,19 +183,42 @@
 
     /**
      * Represents a query passed to {@link #getShortcuts(ShortcutQuery, UserHandle)}.
-     *
-     * @hide
      */
     public static class ShortcutQuery {
         /**
          * Include dynamic shortcuts in the result.
          */
-        public static final int FLAG_GET_DYNAMIC = 1 << 0;
+        public static final int FLAG_MATCH_DYNAMIC = 1 << 0;
+
+        /** @hide kept for unit tests */
+        @Deprecated
+        public static final int FLAG_GET_DYNAMIC = FLAG_MATCH_DYNAMIC;
 
         /**
          * Include pinned shortcuts in the result.
          */
-        public static final int FLAG_GET_PINNED = 1 << 1;
+        public static final int FLAG_MATCH_PINNED = 1 << 1;
+
+        /** @hide kept for unit tests */
+        @Deprecated
+        public static final int FLAG_GET_PINNED = FLAG_MATCH_PINNED;
+
+        /**
+         * Include manifest shortcuts in the result.
+         */
+        public static final int FLAG_MATCH_MANIFEST = 1 << 3;
+
+        /** @hide kept for unit tests */
+        @Deprecated
+        public static final int FLAG_GET_MANIFEST = FLAG_MATCH_MANIFEST;
+
+        /** @hide */
+        public static final int FLAG_MATCH_ALL_KINDS =
+                FLAG_GET_DYNAMIC | FLAG_GET_PINNED | FLAG_GET_MANIFEST;
+
+        /** @hide kept for unit tests */
+        @Deprecated
+        public static final int FLAG_GET_ALL_KINDS = FLAG_MATCH_ALL_KINDS;
 
         /**
          * Requests "key" fields only.  See {@link ShortcutInfo#hasKeyFieldsOnly()} for which
@@ -199,8 +229,9 @@
         /** @hide */
         @IntDef(flag = true,
                 value = {
-                        FLAG_GET_DYNAMIC,
-                        FLAG_GET_PINNED,
+                        FLAG_MATCH_DYNAMIC,
+                        FLAG_MATCH_PINNED,
+                        FLAG_MATCH_MANIFEST,
                         FLAG_GET_KEY_FIELDS_ONLY,
                 })
         @Retention(RetentionPolicy.SOURCE)
@@ -227,37 +258,44 @@
          * If non-zero, returns only shortcuts that have been added or updated since the timestamp,
          * which is a milliseconds since the Epoch.
          */
-        public void setChangedSince(long changedSince) {
+        public ShortcutQuery setChangedSince(long changedSince) {
             mChangedSince = changedSince;
+            return this;
         }
 
         /**
          * If non-null, returns only shortcuts from the package.
          */
-        public void setPackage(@Nullable String packageName) {
+        public ShortcutQuery setPackage(@Nullable String packageName) {
             mPackage = packageName;
+            return this;
         }
 
         /**
          * If non-null, return only the specified shortcuts by ID.  When setting this field,
          * a packange name must also be set with {@link #setPackage}.
          */
-        public void setShortcutIds(@Nullable List<String> shortcutIds) {
+        public ShortcutQuery setShortcutIds(@Nullable List<String> shortcutIds) {
             mShortcutIds = shortcutIds;
+            return this;
         }
 
         /**
-         * If non-null, returns only shortcuts associated with the activity.
+         * If non-null, returns only shortcuts associated with the activity; i.e.
+         * {@link ShortcutInfo}s whose {@link ShortcutInfo#getActivity()} are equal
+         * to {@code activity}.
          */
-        public void setActivity(@Nullable ComponentName activity) {
+        public ShortcutQuery setActivity(@Nullable ComponentName activity) {
             mActivity = activity;
+            return this;
         }
 
         /**
          * Set query options.
          */
-        public void setQueryFlags(@QueryFlags int queryFlags) {
+        public ShortcutQuery setQueryFlags(@QueryFlags int queryFlags) {
             mQueryFlags = queryFlags;
+            return this;
         }
     }
 
@@ -426,8 +464,6 @@
      * the user is trying a new launcher application.  The user may decide to change the default
      * launcher to the calling application again, so even if a launcher application loses
      * this permission, it does <b>not</b> have to purge pinned shortcut information.
-     *
-     * @hide
      */
     public boolean hasShortcutHostPermission() {
         try {
@@ -447,8 +483,6 @@
      * @param user The UserHandle of the profile.
      *
      * @return the IDs of {@link ShortcutInfo}s that match the query.
-     *
-     * @hide
      */
     @Nullable
     public List<ShortcutInfo> getShortcuts(@NonNull ShortcutQuery query,
@@ -467,12 +501,13 @@
      * @hide // No longer used.  Use getShortcuts() instead.  Kept for unit tests.
      */
     @Nullable
+    @Deprecated
     public List<ShortcutInfo> getShortcutInfo(@NonNull String packageName,
             @NonNull List<String> ids, @NonNull UserHandle user) {
         final ShortcutQuery q = new ShortcutQuery();
         q.setPackage(packageName);
         q.setShortcutIds(ids);
-        q.setQueryFlags(ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_PINNED);
+        q.setQueryFlags(ShortcutQuery.FLAG_GET_ALL_KINDS);
         return getShortcuts(q, user);
     }
 
@@ -488,8 +523,6 @@
      * @param packageName The target package name.
      * @param shortcutIds The IDs of the shortcut to be pinned.
      * @param user The UserHandle of the profile.
-     *
-     * @hide
      */
     public void pinShortcuts(@NonNull String packageName, @NonNull List<String> shortcutIds,
             @NonNull UserHandle user) {
@@ -503,6 +536,7 @@
     /**
      * @hide kept for testing.
      */
+    @Deprecated
     public int getShortcutIconResId(@NonNull ShortcutInfo shortcut) {
         return shortcut.getIconResourceId();
     }
@@ -510,46 +544,29 @@
     /**
      * @hide kept for testing.
      */
+    @Deprecated
     public int getShortcutIconResId(@NonNull String packageName, @NonNull String shortcutId,
             @NonNull UserHandle user) {
         final ShortcutQuery q = new ShortcutQuery();
         q.setPackage(packageName);
         q.setShortcutIds(Arrays.asList(shortcutId));
-        q.setQueryFlags(ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_PINNED);
+        q.setQueryFlags(ShortcutQuery.FLAG_GET_ALL_KINDS);
         final List<ShortcutInfo> shortcuts = getShortcuts(q, user);
 
         return shortcuts.size() > 0 ? shortcuts.get(0).getIconResourceId() : 0;
     }
 
     /**
-     * Return the icon as {@link ParcelFileDescriptor}, when it's stored as a file
-     * (i.e. when {@link ShortcutInfo#hasIconFile()} returns {@code true}).
-     *
-     * <p>Callers must be allowed to access the shortcut information, as defined in {@link
-     * #hasShortcutHostPermission()}.
-     *
-     * @param shortcut The target shortcut.
-     *
-     * @hide
+     * @hide internal/unit tests only
      */
     public ParcelFileDescriptor getShortcutIconFd(
             @NonNull ShortcutInfo shortcut) {
-        return getShortcutIconFd(shortcut.getPackageName(), shortcut.getId(),
+        return getShortcutIconFd(shortcut.getPackage(), shortcut.getId(),
                 shortcut.getUserId());
     }
 
     /**
-     * Return the icon as {@link ParcelFileDescriptor}, when it's stored as a file
-     * (i.e. when {@link ShortcutInfo#hasIconFile()} returns {@code true}).
-     *
-     * <p>Callers must be allowed to access the shortcut information, as defined in {@link
-     * #hasShortcutHostPermission()}.
-     *
-     * @param packageName The target package name.
-     * @param shortcutId The ID of the shortcut to lad rom.
-     * @param user The UserHandle of the profile.
-     *
-     * @hide
+     * @hide internal/unit tests only
      */
     public ParcelFileDescriptor getShortcutIconFd(
             @NonNull String packageName, @NonNull String shortcutId, @NonNull UserHandle user) {
@@ -567,6 +584,63 @@
     }
 
     /**
+     * Returns the icon for this shortcut, without any badging for the profile.
+     *
+     * @param density The preferred density of the icon, zero for default density. Use
+     * density DPI values from {@link DisplayMetrics}.
+     * @see #getShortcutBadgedIconDrawable(ShortcutInfo, int)
+     * @see DisplayMetrics
+     * @return The drawable associated with the shortcut.
+     */
+    public Drawable getShortcutIconDrawable(@NonNull ShortcutInfo shortcut, int density) {
+        if (shortcut.hasIconFile()) {
+            final ParcelFileDescriptor pfd = getShortcutIconFd(shortcut);
+            if (pfd == null) {
+                return null;
+            }
+            try {
+                final Bitmap bmp = BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor());
+                return (bmp == null) ? null : new BitmapDrawable(mContext.getResources(), bmp);
+            } finally {
+                try {
+                    pfd.close();
+                } catch (IOException ignore) {
+                }
+            }
+        } else if (shortcut.hasIconResource()) {
+            try {
+                final int resId = shortcut.getIconResourceId();
+                if (resId == 0) {
+                    return null; // Shouldn't happen but just in case.
+                }
+                final ApplicationInfo ai = getApplicationInfo(shortcut.getPackage(),
+                        /* flags =*/ 0, shortcut.getUserHandle());
+                final Resources res = mContext.getPackageManager().getResourcesForApplication(ai);
+                return res.getDrawableForDensity(resId, density);
+            } catch (NameNotFoundException | Resources.NotFoundException e) {
+                return null;
+            }
+        } else {
+            return null; // Has no icon.
+        }
+    }
+
+    /**
+     * Returns the shortcut icon with badging appropriate for the profile.
+     *
+     * @param density Optional density for the icon, or 0 to use the default density. Use
+     * {@link DisplayMetrics} for DPI values.
+     * @see DisplayMetrics
+     * @return A badged icon for the shortcut.
+     */
+    public Drawable getShortcutBadgedIconDrawable(ShortcutInfo shortcut, int density) {
+        final Drawable originalIcon = getShortcutIconDrawable(shortcut, density);
+
+        return (originalIcon == null) ? null : mContext.getPackageManager().getUserBadgedIcon(
+                originalIcon, shortcut.getUserHandle());
+    }
+
+    /**
      * Launches a shortcut.
      *
      * <p>Callers must be allowed to access the shortcut information, as defined in {@link
@@ -577,15 +651,11 @@
      * @param sourceBounds The Rect containing the source bounds of the clicked icon.
      * @param startActivityOptions Options to pass to startActivity.
      * @param user The UserHandle of the profile.
-     * @return {@code false} when the shortcut is no longer valid (e.g. the creator application
-     *   has been uninstalled). {@code true} when the shortcut is still valid.
-     *
-     * @hide
      */
-    public boolean startShortcut(@NonNull String packageName, @NonNull String shortcutId,
+    public void startShortcut(@NonNull String packageName, @NonNull String shortcutId,
             @Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions,
             @NonNull UserHandle user) {
-        return startShortcut(packageName, shortcutId, sourceBounds, startActivityOptions,
+        startShortcut(packageName, shortcutId, sourceBounds, startActivityOptions,
                 user.getIdentifier());
     }
 
@@ -598,23 +668,19 @@
      * @param shortcut The target shortcut.
      * @param sourceBounds The Rect containing the source bounds of the clicked icon.
      * @param startActivityOptions Options to pass to startActivity.
-     * @return {@code false} when the shortcut is no longer valid (e.g. the creator application
-     *   has been uninstalled). {@code true} when the shortcut is still valid.
-     *
-     * @hide
      */
-    public boolean startShortcut(@NonNull ShortcutInfo shortcut,
+    public void startShortcut(@NonNull ShortcutInfo shortcut,
             @Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions) {
-        return startShortcut(shortcut.getPackageName(), shortcut.getId(),
+        startShortcut(shortcut.getPackage(), shortcut.getId(),
                 sourceBounds, startActivityOptions,
                 shortcut.getUserId());
     }
 
-    private boolean startShortcut(@NonNull String packageName, @NonNull String shortcutId,
+    private void startShortcut(@NonNull String packageName, @NonNull String shortcutId,
             @Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions,
             int userId) {
         try {
-            return mService.startShortcut(mContext.getPackageName(), packageName, shortcutId,
+            mService.startShortcut(mContext.getPackageName(), packageName, shortcutId,
                     sourceBounds, startActivityOptions, userId);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index b06568c..281d6f6 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -132,6 +132,9 @@
             MATCH_SYSTEM_ONLY,
             MATCH_FACTORY_ONLY,
             MATCH_DEBUG_TRIAGED_MISSING,
+            GET_DISABLED_COMPONENTS,
+            GET_DISABLED_UNTIL_USED_COMPONENTS,
+            GET_UNINSTALLED_PACKAGES,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface PackageInfoFlags {}
@@ -143,6 +146,9 @@
             MATCH_UNINSTALLED_PACKAGES,
             MATCH_SYSTEM_ONLY,
             MATCH_DEBUG_TRIAGED_MISSING,
+            MATCH_DISABLED_UNTIL_USED_COMPONENTS,
+            GET_DISABLED_UNTIL_USED_COMPONENTS,
+            GET_UNINSTALLED_PACKAGES,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ApplicationInfoFlags {}
@@ -160,6 +166,9 @@
             MATCH_DIRECT_BOOT_UNAWARE,
             MATCH_SYSTEM_ONLY,
             MATCH_UNINSTALLED_PACKAGES,
+            GET_DISABLED_COMPONENTS,
+            GET_DISABLED_UNTIL_USED_COMPONENTS,
+            GET_UNINSTALLED_PACKAGES,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ComponentInfoFlags {}
@@ -178,6 +187,9 @@
             MATCH_DIRECT_BOOT_UNAWARE,
             MATCH_SYSTEM_ONLY,
             MATCH_UNINSTALLED_PACKAGES,
+            GET_DISABLED_COMPONENTS,
+            GET_DISABLED_UNTIL_USED_COMPONENTS,
+            GET_UNINSTALLED_PACKAGES,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ResolveInfoFlags {}
@@ -2869,6 +2881,7 @@
      *
      * @see #GET_META_DATA
      * @see #GET_SHARED_LIBRARY_FILES
+     * @see #MATCH_DISABLED_UNTIL_USED_COMPONENTS
      * @see #MATCH_SYSTEM_ONLY
      * @see #MATCH_UNINSTALLED_PACKAGES
      */
@@ -3497,6 +3510,7 @@
      *
      * @see #GET_META_DATA
      * @see #GET_SHARED_LIBRARY_FILES
+     * @see #MATCH_DISABLED_UNTIL_USED_COMPONENTS
      * @see #MATCH_SYSTEM_ONLY
      * @see #MATCH_UNINSTALLED_PACKAGES
      */
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index 14f7727..d208fe7 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -157,7 +157,7 @@
             int deviceOwnerUserId, String deviceOwner, SparseArray<String> profileOwners);
 
     /**
-     * Whether a package's data be cleared.
+     * Returns {@code true} if a given package can't be wiped. Otherwise, returns {@code false}.
      */
-    public abstract boolean canPackageBeWiped(int userId, String packageName);
+    public abstract boolean isPackageDataProtected(int userId, String packageName);
 }
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 4da77f4..82cd448 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -270,6 +270,7 @@
         final int nameRes;
         final int labelRes;
         final int iconRes;
+        final int roundIconRes;
         final int logoRes;
         final int bannerRes;
 
@@ -277,7 +278,8 @@
         TypedArray sa;
 
         ParsePackageItemArgs(Package _owner, String[] _outError,
-                int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes) {
+                int _nameRes, int _labelRes, int _iconRes, int _roundIconRes, int _logoRes,
+                int _bannerRes) {
             owner = _owner;
             outError = _outError;
             nameRes = _nameRes;
@@ -285,6 +287,7 @@
             iconRes = _iconRes;
             logoRes = _logoRes;
             bannerRes = _bannerRes;
+            roundIconRes = _roundIconRes;
         }
     }
 
@@ -296,10 +299,12 @@
         int flags;
 
         ParseComponentArgs(Package _owner, String[] _outError,
-                int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes,
+                int _nameRes, int _labelRes, int _iconRes, int _roundIconRes, int _logoRes,
+                int _bannerRes,
                 String[] _sepProcesses, int _processRes,
                 int _descriptionRes, int _enabledRes) {
-            super(_owner, _outError, _nameRes, _labelRes, _iconRes, _logoRes, _bannerRes);
+            super(_owner, _outError, _nameRes, _labelRes, _iconRes, _roundIconRes, _logoRes,
+                    _bannerRes);
             sepProcesses = _sepProcesses;
             processRes = _processRes;
             descriptionRes = _descriptionRes;
@@ -2503,12 +2508,12 @@
 
         TypedArray sa = res.obtainAttributes(parser,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup);
-
         if (!parsePackageItemInfo(owner, perm.info, outError,
-                "<permission-group>", sa,
+                "<permission-group>", sa, true /*nameRequired*/,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_name,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_label,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon,
+                com.android.internal.R.styleable.AndroidManifestPermissionGroup_roundIcon,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo,
                 com.android.internal.R.styleable.AndroidManifestPermissionGroup_banner)) {
             sa.recycle();
@@ -2549,10 +2554,11 @@
                 com.android.internal.R.styleable.AndroidManifestPermission);
 
         if (!parsePackageItemInfo(owner, perm.info, outError,
-                "<permission>", sa,
+                "<permission>", sa, true /*nameRequired*/,
                 com.android.internal.R.styleable.AndroidManifestPermission_name,
                 com.android.internal.R.styleable.AndroidManifestPermission_label,
                 com.android.internal.R.styleable.AndroidManifestPermission_icon,
+                com.android.internal.R.styleable.AndroidManifestPermission_roundIcon,
                 com.android.internal.R.styleable.AndroidManifestPermission_logo,
                 com.android.internal.R.styleable.AndroidManifestPermission_banner)) {
             sa.recycle();
@@ -2618,10 +2624,11 @@
                 com.android.internal.R.styleable.AndroidManifestPermissionTree);
 
         if (!parsePackageItemInfo(owner, perm.info, outError,
-                "<permission-tree>", sa,
+                "<permission-tree>", sa, true /*nameRequired*/,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_name,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_label,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_icon,
+                com.android.internal.R.styleable.AndroidManifestPermissionTree_roundIcon,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_logo,
                 com.android.internal.R.styleable.AndroidManifestPermissionTree_banner)) {
             sa.recycle();
@@ -2668,6 +2675,7 @@
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_name,
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_label,
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_icon,
+                    com.android.internal.R.styleable.AndroidManifestInstrumentation_roundIcon,
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_logo,
                     com.android.internal.R.styleable.AndroidManifestInstrumentation_banner);
             mParseInstrumentationArgs.tag = "<instrumentation>";
@@ -2733,10 +2741,21 @@
         TypedArray sa = res.obtainAttributes(parser,
                 com.android.internal.R.styleable.AndroidManifestApplication);
 
-        String name = sa.getNonConfigurationString(
-                com.android.internal.R.styleable.AndroidManifestApplication_name, 0);
-        if (name != null) {
-            ai.className = buildClassName(pkgName, name, outError);
+        if (!parsePackageItemInfo(owner, ai, outError,
+                "<application>", sa, false /*nameRequired*/,
+                com.android.internal.R.styleable.AndroidManifestApplication_name,
+                com.android.internal.R.styleable.AndroidManifestApplication_label,
+                com.android.internal.R.styleable.AndroidManifestApplication_icon,
+                com.android.internal.R.styleable.AndroidManifestApplication_roundIcon,
+                com.android.internal.R.styleable.AndroidManifestApplication_logo,
+                com.android.internal.R.styleable.AndroidManifestApplication_banner)) {
+            sa.recycle();
+            mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
+            return false;
+        }
+
+        if (ai.name != null) {
+            ai.className = buildClassName(pkgName, ai.name, outError);
             if (ai.className == null) {
                 sa.recycle();
                 mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
@@ -2807,18 +2826,6 @@
             }
         }
 
-        TypedValue v = sa.peekValue(
-                com.android.internal.R.styleable.AndroidManifestApplication_label);
-        if (v != null && (ai.labelRes=v.resourceId) == 0) {
-            ai.nonLocalizedLabel = v.coerceToString();
-        }
-
-        ai.icon = sa.getResourceId(
-                com.android.internal.R.styleable.AndroidManifestApplication_icon, 0);
-        ai.logo = sa.getResourceId(
-                com.android.internal.R.styleable.AndroidManifestApplication_logo, 0);
-        ai.banner = sa.getResourceId(
-                com.android.internal.R.styleable.AndroidManifestApplication_banner, 0);
         ai.theme = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestApplication_theme, 0);
         ai.descriptionRes = sa.getResourceId(
@@ -3332,25 +3339,35 @@
         return true;
     }
 
-    private boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo,
-            String[] outError, String tag, TypedArray sa,
-            int nameRes, int labelRes, int iconRes, int logoRes, int bannerRes) {
+    private static boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo,
+            String[] outError, String tag, TypedArray sa, boolean nameRequired,
+            int nameRes, int labelRes, int iconRes, int roundIconRes, int logoRes, int bannerRes) {
         String name = sa.getNonConfigurationString(nameRes, 0);
         if (name == null) {
-            outError[0] = tag + " does not specify android:name";
-            return false;
+            if (nameRequired) {
+                outError[0] = tag + " does not specify android:name";
+                return false;
+            }
+        } else {
+            outInfo.name
+                = buildClassName(owner.applicationInfo.packageName, name, outError);
+            if (outInfo.name == null) {
+                return false;
+            }
         }
 
-        outInfo.name
-            = buildClassName(owner.applicationInfo.packageName, name, outError);
-        if (outInfo.name == null) {
-            return false;
-        }
-
-        int iconVal = sa.getResourceId(iconRes, 0);
-        if (iconVal != 0) {
-            outInfo.icon = iconVal;
+        final boolean useRoundIcon =
+                Resources.getSystem().getBoolean(com.android.internal.R.bool.config_useRoundIcon);
+        int roundIconVal = useRoundIcon ? sa.getResourceId(roundIconRes, 0) : 0;
+        if (roundIconVal != 0) {
+            outInfo.icon = roundIconVal;
             outInfo.nonLocalizedLabel = null;
+        } else {
+            int iconVal = sa.getResourceId(iconRes, 0);
+            if (iconVal != 0) {
+                outInfo.icon = iconVal;
+                outInfo.nonLocalizedLabel = null;
+            }
         }
 
         int logoVal = sa.getResourceId(logoRes, 0);
@@ -3384,6 +3401,7 @@
                     R.styleable.AndroidManifestActivity_name,
                     R.styleable.AndroidManifestActivity_label,
                     R.styleable.AndroidManifestActivity_icon,
+                    R.styleable.AndroidManifestActivity_roundIcon,
                     R.styleable.AndroidManifestActivity_logo,
                     R.styleable.AndroidManifestActivity_banner,
                     mSeparateProcesses,
@@ -3758,6 +3776,7 @@
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_name,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_label,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_icon,
+                    com.android.internal.R.styleable.AndroidManifestActivityAlias_roundIcon,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_logo,
                     com.android.internal.R.styleable.AndroidManifestActivityAlias_banner,
                     mSeparateProcesses,
@@ -3912,6 +3931,7 @@
                     com.android.internal.R.styleable.AndroidManifestProvider_name,
                     com.android.internal.R.styleable.AndroidManifestProvider_label,
                     com.android.internal.R.styleable.AndroidManifestProvider_icon,
+                    com.android.internal.R.styleable.AndroidManifestProvider_roundIcon,
                     com.android.internal.R.styleable.AndroidManifestProvider_logo,
                     com.android.internal.R.styleable.AndroidManifestProvider_banner,
                     mSeparateProcesses,
@@ -4231,6 +4251,7 @@
                     com.android.internal.R.styleable.AndroidManifestService_name,
                     com.android.internal.R.styleable.AndroidManifestService_label,
                     com.android.internal.R.styleable.AndroidManifestService_icon,
+                    com.android.internal.R.styleable.AndroidManifestService_roundIcon,
                     com.android.internal.R.styleable.AndroidManifestService_logo,
                     com.android.internal.R.styleable.AndroidManifestService_banner,
                     mSeparateProcesses,
@@ -4547,8 +4568,16 @@
             outInfo.nonLocalizedLabel = v.coerceToString();
         }
 
-        outInfo.icon = sa.getResourceId(
-                com.android.internal.R.styleable.AndroidManifestIntentFilter_icon, 0);
+        final boolean useRoundIcon =
+                Resources.getSystem().getBoolean(com.android.internal.R.bool.config_useRoundIcon);
+        int roundIconVal = useRoundIcon ? sa.getResourceId(
+                com.android.internal.R.styleable.AndroidManifestIntentFilter_roundIcon, 0) : 0;
+        if (roundIconVal != 0) {
+            outInfo.icon = roundIconVal;
+        } else {
+            outInfo.icon = sa.getResourceId(
+                    com.android.internal.R.styleable.AndroidManifestIntentFilter_icon, 0);
+        }
 
         outInfo.logo = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestIntentFilter_logo, 0);
@@ -5177,45 +5206,13 @@
         public Component(final ParsePackageItemArgs args, final PackageItemInfo outInfo) {
             owner = args.owner;
             intents = new ArrayList<II>(0);
-            String name = args.sa.getNonConfigurationString(args.nameRes, 0);
-            if (name == null) {
+            if (parsePackageItemInfo(args.owner, outInfo, args.outError, args.tag, args.sa,
+                    true /*nameRequired*/, args.nameRes, args.labelRes, args.iconRes,
+                    args.roundIconRes, args.logoRes, args.bannerRes)) {
+                className = outInfo.name;
+            } else {
                 className = null;
-                args.outError[0] = args.tag + " does not specify android:name";
-                return;
             }
-
-            outInfo.name
-                = buildClassName(owner.applicationInfo.packageName, name, args.outError);
-            if (outInfo.name == null) {
-                className = null;
-                args.outError[0] = args.tag + " does not have valid android:name";
-                return;
-            }
-
-            className = outInfo.name;
-
-            int iconVal = args.sa.getResourceId(args.iconRes, 0);
-            if (iconVal != 0) {
-                outInfo.icon = iconVal;
-                outInfo.nonLocalizedLabel = null;
-            }
-
-            int logoVal = args.sa.getResourceId(args.logoRes, 0);
-            if (logoVal != 0) {
-                outInfo.logo = logoVal;
-            }
-
-            int bannerVal = args.sa.getResourceId(args.bannerRes, 0);
-            if (bannerVal != 0) {
-                outInfo.banner = bannerVal;
-            }
-
-            TypedValue v = args.sa.peekValue(args.labelRes);
-            if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
-                outInfo.nonLocalizedLabel = v.coerceToString();
-            }
-
-            outInfo.packageName = owner.packageName;
         }
 
         public Component(final ParseComponentArgs args, final ComponentInfo outInfo) {
diff --git a/core/java/android/content/pm/ShortcutInfo.java b/core/java/android/content/pm/ShortcutInfo.java
index 4340d04..39e15e0 100644
--- a/core/java/android/content/pm/ShortcutInfo.java
+++ b/core/java/android/content/pm/ShortcutInfo.java
@@ -22,18 +22,24 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
 import android.graphics.drawable.Icon;
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.PersistableBundle;
 import android.os.UserHandle;
+import android.text.TextUtils;
 import android.util.ArraySet;
+import android.util.Log;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.Preconditions;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.List;
 import java.util.Set;
 
 // TODO Enhance javadoc
@@ -50,26 +56,49 @@
  * </ul>
  *
  * @see {@link ShortcutManager}.
- *
- * @hide
  */
 public final class ShortcutInfo implements Parcelable {
-    /* @hide */
+    static final String TAG = "Shortcut";
+
+    private static final String RES_TYPE_STRING = "string";
+
+    private static final String ANDROID_PACKAGE_NAME = "android";
+
+    private static final int IMPLICIT_RANK_MASK = 0x7fffffff;
+
+    private static final int RANK_CHANGED_BIT = ~IMPLICIT_RANK_MASK;
+
+    /** @hide */
+    public static final int RANK_NOT_SET = Integer.MAX_VALUE;
+
+    /** @hide */
     public static final int FLAG_DYNAMIC = 1 << 0;
 
-    /* @hide */
+    /** @hide */
     public static final int FLAG_PINNED = 1 << 1;
 
-    /* @hide */
+    /** @hide */
     public static final int FLAG_HAS_ICON_RES = 1 << 2;
 
-    /* @hide */
+    /** @hide */
     public static final int FLAG_HAS_ICON_FILE = 1 << 3;
 
-    /* @hide */
+    /** @hide */
     public static final int FLAG_KEY_FIELDS_ONLY = 1 << 4;
 
     /** @hide */
+    public static final int FLAG_MANIFEST = 1 << 5;
+
+    /** @hide */
+    public static final int FLAG_DISABLED = 1 << 6;
+
+    /** @hide */
+    public static final int FLAG_STRINGS_RESOLVED = 1 << 7;
+
+    /** @hide */
+    public static final int FLAG_IMMUTABLE = 1 << 8;
+
+    /** @hide */
     @IntDef(flag = true,
             value = {
             FLAG_DYNAMIC,
@@ -77,26 +106,34 @@
             FLAG_HAS_ICON_RES,
             FLAG_HAS_ICON_FILE,
             FLAG_KEY_FIELDS_ONLY,
+            FLAG_MANIFEST,
+            FLAG_DISABLED,
+            FLAG_STRINGS_RESOLVED,
+            FLAG_IMMUTABLE,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ShortcutFlags {}
 
     // Cloning options.
 
-    /* @hide */
+    /** @hide */
     private static final int CLONE_REMOVE_ICON = 1 << 0;
 
-    /* @hide */
+    /** @hide */
     private static final int CLONE_REMOVE_INTENT = 1 << 1;
 
-    /* @hide */
+    /** @hide */
     public static final int CLONE_REMOVE_NON_KEY_INFO = 1 << 2;
 
-    /* @hide */
-    public static final int CLONE_REMOVE_FOR_CREATOR = CLONE_REMOVE_ICON;
+    /** @hide */
+    public static final int CLONE_REMOVE_RES_NAMES = 1 << 3;
 
-    /* @hide */
-    public static final int CLONE_REMOVE_FOR_LAUNCHER = CLONE_REMOVE_ICON | CLONE_REMOVE_INTENT;
+    /** @hide */
+    public static final int CLONE_REMOVE_FOR_CREATOR = CLONE_REMOVE_ICON | CLONE_REMOVE_RES_NAMES;
+
+    /** @hide */
+    public static final int CLONE_REMOVE_FOR_LAUNCHER = CLONE_REMOVE_ICON | CLONE_REMOVE_INTENT
+            | CLONE_REMOVE_RES_NAMES;
 
     /** @hide */
     @IntDef(flag = true,
@@ -104,6 +141,7 @@
                     CLONE_REMOVE_ICON,
                     CLONE_REMOVE_INTENT,
                     CLONE_REMOVE_NON_KEY_INFO,
+                    CLONE_REMOVE_RES_NAMES,
                     CLONE_REMOVE_FOR_CREATOR,
                     CLONE_REMOVE_FOR_LAUNCHER
             })
@@ -121,33 +159,57 @@
     private final String mPackageName;
 
     @Nullable
-    private ComponentName mActivityComponent;
+    private ComponentName mActivity;
 
     @Nullable
     private Icon mIcon;
 
-    @NonNull
-    private String mTitle;
+    private int mTitleResId;
+
+    private String mTitleResName;
 
     @Nullable
-    private String mText;
+    private CharSequence mTitle;
 
-    @NonNull
+    private int mTextResId;
+
+    private String mTextResName;
+
+    @Nullable
+    private CharSequence mText;
+
+    private int mDisabledMessageResId;
+
+    private String mDisabledMessageResName;
+
+    @Nullable
+    private CharSequence mDisabledMessage;
+
+    @Nullable
     private ArraySet<String> mCategories;
 
     /**
      * Intent *with extras removed*.
      */
-    @NonNull
+    @Nullable
     private Intent mIntent;
 
     /**
      * Extras for the intent.
      */
-    @NonNull
+    @Nullable
     private PersistableBundle mIntentPersistableExtras;
 
-    private int mWeight;
+    private int mRank;
+
+    /**
+     * Internally used for auto-rank-adjustment.
+     *
+     * RANK_CHANGED_BIT is used to denote that the rank of a shortcut is changing.
+     * The rest of the bits are used to denote the order in which shortcuts are passed to
+     * APIs, which is used to preserve the argument order when ranks are tie.
+     */
+    private int mImplicitRank;
 
     @Nullable
     private PersistableBundle mExtras;
@@ -159,7 +221,9 @@
     private int mFlags;
 
     // Internal use only.
-    private int mIconResourceId;
+    private int mIconResId;
+
+    private String mIconResName;
 
     // Internal use only.
     @Nullable
@@ -175,11 +239,15 @@
         // Note we can't do other null checks here because SM.updateShortcuts() takes partial
         // information.
         mPackageName = b.mContext.getPackageName();
-        mActivityComponent = b.mActivityComponent;
+        mActivity = b.mActivity;
         mIcon = b.mIcon;
         mTitle = b.mTitle;
+        mTitleResId = b.mTitleResId;
         mText = b.mText;
-        mCategories = clone(b.mCategories);
+        mTextResId = b.mTextResId;
+        mDisabledMessage = b.mDisabledMessage;
+        mDisabledMessageResId = b.mDisabledMessageResId;
+        mCategories = cloneCategories(b.mCategories);
         mIntent = b.mIntent;
         if (mIntent != null) {
             final Bundle intentExtras = mIntent.getExtras();
@@ -188,13 +256,22 @@
                 mIntentPersistableExtras = new PersistableBundle(intentExtras);
             }
         }
-        mWeight = b.mWeight;
+        mRank = b.mRank;
         mExtras = b.mExtras;
         updateTimestamp();
     }
 
-    private <T> ArraySet<T> clone(Set<T> source) {
-        return (source == null) ? null : new ArraySet<>(source);
+    private ArraySet<String> cloneCategories(Set<String> source) {
+        if (source == null) {
+            return null;
+        }
+        final ArraySet<String> ret = new ArraySet<>(source.size());
+        for (CharSequence s : source) {
+            if (!TextUtils.isEmpty(s)) {
+                ret.add(s.toString().intern());
+            }
+        }
+        return ret;
     }
 
     /**
@@ -204,7 +281,10 @@
      */
     public void enforceMandatoryFields() {
         Preconditions.checkStringNotEmpty(mId, "Shortcut ID must be provided");
-        Preconditions.checkStringNotEmpty(mTitle, "Shortcut title must be provided");
+        Preconditions.checkNotNull(mActivity, "Activity must be provided");
+        if (mTitle == null && mTitleResId == 0) {
+            throw new IllegalArgumentException("Short label must be provided");
+        }
         Preconditions.checkNotNull(mIntent, "Shortcut Intent must be provided");
     }
 
@@ -215,14 +295,14 @@
         mUserId = source.mUserId;
         mId = source.mId;
         mPackageName = source.mPackageName;
+        mActivity = source.mActivity;
         mFlags = source.mFlags;
         mLastChangedTimestamp = source.mLastChangedTimestamp;
 
         // Just always keep it since it's cheep.
-        mIconResourceId = source.mIconResourceId;
+        mIconResId = source.mIconResId;
 
         if ((cloneFlags & CLONE_REMOVE_NON_KEY_INFO) == 0) {
-            mActivityComponent = source.mActivityComponent;
 
             if ((cloneFlags & CLONE_REMOVE_ICON) == 0) {
                 mIcon = source.mIcon;
@@ -230,14 +310,25 @@
             }
 
             mTitle = source.mTitle;
+            mTitleResId = source.mTitleResId;
             mText = source.mText;
-            mCategories = clone(source.mCategories);
+            mTextResId = source.mTextResId;
+            mDisabledMessage = source.mDisabledMessage;
+            mDisabledMessageResId = source.mDisabledMessageResId;
+            mCategories = cloneCategories(source.mCategories);
             if ((cloneFlags & CLONE_REMOVE_INTENT) == 0) {
                 mIntent = source.mIntent;
                 mIntentPersistableExtras = source.mIntentPersistableExtras;
             }
-            mWeight = source.mWeight;
+            mRank = source.mRank;
             mExtras = source.mExtras;
+
+            if ((cloneFlags & CLONE_REMOVE_RES_NAMES) == 0) {
+                mTitleResName = source.mTitleResName;
+                mTextResName = source.mTextResName;
+                mDisabledMessageResName = source.mDisabledMessageResName;
+                mIconResName = source.mIconResName;
+            }
         } else {
             // Set this bit.
             mFlags |= FLAG_KEY_FIELDS_ONLY;
@@ -245,6 +336,221 @@
     }
 
     /**
+     * Load a string resource from the publisher app.
+     *
+     * @param resId resource ID
+     * @param defValue default value to be returned when the specified resource isn't found.
+     */
+    private CharSequence getResourceString(Resources res, int resId, CharSequence defValue) {
+        try {
+            return res.getString(resId);
+        } catch (NotFoundException e) {
+            Log.e(TAG, "Resource for ID=" + resId + " not found in package " + mPackageName);
+            return defValue;
+        }
+    }
+
+    /**
+     * Load the string resources for the text fields and set them to the actual value fields.
+     * This will set {@link #FLAG_STRINGS_RESOLVED}.
+     *
+     * @param res {@link Resources} for the publisher.  Must have been loaded with
+     * {@link PackageManager#getResourcesForApplicationAsUser}.
+     *
+     * @hide
+     */
+    public void resolveResourceStrings(@NonNull Resources res) {
+        mFlags |= FLAG_STRINGS_RESOLVED;
+
+        if ((mTitleResId == 0) && (mTextResId == 0) && (mDisabledMessageResId == 0)) {
+            return; // Bail early.
+        }
+
+        if (mTitleResId != 0) {
+            mTitle = getResourceString(res, mTitleResId, mTitle);
+        }
+        if (mTextResId != 0) {
+            mText = getResourceString(res, mTextResId, mText);
+        }
+        if (mDisabledMessageResId != 0) {
+            mDisabledMessage = getResourceString(res, mDisabledMessageResId, mDisabledMessage);
+        }
+    }
+
+    /**
+     * Look up resource name for a given resource ID.
+     *
+     * @return a simple resource name (e.g. "text_1") when {@code withType} is false, or with the
+     * type (e.g. "string/text_1").
+     *
+     * @hide
+     */
+    @VisibleForTesting
+    public static String lookUpResourceName(@NonNull Resources res, int resId, boolean withType,
+            @NonNull String packageName) {
+        if (resId == 0) {
+            return null;
+        }
+        try {
+            final String fullName = res.getResourceName(resId);
+
+            if (ANDROID_PACKAGE_NAME.equals(getResourcePackageName(fullName))) {
+                // If it's a framework resource, the value won't change, so just return the ID
+                // value as a string.
+                return String.valueOf(resId);
+            }
+            return withType ? getResourceTypeAndEntryName(fullName)
+                    : getResourceEntryName(fullName);
+        } catch (NotFoundException e) {
+            Log.e(TAG, "Resource name for ID=" + resId + " not found in package " + packageName
+                    + ". Resource IDs may change when the application is upgraded, and the system"
+                    + " may not be able to find the correct resource.");
+            return null;
+        }
+    }
+
+    /**
+     * Extract the package name from a fully-donated resource name.
+     * e.g. "com.android.app1:drawable/icon1" -> "com.android.app1"
+     * @hide
+     */
+    @VisibleForTesting
+    public static String getResourcePackageName(@NonNull String fullResourceName) {
+        final int p1 = fullResourceName.indexOf(':');
+        if (p1 < 0) {
+            return null;
+        }
+        return fullResourceName.substring(0, p1);
+    }
+
+    /**
+     * Extract the type name from a fully-donated resource name.
+     * e.g. "com.android.app1:drawable/icon1" -> "drawable"
+     * @hide
+     */
+    @VisibleForTesting
+    public static String getResourceTypeName(@NonNull String fullResourceName) {
+        final int p1 = fullResourceName.indexOf(':');
+        if (p1 < 0) {
+            return null;
+        }
+        final int p2 = fullResourceName.indexOf('/', p1 + 1);
+        if (p2 < 0) {
+            return null;
+        }
+        return fullResourceName.substring(p1 + 1, p2);
+    }
+
+    /**
+     * Extract the type name + the entry name from a fully-donated resource name.
+     * e.g. "com.android.app1:drawable/icon1" -> "drawable/icon1"
+     * @hide
+     */
+    @VisibleForTesting
+    public static String getResourceTypeAndEntryName(@NonNull String fullResourceName) {
+        final int p1 = fullResourceName.indexOf(':');
+        if (p1 < 0) {
+            return null;
+        }
+        return fullResourceName.substring(p1 + 1);
+    }
+
+    /**
+     * Extract the entry name from a fully-donated resource name.
+     * e.g. "com.android.app1:drawable/icon1" -> "icon1"
+     * @hide
+     */
+    @VisibleForTesting
+    public static String getResourceEntryName(@NonNull String fullResourceName) {
+        final int p1 = fullResourceName.indexOf('/');
+        if (p1 < 0) {
+            return null;
+        }
+        return fullResourceName.substring(p1 + 1);
+    }
+
+    /**
+     * Return the resource ID for a given resource ID.
+     *
+     * Basically its' a wrapper over {@link Resources#getIdentifier(String, String, String)}, except
+     * if {@code resourceName} is an integer then it'll just return its value.  (Which also the
+     * aforementioned method would do internally, but not documented, so doing here explicitly.)
+     *
+     * @param res {@link Resources} for the publisher.  Must have been loaded with
+     * {@link PackageManager#getResourcesForApplicationAsUser}.
+     *
+     * @hide
+     */
+    @VisibleForTesting
+    public static int lookUpResourceId(@NonNull Resources res, @Nullable String resourceName,
+            @Nullable String resourceType, String packageName) {
+        if (resourceName == null) {
+            return 0;
+        }
+        try {
+            try {
+                // It the name can be parsed as an integer, just use it.
+                return Integer.parseInt(resourceName);
+            } catch (NumberFormatException ignore) {
+            }
+
+            return res.getIdentifier(resourceName, resourceType, packageName);
+        } catch (NotFoundException e) {
+            Log.e(TAG, "Resource ID for name=" + resourceName + " not found in package "
+                    + packageName);
+            return 0;
+        }
+    }
+
+    /**
+     * Look up resource names from the resource IDs for the icon res and the text fields, and fill
+     * in the resource name fields.
+     *
+     * @param res {@link Resources} for the publisher.  Must have been loaded with
+     * {@link PackageManager#getResourcesForApplicationAsUser}.
+     *
+     * @hide
+     */
+    public void lookupAndFillInResourceNames(@NonNull Resources res) {
+        if ((mTitleResId == 0) && (mTextResId == 0) && (mDisabledMessageResId == 0)
+                && (mIconResId == 0)) {
+            return; // Bail early.
+        }
+
+        // We don't need types for strings because their types are always "string".
+        mTitleResName = lookUpResourceName(res, mTitleResId, /*withType=*/ false, mPackageName);
+        mTextResName = lookUpResourceName(res, mTextResId, /*withType=*/ false, mPackageName);
+        mDisabledMessageResName = lookUpResourceName(res, mDisabledMessageResId,
+                /*withType=*/ false, mPackageName);
+
+        // But icons have multiple possible types, so include the type.
+        mIconResName = lookUpResourceName(res, mIconResId, /*withType=*/ true, mPackageName);
+    }
+
+    /**
+     * Look up resource IDs from the resource names for the icon res and the text fields, and fill
+     * in the resource ID fields.
+     *
+     * This is called when an app is updated.
+     *
+     * @hide
+     */
+    public void lookupAndFillInResourceIds(@NonNull Resources res) {
+        if ((mTitleResName == null) && (mTextResName == null) && (mDisabledMessageResName == null)
+                && (mIconResName == null)) {
+            return; // Bail early.
+        }
+
+        mTitleResId = lookUpResourceId(res, mTitleResName, RES_TYPE_STRING, mPackageName);
+        mTextResId = lookUpResourceId(res, mTextResName, RES_TYPE_STRING, mPackageName);
+        mDisabledMessageResId = lookUpResourceId(res, mDisabledMessageResName, RES_TYPE_STRING,
+                mPackageName);
+
+        // mIconResName already contains the type, so the third argument is not needed.
+        mIconResId = lookUpResourceId(res, mIconResName, null, mPackageName);
+    }
+
+    /**
      * Copy a {@link ShortcutInfo}, optionally removing fields.
      * @hide
      */
@@ -253,49 +559,84 @@
     }
 
     /**
+     * @hide
+     */
+    public void ensureUpdatableWith(ShortcutInfo source) {
+        Preconditions.checkState(mUserId == source.mUserId, "Owner User ID must match");
+        Preconditions.checkState(mId.equals(source.mId), "ID must match");
+        Preconditions.checkState(mPackageName.equals(source.mPackageName),
+                "Package name must match");
+        Preconditions.checkState(!isImmutable(), "Target ShortcutInfo is immutable");
+    }
+
+    /**
      * Copy non-null/zero fields from another {@link ShortcutInfo}.  Only "public" information
-     * will be overwritten.  The timestamp will be updated.
+     * will be overwritten.  The timestamp will *not* be updated to be consistent with other
+     * setters (and also the clock is not injectable in this file).
      *
      * - Flags will not change
      * - mBitmapPath will not change
      * - Current time will be set to timestamp
      *
+     * @throws IllegalStateException if source is not compatible.
+     *
      * @hide
      */
     public void copyNonNullFieldsFrom(ShortcutInfo source) {
-        Preconditions.checkState(mUserId == source.mUserId, "Owner User ID must match");
-        Preconditions.checkState(mId.equals(source.mId), "ID must match");
-        Preconditions.checkState(mPackageName.equals(source.mPackageName),
-                "Package name must match");
+        ensureUpdatableWith(source);
 
-        if (source.mActivityComponent != null) {
-            mActivityComponent = source.mActivityComponent;
+        if (source.mActivity != null) {
+            mActivity = source.mActivity;
         }
 
         if (source.mIcon != null) {
             mIcon = source.mIcon;
+
+            mIconResId = 0;
+            mIconResName = null;
+            mBitmapPath = null;
         }
         if (source.mTitle != null) {
             mTitle = source.mTitle;
+            mTitleResId = 0;
+            mTitleResName = null;
+        } else if (source.mTitleResId != 0) {
+            mTitle = null;
+            mTitleResId = source.mTitleResId;
+            mTitleResName = null;
         }
+
         if (source.mText != null) {
             mText = source.mText;
+            mTextResId = 0;
+            mTextResName = null;
+        } else if (source.mTextResId != 0) {
+            mText = null;
+            mTextResId = source.mTextResId;
+            mTextResName = null;
+        }
+        if (source.mDisabledMessage != null) {
+            mDisabledMessage = source.mDisabledMessage;
+            mDisabledMessageResId = 0;
+            mDisabledMessageResName = null;
+        } else if (source.mDisabledMessageResId != 0) {
+            mDisabledMessage = null;
+            mDisabledMessageResId = source.mDisabledMessageResId;
+            mDisabledMessageResName = null;
         }
         if (source.mCategories != null) {
-            mCategories = clone(source.mCategories);
+            mCategories = cloneCategories(source.mCategories);
         }
         if (source.mIntent != null) {
             mIntent = source.mIntent;
             mIntentPersistableExtras = source.mIntentPersistableExtras;
         }
-        if (source.mWeight != 0) {
-            mWeight = source.mWeight;
+        if (source.mRank != RANK_NOT_SET) {
+            mRank = source.mRank;
         }
         if (source.mExtras != null) {
             mExtras = source.mExtras;
         }
-
-        updateTimestamp();
     }
 
     /**
@@ -310,7 +651,6 @@
                 throw getInvalidIconException();
         }
         if (icon.hasTint()) {
-            // TODO support it
             throw new IllegalArgumentException("Icons with tints are not supported");
         }
 
@@ -331,40 +671,69 @@
 
         private String mId;
 
-        private ComponentName mActivityComponent;
+        private ComponentName mActivity;
 
         private Icon mIcon;
 
-        private String mTitle;
+        private int mTitleResId;
 
-        private String mText;
+        private CharSequence mTitle;
+
+        private int mTextResId;
+
+        private CharSequence mText;
+
+        private int mDisabledMessageResId;
+
+        private CharSequence mDisabledMessage;
 
         private Set<String> mCategories;
 
         private Intent mIntent;
 
-        private int mWeight;
+        private int mRank = RANK_NOT_SET;
 
         private PersistableBundle mExtras;
 
-        /** Constructor. */
+        /**
+         * Old style constructor.
+         * @hide
+         */
+        @Deprecated
         public Builder(Context context) {
             mContext = context;
         }
 
         /**
-         * Sets the ID of the shortcut.  This is a mandatory field.
+         * Used with the old style constructor, kept for unit tests.
+         * @hide
          */
         @NonNull
+        @Deprecated
         public Builder setId(@NonNull String id) {
-            mId = Preconditions.checkStringNotEmpty(id, "id");
+            mId = Preconditions.checkStringNotEmpty(id, "id cannot be empty");
             return this;
         }
 
         /**
-         * Optionally sets the target activity.  If it's not set, and if the caller application
-         * has multiple launcher icons, this shortcut will be shown on all those icons.
-         * If it's set, this shortcut will be only shown on this activity.
+         * Constructor.
+         *
+         * @param context Client context.
+         * @param id ID of the shortcut.
+         */
+        public Builder(Context context, String id) {
+            mContext = context;
+            mId = Preconditions.checkStringNotEmpty(id, "id cannot be empty");
+        }
+
+        /**
+         * Sets the target activity. A shortcut will be shown with this activity on the launcher.
+         *
+         * <p>Only "main" activities -- i.e. ones with an intent filter for
+         * {@link Intent#ACTION_MAIN} and {@link Intent#CATEGORY_LAUNCHER} can be target activities.
+         *
+         * <p>By default, the first main activity defined in the application manifest will be
+         * the target.
          *
          * <p>The package name of the target activity must match the package name of the shortcut
          * publisher.
@@ -373,24 +742,24 @@
          * a hint to the launcher app about which launcher icon to associate this shortcut with.
          */
         @NonNull
-        public Builder setActivityComponent(@NonNull ComponentName activityComponent) {
-            mActivityComponent = Preconditions.checkNotNull(activityComponent, "activityComponent");
+        public Builder setActivity(@NonNull ComponentName activity) {
+            mActivity = Preconditions.checkNotNull(activity, "activity cannot be null");
             return this;
         }
 
         /**
-         * Optionally sets an icon.
+         * Sets an icon.
          *
          * <ul>
          *     <li>Tints set by {@link Icon#setTint} or {@link Icon#setTintList} are not supported.
          *     <li>Bitmaps and resources are supported, but "content:" URIs are not supported.
          * </ul>
          *
-         * <p>For performance reasons, icons will <b>NOT</b> be available on instances
-         * returned by {@link ShortcutManager} or {@link LauncherApps}.  Launcher applications
-         * can use {@link ShortcutInfo#getIconResourceId()} if {@link #hasIconResource()} is true.
-         * Otherwise, if {@link #hasIconFile()} is true, use
-         * {@link LauncherApps#getShortcutIconFd} to load the image.
+         * <p>For performance and security reasons, icons will <b>NOT</b> be available on instances
+         * returned by {@link ShortcutManager} or {@link LauncherApps}.  Default launcher application
+         * can use {@link LauncherApps#getShortcutIconDrawable(ShortcutInfo, int)}
+         * or {@link LauncherApps#getShortcutBadgedIconDrawable(ShortcutInfo, int)} to fetch
+         * shortcut icons.
          */
         @NonNull
         public Builder setIcon(Icon icon) {
@@ -399,26 +768,99 @@
         }
 
         /**
-         * Sets the title of a shortcut.  This is a mandatory field.
+         * @hide We don't support resource strings for dynamic shortcuts for now.  (But unit tests
+         * use it.)
+         */
+        @Deprecated
+        public Builder setShortLabelResId(int shortLabelResId) {
+            Preconditions.checkState(mTitle == null, "shortLabel already set");
+            mTitleResId = shortLabelResId;
+            return this;
+        }
+
+        /**
+         * Sets the short title of a shortcut.
+         *
+         * <p>This is a mandatory field, unless it's passed to
+         * {@link ShortcutManager#updateShortcuts(List)}.
          *
          * <p>This field is intended for a concise description of a shortcut displayed under
          * an icon.  The recommend max length is 10 characters.
          */
         @NonNull
-        public Builder setTitle(@NonNull String title) {
-            mTitle = Preconditions.checkStringNotEmpty(title, "title");
+        public Builder setShortLabel(@NonNull CharSequence shortLabel) {
+            Preconditions.checkState(mTitleResId == 0, "shortLabelResId already set");
+            mTitle = Preconditions.checkStringNotEmpty(shortLabel, "shortLabel cannot be empty");
             return this;
         }
 
         /**
-         * Sets the text of a shortcut.  This is an optional field.
+         * @hide We don't support resource strings for dynamic shortcuts for now.  (But unit tests
+         * use it.)
+         */
+        @Deprecated
+        public Builder setLongLabelResId(int longLabelResId) {
+            Preconditions.checkState(mText == null, "longLabel already set");
+            mTextResId = longLabelResId;
+            return this;
+        }
+
+        /**
+         * Sets the text of a shortcut.
          *
-         * <p>This field is intended to be more descriptive than the shortcut title.
+         * <p>This field is intended to be more descriptive than the shortcut title.  The launcher
+         * shows this instead of the short title, when it has enough space.
          * The recommend max length is 25 characters.
          */
         @NonNull
-        public Builder setText(@NonNull String text) {
-            mText = Preconditions.checkStringNotEmpty(text, "text");
+        public Builder setLongLabel(@NonNull CharSequence longLabel) {
+            Preconditions.checkState(mTextResId == 0, "longLabelResId already set");
+            mText = Preconditions.checkStringNotEmpty(longLabel, "longLabel cannot be empty");
+            return this;
+        }
+
+        /** @hide -- old signature, the internal code still uses it. */
+        @Deprecated
+        public Builder setTitle(@NonNull CharSequence value) {
+            return setShortLabel(value);
+        }
+
+        /** @hide -- old signature, the internal code still uses it. */
+        @Deprecated
+        public Builder setTitleResId(int value) {
+            return setShortLabelResId(value);
+        }
+
+        /** @hide -- old signature, the internal code still uses it. */
+        @Deprecated
+        public Builder setText(@NonNull CharSequence value) {
+            return setLongLabel(value);
+        }
+
+        /** @hide -- old signature, the internal code still uses it. */
+        @Deprecated
+        public Builder setTextResId(int value) {
+            return setLongLabelResId(value);
+        }
+
+        /**
+         * @hide We don't support resource strings for dynamic shortcuts for now.  (But unit tests
+         * use it.)
+         */
+        @Deprecated
+        public Builder setDisabledMessageResId(int disabledMessageResId) {
+            Preconditions.checkState(mDisabledMessage == null, "disabledMessage already set");
+            mDisabledMessageResId = disabledMessageResId;
+            return this;
+        }
+
+        @NonNull
+        public Builder setDisabledMessage(@NonNull CharSequence disabledMessage) {
+            Preconditions.checkState(
+                    mDisabledMessageResId == 0, "disabledMessageResId already set");
+            mDisabledMessage =
+                    Preconditions.checkStringNotEmpty(disabledMessage,
+                            "disabledMessage cannot be empty");
             return this;
         }
 
@@ -440,22 +882,27 @@
          */
         @NonNull
         public Builder setIntent(@NonNull Intent intent) {
-            mIntent = Preconditions.checkNotNull(intent, "intent");
+            mIntent = Preconditions.checkNotNull(intent, "intent cannot be null");
+            Preconditions.checkNotNull(mIntent.getAction(), "intent's action must be set");
             return this;
         }
 
         /**
-         * Optionally sets the weight of a shortcut, which will be used by the launcher for sorting.
-         * The larger the weight, the more "important" a shortcut is.
+         * "Rank" of a shortcut, which is a non-negative value that's used by the launcher app
+         * to sort shortcuts.
          */
         @NonNull
-        public Builder setWeight(int weight) {
-            mWeight = weight;
+        public Builder setRank(int rank) {
+            Preconditions.checkArgument((0 <= rank),
+                    "Rank cannot be negative or bigger than MAX_RANK");
+            mRank = rank;
             return this;
         }
 
         /**
-         * Optional values that applications can set.  Applications can store any meta-data of
+         * Extras that application can set to any purposes.
+         *
+         * <p>Applications can store any meta-data of
          * shortcuts in this, and retrieve later from {@link ShortcutInfo#getExtras()}.
          */
         @NonNull
@@ -485,7 +932,7 @@
      * Return the package name of the creator application.
      */
     @NonNull
-    public String getPackageName() {
+    public String getPackage() {
         return mPackageName;
     }
 
@@ -496,11 +943,16 @@
      * <p>This has nothing to do with the activity that this shortcut will launch.  This is
      * a hint to the launcher app that on which launcher icon this shortcut should be shown.
      *
-     * @see Builder#setActivityComponent
+     * @see Builder#setActivity
      */
     @Nullable
-    public ComponentName getActivityComponent() {
-        return mActivityComponent;
+    public ComponentName getActivity() {
+        return mActivity;
+    }
+
+    /** @hide */
+    public void setActivity(ComponentName activity) {
+        mActivity = activity;
     }
 
     /**
@@ -517,25 +969,74 @@
         return mIcon;
     }
 
+    /** @hide -- old signature, the internal code still uses it. */
+    @Nullable
+    @Deprecated
+    public CharSequence getTitle() {
+        return mTitle;
+    }
+
+    /** @hide -- old signature, the internal code still uses it. */
+    @Deprecated
+    public int getTitleResId() {
+        return mTitleResId;
+    }
+
+    /** @hide -- old signature, the internal code still uses it. */
+    @Nullable
+    @Deprecated
+    public CharSequence getText() {
+        return mText;
+    }
+
+    /** @hide -- old signature, the internal code still uses it. */
+    @Deprecated
+    public int getTextResId() {
+        return mTextResId;
+    }
+
     /**
-     * Return the shortcut title.
+     * Return the shorter version of the shortcut title.
      *
      * <p>All shortcuts must have a non-empty title, but this method will return null when
      * {@link #hasKeyFieldsOnly()} is true.
      */
     @Nullable
-    public String getTitle() {
+    public CharSequence getShortLabel() {
         return mTitle;
     }
 
+    /** @hide */
+    public int getShortLabelResourceId() {
+        return mTitleResId;
+    }
+
     /**
      * Return the shortcut text.
      */
     @Nullable
-    public String getText() {
+    public CharSequence getLongLabel() {
         return mText;
     }
 
+    /** @hide */
+    public int getLongLabelResourceId() {
+        return mTextResId;
+    }
+
+    /**
+     * Return the message that should be shown when a shortcut in disabled state is launched.
+     */
+    @Nullable
+    public CharSequence getDisabledMessage() {
+        return mDisabledMessage;
+    }
+
+    /** @hide */
+    public int getDisabledMessageResourceId() {
+        return mDisabledMessageResId;
+    }
+
     /**
      * Return the categories.
      */
@@ -585,15 +1086,59 @@
     }
 
     /**
-     * Return the weight of a shortcut, which will be used by Launcher for sorting.
-     * The larger the weight, the more "important" a shortcut is.
+     * "Rank" of a shortcut, which is a non-negative, sequential value that's unique for each
+     * {@link #getActivity} for each of the two kinds, dynamic shortcuts and manifest shortcuts.
+     *
+     * <p>Because manifest shortcuts and dynamic shortcuts have overlapping ranks,
+     * when a launcher application shows shortcuts for an activity, it should first show
+     * the manifest shortcuts followed by the dynamic shortcuts.  Within each of those categories,
+     * shortcuts should be sorted by rank in ascending order.
+     *
+     * <p>"Floating" shortcuts (i.e. shortcuts that are neither dynamic nor manifest) will all
+     * have rank 0, because there's no sorting for them.
      */
-    public int getWeight() {
-        return mWeight;
+    public int getRank() {
+        return mRank;
+    }
+
+    /** @hide */
+    public boolean hasRank() {
+        return mRank != RANK_NOT_SET;
+    }
+
+    /** @hide */
+    public void setRank(int rank) {
+        mRank = rank;
+    }
+
+    /** @hide */
+    public void clearImplicitRankAndRankChangedFlag() {
+        mImplicitRank = 0;
+    }
+
+    /** @hide */
+    public void setImplicitRank(int rank) {
+        // Make sure to keep RANK_CHANGED_BIT.
+        mImplicitRank = (mImplicitRank & RANK_CHANGED_BIT) | (rank & IMPLICIT_RANK_MASK);
+    }
+
+    /** @hide */
+    public int getImplicitRank() {
+        return mImplicitRank & IMPLICIT_RANK_MASK;
+    }
+
+    /** @hide */
+    public void setRankChanged() {
+        mImplicitRank |= RANK_CHANGED_BIT;
+    }
+
+    /** @hide */
+    public boolean isRankChanged() {
+        return (mImplicitRank & RANK_CHANGED_BIT) != 0;
     }
 
     /**
-     * Optional values that application can set.
+     * Extras that application can set to any purposes.
      */
     @Nullable
     public PersistableBundle getExtras() {
@@ -656,18 +1201,96 @@
     }
 
     /**
+     * Return whether a shortcut is published via AndroidManifest.xml or not.  If {@code true},
+     * it's also {@link #isImmutable()}.
+     *
+     * <p>When an app is upgraded and a shortcut is no longer published from AndroidManifest.xml,
+     * this will be set to {@code false}.  If the shortcut is not pinned, then it'll just disappear.
+     * However, if it's pinned, it will still be alive, and {@link #isEnabled()} will be
+     * {@code false} and {@link #isImmutable()} will be {@code true}.
+     *
+     * <p>NOTE this is whether a shortcut is published from the <b>current version's</b>
+     * AndroidManifest.xml.
+     */
+    public boolean isDeclaredInManifest() {
+        return hasFlags(FLAG_MANIFEST);
+    }
+
+    /** @hide kept for unit tests */
+    @Deprecated
+    public boolean isManifestShortcut() {
+        return isDeclaredInManifest();
+    }
+
+    /**
+     * @return true if pinned but neither dynamic nor manifest.
+     * @hide
+     */
+    public boolean isFloating() {
+        return isPinned() && !(isDynamic() || isManifestShortcut());
+    }
+
+    /** @hide */
+    public boolean isOriginallyFromManifest() {
+        return hasFlags(FLAG_IMMUTABLE);
+    }
+
+    /**
+     * Return if a shortcut is immutable, in which case it cannot be modified with any of
+     * {@link ShortcutManager} APIs.
+     *
+     * <p>All manifest shortcuts are immutable.  When a manifest shortcut is pinned and then
+     * disabled because the app is upgraded and its AndroidManifest.xml no longer publishes it,
+     * {@link #isDeclaredInManifest()} returns {@code false}, but it is still immutable.
+     *
+     * <p>All shortcuts originally published via the {@link ShortcutManager} APIs
+     * are all mutable.
+     */
+    public boolean isImmutable() {
+        return hasFlags(FLAG_IMMUTABLE);
+    }
+
+    /**
+     * Returns {@code false} if a shortcut is disabled with
+     * {@link ShortcutManager#disableShortcuts}.
+     */
+    public boolean isEnabled() {
+        return !hasFlags(FLAG_DISABLED);
+    }
+
+    /** @hide */
+    public boolean isAlive() {
+        return hasFlags(FLAG_PINNED) || hasFlags(FLAG_DYNAMIC) || hasFlags(FLAG_MANIFEST);
+    }
+
+    /** @hide */
+    public boolean usesQuota() {
+        return hasFlags(FLAG_DYNAMIC) || hasFlags(FLAG_MANIFEST);
+    }
+
+    /**
      * Return whether a shortcut's icon is a resource in the owning package.
      *
-     * @see LauncherApps#getShortcutIconResId(ShortcutInfo)
+     * @hide internal/unit tests only
      */
     public boolean hasIconResource() {
         return hasFlags(FLAG_HAS_ICON_RES);
     }
 
+    /** @hide */
+    public boolean hasStringResources() {
+        return (mTitleResId != 0) || (mTextResId != 0) || (mDisabledMessageResId != 0);
+    }
+
+    /** @hide */
+    public boolean hasAnyResources() {
+        return hasIconResource() || hasStringResources();
+    }
+
     /**
      * Return whether a shortcut's icon is stored as a file.
      *
-     * @see LauncherApps#getShortcutIconFd(ShortcutInfo)
+     * @hide internal/unit tests only
      */
     public boolean hasIconFile() {
         return hasFlags(FLAG_HAS_ICON_FILE);
@@ -678,12 +1301,15 @@
      * following fields are available.
      * <ul>
      *     <li>{@link #getId()}
-     *     <li>{@link #getPackageName()}
+     *     <li>{@link #getPackage()}
+     *     <li>{@link #getActivity()}
      *     <li>{@link #getLastChangedTimestamp()}
      *     <li>{@link #isDynamic()}
      *     <li>{@link #isPinned()}
-     *     <li>{@link #hasIconResource()}
-     *     <li>{@link #hasIconFile()}
+     *     <li>{@link #isDeclaredInManifest()}
+     *     <li>{@link #isImmutable()}
+     *     <li>{@link #isEnabled()}
+     *     <li>{@link #getUserHandle()}
      * </ul>
      */
     public boolean hasKeyFieldsOnly() {
@@ -691,6 +1317,11 @@
     }
 
     /** @hide */
+    public boolean hasStringResourcesResolved() {
+        return hasFlags(FLAG_STRINGS_RESOLVED);
+    }
+
+    /** @hide */
     public void updateTimestamp() {
         mLastChangedTimestamp = System.currentTimeMillis();
     }
@@ -708,14 +1339,18 @@
 
     /** @hide */
     public void setIconResourceId(int iconResourceId) {
-        mIconResourceId = iconResourceId;
+        if (mIconResId != iconResourceId) {
+            mIconResName = null;
+        }
+        mIconResId = iconResourceId;
     }
 
     /**
      * Get the resource ID for the icon, valid only when {@link #hasIconResource()} } is true.
+     * @hide internal / tests only.
      */
     public int getIconResourceId() {
-        return mIconResourceId;
+        return mIconResId;
     }
 
     /** @hide */
@@ -728,25 +1363,126 @@
         mBitmapPath = bitmapPath;
     }
 
+    /** @hide */
+    public void setDisabledMessageResId(int disabledMessageResId) {
+        if (mDisabledMessageResId != disabledMessageResId) {
+            mDisabledMessageResName = null;
+        }
+        mDisabledMessageResId = disabledMessageResId;
+        mDisabledMessage = null;
+    }
+
+    /** @hide */
+    public void setDisabledMessage(String disabledMessage) {
+        mDisabledMessage = disabledMessage;
+        mDisabledMessageResId = 0;
+        mDisabledMessageResName = null;
+    }
+
+    /** @hide */
+    public String getTitleResName() {
+        return mTitleResName;
+    }
+
+    /** @hide */
+    public void setTitleResName(String titleResName) {
+        mTitleResName = titleResName;
+    }
+
+    /** @hide */
+    public String getTextResName() {
+        return mTextResName;
+    }
+
+    /** @hide */
+    public void setTextResName(String textResName) {
+        mTextResName = textResName;
+    }
+
+    /** @hide */
+    public String getDisabledMessageResName() {
+        return mDisabledMessageResName;
+    }
+
+    /** @hide */
+    public void setDisabledMessageResName(String disabledMessageResName) {
+        mDisabledMessageResName = disabledMessageResName;
+    }
+
+    /** @hide */
+    public String getIconResName() {
+        return mIconResName;
+    }
+
+    /** @hide */
+    public void setIconResName(String iconResName) {
+        mIconResName = iconResName;
+    }
+
+    /**
+     * Replaces the intent
+     *
+     * @throws IllegalArgumentException when extra is not compatible with {@link PersistableBundle}.
+     *
+     * @hide
+     */
+    public void setIntent(Intent intent) throws IllegalArgumentException {
+        Preconditions.checkNotNull(intent);
+
+        final Bundle intentExtras = intent.getExtras();
+
+        mIntent = intent;
+
+        if (intentExtras != null) {
+            intent.replaceExtras((Bundle) null);
+            mIntentPersistableExtras = new PersistableBundle(intentExtras);
+        } else {
+            mIntentPersistableExtras = null;
+        }
+    }
+
+    /**
+     * Replaces the categories.
+     *
+     * @hide
+     */
+    public void setCategories(Set<String> categories) {
+        mCategories = cloneCategories(categories);
+    }
+
     private ShortcutInfo(Parcel source) {
         final ClassLoader cl = getClass().getClassLoader();
 
         mUserId = source.readInt();
         mId = source.readString();
         mPackageName = source.readString();
-        mActivityComponent = source.readParcelable(cl);
+        mActivity = source.readParcelable(cl);
+        mFlags = source.readInt();
+        mIconResId = source.readInt();
+        mLastChangedTimestamp = source.readLong();
+
+        if (source.readInt() == 0) {
+            return; // key information only.
+        }
+
         mIcon = source.readParcelable(cl);
-        mTitle = source.readString();
-        mText = source.readString();
+        mTitle = source.readCharSequence();
+        mTitleResId = source.readInt();
+        mText = source.readCharSequence();
+        mTextResId = source.readInt();
+        mDisabledMessage = source.readCharSequence();
+        mDisabledMessageResId = source.readInt();
         mIntent = source.readParcelable(cl);
         mIntentPersistableExtras = source.readParcelable(cl);
-        mWeight = source.readInt();
+        mRank = source.readInt();
         mExtras = source.readParcelable(cl);
-        mLastChangedTimestamp = source.readLong();
-        mFlags = source.readInt();
-        mIconResourceId = source.readInt();
         mBitmapPath = source.readString();
 
+        mIconResName = source.readString();
+        mTitleResName = source.readString();
+        mTextResName = source.readString();
+        mDisabledMessageResName = source.readString();
+
         int N = source.readInt();
         if (N == 0) {
             mCategories = null;
@@ -763,20 +1499,36 @@
         dest.writeInt(mUserId);
         dest.writeString(mId);
         dest.writeString(mPackageName);
-        dest.writeParcelable(mActivityComponent, flags);
+        dest.writeParcelable(mActivity, flags);
+        dest.writeInt(mFlags);
+        dest.writeInt(mIconResId);
+        dest.writeLong(mLastChangedTimestamp);
+
+        if (hasKeyFieldsOnly()) {
+            dest.writeInt(0);
+            return;
+        }
+        dest.writeInt(1);
+
         dest.writeParcelable(mIcon, flags);
-        dest.writeString(mTitle);
-        dest.writeString(mText);
+        dest.writeCharSequence(mTitle);
+        dest.writeInt(mTitleResId);
+        dest.writeCharSequence(mText);
+        dest.writeInt(mTextResId);
+        dest.writeCharSequence(mDisabledMessage);
+        dest.writeInt(mDisabledMessageResId);
 
         dest.writeParcelable(mIntent, flags);
         dest.writeParcelable(mIntentPersistableExtras, flags);
-        dest.writeInt(mWeight);
+        dest.writeInt(mRank);
         dest.writeParcelable(mExtras, flags);
-        dest.writeLong(mLastChangedTimestamp);
-        dest.writeInt(mFlags);
-        dest.writeInt(mIconResourceId);
         dest.writeString(mBitmapPath);
 
+        dest.writeString(mIconResName);
+        dest.writeString(mTitleResName);
+        dest.writeString(mTextResName);
+        dest.writeString(mDisabledMessageResName);
+
         if (mCategories != null) {
             final int N = mCategories.size();
             dest.writeInt(N);
@@ -823,24 +1575,67 @@
         sb.append("id=");
         sb.append(secure ? "***" : mId);
 
+        sb.append(", flags=0x");
+        sb.append(Integer.toHexString(mFlags));
+        sb.append(" [");
+        if (!isEnabled()) {
+            sb.append("X");
+        }
+        if (isImmutable()) {
+            sb.append("Im");
+        }
+        if (isManifestShortcut()) {
+            sb.append("M");
+        }
+        if (isDynamic()) {
+            sb.append("D");
+        }
+        if (isPinned()) {
+            sb.append("P");
+        }
+        if (hasIconFile()) {
+            sb.append("If");
+        }
+        if (hasIconResource()) {
+            sb.append("Ir");
+        }
+        if (hasKeyFieldsOnly()) {
+            sb.append("K");
+        }
+        if (hasStringResourcesResolved()) {
+            sb.append("Sr");
+        }
+        sb.append("]");
+
         sb.append(", packageName=");
         sb.append(mPackageName);
 
-        if (isDynamic()) {
-            sb.append(", dynamic");
-        }
-        if (isPinned()) {
-            sb.append(", pinned");
-        }
-
         sb.append(", activity=");
-        sb.append(mActivityComponent);
+        sb.append(mActivity);
 
-        sb.append(", title=");
+        sb.append(", shortLabel=");
         sb.append(secure ? "***" : mTitle);
+        sb.append(", resId=");
+        sb.append(mTitleResId);
+        sb.append("[");
+        sb.append(mTitleResName);
+        sb.append("]");
 
-        sb.append(", text=");
+        sb.append(", longLabel=");
         sb.append(secure ? "***" : mText);
+        sb.append(", resId=");
+        sb.append(mTextResId);
+        sb.append("[");
+        sb.append(mTextResName);
+        sb.append("]");
+
+        sb.append(", disabledMessage=");
+        sb.append(secure ? "***" : mDisabledMessage);
+        sb.append(", resId=");
+        sb.append(mDisabledMessageResId);
+        sb.append("[");
+        sb.append(mDisabledMessageResName);
+        sb.append("]");
 
         sb.append(", categories=");
         sb.append(mCategories);
@@ -848,8 +1643,8 @@
         sb.append(", icon=");
         sb.append(mIcon);
 
-        sb.append(", weight=");
-        sb.append(mWeight);
+        sb.append(", rank=");
+        sb.append(mRank);
 
         sb.append(", timestamp=");
         sb.append(mLastChangedTimestamp);
@@ -863,13 +1658,13 @@
         sb.append(", extras=");
         sb.append(mExtras);
 
-        sb.append(", flags=");
-        sb.append(mFlags);
-
         if (includeInternalData) {
 
             sb.append(", iconRes=");
-            sb.append(mIconResourceId);
+            sb.append(mIconResId);
+            sb.append("[");
+            sb.append(mIconResName);
+            sb.append("]");
 
             sb.append(", bitmapPath=");
             sb.append(mBitmapPath);
@@ -881,26 +1676,37 @@
 
     /** @hide */
     public ShortcutInfo(
-            @UserIdInt int userId, String id, String packageName, ComponentName activityComponent,
-            Icon icon, String title, String text, Set<String> categories, Intent intent,
-            PersistableBundle intentPersistableExtras,
-            int weight, PersistableBundle extras, long lastChangedTimestamp,
-            int flags, int iconResId, String bitmapPath) {
+            @UserIdInt int userId, String id, String packageName, ComponentName activity,
+            Icon icon, CharSequence title, int titleResId, String titleResName,
+            CharSequence text, int textResId, String textResName,
+            CharSequence disabledMessage, int disabledMessageResId, String disabledMessageResName,
+            Set<String> categories,
+            Intent intent, PersistableBundle intentPersistableExtras,
+            int rank, PersistableBundle extras, long lastChangedTimestamp,
+            int flags, int iconResId, String iconResName, String bitmapPath) {
         mUserId = userId;
         mId = id;
         mPackageName = packageName;
-        mActivityComponent = activityComponent;
+        mActivity = activity;
         mIcon = icon;
         mTitle = title;
+        mTitleResId = titleResId;
+        mTitleResName = titleResName;
         mText = text;
-        mCategories = clone(categories);
+        mTextResId = textResId;
+        mTextResName = textResName;
+        mDisabledMessage = disabledMessage;
+        mDisabledMessageResId = disabledMessageResId;
+        mDisabledMessageResName = disabledMessageResName;
+        mCategories = cloneCategories(categories);
         mIntent = intent;
         mIntentPersistableExtras = intentPersistableExtras;
-        mWeight = weight;
+        mRank = rank;
         mExtras = extras;
         mLastChangedTimestamp = lastChangedTimestamp;
         mFlags = flags;
-        mIconResourceId = iconResId;
+        mIconResId = iconResId;
+        mIconResName = iconResName;
         mBitmapPath = bitmapPath;
     }
 }
diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java
index 16486e1..1af63a0 100644
--- a/core/java/android/content/pm/ShortcutManager.java
+++ b/core/java/android/content/pm/ShortcutManager.java
@@ -17,8 +17,9 @@
 
 import android.annotation.NonNull;
 import android.annotation.TestApi;
+import android.annotation.UserIdInt;
+import android.app.usage.UsageStatsManager;
 import android.content.Context;
-import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.UserHandle;
@@ -29,14 +30,16 @@
 
 // TODO Enhance javadoc
 /**
+ * <b>TODO: Update to reflect DR changes, such as manifest shortcuts.</b><br>
+ *
  * {@link ShortcutManager} manages shortcuts created by applications.
  *
  * <h3>Dynamic shortcuts and pinned shortcuts</h3>
  *
  * An application can publish shortcuts with {@link #setDynamicShortcuts(List)} and
  * {@link #addDynamicShortcuts(List)}.  There can be at most
- * {@link #getMaxDynamicShortcutCount()} number of dynamic shortcuts at a time from the same
- * application.
+ * {@link #getMaxShortcutCountPerActivity()} number of dynamic shortcuts at a time from the
+ * same application.
  * A dynamic shortcut can be deleted with {@link #removeDynamicShortcuts(List)}, and apps
  * can also use {@link #removeAllDynamicShortcuts()} to delete all dynamic shortcuts.
  *
@@ -50,7 +53,8 @@
  * <p>The number of pinned shortcuts does not affect the number of dynamic shortcuts that can be
  * published by an application at a time.
  * No matter how many pinned shortcuts that Launcher has for an application, the
- * application can still always publish {@link #getMaxDynamicShortcutCount()} number of dynamic
+ * application can still always publish {@link #getMaxShortcutCountPerActivity()} number of
+ * dynamic
  * shortcuts.
  *
  * <h3>Shortcut IDs</h3>
@@ -59,37 +63,27 @@
  * published, existing shortcuts with the same ID will be updated.  Note this may include a
  * pinned shortcut.
  *
- * <h3>Rate limiting</h3>
- *
- * Calls to {@link #setDynamicShortcuts(List)}, {@link #addDynamicShortcuts(List)},
- * and {@link #updateShortcuts(List)} from <b>background applications</b> will be
- * rate-limited.  An application can call these methods at most
- * {@link #getRemainingCallCount()} times until the rate-limiting counter is reset,
- * which happens at a certain time every day.
- *
- * <p>An application can use {@link #getRateLimitResetTime()} to get the next reset time.
- *
- * <p>Foreground applications (i.e. ones with a foreground activity or a foreground services)
- * will not be throttled. Also, when an application comes to foreground,
- * {@link #getRemainingCallCount()} will be reset to the initial value.
- *
- * <p>For testing purposes, use "Developer Options" (found in the Settings menu) to reset the
- * internal rate-limiting counter.  Automated tests can use the following ADB shell command to
- * achieve the same effect:</p>
- * <pre>adb shell cmd shortcut reset-throttling</pre>
  *
  * <h3>Backup and Restore</h3>
  *
- * Shortcuts will be backed up and restored across devices.  This means all information, including
- * IDs, must be meaningful on a different device.
+ * Pinned shortcuts will be backed up and restored across devices.  This means all information
+ * within shortcuts, including IDs, must be meaningful on different devices.
+ *
+ * <p>Note that:
+ * <ul>
+ *     <li>Dynamic shortcuts will not be backed up or restored.
+ *     <li>Icons of pinned shortcuts will <b>not</b> be backed up for performance reasons, unless
+ *     they refer to resources.  Instead, launcher applications are supposed to back up and restore
+ *     icons of pinned shortcuts by themselves, and thus from the user's point of view, pinned
+ *     shortcuts will look to have icons restored.
+ * </ul>
+ *
  *
  * <h3>APIs for launcher</h3>
  *
  * Launcher applications should use {@link LauncherApps} to get shortcuts that are published from
  * applications.  Launcher applications can also pin shortcuts with
  * {@link LauncherApps#pinShortcuts(String, List, UserHandle)}.
- *
- * @hide
  */
 public class ShortcutManager {
     private static final String TAG = "ShortcutManager";
@@ -123,7 +117,7 @@
      * @return {@code true} if the call has succeeded. {@code false} if the call is rate-limited.
      *
      * @throws IllegalArgumentException if {@code shortcutInfoList} contains more than
-     * {@link #getMaxDynamicShortcutCount()} shortcuts.
+     * {@link #getMaxShortcutCountPerActivity()} shortcuts.
      */
     public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) {
         try {
@@ -136,7 +130,7 @@
 
     /**
      * Return all dynamic shortcuts from the caller application.  The number of result items
-     * will not exceed the value returned by {@link #getMaxDynamicShortcutCount()}.
+     * will not exceed the value returned by {@link #getMaxShortcutCountPerActivity()}.
      */
     @NonNull
     public List<ShortcutInfo> getDynamicShortcuts() {
@@ -149,8 +143,21 @@
     }
 
     /**
-     * Publish a single dynamic shortcut.  If there's already dynamic or pinned shortcuts with
-     * the same ID, they will all be updated.
+     * TODO Javadoc
+     */
+    @NonNull
+    public List<ShortcutInfo> getManifestShortcuts() {
+        try {
+            return mService.getManifestShortcuts(mContext.getPackageName(), injectMyUserId())
+                    .getList();
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Publish list of dynamic shortcuts.  If there's already dynamic or pinned shortcuts with
+     * the same IDs, they will all be updated.
      *
      * <p>This API will be rate-limited.
      *
@@ -169,7 +176,7 @@
     }
 
     /**
-     * Delete a single dynamic shortcut by ID.
+     * Delete dynamic shortcuts by ID.
      */
     public void removeDynamicShortcuts(@NonNull List<String> shortcutIds) {
         try {
@@ -221,11 +228,78 @@
     }
 
     /**
-     * Return the max number of dynamic shortcuts that each application can have at a time.
+     * TODO Javadoc
      */
-    public int getMaxDynamicShortcutCount() {
+    public void disableShortcuts(@NonNull List<String> shortcutIds) {
         try {
-            return mService.getMaxDynamicShortcutCount(mContext.getPackageName(), injectMyUserId());
+            mService.disableShortcuts(mContext.getPackageName(), shortcutIds,
+                    /* disabledMessage =*/ null, /* disabledMessageResId =*/ 0,
+                    injectMyUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide old signature, kept for unit testing.
+     */
+    public void disableShortcuts(@NonNull List<String> shortcutIds, int disabledMessageResId) {
+        try {
+            mService.disableShortcuts(mContext.getPackageName(), shortcutIds,
+                    /* disabledMessage =*/ null, disabledMessageResId,
+                    injectMyUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide old signature, kept for unit testing.
+     */
+    public void disableShortcuts(@NonNull List<String> shortcutIds, String disabledMessage) {
+        disableShortcuts(shortcutIds, (CharSequence) disabledMessage);
+    }
+
+    /**
+     * TODO Javadoc
+     */
+    public void disableShortcuts(@NonNull List<String> shortcutIds, CharSequence disabledMessage) {
+        try {
+            mService.disableShortcuts(mContext.getPackageName(), shortcutIds,
+                    disabledMessage, /* disabledMessageResId =*/ 0,
+                    injectMyUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * TODO Javadoc
+     */
+    public void enableShortcuts(@NonNull List<String> shortcutIds) {
+        try {
+            mService.enableShortcuts(mContext.getPackageName(), shortcutIds, injectMyUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+
+    /**
+     * @hide old signature, kept for unit testing.
+     */
+    public int getMaxShortcutCountForActivity() {
+        return getMaxShortcutCountPerActivity();
+    }
+
+    /**
+     * Return the max number of dynamic shortcuts + manifest shortcuts that each launcher icon
+     * can have at a time.
+     */
+    public int getMaxShortcutCountPerActivity() {
+        try {
+            return mService.getMaxShortcutCountPerActivity(
+                    mContext.getPackageName(), injectMyUserId());
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -236,6 +310,8 @@
      * before the rate limit counter is reset.
      *
      * @see #getRateLimitResetTime()
+     *
+     * @hide
      */
     public int getRemainingCallCount() {
         try {
@@ -250,6 +326,8 @@
      *
      * @see #getRemainingCallCount()
      * @see System#currentTimeMillis()
+     *
+     * @hide
      */
     public long getRateLimitResetTime() {
         try {
@@ -260,16 +338,66 @@
     }
 
     /**
-     * Return the max width and height for icons, in pixels.
+     * Return the max width for icons, in pixels.
      */
-    public int getIconMaxDimensions() {
+    public int getIconMaxWidth() {
         try {
+            // TODO Implement it properly using xdpi.
             return mService.getIconMaxDimensions(mContext.getPackageName(), injectMyUserId());
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
     }
 
+    /**
+     * Return the max height for icons, in pixels.
+     */
+    public int getIconMaxHeight() {
+        try {
+            // TODO Implement it properly using ydpi.
+            return mService.getIconMaxDimensions(mContext.getPackageName(), injectMyUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Applications that publish shortcuts should call this method whenever an action that's
+     * equivalent to an existing shortcut has been taken by the user.  This includes not only when
+     * the user manually taps a shortcut, but when the user takes an equivalent action within the
+     * application -- for example, when a music player application has a shortcut to playlist X,
+     * then the application should not only report it when the playlist is opened from the
+     * shortcut, but also when the user plays the playlist within the application.
+     *
+     * <p>The information is accessible via {@link UsageStatsManager#queryEvents}
+     * Typically, launcher applications use this information to build a prediction model
+     * so that they can promote the shortcuts that are likely to be used at the moment.
+     */
+    public void reportShortcutUsed(String shortcutId) {
+        try {
+            mService.reportShortcutUsed(mContext.getPackageName(), shortcutId,
+                    injectMyUserId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Called internally when an application is considered to have come to foreground
+     * even when technically it's not.  This method resets the throttling for this package.
+     * For example, when the user sends an "inline reply" on an notification, the system UI will
+     * call it.
+     *
+     * @hide
+     */
+    public void onApplicationActive(@NonNull String packageName, @UserIdInt int userId) {
+        try {
+            mService.onApplicationActive(packageName, userId);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
     /** @hide injection point */
     @VisibleForTesting
     protected int injectMyUserId() {
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java
index dd3a36c..6cd8403 100644
--- a/core/java/android/content/pm/UserInfo.java
+++ b/core/java/android/content/pm/UserInfo.java
@@ -28,8 +28,8 @@
  */
 public class UserInfo implements Parcelable {
 
-    /** 8 bits for user type */
-    public static final int FLAG_MASK_USER_TYPE = 0x000000FF;
+    /** 16 bits for user type */
+    public static final int FLAG_MASK_USER_TYPE = 0x0000FFFF;
 
     /**
      * *************************** NOTE ***************************
@@ -87,6 +87,11 @@
      */
     public static final int FLAG_EPHEMERAL = 0x00000100;
 
+    /**
+     * User is for demo purposes only and can be removed at any time.
+     */
+    public static final int FLAG_DEMO = 0x00000200;
+
     public static final int NO_PROFILE_GROUP_ID = UserHandle.USER_NULL;
 
     public int id;
@@ -153,6 +158,10 @@
         return (flags & FLAG_INITIALIZED) == FLAG_INITIALIZED;
     }
 
+    public boolean isDemo() {
+        return (flags & FLAG_DEMO) == FLAG_DEMO;
+    }
+
     /**
      * Returns true if the user is a split system user.
      * <p>If {@link UserManager#isSplitSystemUser split system user mode} is not enabled,
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index 6f43d99..b2d518c 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -1543,27 +1543,41 @@
      * @hide
      */
     public static String localesToResourceQualifier(LocaleList locs) {
-        StringBuilder sb = new StringBuilder();
+        final StringBuilder sb = new StringBuilder();
         for (int i = 0; i < locs.size(); i++) {
-            Locale loc = locs.get(i);
-            boolean l = (loc.getLanguage().length() != 0);
-            boolean c = (loc.getCountry().length() != 0);
-            boolean s = (loc.getScript().length() != 0);
-            boolean v = (loc.getVariant().length() != 0);
-            // TODO: take script and extensions into account
-            if (l) {
-                if (sb.length() != 0) {
-                    sb.append(",");
-                }
+            final Locale loc = locs.get(i);
+            final int l = loc.getLanguage().length();
+            if (l == 0) {
+                continue;
+            }
+            final int s = loc.getScript().length();
+            final int c = loc.getCountry().length();
+            final int v = loc.getVariant().length();
+            // We ignore locale extensions, since they are not supported by AAPT
+
+            if (sb.length() != 0) {
+                sb.append(",");
+            }
+            if (l == 2 && s == 0 && (c == 0 || c == 2) && v == 0) {
+                // Traditional locale format: xx or xx-rYY
                 sb.append(loc.getLanguage());
-                if (c) {
+                if (c == 2) {
                     sb.append("-r").append(loc.getCountry());
-                    if (s) {
-                        sb.append("-s").append(loc.getScript());
-                        if (v) {
-                            sb.append("-v").append(loc.getVariant());
-                        }
-                    }
+                }
+            } else {
+                sb.append("b+");
+                sb.append(loc.getLanguage());
+                if (s != 0) {
+                    sb.append("+");
+                    sb.append(loc.getScript());
+                }
+                if (c != 0) {
+                    sb.append("+");
+                    sb.append(loc.getCountry());
+                }
+                if (v != 0) {
+                    sb.append("+");
+                    sb.append(loc.getVariant());
                 }
             }
         }
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java
index 38279a4..4b21187 100644
--- a/core/java/android/hardware/camera2/CameraCaptureSession.java
+++ b/core/java/android/hardware/camera2/CameraCaptureSession.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.hardware.camera2.params.OutputConfiguration;
 import android.os.Handler;
 import android.view.Surface;
 
@@ -220,6 +221,53 @@
     public abstract void tearDown(@NonNull Surface surface) throws CameraAccessException;
 
     /**
+     * <p>
+     * Finish the deferred output configurations where the output Surface was not configured before.
+     * </p>
+     * <p>
+     * For camera use cases where a preview and other output configurations need to be configured,
+     * it can take some time for the preview Surface to be ready (e.g., if the preview Surface is
+     * obtained from {@link android.view.SurfaceView}, the SurfaceView is ready after the UI layout
+     * is done, then it takes some time to get the preview Surface).
+     * </p>
+     * <p>
+     * To speed up camera startup time, the application can configure the
+     * {@link CameraCaptureSession} with the desired preview size, and defer the preview output
+     * configuration until the Surface is ready. After the {@link CameraCaptureSession} is created
+     * successfully with this deferred configuration and other normal configurations, the
+     * application can submit requests that don't include deferred output Surfaces. Once the
+     * deferred Surface is ready, the application can set the Surface to the same deferred output
+     * configuration with the {@link OutputConfiguration#setDeferredSurface} method, and then finish
+     * the deferred output configuration via this method, before it can submit requests with this
+     * output target.
+     * </p>
+     * <p>
+     * The output Surfaces included by this list of deferred {@link OutputConfiguration
+     * OutputConfigurations} can be used as {@link CaptureRequest} targets as soon as this call
+     * returns;
+     * </p>
+     * <p>
+     * This method is not supported by Legacy devices.
+     * </p>
+     *
+     * @param deferredOutputConfigs a list of {@link OutputConfiguration OutputConfigurations} that
+     *            have had {@link OutputConfiguration#setDeferredSurface setDeferredSurface} invoked
+     *            with a valid output Surface.
+     * @throws CameraAccessException if the camera device is no longer connected or has encountered
+     *             a fatal error.
+     * @throws IllegalStateException if this session is no longer active, either because the session
+     *             was explicitly closed, a new session has been created or the camera device has
+     *             been closed. Or if this output configuration was already finished with the
+     *             included surface before.
+     * @throws IllegalArgumentException for invalid output configurations, including ones where the
+     *             source of the Surface is no longer valid or the Surface is from a unsupported
+     *             source.
+     * @hide
+     */
+    public abstract void finishDeferredConfiguration(
+            List<OutputConfiguration> deferredOutputConfigs) throws CameraAccessException;
+
+    /**
      * <p>Submit a request for an image to be captured by the camera device.</p>
      *
      * <p>The request defines all the parameters for capturing the single image,
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 3917bfa..145b1d0 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -267,6 +267,10 @@
      * @param cameraId The unique identifier of the camera device to open
      * @param callback The callback for the camera. Must not be null.
      * @param handler  The handler to invoke the callback on. Must not be null.
+     * @param uid      The UID of the application actually opening the camera.
+     *                 Must be USE_CALLING_UID unless the caller is a service
+     *                 that is trusted to open the device on behalf of an
+     *                 application and to forward the real UID.
      *
      * @throws CameraAccessException if the camera is disabled by device policy,
      * too many camera devices are already open, or the cameraId does not match
@@ -281,7 +285,7 @@
      * @see android.app.admin.DevicePolicyManager#setCameraDisabled
      */
     private CameraDevice openCameraDeviceUserAsync(String cameraId,
-            CameraDevice.StateCallback callback, Handler handler)
+            CameraDevice.StateCallback callback, Handler handler, final int uid)
             throws CameraAccessException {
         CameraCharacteristics characteristics = getCameraCharacteristics(cameraId);
         CameraDevice device = null;
@@ -317,7 +321,7 @@
                             "Camera service is currently unavailable");
                     }
                     cameraUser = cameraService.connectDevice(callbacks, id,
-                            mContext.getOpPackageName(), USE_CALLING_UID);
+                            mContext.getOpPackageName(), uid);
                 } else {
                     // Use legacy camera implementation for HAL1 devices
                     Log.i(TAG, "Using legacy camera HAL.");
@@ -434,6 +438,29 @@
             @NonNull final CameraDevice.StateCallback callback, @Nullable Handler handler)
             throws CameraAccessException {
 
+        openCameraForUid(cameraId, callback, handler, USE_CALLING_UID);
+    }
+
+    /**
+     * Open a connection to a camera with the given ID, on behalf of another application
+     * specified by clientUid.
+     *
+     * <p>The behavior of this method matches that of {@link #openCamera}, except that it allows
+     * the caller to specify the UID to use for permission/etc verification. This can only be
+     * done by services trusted by the camera subsystem to act on behalf of applications and
+     * to forward the real UID.</p>
+     *
+     * @param clientUid
+     *             The UID of the application on whose behalf the camera is being opened.
+     *             Must be USE_CALLING_UID unless the caller is a trusted service.
+     *
+     * @hide
+     */
+    public void openCameraForUid(@NonNull String cameraId,
+            @NonNull final CameraDevice.StateCallback callback, @Nullable Handler handler,
+            int clientUid)
+            throws CameraAccessException {
+
         if (cameraId == null) {
             throw new IllegalArgumentException("cameraId was null");
         } else if (callback == null) {
@@ -447,7 +474,7 @@
             }
         }
 
-        openCameraDeviceUserAsync(cameraId, callback, handler);
+        openCameraDeviceUserAsync(cameraId, callback, handler, clientUid);
     }
 
     /**
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
index 6736d34..c23bd5b 100644
--- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -24,6 +24,7 @@
 import android.hardware.camera2.dispatch.DuckTypingDispatcher;
 import android.hardware.camera2.dispatch.HandlerDispatcher;
 import android.hardware.camera2.dispatch.InvokeDispatcher;
+import android.hardware.camera2.params.OutputConfiguration;
 import android.hardware.camera2.utils.TaskDrainer;
 import android.hardware.camera2.utils.TaskSingleDrainer;
 import android.os.Handler;
@@ -156,6 +157,12 @@
     }
 
     @Override
+    public void finishDeferredConfiguration(
+            List<OutputConfiguration> deferredOutputConfigs) throws CameraAccessException {
+        mDeviceImpl.finishDeferredConfig(deferredOutputConfigs);
+    }
+
+    @Override
     public synchronized int capture(CaptureRequest request, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         if (request == null) {
diff --git a/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java
index 8cd1da5..1c8e124 100644
--- a/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java
@@ -21,6 +21,7 @@
 import android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession;
 import android.hardware.camera2.CameraDevice;
 import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.params.OutputConfiguration;
 import android.hardware.camera2.params.StreamConfigurationMap;
 import android.hardware.camera2.utils.SurfaceUtils;
 import android.os.Handler;
@@ -256,6 +257,12 @@
         return mSessionImpl.isAborting();
     }
 
+    @Override
+    public void finishDeferredConfiguration(List<OutputConfiguration> deferredOutputConfigs)
+            throws CameraAccessException {
+        mSessionImpl.finishDeferredConfiguration(deferredOutputConfigs);
+    }
+
     private class WrapperCallback extends StateCallback {
         private final StateCallback mCallback;
 
@@ -263,26 +270,32 @@
             mCallback = callback;
         }
 
+        @Override
         public void onConfigured(CameraCaptureSession session) {
             mCallback.onConfigured(CameraConstrainedHighSpeedCaptureSessionImpl.this);
         }
 
+        @Override
         public void onConfigureFailed(CameraCaptureSession session) {
             mCallback.onConfigureFailed(CameraConstrainedHighSpeedCaptureSessionImpl.this);
         }
 
+        @Override
         public void onReady(CameraCaptureSession session) {
             mCallback.onReady(CameraConstrainedHighSpeedCaptureSessionImpl.this);
         }
 
+        @Override
         public void onActive(CameraCaptureSession session) {
             mCallback.onActive(CameraConstrainedHighSpeedCaptureSessionImpl.this);
         }
 
+        @Override
         public void onClosed(CameraCaptureSession session) {
             mCallback.onClosed(CameraConstrainedHighSpeedCaptureSessionImpl.this);
         }
 
+        @Override
         public void onSurfacePrepared(CameraCaptureSession session, Surface surface) {
             mCallback.onSurfacePrepared(CameraConstrainedHighSpeedCaptureSessionImpl.this,
                     surface);
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index 0cee114..ee8a6d7 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -407,7 +407,10 @@
                 int streamId = mConfiguredOutputs.keyAt(i);
                 OutputConfiguration outConfig = mConfiguredOutputs.valueAt(i);
 
-                if (!outputs.contains(outConfig)) {
+                if (!outputs.contains(outConfig) || outConfig.isDeferredConfiguration()) {
+                    // Always delete the deferred output configuration when the session
+                    // is created, as the deferred output configuration doesn't have unique surface
+                    // related identifies.
                     deleteList.add(streamId);
                 } else {
                     addSet.remove(outConfig);  // Don't create a stream previously created
@@ -744,6 +747,37 @@
         }
     }
 
+    public void finishDeferredConfig(List<OutputConfiguration> deferredConfigs)
+            throws CameraAccessException {
+        if (deferredConfigs == null || deferredConfigs.size() == 0) {
+            throw new IllegalArgumentException("deferred config is null or empty");
+        }
+
+        synchronized(mInterfaceLock) {
+            for (OutputConfiguration config : deferredConfigs) {
+                int streamId = -1;
+                for (int i = 0; i < mConfiguredOutputs.size(); i++) {
+                    // Have to use equal here, as createCaptureSessionByOutputConfigurations() and
+                    // createReprocessableCaptureSessionByConfigurations() do a copy of the configs.
+                    if (config.equals(mConfiguredOutputs.valueAt(i))) {
+                        streamId = mConfiguredOutputs.keyAt(i);
+                        break;
+                    }
+                }
+                if (streamId == -1) {
+                    throw new IllegalArgumentException("Deferred config is not part of this "
+                            + "session");
+                }
+
+                if (config.getSurface() == null) {
+                    throw new IllegalArgumentException("The deferred config for stream " + streamId
+                            + " must have a non-null surface");
+                }
+                mRemoteDevice.setDeferredConfiguration(streamId, config);
+            }
+        }
+    }
+
     public int capture(CaptureRequest request, CaptureCallback callback, Handler handler)
             throws CameraAccessException {
         if (DEBUG) {
@@ -2005,6 +2039,7 @@
      *
      * <p> Handle binder death for ICameraDeviceUser. Trigger onError.</p>
      */
+    @Override
     public void binderDied() {
         Log.w(TAG, "CameraDevice " + mCameraId + " died unexpectedly");
 
diff --git a/core/java/android/hardware/camera2/impl/ICameraDeviceUserWrapper.java b/core/java/android/hardware/camera2/impl/ICameraDeviceUserWrapper.java
index ef5f6d7..d77f60b 100644
--- a/core/java/android/hardware/camera2/impl/ICameraDeviceUserWrapper.java
+++ b/core/java/android/hardware/camera2/impl/ICameraDeviceUserWrapper.java
@@ -215,5 +215,14 @@
         }
     }
 
+    public void setDeferredConfiguration(int streamId, OutputConfiguration deferredConfig)
+            throws CameraAccessException {
+        try {
+            mRemoteDevice.setDeferredConfiguration(streamId, deferredConfig);
+        } catch (Throwable t) {
+            CameraManager.throwAsPublicException(t);
+            throw new UnsupportedOperationException("Unexpected exception", t);
+        }
+    }
 
 }
diff --git a/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java b/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
index acbf214..b9e75ee 100644
--- a/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
+++ b/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
@@ -567,6 +567,13 @@
     }
 
     @Override
+    public void setDeferredConfiguration(int steamId, OutputConfiguration config) {
+        String err = "Set deferred configuration is not supported on legacy devices";
+        Log.e(TAG, err);
+        throw new ServiceSpecificException(ICameraService.ERROR_INVALID_OPERATION, err);
+    }
+
+    @Override
     public int createInputStream(int width, int height, int format) {
         String err = "Creating input stream is not supported on legacy devices";
         Log.e(TAG, err);
diff --git a/core/java/android/hardware/camera2/params/OutputConfiguration.java b/core/java/android/hardware/camera2/params/OutputConfiguration.java
index 61b534b..69c00e9 100644
--- a/core/java/android/hardware/camera2/params/OutputConfiguration.java
+++ b/core/java/android/hardware/camera2/params/OutputConfiguration.java
@@ -20,6 +20,8 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
+import android.graphics.ImageFormat;
+import android.hardware.camera2.CameraCaptureSession;
 import android.hardware.camera2.CameraDevice;
 import android.hardware.camera2.utils.HashCodeHelpers;
 import android.hardware.camera2.utils.SurfaceUtils;
@@ -95,6 +97,21 @@
     }
 
     /**
+     * Unknown surface source type.
+     */
+    private final int SURFACE_TYPE_UNKNOWN = -1;
+
+    /**
+     * The surface is obtained from {@link android.view.SurfaceView}.
+     */
+    private final int SURFACE_TYPE_SURFACE_VIEW = 0;
+
+    /**
+     * The surface is obtained from {@link android.graphics.SurfaceTexture}.
+     */
+    private final int SURFACE_TYPE_SURFACE_TEXTURE = 1;
+
+    /**
      * Create a new {@link OutputConfiguration} instance with a {@link Surface},
      * with a surface group ID.
      *
@@ -179,12 +196,110 @@
         checkNotNull(surface, "Surface must not be null");
         checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant");
         mSurfaceGroupId = surfaceGroupId;
+        mSurfaceType = SURFACE_TYPE_UNKNOWN;
         mSurface = surface;
         mRotation = rotation;
         mConfiguredSize = SurfaceUtils.getSurfaceSize(surface);
         mConfiguredFormat = SurfaceUtils.getSurfaceFormat(surface);
         mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(surface);
         mConfiguredGenerationId = surface.getGenerationId();
+        mIsDeferredConfig = false;
+    }
+
+    /**
+     * Create a new {@link OutputConfiguration} instance, with desired Surface size and Surface
+     * source class.
+     * <p>
+     * This constructor takes an argument for desired Surface size and the Surface source class
+     * without providing the actual output Surface. This is used to setup a output configuration
+     * with a deferred Surface. The application can use this output configuration to create a
+     * session.
+     * </p>
+     * <p>
+     * However, the actual output Surface must be set via {@link #setDeferredSurface} and finish the
+     * deferred Surface configuration via {@link CameraCaptureSession#finishDeferredConfiguration}
+     * before submitting a request with this Surface target. The deferred Surface can only be
+     * obtained from either from {@link android.view.SurfaceView} by calling
+     * {@link android.view.SurfaceHolder#getSurface}, or from
+     * {@link android.graphics.SurfaceTexture} via
+     * {@link android.view.Surface#Surface(android.graphics.SurfaceTexture)}).
+     * </p>
+     *
+     * @param surfaceSize Size for the deferred surface.
+     * @param klass a non-{@code null} {@link Class} object reference that indicates the source of
+     *            this surface. Only {@link android.view.SurfaceHolder SurfaceHolder.class} and
+     *            {@link android.graphics.SurfaceTexture SurfaceTexture.class} are supported.
+     * @hide
+     */
+    public <T> OutputConfiguration(@NonNull Size surfaceSize, @NonNull Class<T> klass) {
+        checkNotNull(klass, "surfaceSize must not be null");
+        checkNotNull(klass, "klass must not be null");
+        if (klass == android.view.SurfaceHolder.class) {
+            mSurfaceType = SURFACE_TYPE_SURFACE_VIEW;
+        } else if (klass == android.graphics.SurfaceTexture.class) {
+            mSurfaceType = SURFACE_TYPE_SURFACE_TEXTURE;
+        } else {
+            mSurfaceType = SURFACE_TYPE_UNKNOWN;
+            throw new IllegalArgumentException("Unknow surface source class type");
+        }
+
+        mSurfaceGroupId = SURFACE_GROUP_ID_NONE;
+        mSurface = null;
+        mRotation = ROTATION_0;
+        mConfiguredSize = surfaceSize;
+        mConfiguredFormat = StreamConfigurationMap.imageFormatToInternal(ImageFormat.PRIVATE);
+        mConfiguredDataspace = StreamConfigurationMap.imageFormatToDataspace(ImageFormat.PRIVATE);
+        mConfiguredGenerationId = 0;
+        mIsDeferredConfig = true;
+    }
+
+    /**
+     * Check if this configuration has deferred configuration.
+     *
+     * <p>This will return true if the output configuration was constructed with surface deferred.
+     * It will return true even after the deferred surface is set later.</p>
+     *
+     * @return true if this configuration has deferred surface.
+     * @hide
+     */
+    public boolean isDeferredConfiguration() {
+        return mIsDeferredConfig;
+    }
+
+    /**
+     * Set the deferred surface to this OutputConfiguration.
+     *
+     * <p>
+     * The deferred surface must be obtained from either from {@link android.view.SurfaceView} by
+     * calling {@link android.view.SurfaceHolder#getSurface}, or from
+     * {@link android.graphics.SurfaceTexture} via
+     * {@link android.view.Surface#Surface(android.graphics.SurfaceTexture)}). After the deferred
+     * surface is set, the application must finish the deferred surface configuration via
+     * {@link CameraCaptureSession#finishDeferredConfiguration} before submitting a request with
+     * this surface target.
+     * </p>
+     *
+     * @param surface The deferred surface to be set.
+     * @throws IllegalArgumentException if the Surface is invalid.
+     * @throws IllegalStateException if a Surface was already set to this deferred
+     *         OutputConfiguration.
+     * @hide
+     */
+    public void setDeferredSurface(@NonNull Surface surface) {
+        checkNotNull(surface, "Surface must not be null");
+        if (mSurface != null) {
+            throw new IllegalStateException("Deferred surface is already set!");
+        }
+
+        // This will throw IAE is the surface was abandoned.
+        Size surfaceSize = SurfaceUtils.getSurfaceSize(surface);
+        if (!surfaceSize.equals(mConfiguredSize)) {
+            Log.w(TAG, "Deferred surface size " + surfaceSize +
+                    " is different with pre-configured size " + mConfiguredSize +
+                    ", the pre-configured size will be used.");
+        }
+
+        mSurface = surface;
     }
 
     /**
@@ -203,10 +318,12 @@
         this.mSurface = other.mSurface;
         this.mRotation = other.mRotation;
         this.mSurfaceGroupId = other.mSurfaceGroupId;
+        this.mSurfaceType = other.mSurfaceType;
         this.mConfiguredDataspace = other.mConfiguredDataspace;
         this.mConfiguredFormat = other.mConfiguredFormat;
         this.mConfiguredSize = other.mConfiguredSize;
         this.mConfiguredGenerationId = other.mConfiguredGenerationId;
+        this.mIsDeferredConfig = other.mIsDeferredConfig;
     }
 
     /**
@@ -215,16 +332,30 @@
     private OutputConfiguration(@NonNull Parcel source) {
         int rotation = source.readInt();
         int surfaceSetId = source.readInt();
+        int surfaceType = source.readInt();
+        int width = source.readInt();
+        int height = source.readInt();
         Surface surface = Surface.CREATOR.createFromParcel(source);
-        checkNotNull(surface, "Surface must not be null");
         checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant");
         mSurfaceGroupId = surfaceSetId;
         mSurface = surface;
         mRotation = rotation;
-        mConfiguredSize = SurfaceUtils.getSurfaceSize(mSurface);
-        mConfiguredFormat = SurfaceUtils.getSurfaceFormat(mSurface);
-        mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(mSurface);
-        mConfiguredGenerationId = mSurface.getGenerationId();
+        if (surface != null) {
+            mSurfaceType = SURFACE_TYPE_UNKNOWN;
+            mConfiguredSize = SurfaceUtils.getSurfaceSize(mSurface);
+            mConfiguredFormat = SurfaceUtils.getSurfaceFormat(mSurface);
+            mConfiguredDataspace = SurfaceUtils.getSurfaceDataspace(mSurface);
+            mConfiguredGenerationId = mSurface.getGenerationId();
+            mIsDeferredConfig = true;
+        } else {
+            mSurfaceType = surfaceType;
+            mConfiguredSize = new Size(width, height);
+            mConfiguredFormat = StreamConfigurationMap.imageFormatToInternal(ImageFormat.PRIVATE);
+            mConfiguredGenerationId = 0;
+            mConfiguredDataspace =
+                    StreamConfigurationMap.imageFormatToDataspace(ImageFormat.PRIVATE);
+            mIsDeferredConfig = false;
+        }
     }
 
     /**
@@ -291,7 +422,12 @@
         }
         dest.writeInt(mRotation);
         dest.writeInt(mSurfaceGroupId);
-        mSurface.writeToParcel(dest, flags);
+        dest.writeInt(mSurfaceType);
+        dest.writeInt(mConfiguredSize.getWidth());
+        dest.writeInt(mConfiguredSize.getHeight());
+        if (mSurface != null) {
+            mSurface.writeToParcel(dest, flags);
+        }
     }
 
     /**
@@ -311,13 +447,20 @@
             return true;
         } else if (obj instanceof OutputConfiguration) {
             final OutputConfiguration other = (OutputConfiguration) obj;
+            boolean iSSurfaceEqual = mSurface == other.mSurface &&
+                    mConfiguredGenerationId == other.mConfiguredGenerationId ;
+            if (mIsDeferredConfig) {
+                Log.i(TAG, "deferred config has the same surface");
+                iSSurfaceEqual = true;
+            }
             return mRotation == other.mRotation &&
-                   mSurface == other.mSurface &&
-                   mConfiguredGenerationId == other.mConfiguredGenerationId &&
+                   iSSurfaceEqual&&
                    mConfiguredSize.equals(other.mConfiguredSize) &&
                    mConfiguredFormat == other.mConfiguredFormat &&
                    mConfiguredDataspace == other.mConfiguredDataspace &&
-                   mSurfaceGroupId == other.mSurfaceGroupId;
+                   mSurfaceGroupId == other.mSurfaceGroupId &&
+                   mSurfaceType == other.mSurfaceType &&
+                   mIsDeferredConfig == other.mIsDeferredConfig;
         }
         return false;
     }
@@ -327,15 +470,26 @@
      */
     @Override
     public int hashCode() {
+        // Need ensure that the hashcode remains unchanged after set a deferred surface. Otherwise
+        // The deferred output configuration will be lost in the camera streammap after the deferred
+        // surface is set.
+        if (mIsDeferredConfig) {
+            return HashCodeHelpers.hashCode(
+                    mRotation, mConfiguredSize.hashCode(), mConfiguredFormat, mConfiguredDataspace,
+                    mSurfaceGroupId, mSurfaceType);
+        }
+
         return HashCodeHelpers.hashCode(
             mRotation, mSurface.hashCode(), mConfiguredGenerationId,
             mConfiguredSize.hashCode(), mConfiguredFormat, mConfiguredDataspace, mSurfaceGroupId);
     }
 
     private static final String TAG = "OutputConfiguration";
-    private final Surface mSurface;
+    private Surface mSurface;
     private final int mRotation;
-    private int mSurfaceGroupId;
+    private final int mSurfaceGroupId;
+    // Surface source type, this is only used by the deferred surface configuration objects.
+    private final int mSurfaceType;
 
     // The size, format, and dataspace of the surface when OutputConfiguration is created.
     private final Size mConfiguredSize;
@@ -343,4 +497,6 @@
     private final int mConfiguredDataspace;
     // Surface generation ID to distinguish changes to Surface native internals
     private final int mConfiguredGenerationId;
+    // Flag indicating if this config has deferred surface.
+    private final boolean mIsDeferredConfig;
 }
diff --git a/core/java/android/hardware/input/InputManagerInternal.java b/core/java/android/hardware/input/InputManagerInternal.java
index 10fc8e6..01a5404 100644
--- a/core/java/android/hardware/input/InputManagerInternal.java
+++ b/core/java/android/hardware/input/InputManagerInternal.java
@@ -59,4 +59,9 @@
      * @param deviceId The id of input device.
      */
     public abstract void toggleCapsLock(int deviceId);
+
+    /**
+     * Set whether the input stack should deliver pulse gesture events when the device is asleep.
+     */
+    public abstract void setPulseGestureEnabled(boolean enabled);
 }
diff --git a/core/java/android/hardware/usb/UsbManager.java b/core/java/android/hardware/usb/UsbManager.java
index f9a7d19..8f21b38 100644
--- a/core/java/android/hardware/usb/UsbManager.java
+++ b/core/java/android/hardware/usb/UsbManager.java
@@ -21,6 +21,7 @@
 
 import android.app.PendingIntent;
 import android.content.Context;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
 import android.os.Process;
@@ -476,6 +477,26 @@
     }
 
     /**
+     * Grants permission to specified package for USB device without showing system dialog.
+     * Only system components can call this function, as it requires the MANAGE_USB permission.
+     * @param device to request permissions for
+     * @param packageName of package to grant permissions
+     *
+     * {@hide}
+     */
+    public void grantPermission(UsbDevice device, String packageName) {
+        try {
+            int uid = mContext.getPackageManager()
+                .getPackageUidAsUser(packageName, mContext.getUserId());
+            mService.grantDevicePermission(device, uid);
+        } catch (NameNotFoundException e) {
+            Log.e(TAG, "Package " + packageName + " not found.", e);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * Returns true if the specified USB function is currently enabled when in device mode.
      * <p>
      * USB functions represent interfaces which are published to the host to access
diff --git a/core/java/android/inputmethodservice/AbstractInputMethodService.java b/core/java/android/inputmethodservice/AbstractInputMethodService.java
index 3531926..29177b6 100644
--- a/core/java/android/inputmethodservice/AbstractInputMethodService.java
+++ b/core/java/android/inputmethodservice/AbstractInputMethodService.java
@@ -16,11 +16,14 @@
 
 package android.inputmethodservice;
 
+import android.annotation.NonNull;
 import android.app.Service;
 import android.content.Intent;
 import android.os.IBinder;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
+import android.view.inputmethod.InputConnection;
+import android.view.inputmethod.InputContentInfo;
 import android.view.inputmethod.InputMethod;
 import android.view.inputmethod.InputMethodSession;
 
@@ -208,7 +211,7 @@
      *
      * @param event The motion event being received.
      * @return True if the event was handled in this function, false otherwise.
-     * @see View#onTrackballEvent
+     * @see android.view.View#onTrackballEvent(MotionEvent)
      */
     public boolean onTrackballEvent(MotionEvent event) {
         return false;
@@ -219,9 +222,30 @@
      *
      * @param event The motion event being received.
      * @return True if the event was handled in this function, false otherwise.
-     * @see View#onGenericMotionEvent
+     * @see android.view.View#onGenericMotionEvent(MotionEvent)
      */
     public boolean onGenericMotionEvent(MotionEvent event) {
         return false;
     }
+
+    /**
+     * Allow the receiver of {@link InputContentInfo} to obtain a temporary read-only access
+     * permission to the content.
+     *
+     * <p>Default implementation does nothing.</p>
+     *
+     * @param inputContentInfo Content to be temporarily exposed from the input method to the
+     * application.
+     * This cannot be {@code null}.
+     * @param inputConnection {@link InputConnection} with which
+     * {@link InputConnection#commitContent(InputContentInfo, int, android.os.Bundle)} will be
+     * called.
+     * @return {@code false} if we cannot allow a temporary access permission.
+     * @hide
+     */
+    public void exposeContent(@NonNull InputContentInfo inputContentInfo,
+            @NonNull InputConnection inputConnection) {
+        return;
+    }
+
 }
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java
index cc71a9c..167d5a0 100644
--- a/core/java/android/inputmethodservice/IInputMethodWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java
@@ -168,7 +168,7 @@
                 int missingMethods = msg.arg1;
                 IInputContext inputContext = (IInputContext)args.arg1;
                 InputConnection ic = inputContext != null
-                        ? new InputConnectionWrapper(inputContext, missingMethods) : null;
+                        ? new InputConnectionWrapper(mTarget, inputContext, missingMethods) : null;
                 EditorInfo info = (EditorInfo)args.arg2;
                 info.makeCompatible(mTargetSdkVersion);
                 inputMethod.startInput(ic, info);
@@ -180,7 +180,7 @@
                 int missingMethods = msg.arg1;
                 IInputContext inputContext = (IInputContext)args.arg1;
                 InputConnection ic = inputContext != null
-                        ? new InputConnectionWrapper(inputContext, missingMethods) : null;
+                        ? new InputConnectionWrapper(mTarget, inputContext, missingMethods) : null;
                 EditorInfo info = (EditorInfo)args.arg2;
                 info.makeCompatible(mTargetSdkVersion);
                 inputMethod.restartInput(ic, info);
@@ -251,7 +251,7 @@
     public void bindInput(InputBinding binding) {
         // This IInputContext is guaranteed to implement all the methods.
         final int missingMethodFlags = 0;
-        InputConnection ic = new InputConnectionWrapper(
+        InputConnection ic = new InputConnectionWrapper(mTarget,
                 IInputContext.Stub.asInterface(binding.getConnectionToken()), missingMethodFlags);
         InputBinding nu = new InputBinding(ic, binding);
         mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_SET_INPUT_CONTEXT, nu));
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 4799773..fede77d 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -23,6 +23,7 @@
 import android.annotation.DrawableRes;
 import android.annotation.IntDef;
 import android.annotation.MainThread;
+import android.annotation.NonNull;
 import android.app.ActivityManager;
 import android.app.Dialog;
 import android.content.Context;
@@ -65,6 +66,7 @@
 import android.view.inputmethod.ExtractedTextRequest;
 import android.view.inputmethod.InputBinding;
 import android.view.inputmethod.InputConnection;
+import android.view.inputmethod.InputContentInfo;
 import android.view.inputmethod.InputMethod;
 import android.view.inputmethod.InputMethodManager;
 import android.view.inputmethod.InputMethodSubtype;
@@ -2598,6 +2600,29 @@
     }
 
     /**
+     * Allow the receiver of {@link InputContentInfo} to obtain a temporary read-only access
+     * permission to the content.
+     *
+     * @param inputContentInfo Content to be temporarily exposed from the input method to the
+     * application.
+     * This cannot be {@code null}.
+     * @param inputConnection {@link InputConnection} with which
+     * {@link InputConnection#commitContent(InputContentInfo, Bundle)} will be called.
+     * @hide
+     */
+    @Override
+    public final void exposeContent(@NonNull InputContentInfo inputContentInfo,
+            @NonNull InputConnection inputConnection) {
+        if (inputConnection == null) {
+            return;
+        }
+        if (getCurrentInputConnection() != inputConnection) {
+            return;
+        }
+        mImm.exposeContent(mToken, inputContentInfo, getCurrentInputEditorInfo());
+    }
+
+    /**
      * Performs a dump of the InputMethodService's internal state.  Override
      * to add your own information to the dump.
      */
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index a45e6f5..3c2ac67 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -1035,6 +1035,26 @@
     }
 
     /**
+     * Request that this callback be invoked at ConnectivityService's earliest
+     * convenience with the current satisfying network's LinkProperties.
+     * If no such network exists no callback invocation is performed.
+     *
+     * The callback must have been registered with #requestNetwork() or
+     * #registerDefaultNetworkCallback(); callbacks registered with
+     * registerNetworkCallback() are not specific to any particular Network so
+     * do not cause any updates.
+     *
+     * @hide
+     */
+    public void requestLinkProperties(NetworkCallback networkCallback) {
+        try {
+            mService.requestLinkProperties(networkCallback.networkRequest);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * Get the {@link android.net.NetworkCapabilities} for the given {@link Network}.  This
      * will return {@code null} if the network is unknown.
      * <p>This method requires the caller to hold the permission
@@ -1052,6 +1072,26 @@
     }
 
     /**
+     * Request that this callback be invoked at ConnectivityService's earliest
+     * convenience with the current satisfying network's NetworkCapabilities.
+     * If no such network exists no callback invocation is performed.
+     *
+     * The callback must have been registered with #requestNetwork() or
+     * #registerDefaultNetworkCallback(); callbacks registered with
+     * registerNetworkCallback() are not specific to any particular Network so
+     * do not cause any updates.
+     *
+     * @hide
+     */
+    public void requestNetworkCapabilities(NetworkCallback networkCallback) {
+        try {
+            mService.requestNetworkCapabilities(networkCallback.networkRequest);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * Gets the URL that should be used for resolving whether a captive portal is present.
      * 1. This URL should respond with a 204 response to a GET request to indicate no captive
      *    portal is present.
@@ -3103,14 +3143,11 @@
             throw new IllegalArgumentException("Invalid NetworkCallback");
         }
         try {
+            // CallbackHandler will release callback when receiving CALLBACK_RELEASED.
             mService.releaseNetworkRequest(networkCallback.networkRequest);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
-
-        synchronized (sNetworkCallback) {
-            sNetworkCallback.remove(networkCallback.networkRequest);
-        }
     }
 
     /**
diff --git a/core/java/android/net/ConnectivityMetricsLogger.java b/core/java/android/net/ConnectivityMetricsLogger.java
index d8cdde9..029c5bd 100644
--- a/core/java/android/net/ConnectivityMetricsLogger.java
+++ b/core/java/android/net/ConnectivityMetricsLogger.java
@@ -23,6 +23,8 @@
 import android.os.ServiceManager;
 import android.util.Log;
 
+import com.android.internal.annotations.VisibleForTesting;
+
 /** {@hide} */
 @SystemApi
 public class ConnectivityMetricsLogger {
@@ -33,28 +35,45 @@
 
     // Component Tags
     public static final int COMPONENT_TAG_CONNECTIVITY = 0;
-    public static final int COMPONENT_TAG_BLUETOOTH = 1;
-    public static final int COMPONENT_TAG_WIFI = 2;
-    public static final int COMPONENT_TAG_TELECOM = 3;
-    public static final int COMPONENT_TAG_TELEPHONY = 4;
-
-    public static final int NUMBER_OF_COMPONENTS = 5;
+    public static final int COMPONENT_TAG_BLUETOOTH    = 1;
+    public static final int COMPONENT_TAG_WIFI         = 2;
+    public static final int COMPONENT_TAG_TELECOM      = 3;
+    public static final int COMPONENT_TAG_TELEPHONY    = 4;
+    public static final int NUMBER_OF_COMPONENTS       = 5;
 
     // Event Tag
     public static final int TAG_SKIPPED_EVENTS = -1;
 
     public static final String DATA_KEY_EVENTS_COUNT = "count";
 
-    private IConnectivityMetricsLogger mService;
-
-    private long mServiceUnblockedTimestampMillis = 0;
-    private int mNumSkippedEvents = 0;
+    /** {@hide} */ protected final IConnectivityMetricsLogger mService;
+    /** {@hide} */ protected volatile long mServiceUnblockedTimestampMillis;
+    private int mNumSkippedEvents;
 
     public ConnectivityMetricsLogger() {
-        mService = IConnectivityMetricsLogger.Stub.asInterface(ServiceManager.getService(
-                CONNECTIVITY_METRICS_LOGGER_SERVICE));
+        this(IConnectivityMetricsLogger.Stub.asInterface(
+                ServiceManager.getService(CONNECTIVITY_METRICS_LOGGER_SERVICE)));
     }
 
+    /** {@hide} */
+    @VisibleForTesting
+    public ConnectivityMetricsLogger(IConnectivityMetricsLogger service) {
+        mService = service;
+    }
+
+    /**
+     * Log a ConnectivityMetricsEvent.
+     *
+     * This method keeps track of skipped events when MetricsLoggerService throttles input events.
+     * It skips logging when MetricsLoggerService is active. When throttling ends, it logs a
+     * meta-event containing the number of events dropped. It is not safe to call this method
+     * concurrently from different threads.
+     *
+     * @param timestamp is the epoch timestamp of the event in ms.
+     * @param componentTag is the COMPONENT_* constant the event belongs to.
+     * @param eventTag is an event type constant whose meaning is specific to the component tag.
+     * @param data is a Parcelable instance representing the event.
+     */
     public void logEvent(long timestamp, int componentTag, int eventTag, Parcelable data) {
         if (mService == null) {
             if (DBG) {
@@ -104,7 +123,7 @@
                 }
             }
         } catch (RemoteException e) {
-            Log.e(TAG, "Error logging event " + e.getMessage());
+            Log.e(TAG, "Error logging event", e);
         }
     }
 
@@ -121,8 +140,8 @@
     public ConnectivityMetricsEvent[] getEvents(ConnectivityMetricsEvent.Reference reference) {
         try {
             return mService.getEvents(reference);
-        } catch (RemoteException ex) {
-            Log.e(TAG, "IConnectivityMetricsLogger.getEvents: " + ex);
+        } catch (RemoteException e) {
+            Log.e(TAG, "IConnectivityMetricsLogger.getEvents", e);
             return null;
         }
     }
@@ -133,8 +152,8 @@
     public boolean register(PendingIntent newEventsIntent) {
         try {
             return mService.register(newEventsIntent);
-        } catch (RemoteException ex) {
-            Log.e(TAG, "IConnectivityMetricsLogger.register: " + ex);
+        } catch (RemoteException e) {
+            Log.e(TAG, "IConnectivityMetricsLogger.register", e);
             return false;
         }
     }
@@ -142,11 +161,10 @@
     public boolean unregister(PendingIntent newEventsIntent) {
         try {
             mService.unregister(newEventsIntent);
-        } catch (RemoteException ex) {
-            Log.e(TAG, "IConnectivityMetricsLogger.unregister: " + ex);
+            return true;
+        } catch (RemoteException e) {
+            Log.e(TAG, "IConnectivityMetricsLogger.unregister", e);
             return false;
         }
-
-        return true;
     }
 }
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 0d518cc..d48c155 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -156,6 +156,8 @@
     void pendingListenForNetwork(in NetworkCapabilities networkCapabilities,
             in PendingIntent operation);
 
+    void requestLinkProperties(in NetworkRequest networkRequest);
+    void requestNetworkCapabilities(in NetworkRequest networkRequest);
     void releaseNetworkRequest(in NetworkRequest networkRequest);
 
     void setAcceptUnvalidated(in Network network, boolean accept, boolean always);
diff --git a/core/java/android/net/NetworkMisc.java b/core/java/android/net/NetworkMisc.java
index 5511a24..69f50a2 100644
--- a/core/java/android/net/NetworkMisc.java
+++ b/core/java/android/net/NetworkMisc.java
@@ -52,6 +52,15 @@
     public boolean acceptUnvalidated;
 
     /**
+     * Set to avoid surfacing the "Sign in to network" notification.
+     * if carrier receivers/apps are registered to handle the carrier-specific provisioning
+     * procedure, a carrier specific provisioning notification will be placed.
+     * only one notification should be displayed. This field is set based on
+     * which notification should be used for provisioning.
+     */
+    public boolean provisioningNotificationDisabled;
+
+    /**
      * For mobile networks, this is the subscriber ID (such as IMSI).
      */
     public String subscriberId;
@@ -65,6 +74,7 @@
             explicitlySelected = nm.explicitlySelected;
             acceptUnvalidated = nm.acceptUnvalidated;
             subscriberId = nm.subscriberId;
+            provisioningNotificationDisabled = nm.provisioningNotificationDisabled;
         }
     }
 
@@ -79,6 +89,7 @@
         out.writeInt(explicitlySelected ? 1 : 0);
         out.writeInt(acceptUnvalidated ? 1 : 0);
         out.writeString(subscriberId);
+        out.writeInt(provisioningNotificationDisabled ? 1 : 0);
     }
 
     public static final Creator<NetworkMisc> CREATOR = new Creator<NetworkMisc>() {
@@ -89,6 +100,7 @@
             networkMisc.explicitlySelected = in.readInt() != 0;
             networkMisc.acceptUnvalidated = in.readInt() != 0;
             networkMisc.subscriberId = in.readString();
+            networkMisc.provisioningNotificationDisabled = in.readInt() != 0;
             return networkMisc;
         }
 
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index 51c45e0..11b861a 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -18,7 +18,6 @@
 
 import static android.content.pm.PackageManager.GET_SIGNATURES;
 import static android.net.NetworkPolicy.CYCLE_NONE;
-import static android.text.format.Time.MONTH_DAY;
 
 import android.content.Context;
 import android.content.Intent;
@@ -27,12 +26,13 @@
 import android.content.pm.Signature;
 import android.os.RemoteException;
 import android.os.UserHandle;
-import android.text.format.Time;
 import android.util.DebugUtils;
 
 import com.google.android.collect.Sets;
 
+import java.util.Calendar;
 import java.util.HashSet;
+import java.util.TimeZone;
 
 /**
  * Manager for creating and modifying network policy rules.
@@ -253,28 +253,18 @@
             throw new IllegalArgumentException("Unable to compute boundary without cycleDay");
         }
 
-        final Time now = new Time(policy.cycleTimezone);
-        now.set(currentTime);
+        final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(policy.cycleTimezone));
+        cal.setTimeInMillis(currentTime);
+        snapToCycleDay(cal, policy.cycleDay);
 
-        // first, find cycle boundary for current month
-        final Time cycle = new Time(now);
-        cycle.hour = cycle.minute = cycle.second = 0;
-        snapToCycleDay(cycle, policy.cycleDay);
-
-        if (Time.compare(cycle, now) >= 0) {
-            // cycle boundary is beyond now, use last cycle boundary; start by
-            // pushing ourselves squarely into last month.
-            final Time lastMonth = new Time(now);
-            lastMonth.hour = lastMonth.minute = lastMonth.second = 0;
-            lastMonth.monthDay = 1;
-            lastMonth.month -= 1;
-            lastMonth.normalize(true);
-
-            cycle.set(lastMonth);
-            snapToCycleDay(cycle, policy.cycleDay);
+        if (cal.getTimeInMillis() >= currentTime) {
+            // Cycle boundary is beyond now, use last cycle boundary
+            cal.set(Calendar.DAY_OF_MONTH, 1);
+            cal.add(Calendar.MONTH, -1);
+            snapToCycleDay(cal, policy.cycleDay);
         }
 
-        return cycle.toMillis(true);
+        return cal.getTimeInMillis();
     }
 
     /** {@hide} */
@@ -283,28 +273,18 @@
             throw new IllegalArgumentException("Unable to compute boundary without cycleDay");
         }
 
-        final Time now = new Time(policy.cycleTimezone);
-        now.set(currentTime);
+        final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(policy.cycleTimezone));
+        cal.setTimeInMillis(currentTime);
+        snapToCycleDay(cal, policy.cycleDay);
 
-        // first, find cycle boundary for current month
-        final Time cycle = new Time(now);
-        cycle.hour = cycle.minute = cycle.second = 0;
-        snapToCycleDay(cycle, policy.cycleDay);
-
-        if (Time.compare(cycle, now) <= 0) {
-            // cycle boundary is before now, use next cycle boundary; start by
-            // pushing ourselves squarely into next month.
-            final Time nextMonth = new Time(now);
-            nextMonth.hour = nextMonth.minute = nextMonth.second = 0;
-            nextMonth.monthDay = 1;
-            nextMonth.month += 1;
-            nextMonth.normalize(true);
-
-            cycle.set(nextMonth);
-            snapToCycleDay(cycle, policy.cycleDay);
+        if (cal.getTimeInMillis() <= currentTime) {
+            // Cycle boundary is before now, use next cycle boundary
+            cal.set(Calendar.DAY_OF_MONTH, 1);
+            cal.add(Calendar.MONTH, 1);
+            snapToCycleDay(cal, policy.cycleDay);
         }
 
-        return cycle.toMillis(true);
+        return cal.getTimeInMillis();
     }
 
     /**
@@ -313,16 +293,17 @@
      *
      * @hide
      */
-    public static void snapToCycleDay(Time time, int cycleDay) {
-        if (cycleDay > time.getActualMaximum(MONTH_DAY)) {
-            // cycle day isn't valid this month; snap to last second of month
-            time.month += 1;
-            time.monthDay = 1;
-            time.second = -1;
+    public static void snapToCycleDay(Calendar cal, int cycleDay) {
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        if (cycleDay > cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {
+            cal.set(Calendar.DAY_OF_MONTH, 1);
+            cal.add(Calendar.MONTH, 1);
+            cal.add(Calendar.SECOND, -1);
         } else {
-            time.monthDay = cycleDay;
+            cal.set(Calendar.DAY_OF_MONTH, cycleDay);
         }
-        time.normalize(true);
     }
 
     /**
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index f1edcbe..847d82b 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -19,6 +19,8 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 
+import java.util.Objects;
+
 /**
  * Defines a request for a network, made through {@link NetworkRequest.Builder} and used
  * to request a network via {@link ConnectivityManager#requestNetwork} or listen for changes
@@ -47,15 +49,55 @@
     public final int legacyType;
 
     /**
+     * A NetworkRequest as used by the system can be one of three types:
+     *
+     *     - LISTEN, for which the framework will issue callbacks about any
+     *       and all networks that match the specified NetworkCapabilities,
+     *
+     *     - REQUEST, capable of causing a specific network to be created
+     *       first (e.g. a telephony DUN request), the framework will issue
+     *       callbacks about the single, highest scoring current network
+     *       (if any) that matches the specified NetworkCapabilities, or
+     *
+     *     - TRACK_DEFAULT, a hybrid of the two designed such that the
+     *       framework will issue callbacks for the single, highest scoring
+     *       current network (if any) that matches the capabilities of the
+     *       default Internet request (mDefaultRequest), but which cannot cause
+     *       the framework to either create or retain the existence of any
+     *       specific network.
+     *
+     *     - The value NONE is used only by applications. When an application
+     *       creates a NetworkRequest, it does not have a type; the type is set
+     *       by the system depending on the method used to file the request
+     *       (requestNetwork, registerNetworkCallback, etc.).
+     *
      * @hide
      */
-    public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId) {
+    public static enum Type {
+        NONE,
+        LISTEN,
+        TRACK_DEFAULT,
+        REQUEST
+    };
+
+    /**
+     * The type of the request. This is only used by the system and is always NONE elsewhere.
+     *
+     * @hide
+     */
+    public final Type type;
+
+    /**
+     * @hide
+     */
+    public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId, Type type) {
         if (nc == null) {
             throw new NullPointerException();
         }
         requestId = rId;
         networkCapabilities = nc;
         this.legacyType = legacyType;
+        this.type = type;
     }
 
     /**
@@ -65,6 +107,7 @@
         networkCapabilities = new NetworkCapabilities(that.networkCapabilities);
         requestId = that.requestId;
         this.legacyType = that.legacyType;
+        this.type = that.type;
     }
 
     /**
@@ -90,7 +133,7 @@
             final NetworkCapabilities nc = new NetworkCapabilities(mNetworkCapabilities);
             nc.maybeMarkCapabilitiesRestricted();
             return new NetworkRequest(nc, ConnectivityManager.TYPE_NONE,
-                    ConnectivityManager.REQUEST_ID_UNSET);
+                    ConnectivityManager.REQUEST_ID_UNSET, Type.NONE);
         }
 
         /**
@@ -223,6 +266,7 @@
         dest.writeParcelable(networkCapabilities, flags);
         dest.writeInt(legacyType);
         dest.writeInt(requestId);
+        dest.writeString(type.name());
     }
     public static final Creator<NetworkRequest> CREATOR =
         new Creator<NetworkRequest>() {
@@ -230,7 +274,8 @@
                 NetworkCapabilities nc = (NetworkCapabilities)in.readParcelable(null);
                 int legacyType = in.readInt();
                 int requestId = in.readInt();
-                NetworkRequest result = new NetworkRequest(nc, legacyType, requestId);
+                Type type = Type.valueOf(in.readString());  // IllegalArgumentException if invalid.
+                NetworkRequest result = new NetworkRequest(nc, legacyType, requestId, type);
                 return result;
             }
             public NetworkRequest[] newArray(int size) {
@@ -238,8 +283,27 @@
             }
         };
 
+    /**
+     * Returns true iff. the contained NetworkRequest is one that:
+     *
+     *     - should be associated with at most one satisfying network
+     *       at a time;
+     *
+     *     - should cause a network to be kept up if it is the best network
+     *       which can satisfy the NetworkRequest.
+     *
+     * For full detail of how isRequest() is used for pairing Networks with
+     * NetworkRequests read rematchNetworkAndRequests().
+     *
+     * @hide
+     */
+    public boolean isRequest() {
+        return type == Type.TRACK_DEFAULT || type == Type.REQUEST;
+    }
+
     public String toString() {
-        return "NetworkRequest [ id=" + requestId + ", legacyType=" + legacyType +
+        return "NetworkRequest [ " + type + " id=" + requestId +
+                (legacyType != ConnectivityManager.TYPE_NONE ? ", legacyType=" + legacyType : "") +
                 ", " + networkCapabilities.toString() + " ]";
     }
 
@@ -248,13 +312,11 @@
         NetworkRequest that = (NetworkRequest)obj;
         return (that.legacyType == this.legacyType &&
                 that.requestId == this.requestId &&
-                ((that.networkCapabilities == null && this.networkCapabilities == null) ||
-                 (that.networkCapabilities != null &&
-                  that.networkCapabilities.equals(this.networkCapabilities))));
+                that.type == this.type &&
+                Objects.equals(that.networkCapabilities, this.networkCapabilities));
     }
 
     public int hashCode() {
-        return requestId + (legacyType * 1013) +
-                (networkCapabilities.hashCode() * 1051);
+        return Objects.hash(requestId, legacyType, networkCapabilities, type);
     }
 }
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index 141af3d..35e3065 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -45,13 +45,20 @@
     public native static void attachDhcpFilter(FileDescriptor fd) throws SocketException;
 
     /**
-     * Attaches a socket filter that accepts ICMP6 router advertisement packets to the given socket.
+     * Attaches a socket filter that accepts ICMPv6 router advertisements to the given socket.
      * @param fd the socket's {@link FileDescriptor}.
      * @param packetType the hardware address type, one of ARPHRD_*.
      */
     public native static void attachRaFilter(FileDescriptor fd, int packetType) throws SocketException;
 
     /**
+     * Configures a socket for receiving ICMPv6 router solicitations and sending advertisements.
+     * @param fd the socket's {@link FileDescriptor}.
+     * @param ifIndex the interface index.
+     */
+    public native static void setupRaSocket(FileDescriptor fd, int ifIndex) throws SocketException;
+
+    /**
      * Binds the current process to the network designated by {@code netId}.  All sockets created
      * in the future (and not explicitly bound via a bound {@link SocketFactory} (see
      * {@link Network#getSocketFactory}) will be bound to this network.  Note that if this
diff --git a/core/java/android/net/metrics/ApfProgramEvent.java b/core/java/android/net/metrics/ApfProgramEvent.java
new file mode 100644
index 0000000..258d8e1
--- /dev/null
+++ b/core/java/android/net/metrics/ApfProgramEvent.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.metrics;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+import android.util.SparseArray;
+
+import com.android.internal.util.MessageUtils;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.List;
+
+/**
+ * An event logged when there is a change or event that requires updating the
+ * the APF program in place with a new APF program.
+ * {@hide}
+ */
+@SystemApi
+public final class ApfProgramEvent implements Parcelable {
+
+    // Bitflag constants describing what an Apf program filters.
+    // Bits are indexeds from LSB to MSB, starting at index 0.
+    public static final int FLAG_MULTICAST_FILTER_ON = 0;
+    public static final int FLAG_HAS_IPV4_ADDRESS    = 1;
+
+    /** {@hide} */
+    @IntDef(flag = true, value = {FLAG_MULTICAST_FILTER_ON, FLAG_HAS_IPV4_ADDRESS})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface Flags {}
+
+    public final long lifetime;     // Lifetime of the program in seconds
+    public final int filteredRas;   // Number of RAs filtered by the APF program
+    public final int currentRas;    // Total number of current RAs at generation time
+    public final int programLength; // Length of the APF program in bytes
+    public final int flags;         // Bitfield compound of FLAG_* constants
+
+    /** {@hide} */
+    public ApfProgramEvent(
+            long lifetime, int filteredRas, int currentRas, int programLength, @Flags int flags) {
+        this.lifetime = lifetime;
+        this.filteredRas = filteredRas;
+        this.currentRas = currentRas;
+        this.programLength = programLength;
+        this.flags = flags;
+    }
+
+    private ApfProgramEvent(Parcel in) {
+        this.lifetime = in.readLong();
+        this.filteredRas = in.readInt();
+        this.currentRas = in.readInt();
+        this.programLength = in.readInt();
+        this.flags = in.readInt();
+    }
+
+    @Override
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeLong(lifetime);
+        out.writeInt(filteredRas);
+        out.writeInt(currentRas);
+        out.writeInt(programLength);
+        out.writeInt(flags);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        String lifetimeString = (lifetime < Long.MAX_VALUE) ? lifetime + "s" : "forever";
+        return String.format("ApfProgramEvent(%d/%d RAs %dB %s %s)",
+                filteredRas, currentRas, programLength, lifetimeString, namesOf(flags));
+    }
+
+    public static final Parcelable.Creator<ApfProgramEvent> CREATOR
+            = new Parcelable.Creator<ApfProgramEvent>() {
+        public ApfProgramEvent createFromParcel(Parcel in) {
+            return new ApfProgramEvent(in);
+        }
+
+        public ApfProgramEvent[] newArray(int size) {
+            return new ApfProgramEvent[size];
+        }
+    };
+
+    /** {@hide} */
+    public static @Flags int flagsFor(boolean hasIPv4, boolean multicastFilterOn) {
+        int bitfield = 0;
+        if (hasIPv4) {
+            bitfield |= (1 << FLAG_HAS_IPV4_ADDRESS);
+        }
+        if (multicastFilterOn) {
+            bitfield |= (1 << FLAG_MULTICAST_FILTER_ON);
+        }
+        return bitfield;
+    }
+
+    private static String namesOf(@Flags int bitfield) {
+        List<String> names = new ArrayList<>(Integer.bitCount(bitfield));
+        BitSet set = BitSet.valueOf(new long[]{bitfield & Integer.MAX_VALUE});
+        // Only iterate over flag bits which are set.
+        for (int bit = set.nextSetBit(0); bit >= 0; bit = set.nextSetBit(bit+1)) {
+            names.add(Decoder.constants.get(bit));
+        }
+        return TextUtils.join("|", names);
+    }
+
+    final static class Decoder {
+        static final SparseArray<String> constants =
+                MessageUtils.findMessageNames(
+                       new Class[]{ApfProgramEvent.class}, new String[]{"FLAG_"});
+    }
+}
diff --git a/core/java/android/net/metrics/ApfStats.java b/core/java/android/net/metrics/ApfStats.java
new file mode 100644
index 0000000..8451e53
--- /dev/null
+++ b/core/java/android/net/metrics/ApfStats.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.metrics;
+
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * An event logged for an interface with APF capabilities when its IpManager state machine exits.
+ * {@hide}
+ */
+@SystemApi
+public final class ApfStats implements Parcelable {
+
+    public final long durationMs;     // time interval in milliseconds these stastistics covers
+    public final int receivedRas;     // number of received RAs
+    public final int matchingRas;     // number of received RAs matching a known RA
+    public final int droppedRas;      // number of received RAs ignored due to the MAX_RAS limit
+    public final int zeroLifetimeRas; // number of received RAs with a minimum lifetime of 0
+    public final int parseErrors;     // number of received RAs that could not be parsed
+    public final int programUpdates;  // number of APF program updates
+    public final int maxProgramSize;  // maximum APF program size advertised by hardware
+
+    /** {@hide} */
+    public ApfStats(long durationMs, int receivedRas, int matchingRas, int droppedRas,
+            int zeroLifetimeRas, int parseErrors, int programUpdates, int maxProgramSize) {
+        this.durationMs = durationMs;
+        this.receivedRas = receivedRas;
+        this.matchingRas = matchingRas;
+        this.droppedRas = droppedRas;
+        this.zeroLifetimeRas = zeroLifetimeRas;
+        this.parseErrors = parseErrors;
+        this.programUpdates = programUpdates;
+        this.maxProgramSize = maxProgramSize;
+    }
+
+    private ApfStats(Parcel in) {
+        this.durationMs = in.readLong();
+        this.receivedRas = in.readInt();
+        this.matchingRas = in.readInt();
+        this.droppedRas = in.readInt();
+        this.zeroLifetimeRas = in.readInt();
+        this.parseErrors = in.readInt();
+        this.programUpdates = in.readInt();
+        this.maxProgramSize = in.readInt();
+    }
+
+    @Override
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeLong(durationMs);
+        out.writeInt(receivedRas);
+        out.writeInt(matchingRas);
+        out.writeInt(droppedRas);
+        out.writeInt(zeroLifetimeRas);
+        out.writeInt(parseErrors);
+        out.writeInt(programUpdates);
+        out.writeInt(maxProgramSize);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return new StringBuilder("ApfStats(")
+                .append(String.format("%dms ", durationMs))
+                .append(String.format("%dB RA: {", maxProgramSize))
+                .append(String.format("%d received, ", receivedRas))
+                .append(String.format("%d matching, ", matchingRas))
+                .append(String.format("%d dropped, ", droppedRas))
+                .append(String.format("%d zero lifetime, ", zeroLifetimeRas))
+                .append(String.format("%d parse errors, ", parseErrors))
+                .append(String.format("%d program updates})", programUpdates))
+                .toString();
+    }
+
+    public static final Parcelable.Creator<ApfStats> CREATOR = new Parcelable.Creator<ApfStats>() {
+        public ApfStats createFromParcel(Parcel in) {
+            return new ApfStats(in);
+        }
+
+        public ApfStats[] newArray(int size) {
+            return new ApfStats[size];
+        }
+    };
+}
diff --git a/core/java/android/net/metrics/DefaultNetworkEvent.java b/core/java/android/net/metrics/DefaultNetworkEvent.java
index f8b5992..9f0bad7 100644
--- a/core/java/android/net/metrics/DefaultNetworkEvent.java
+++ b/core/java/android/net/metrics/DefaultNetworkEvent.java
@@ -22,10 +22,11 @@
 import android.os.Parcelable;
 
 /**
+ * An event recorded by ConnectivityService when there is a change in the default network.
  * {@hide}
  */
 @SystemApi
-public final class DefaultNetworkEvent extends IpConnectivityEvent implements Parcelable {
+public final class DefaultNetworkEvent implements Parcelable {
     // The ID of the network that has become the new default or NETID_UNSET if none.
     public final int netId;
     // The list of transport types of the new default network, for example TRANSPORT_WIFI, as
@@ -37,7 +38,8 @@
     public final boolean prevIPv4;
     public final boolean prevIPv6;
 
-    private DefaultNetworkEvent(int netId, int[] transportTypes,
+    /** {@hide} */
+    public DefaultNetworkEvent(int netId, int[] transportTypes,
                 int prevNetId, boolean prevIPv4, boolean prevIPv6) {
         this.netId = netId;
         this.transportTypes = transportTypes;
@@ -54,6 +56,7 @@
         this.prevIPv6 = (in.readByte() > 0);
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeInt(netId);
         out.writeIntArray(transportTypes);
@@ -62,6 +65,7 @@
         out.writeByte(prevIPv6 ? (byte) 1 : (byte) 0);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -105,6 +109,5 @@
 
     public static void logEvent(
             int netId, int[] transports, int prevNetId, boolean hadIPv4, boolean hadIPv6) {
-        logEvent(new DefaultNetworkEvent(netId, transports, prevNetId, hadIPv4, hadIPv6));
     }
-};
+}
diff --git a/core/java/android/net/metrics/DhcpClientEvent.java b/core/java/android/net/metrics/DhcpClientEvent.java
index ec560bf..4a9ff05 100644
--- a/core/java/android/net/metrics/DhcpClientEvent.java
+++ b/core/java/android/net/metrics/DhcpClientEvent.java
@@ -21,35 +21,50 @@
 import android.os.Parcelable;
 
 /**
+ * An event recorded when a DhcpClient state machine transitions to a new state.
  * {@hide}
  */
 @SystemApi
-public final class DhcpClientEvent extends IpConnectivityEvent implements Parcelable {
+public final class DhcpClientEvent implements Parcelable {
+
+    // Names for recording DhcpClient pseudo-state transitions.
+    /** {@hide} Represents transitions from DhcpInitState to DhcpBoundState */
+    public static final String INITIAL_BOUND = "InitialBoundState";
+    /** {@hide} Represents transitions from and to DhcpBoundState via DhcpRenewingState */
+    public static final String RENEWING_BOUND = "RenewingBoundState";
+
     public final String ifName;
     public final String msg;
+    public final int durationMs;
 
-    private DhcpClientEvent(String ifName, String msg) {
+    /** {@hide} */
+    public DhcpClientEvent(String ifName, String msg, int durationMs) {
         this.ifName = ifName;
         this.msg = msg;
+        this.durationMs = durationMs;
     }
 
     private DhcpClientEvent(Parcel in) {
         this.ifName = in.readString();
         this.msg = in.readString();
+        this.durationMs = in.readInt();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeString(ifName);
         out.writeString(msg);
+        out.writeInt(durationMs);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
 
     @Override
     public String toString() {
-        return String.format("DhcpClientEvent(%s, %s)", ifName, msg);
+        return String.format("DhcpClientEvent(%s, %s, %dms)", ifName, msg, durationMs);
     }
 
     public static final Parcelable.Creator<DhcpClientEvent> CREATOR
@@ -64,6 +79,5 @@
     };
 
     public static void logStateEvent(String ifName, String state) {
-        logEvent(new DhcpClientEvent(ifName, state));
     }
-};
+}
diff --git a/core/java/android/net/metrics/DhcpErrorEvent.java b/core/java/android/net/metrics/DhcpErrorEvent.java
index 84795b8..59c5fb6 100644
--- a/core/java/android/net/metrics/DhcpErrorEvent.java
+++ b/core/java/android/net/metrics/DhcpErrorEvent.java
@@ -24,10 +24,11 @@
 import com.android.internal.util.MessageUtils;
 
 /**
- * {@hide} Event class used to record error events when parsing DHCP response packets.
+ * Event class used to record error events when parsing DHCP response packets.
+ * {@hide}
  */
 @SystemApi
-public final class DhcpErrorEvent extends IpConnectivityEvent implements Parcelable {
+public final class DhcpErrorEvent implements Parcelable {
     public static final int L2_ERROR   = 1;
     public static final int L3_ERROR   = 2;
     public static final int L4_ERROR   = 3;
@@ -61,7 +62,8 @@
     // byte 3: optional code
     public final int errorCode;
 
-    private DhcpErrorEvent(String ifName, int errorCode) {
+    /** {@hide} */
+    public DhcpErrorEvent(String ifName, int errorCode) {
         this.ifName = ifName;
         this.errorCode = errorCode;
     }
@@ -71,11 +73,13 @@
         this.errorCode = in.readInt();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeString(ifName);
         out.writeInt(errorCode);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -92,11 +96,9 @@
     };
 
     public static void logParseError(String ifName, int errorCode) {
-        logEvent(new DhcpErrorEvent(ifName, errorCode));
     }
 
     public static void logReceiveError(String ifName) {
-        logEvent(new DhcpErrorEvent(ifName, RECEIVE_ERROR));
     }
 
     public static int errorCodeWithOption(int errorCode, int option) {
diff --git a/core/java/android/net/metrics/DnsEvent.java b/core/java/android/net/metrics/DnsEvent.java
index b94dda0..4fc6b7a 100644
--- a/core/java/android/net/metrics/DnsEvent.java
+++ b/core/java/android/net/metrics/DnsEvent.java
@@ -21,10 +21,11 @@
 import android.os.Parcelable;
 
 /**
+ * An event recorded by DnsEventListenerService.
  * {@hide}
  */
 @SystemApi
-final public class DnsEvent extends IpConnectivityEvent implements Parcelable {
+final public class DnsEvent implements Parcelable {
     public final int netId;
 
     // The event type is currently only 1 or 2, so we store it as a byte.
@@ -37,7 +38,8 @@
     // queries.
     public final int[] latenciesMs;
 
-    private DnsEvent(int netId, byte[] eventTypes, byte[] returnCodes, int[] latenciesMs) {
+    /** {@hide} */
+    public DnsEvent(int netId, byte[] eventTypes, byte[] returnCodes, int[] latenciesMs) {
         this.netId = netId;
         this.eventTypes = eventTypes;
         this.returnCodes = returnCodes;
@@ -59,6 +61,7 @@
         out.writeIntArray(latenciesMs);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -82,6 +85,5 @@
 
     public static void logEvent(
             int netId, byte[] eventTypes, byte[] returnCodes, int[] latenciesMs) {
-        logEvent(new DnsEvent(netId, eventTypes, returnCodes, latenciesMs));
     }
 }
diff --git a/core/java/android/net/metrics/IpConnectivityEvent.java b/core/java/android/net/metrics/IpConnectivityEvent.java
deleted file mode 100644
index 95576c2..0000000
--- a/core/java/android/net/metrics/IpConnectivityEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.metrics;
-
-import android.net.ConnectivityMetricsLogger;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * {@hide}
- */
-public abstract class IpConnectivityEvent {
-    private static final int COMPONENT_TAG = ConnectivityMetricsLogger.COMPONENT_TAG_CONNECTIVITY;
-
-    private static final ConnectivityMetricsLogger sMetricsLogger = new ConnectivityMetricsLogger();
-
-    public static <T extends IpConnectivityEvent & Parcelable> void logEvent(T event) {
-        // TODO: consider using different component for DNS event.
-        sMetricsLogger.logEvent(System.currentTimeMillis(), COMPONENT_TAG, 0, event);
-    }
-};
diff --git a/core/java/android/net/metrics/IpConnectivityLog.java b/core/java/android/net/metrics/IpConnectivityLog.java
new file mode 100644
index 0000000..a7c1d40
--- /dev/null
+++ b/core/java/android/net/metrics/IpConnectivityLog.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.metrics;
+
+import android.net.ConnectivityMetricsEvent;
+import android.net.ConnectivityMetricsLogger;
+import android.net.IConnectivityMetricsLogger;
+import android.os.Parcelable;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Specialization of the ConnectivityMetricsLogger class for recording IP connectivity events.
+ * {@hide}
+ */
+public class IpConnectivityLog extends ConnectivityMetricsLogger {
+    private static String TAG = "IpConnectivityMetricsLogger";
+    private static final boolean DBG = false;
+
+    public IpConnectivityLog() {
+        // mService initialized in super constructor.
+    }
+
+    @VisibleForTesting
+    public IpConnectivityLog(IConnectivityMetricsLogger service) {
+        super(service);
+    }
+
+    /**
+     * Log an IpConnectivity event. Contrary to logEvent(), this method does not
+     * keep track of skipped events and is thread-safe for callers.
+     *
+     * @param timestamp is the epoch timestamp of the event in ms.
+     * @param data is a Parcelable instance representing the event.
+     *
+     * @return true if the event was successfully logged.
+     */
+    public boolean log(long timestamp, Parcelable data) {
+        if (mService == null) {
+            if (DBG) {
+                Log.d(TAG, CONNECTIVITY_METRICS_LOGGER_SERVICE + " service not ready");
+            }
+            return false;
+        }
+
+        if (System.currentTimeMillis() < mServiceUnblockedTimestampMillis) {
+            if (DBG) {
+                Log.d(TAG, "skipping logging due to throttling for IpConnectivity component");
+            }
+            return false;
+        }
+
+        try {
+            final ConnectivityMetricsEvent event =
+                new ConnectivityMetricsEvent(timestamp, COMPONENT_TAG_CONNECTIVITY, 0, data);
+            final long result = mService.logEvent(event);
+            if (result >= 0) {
+                mServiceUnblockedTimestampMillis = result;
+            }
+            return (result == 0);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error logging event", e);
+            return false;
+        }
+    }
+
+    public void log(Parcelable event) {
+        log(System.currentTimeMillis(), event);
+    }
+}
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index 0940bd0..a5b4eb5 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -16,6 +16,7 @@
 
 package android.net.metrics;
 
+import android.annotation.IntDef;
 import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -23,21 +24,32 @@
 
 import com.android.internal.util.MessageUtils;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
+ * An event recorded by IpManager when IP provisioning completes for a network or
+ * when a network disconnects.
  * {@hide}
  */
 @SystemApi
-public final class IpManagerEvent extends IpConnectivityEvent implements Parcelable {
+public final class IpManagerEvent implements Parcelable {
 
     public static final int PROVISIONING_OK    = 1;
     public static final int PROVISIONING_FAIL  = 2;
     public static final int COMPLETE_LIFECYCLE = 3;
 
+    /** {@hide} */
+    @IntDef(value = {PROVISIONING_OK, PROVISIONING_FAIL, COMPLETE_LIFECYCLE})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface EventType {}
+
     public final String ifName;
-    public final int eventType;
+    public final @EventType int eventType;
     public final long durationMs;
 
-    private IpManagerEvent(String ifName, int eventType, long duration) {
+    /** {@hide} */
+    public IpManagerEvent(String ifName, @EventType int eventType, long duration) {
         this.ifName = ifName;
         this.eventType = eventType;
         this.durationMs = duration;
@@ -49,12 +61,14 @@
         this.durationMs = in.readLong();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeString(ifName);
         out.writeInt(eventType);
         out.writeLong(durationMs);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -71,7 +85,6 @@
     };
 
     public static void logEvent(int eventType, String ifName, long durationMs) {
-        logEvent(new IpManagerEvent(ifName, eventType, durationMs));
     }
 
     @Override
@@ -84,4 +97,4 @@
         static final SparseArray<String> constants = MessageUtils.findMessageNames(
                 new Class[]{IpManagerEvent.class}, new String[]{"PROVISIONING_", "COMPLETE_"});
     }
-};
+}
diff --git a/core/java/android/net/metrics/IpReachabilityEvent.java b/core/java/android/net/metrics/IpReachabilityEvent.java
index d40389c..ee09e22 100644
--- a/core/java/android/net/metrics/IpReachabilityEvent.java
+++ b/core/java/android/net/metrics/IpReachabilityEvent.java
@@ -24,24 +24,35 @@
 import com.android.internal.util.MessageUtils;
 
 /**
+ * An event recorded when IpReachabilityMonitor sends a neighbor probe or receives
+ * a neighbor probe result.
  * {@hide}
  */
 @SystemApi
-public final class IpReachabilityEvent extends IpConnectivityEvent implements Parcelable {
+public final class IpReachabilityEvent implements Parcelable {
 
-    public static final int PROBE             = 1 << 8;
-    public static final int NUD_FAILED        = 2 << 8;
-    public static final int PROVISIONING_LOST = 3 << 8;
+    // Event types.
+    /** A probe forced by IpReachabilityMonitor. */
+    public static final int PROBE                     = 1 << 8;
+    /** Neighbor unreachable after a forced probe. */
+    public static final int NUD_FAILED                = 2 << 8;
+    /** Neighbor unreachable after a forced probe, IP provisioning is also lost. */
+    public static final int PROVISIONING_LOST         = 3 << 8;
+    /** {@hide} Neighbor unreachable notification from kernel. */
+    public static final int NUD_FAILED_ORGANIC        = 4 << 8;
+    /** {@hide} Neighbor unreachable notification from kernel, IP provisioning is also lost. */
+    public static final int PROVISIONING_LOST_ORGANIC = 5 << 8;
 
     public final String ifName;
     // eventType byte format (MSB to LSB):
     // byte 0: unused
     // byte 1: unused
     // byte 2: type of event: PROBE, NUD_FAILED, PROVISIONING_LOST
-    // byte 3: kernel errno from RTNetlink or IpReachabilityMonitor
+    // byte 3: when byte 2 == PROBE, errno code from RTNetlink or IpReachabilityMonitor.
     public final int eventType;
 
-    private IpReachabilityEvent(String ifName, int eventType) {
+    /** {@hide} */
+    public IpReachabilityEvent(String ifName, int eventType) {
         this.ifName = ifName;
         this.eventType = eventType;
     }
@@ -51,11 +62,13 @@
         this.eventType = in.readInt();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeString(ifName);
         out.writeInt(eventType);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -72,21 +85,32 @@
     };
 
     public static void logProbeEvent(String ifName, int nlErrorCode) {
-        logEvent(new IpReachabilityEvent(ifName, PROBE | (nlErrorCode & 0xFF)));
     }
 
     public static void logNudFailed(String ifName) {
-        logEvent(new IpReachabilityEvent(ifName, NUD_FAILED));
     }
 
     public static void logProvisioningLost(String ifName) {
-        logEvent(new IpReachabilityEvent(ifName, PROVISIONING_LOST));
+    }
+
+    /**
+     * Returns the NUD failure event type code corresponding to the given conditions.
+     * {@hide}
+     */
+    public static int nudFailureEventType(boolean isFromProbe, boolean isProvisioningLost) {
+        if (isFromProbe) {
+            return isProvisioningLost ? PROVISIONING_LOST : NUD_FAILED;
+        } else {
+            return isProvisioningLost ? PROVISIONING_LOST_ORGANIC : NUD_FAILED_ORGANIC;
+        }
     }
 
     @Override
     public String toString() {
-        return String.format("IpReachabilityEvent(%s, %s)", ifName,
-                Decoder.constants.get(eventType));
+        int hi = eventType & 0xff00;
+        int lo = eventType & 0x00ff;
+        String eventName = Decoder.constants.get(hi);
+        return String.format("IpReachabilityEvent(%s, %s:%02x)", ifName, eventName, lo);
     }
 
     final static class Decoder {
@@ -94,4 +118,4 @@
                 MessageUtils.findMessageNames(new Class[]{IpReachabilityEvent.class},
                 new String[]{"PROBE", "PROVISIONING_", "NUD_"});
     }
-};
+}
diff --git a/core/java/android/net/metrics/NetworkEvent.java b/core/java/android/net/metrics/NetworkEvent.java
index 08c9c75..3b3fa69 100644
--- a/core/java/android/net/metrics/NetworkEvent.java
+++ b/core/java/android/net/metrics/NetworkEvent.java
@@ -16,6 +16,7 @@
 
 package android.net.metrics;
 
+import android.annotation.IntDef;
 import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -23,11 +24,14 @@
 
 import com.android.internal.util.MessageUtils;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
  * {@hide}
  */
 @SystemApi
-public final class NetworkEvent extends IpConnectivityEvent implements Parcelable {
+public final class NetworkEvent implements Parcelable {
 
     public static final int NETWORK_CONNECTED            = 1;
     public static final int NETWORK_VALIDATED            = 2;
@@ -37,28 +41,49 @@
     public static final int NETWORK_UNLINGER             = 6;
     public static final int NETWORK_DISCONNECTED         = 7;
 
+    /** {@hide} */
+    @IntDef(value = {
+            NETWORK_CONNECTED,
+            NETWORK_VALIDATED,
+            NETWORK_VALIDATION_FAILED,
+            NETWORK_CAPTIVE_PORTAL_FOUND,
+            NETWORK_LINGER,
+            NETWORK_UNLINGER,
+            NETWORK_DISCONNECTED,
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface EventType {}
+
     public final int netId;
-    public final int eventType;
+    public final @EventType int eventType;
     public final long durationMs;
 
-    private NetworkEvent(int netId, int eventType, long durationMs) {
+    /** {@hide} */
+    public NetworkEvent(int netId, @EventType int eventType, long durationMs) {
         this.netId = netId;
         this.eventType = eventType;
         this.durationMs = durationMs;
     }
 
+    /** {@hide} */
+    public NetworkEvent(int netId, @EventType int eventType) {
+        this(netId, eventType, 0);
+    }
+
     private NetworkEvent(Parcel in) {
         netId = in.readInt();
         eventType = in.readInt();
         durationMs = in.readLong();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeInt(netId);
         out.writeInt(eventType);
         out.writeLong(durationMs);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -75,15 +100,12 @@
     };
 
     public static void logEvent(int netId, int eventType) {
-        logEvent(new NetworkEvent(netId, eventType, 0));
     }
 
     public static void logValidated(int netId, long durationMs) {
-        logEvent(new NetworkEvent(netId, NETWORK_VALIDATED, durationMs));
     }
 
     public static void logCaptivePortalFound(int netId, long durationMs) {
-        logEvent(new NetworkEvent(netId, NETWORK_CAPTIVE_PORTAL_FOUND, durationMs));
     }
 
     @Override
@@ -96,4 +118,4 @@
         static final SparseArray<String> constants = MessageUtils.findMessageNames(
                 new Class[]{NetworkEvent.class}, new String[]{"NETWORK_"});
     }
-};
+}
diff --git a/core/java/android/net/metrics/RaEvent.java b/core/java/android/net/metrics/RaEvent.java
new file mode 100644
index 0000000..91bd023
--- /dev/null
+++ b/core/java/android/net/metrics/RaEvent.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.metrics;
+
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * An event logged when the APF packet socket receives an RA packet.
+ * {@hide}
+ */
+@SystemApi
+public final class RaEvent implements Parcelable {
+
+    /** {@hide} */
+    public static final long NO_LIFETIME = -1L;
+
+    // Lifetime in seconds of options found in a single RA packet.
+    // When an option is not set, the value of the associated field is -1;
+    public final long routerLifetime;
+    public final long prefixValidLifetime;
+    public final long prefixPreferredLifetime;
+    public final long routeInfoLifetime;
+    public final long rdnssLifetime;
+    public final long dnsslLifetime;
+
+    /** {@hide} */
+    public RaEvent(long routerLifetime, long prefixValidLifetime, long prefixPreferredLifetime,
+            long routeInfoLifetime, long rdnssLifetime, long dnsslLifetime) {
+        this.routerLifetime = routerLifetime;
+        this.prefixValidLifetime = prefixValidLifetime;
+        this.prefixPreferredLifetime = prefixPreferredLifetime;
+        this.routeInfoLifetime = routeInfoLifetime;
+        this.rdnssLifetime = rdnssLifetime;
+        this.dnsslLifetime = dnsslLifetime;
+    }
+
+    private RaEvent(Parcel in) {
+        routerLifetime          = in.readLong();
+        prefixValidLifetime     = in.readLong();
+        prefixPreferredLifetime = in.readLong();
+        routeInfoLifetime       = in.readLong();
+        rdnssLifetime           = in.readLong();
+        dnsslLifetime           = in.readLong();
+    }
+
+    @Override
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeLong(routerLifetime);
+        out.writeLong(prefixValidLifetime);
+        out.writeLong(prefixPreferredLifetime);
+        out.writeLong(routeInfoLifetime);
+        out.writeLong(rdnssLifetime);
+        out.writeLong(dnsslLifetime);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return new StringBuilder("RaEvent(lifetimes: ")
+                .append(String.format("router=%ds, ", routerLifetime))
+                .append(String.format("prefix_valid=%ds, ", prefixValidLifetime))
+                .append(String.format("prefix_preferred=%ds, ", prefixPreferredLifetime))
+                .append(String.format("route_info=%ds, ", routeInfoLifetime))
+                .append(String.format("rdnss=%ds, ", rdnssLifetime))
+                .append(String.format("dnssl=%ds)", dnsslLifetime))
+                .toString();
+    }
+
+    public static final Parcelable.Creator<RaEvent> CREATOR = new Parcelable.Creator<RaEvent>() {
+        public RaEvent createFromParcel(Parcel in) {
+            return new RaEvent(in);
+        }
+
+        public RaEvent[] newArray(int size) {
+            return new RaEvent[size];
+        }
+    };
+
+    /** {@hide} */
+    public static class Builder {
+
+        long routerLifetime          = NO_LIFETIME;
+        long prefixValidLifetime     = NO_LIFETIME;
+        long prefixPreferredLifetime = NO_LIFETIME;
+        long routeInfoLifetime       = NO_LIFETIME;
+        long rdnssLifetime           = NO_LIFETIME;
+        long dnsslLifetime           = NO_LIFETIME;
+
+        public Builder() {
+        }
+
+        public RaEvent build() {
+            return new RaEvent(routerLifetime, prefixValidLifetime, prefixPreferredLifetime,
+                    routeInfoLifetime, rdnssLifetime, dnsslLifetime);
+        }
+
+        public Builder updateRouterLifetime(long lifetime) {
+            routerLifetime = updateLifetime(routerLifetime, lifetime);
+            return this;
+        }
+
+        public Builder updatePrefixValidLifetime(long lifetime) {
+            prefixValidLifetime = updateLifetime(prefixValidLifetime, lifetime);
+            return this;
+        }
+
+        public Builder updatePrefixPreferredLifetime(long lifetime) {
+            prefixPreferredLifetime = updateLifetime(prefixPreferredLifetime, lifetime);
+            return this;
+        }
+
+        public Builder updateRouteInfoLifetime(long lifetime) {
+            routeInfoLifetime = updateLifetime(routeInfoLifetime, lifetime);
+            return this;
+        }
+
+        public Builder updateRdnssLifetime(long lifetime) {
+            rdnssLifetime = updateLifetime(rdnssLifetime, lifetime);
+            return this;
+        }
+
+        public Builder updateDnsslLifetime(long lifetime) {
+            dnsslLifetime = updateLifetime(dnsslLifetime, lifetime);
+            return this;
+        }
+
+        private long updateLifetime(long currentLifetime, long newLifetime) {
+            if (currentLifetime == RaEvent.NO_LIFETIME) {
+                return newLifetime;
+            }
+            return Math.min(currentLifetime, newLifetime);
+        }
+    }
+}
diff --git a/core/java/android/net/metrics/ValidationProbeEvent.java b/core/java/android/net/metrics/ValidationProbeEvent.java
index 751c35f..331cf0c 100644
--- a/core/java/android/net/metrics/ValidationProbeEvent.java
+++ b/core/java/android/net/metrics/ValidationProbeEvent.java
@@ -16,6 +16,7 @@
 
 package android.net.metrics;
 
+import android.annotation.IntDef;
 import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -23,11 +24,15 @@
 
 import com.android.internal.util.MessageUtils;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
+ * An event recorded by NetworkMonitor when sending a probe for finding captive portals.
  * {@hide}
  */
 @SystemApi
-public final class ValidationProbeEvent extends IpConnectivityEvent implements Parcelable {
+public final class ValidationProbeEvent implements Parcelable {
 
     public static final int PROBE_DNS   = 0;
     public static final int PROBE_HTTP  = 1;
@@ -37,12 +42,24 @@
     public static final int DNS_FAILURE = 0;
     public static final int DNS_SUCCESS = 1;
 
+    /** {@hide} */
+    @IntDef(value = {PROBE_DNS, PROBE_HTTP, PROBE_HTTPS, PROBE_PAC})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface ProbeType {}
+
+    /** {@hide} */
+    @IntDef(value = {DNS_FAILURE, DNS_SUCCESS})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface ReturnCode {}
+
     public final int netId;
     public final long durationMs;
-    public final int probeType;
-    public final int returnCode;
+    public final @ProbeType int probeType;
+    public final @ReturnCode int returnCode;
 
-    private ValidationProbeEvent(int netId, long durationMs, int probeType, int returnCode) {
+    /** @hide */
+    public ValidationProbeEvent(
+            int netId, long durationMs, @ProbeType int probeType, @ReturnCode int returnCode) {
         this.netId = netId;
         this.durationMs = durationMs;
         this.probeType = probeType;
@@ -56,6 +73,7 @@
         returnCode = in.readInt();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeInt(netId);
         out.writeLong(durationMs);
@@ -63,6 +81,7 @@
         out.writeInt(returnCode);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
@@ -84,7 +103,6 @@
     }
 
     public static void logEvent(int netId, long durationMs, int probeType, int returnCode) {
-        logEvent(new ValidationProbeEvent(netId, durationMs, probeType, returnCode));
     }
 
     @Override
@@ -97,4 +115,4 @@
         static final SparseArray<String> constants = MessageUtils.findMessageNames(
                 new Class[]{ValidationProbeEvent.class}, new String[]{"PROBE_"});
     }
-};
+}
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index 41ff9fd..783c25a 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -290,6 +290,7 @@
 
     // Guarded by NfcAdapter.class
     static boolean sIsInitialized = false;
+    static boolean sHasNfcFeature;
 
     // Final after first constructor, except for
     // attemptDeadServiceRecovery() when NFC crashes - we accept a best effort
@@ -435,42 +436,65 @@
     }
 
     /**
+     * Helper to check if this device is NFC HCE capable, by checking for
+     * FEATURE_NFC_HOST_CARD_EMULATION and/or FEATURE_NFC_HOST_CARD_EMULATION_NFCF,
+     * but without using a context.
+     */
+    private static boolean hasNfcHceFeature() {
+        IPackageManager pm = ActivityThread.getPackageManager();
+        if (pm == null) {
+            Log.e(TAG, "Cannot get package manager, assuming no NFC feature");
+            return false;
+        }
+        try {
+            return pm.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION, 0)
+                || pm.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION_NFCF, 0);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Package manager query failed, assuming no NFC feature", e);
+            return false;
+        }
+    }
+
+    /**
      * Returns the NfcAdapter for application context,
      * or throws if NFC is not available.
      * @hide
      */
     public static synchronized NfcAdapter getNfcAdapter(Context context) {
         if (!sIsInitialized) {
+            sHasNfcFeature = hasNfcFeature();
+            boolean hasHceFeature = hasNfcHceFeature();
             /* is this device meant to have NFC */
-            if (!hasNfcFeature()) {
+            if (!sHasNfcFeature && !hasHceFeature) {
                 Log.v(TAG, "this device does not have NFC support");
                 throw new UnsupportedOperationException();
             }
-
             sService = getServiceInterface();
             if (sService == null) {
                 Log.e(TAG, "could not retrieve NFC service");
                 throw new UnsupportedOperationException();
             }
-            try {
-                sTagService = sService.getNfcTagInterface();
-            } catch (RemoteException e) {
-                Log.e(TAG, "could not retrieve NFC Tag service");
-                throw new UnsupportedOperationException();
+            if (sHasNfcFeature) {
+                try {
+                    sTagService = sService.getNfcTagInterface();
+                } catch (RemoteException e) {
+                    Log.e(TAG, "could not retrieve NFC Tag service");
+                    throw new UnsupportedOperationException();
+                }
             }
-
-            try {
-                sCardEmulationService = sService.getNfcCardEmulationInterface();
-            } catch (RemoteException e) {
-                Log.e(TAG, "could not retrieve card emulation service");
-                throw new UnsupportedOperationException();
-            }
-
-            try {
-                sNfcFCardEmulationService = sService.getNfcFCardEmulationInterface();
-            } catch (RemoteException e) {
-                Log.e(TAG, "could not retrieve NFC-F card emulation service");
-                throw new UnsupportedOperationException();
+            if (hasHceFeature) {
+                try {
+                    sNfcFCardEmulationService = sService.getNfcFCardEmulationInterface();
+                } catch (RemoteException e) {
+                    Log.e(TAG, "could not retrieve NFC-F card emulation service");
+                    throw new UnsupportedOperationException();
+                }
+                try {
+                    sCardEmulationService = sService.getNfcCardEmulationInterface();
+                } catch (RemoteException e) {
+                    Log.e(TAG, "could not retrieve card emulation service");
+                    throw new UnsupportedOperationException();
+                }
             }
 
             sIsInitialized = true;
@@ -838,8 +862,14 @@
      *
      * @param uris an array of Uri(s) to push over Android Beam
      * @param activity activity for which the Uri(s) will be pushed
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void setBeamPushUris(Uri[] uris, Activity activity) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null) {
             throw new NullPointerException("activity cannot be null");
         }
@@ -914,8 +944,14 @@
      *
      * @param callback callback, or null to disable
      * @param activity activity for which the Uri(s) will be pushed
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void setBeamPushUrisCallback(CreateBeamUrisCallback callback, Activity activity) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null) {
             throw new NullPointerException("activity cannot be null");
         }
@@ -992,9 +1028,15 @@
      * @param activities optional additional activities, however we strongly recommend
      *        to only register one at a time, and to do so in that activity's
      *        {@link Activity#onCreate}
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void setNdefPushMessage(NdefMessage message, Activity activity,
             Activity ... activities) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         int targetSdkVersion = getSdkVersion();
         try {
             if (activity == null) {
@@ -1024,6 +1066,11 @@
      */
     @SystemApi
     public void setNdefPushMessage(NdefMessage message, Activity activity, int flags) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null) {
             throw new NullPointerException("activity cannot be null");
         }
@@ -1094,9 +1141,15 @@
      * @param activities optional additional activities, however we strongly recommend
      *        to only register one at a time, and to do so in that activity's
      *        {@link Activity#onCreate}
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void setNdefPushMessageCallback(CreateNdefMessageCallback callback, Activity activity,
             Activity ... activities) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         int targetSdkVersion = getSdkVersion();
         try {
             if (activity == null) {
@@ -1168,9 +1221,15 @@
      * @param activities optional additional activities, however we strongly recommend
      *        to only register one at a time, and to do so in that activity's
      *        {@link Activity#onCreate}
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void setOnNdefPushCompleteCallback(OnNdefPushCompleteCallback callback,
             Activity activity, Activity ... activities) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         int targetSdkVersion = getSdkVersion();
         try {
             if (activity == null) {
@@ -1227,9 +1286,15 @@
      * @param techLists the tech lists used to perform matching for dispatching of the
      *      {@link NfcAdapter#ACTION_TECH_DISCOVERED} intent
      * @throws IllegalStateException if the Activity is not currently in the foreground
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void enableForegroundDispatch(Activity activity, PendingIntent intent,
             IntentFilter[] filters, String[][] techLists) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null || intent == null) {
             throw new NullPointerException();
         }
@@ -1263,8 +1328,14 @@
      *
      * @param activity the Activity to disable dispatch to
      * @throws IllegalStateException if the Activity has already been paused
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void disableForegroundDispatch(Activity activity) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         ActivityThread.currentActivityThread().unregisterOnActivityPausedListener(activity,
                 mForegroundDispatchListener);
         disableForegroundDispatchInternal(activity, false);
@@ -1309,9 +1380,15 @@
      * @param callback the callback to be called when a tag is discovered
      * @param flags Flags indicating poll technologies and other optional parameters
      * @param extras Additional extras for configuring reader mode.
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void enableReaderMode(Activity activity, ReaderCallback callback, int flags,
             Bundle extras) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         mNfcActivityManager.enableReaderMode(activity, callback, flags, extras);
     }
 
@@ -1321,8 +1398,14 @@
      * all supported tag technologies.
      *
      * @param activity the Activity that currently has reader mode enabled
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public void disableReaderMode(Activity activity) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         mNfcActivityManager.disableReaderMode(activity);
     }
 
@@ -1349,8 +1432,14 @@
      *
      * @param activity the current foreground Activity that has registered data to share
      * @return whether the Beam animation was successfully invoked
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public boolean invokeBeam(Activity activity) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null) {
             throw new NullPointerException("activity may not be null.");
         }
@@ -1404,10 +1493,16 @@
      * @param activity foreground activity
      * @param message a NDEF Message to push over NFC
      * @throws IllegalStateException if the activity is not currently in the foreground
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      * @deprecated use {@link #setNdefPushMessage} instead
      */
     @Deprecated
     public void enableForegroundNdefPush(Activity activity, NdefMessage message) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null || message == null) {
             throw new NullPointerException();
         }
@@ -1432,10 +1527,16 @@
      *
      * @param activity the Foreground activity
      * @throws IllegalStateException if the Activity has already been paused
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      * @deprecated use {@link #setNdefPushMessage} instead
      */
     @Deprecated
     public void disableForegroundNdefPush(Activity activity) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         if (activity == null) {
             throw new NullPointerException();
         }
@@ -1452,6 +1553,9 @@
      */
     @SystemApi
     public boolean enableNdefPush() {
+        if (!sHasNfcFeature) {
+            throw new UnsupportedOperationException();
+        }
         try {
             return sService.enableNdefPush();
         } catch (RemoteException e) {
@@ -1467,6 +1571,11 @@
      */
     @SystemApi
     public boolean disableNdefPush() {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         try {
             return sService.disableNdefPush();
         } catch (RemoteException e) {
@@ -1497,8 +1606,14 @@
      *
      * @see android.provider.Settings#ACTION_NFCSHARING_SETTINGS
      * @return true if NDEF Push feature is enabled
+     * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
      */
     public boolean isNdefPushEnabled() {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         try {
             return sService.isNdefPushEnabled();
         } catch (RemoteException e) {
@@ -1623,6 +1738,11 @@
     @SystemApi
     public boolean addNfcUnlockHandler(final NfcUnlockHandler unlockHandler,
                                        String[] tagTechnologies) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         // If there are no tag technologies, don't bother adding unlock handler
         if (tagTechnologies.length == 0) {
             return false;
@@ -1666,6 +1786,11 @@
      */
     @SystemApi
     public boolean removeNfcUnlockHandler(NfcUnlockHandler unlockHandler) {
+        synchronized (NfcAdapter.class) {
+            if (!sHasNfcFeature) {
+                throw new UnsupportedOperationException();
+            }
+        }
         try {
             synchronized (mLock) {
                 if (mNfcUnlockHandlers.containsKey(unlockHandler)) {
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index dc7be6b..c5e09bd 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -672,6 +672,11 @@
          * N is for ¯\_(ツ)_/¯.
          */
         public static final int N = 24;
+
+        /**
+         * N MR1: Still ¯\_(シ)_/¯.
+         */
+        public static final int N_MR1 = 25;
     }
 
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index d8be2b6..80927f3 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -340,6 +340,33 @@
     }
 
     /**
+     * Return preloads directory.
+     * <p>This directory may contain pre-loaded content such as
+     * {@link #getDataPreloadsDemoDirectory() demo videos} and
+     * {@link #getDataPreloadsAppsDirectory() APK files} .
+     * {@hide}
+     */
+    public static File getDataPreloadsDirectory() {
+        return new File(getDataDirectory(), "preloads");
+    }
+
+    /**
+     * @see #getDataPreloadsDirectory()
+     * {@hide}
+     */
+    public static File getDataPreloadsDemoDirectory() {
+        return new File(getDataPreloadsDirectory(), "demo");
+    }
+
+    /**
+     * @see #getDataPreloadsDirectory()
+     * {@hide}
+     */
+    public static File getDataPreloadsAppsDirectory() {
+        return new File(getDataPreloadsDirectory(), "apps");
+    }
+
+    /**
      * Return the primary shared/external storage directory. This directory may
      * not currently be accessible if it has been mounted by the user on their
      * computer, has been removed from the device, or some other problem has
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 36ba6966..efdb4b5 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -18,6 +18,7 @@
 package android.os;
 
 import android.net.InterfaceConfiguration;
+import android.net.INetd;
 import android.net.INetworkManagementEventObserver;
 import android.net.Network;
 import android.net.NetworkStats;
@@ -36,7 +37,7 @@
      **/
 
     /**
-     * Register an observer to receive events
+     * Register an observer to receive events.
      */
     void registerObserver(INetworkManagementEventObserver obs);
 
@@ -46,6 +47,11 @@
     void unregisterObserver(INetworkManagementEventObserver obs);
 
     /**
+     * Retrieve an INetd to talk to netd.
+     */
+    INetd getNetdService();
+
+    /**
      * Returns a list of currently known network interfaces
      */
     String[] listInterfaces();
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index b27cb32..eeb641d 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -81,4 +81,5 @@
     void clearSeedAccountData();
     boolean someUserHasSeedAccount(in String accountName, in String accountType);
     boolean isManagedProfile(int userId);
+    boolean isDemoUser(int userId);
 }
diff --git a/core/java/android/os/PowerManagerInternal.java b/core/java/android/os/PowerManagerInternal.java
index b3cf710..9bbe8f9 100644
--- a/core/java/android/os/PowerManagerInternal.java
+++ b/core/java/android/os/PowerManagerInternal.java
@@ -57,14 +57,19 @@
     /**
      * Power hint:
      * Interaction: The user is interacting with the device. The corresponding data field must be
-     * the expected duration of the fling, or 0 if unknown.
+     * the expected duration of the interaction, or 0 if unknown.
      *
-     * Sustained Performance Mode: Enable/Disables Sustained Performance Mode.
+     * Sustained Performance Mode: The corresponding data field must be Enable/Disable
+     * Sustained Performance Mode.
+     *
+     * Launch: This is specific for activity launching. The corresponding data field must be
+     * the expected duration of the required boost, or 0 if unknown.
      *
      * These must be kept in sync with the values in hardware/libhardware/include/hardware/power.h
      */
     public static final int POWER_HINT_INTERACTION = 2;
     public static final int POWER_HINT_SUSTAINED_PERFORMANCE_MODE = 6;
+    public static final int POWER_HINT_LAUNCH = 8;
 
     public static String wakefulnessToString(int wakefulness) {
         switch (wakefulness) {
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index f664e70..c26d974 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -19,6 +19,7 @@
 import android.net.LocalSocket;
 import android.net.LocalSocketAddress;
 import android.system.Os;
+import android.system.OsConstants;
 import android.util.Log;
 import com.android.internal.os.Zygote;
 import dalvik.system.VMRuntime;
@@ -322,6 +323,12 @@
      */
     public static final int SCHED_IDLE = 5;
 
+    /**
+     * Reset scheduler choice on fork.
+     * @hide
+     */
+    public static final int SCHED_RESET_ON_FORK = 0x40000000;
+
     // Keep in sync with SP_* constants of enum type SchedPolicy
     // declared in system/core/include/cutils/sched_policy.h,
     // except THREAD_GROUP_DEFAULT does not correspond to any SP_* value.
@@ -1243,4 +1250,22 @@
      * @hide
      */
     public static final native void removeAllProcessGroups();
+
+    /**
+     * Check to see if a thread belongs to a given process. This may require
+     * more permissions than apps generally have.
+     * @return true if this thread belongs to a process
+     * @hide
+     */
+    public static final boolean isThreadInProcess(int tid, int pid) {
+        try {
+            if (Os.access("/proc/" + tid + "/task/" + pid, OsConstants.F_OK)) {
+                return true;
+            } else {
+                return false;
+            }
+        } catch (Exception e) {
+            return false;
+        }
+    }
 }
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index dd7be53..507379b 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -570,18 +570,19 @@
      * @throws SecurityException if the current user is not allowed to wipe data.
      */
     public static void rebootWipeUserData(Context context) throws IOException {
-        rebootWipeUserData(context, false, context.getPackageName());
+        rebootWipeUserData(context, false /* shutdown */, context.getPackageName(),
+                false /* force */);
     }
 
     /** {@hide} */
     public static void rebootWipeUserData(Context context, String reason) throws IOException {
-        rebootWipeUserData(context, false, reason);
+        rebootWipeUserData(context, false /* shutdown */, reason, false /* force */);
     }
 
     /** {@hide} */
     public static void rebootWipeUserData(Context context, boolean shutdown)
             throws IOException {
-        rebootWipeUserData(context, shutdown, context.getPackageName());
+        rebootWipeUserData(context, shutdown, context.getPackageName(), false /* force */);
     }
 
     /**
@@ -595,6 +596,9 @@
      * @param shutdown  if true, the device will be powered down after
      *                  the wipe completes, rather than being rebooted
      *                  back to the regular system.
+     * @param reason    the reason for the wipe that is visible in the logs
+     * @param force     whether the {@link UserManager.DISALLOW_FACTORY_RESET} user restriction
+     *                  should be ignored
      *
      * @throws IOException  if writing the recovery command file
      * fails, or if the reboot itself fails.
@@ -602,10 +606,10 @@
      *
      * @hide
      */
-    public static void rebootWipeUserData(Context context, boolean shutdown, String reason)
-            throws IOException {
+    public static void rebootWipeUserData(Context context, boolean shutdown, String reason,
+            boolean force) throws IOException {
         UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
-        if (um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) {
+        if (!force && um.hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET)) {
             throw new SecurityException("Wiping data is not allowed for this user.");
         }
         final ConditionVariable condition = new ConditionVariable();
@@ -658,6 +662,31 @@
     }
 
     /**
+     * Reboot into recovery and wipe the A/B device.
+     *
+     * @param Context      the Context to use.
+     * @param packageFile  the wipe package to be applied.
+     * @param reason       the reason to wipe.
+     *
+     * @throws IOException if something goes wrong.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static void rebootWipeAb(Context context, File packageFile, String reason)
+            throws IOException {
+        String reasonArg = null;
+        if (!TextUtils.isEmpty(reason)) {
+            reasonArg = "--reason=" + sanitizeArg(reason);
+        }
+
+        final String filename = packageFile.getCanonicalPath();
+        final String filenameArg = "--wipe_package=" + filename;
+        final String localeArg = "--locale=" + Locale.getDefault().toString();
+        bootCommand(context, "--wipe_ab", filenameArg, reasonArg, localeArg);
+    }
+
+    /**
      * Reboot into the recovery system with the supplied argument.
      * @param args to pass to the recovery utility.
      * @throws IOException if something goes wrong.
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index bcc8d46..a44a9ee 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -789,7 +789,7 @@
      */
     public boolean isPrimaryUser() {
         UserInfo user = getUserInfo(UserHandle.myUserId());
-        return user != null ? user.isPrimary() : false;
+        return user != null && user.isPrimary();
     }
 
     /**
@@ -855,7 +855,21 @@
      */
     public boolean isGuestUser() {
         UserInfo user = getUserInfo(UserHandle.myUserId());
-        return user != null ? user.isGuest() : false;
+        return user != null && user.isGuest();
+    }
+
+    /**
+     * Checks if the calling app is running in a demo user. When running in a demo user,
+     * apps can be more helpful to the user, or explain their features in more detail.
+     *
+     * @return whether the caller is a demo user.
+     */
+    public boolean isDemoUser() {
+        try {
+            return mService.isDemoUser(UserHandle.myUserId());
+        } catch (RemoteException re) {
+            throw re.rethrowFromSystemServer();
+        }
     }
 
     /**
@@ -1975,6 +1989,10 @@
         if (!supportsMultipleUsers()) {
             return false;
         }
+        // If Demo Mode is on, don't show user switcher
+        if (isDeviceInDemoMode(mContext)) {
+            return false;
+        }
         List<UserInfo> users = getUsers(true);
         if (users == null) {
            return false;
@@ -1991,6 +2009,14 @@
     }
 
     /**
+     * @hide
+     */
+    public static boolean isDeviceInDemoMode(Context context) {
+        return Settings.Global.getInt(context.getContentResolver(),
+                Settings.Global.DEVICE_DEMO_MODE, 0) > 0;
+    }
+
+    /**
      * Returns a serial number on this device for a given userHandle. User handles can be recycled
      * when deleting and creating users, but serial numbers are not reused until the device is wiped.
      * @param userHandle
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index 485bbd1..5254d35 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -20,6 +20,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.SdkConstant;
 import android.app.ActivityThread;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -45,8 +46,11 @@
 import com.android.internal.os.SomeArgs;
 import com.android.internal.util.Preconditions;
 
+import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -92,6 +96,19 @@
     /** {@hide} */
     public static final String UUID_PRIMARY_PHYSICAL = "primary_physical";
 
+
+    /**
+     * Activity Action: Allows the user to manage their storage. This activity provides the ability
+     * to free up space on the device by deleting data such as apps.
+     * <p>
+     * Input: Nothing.
+     * <p>
+     * Output: Nothing.
+     */
+    @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
+    public static final String ACTION_MANAGE_STORAGE
+            = "android.os.storage.action.MANAGE_STORAGE";
+
     /** {@hide} */
     public static final int DEBUG_FORCE_ADOPTABLE = 1 << 0;
     /** {@hide} */
@@ -115,6 +132,10 @@
     public static final int FLAG_INCLUDE_INVISIBLE = 1 << 10;
 
     private static volatile IMountService sMountService = null;
+    private static final String INTERNAL_STORAGE_SIZE_PATH =
+            "/sys/block/mmcblk0/size";
+    private static final String INTERNAL_STORAGE_SECTOR_SIZE =
+            "/sys/block/mmcblk0/queue/hw_sector_size";
 
     private final Context mContext;
     private final ContentResolver mResolver;
@@ -903,6 +924,23 @@
         return getVolumeList(UserHandle.myUserId(), FLAG_REAL_STATE | FLAG_INCLUDE_INVISIBLE)[0];
     }
 
+    /** {@hide} */
+    public long getPrimaryStorageSize() {
+        final long numberBlocks = readLong(INTERNAL_STORAGE_SIZE_PATH);
+        final long sectorSize = readLong(INTERNAL_STORAGE_SECTOR_SIZE);
+        return numberBlocks * sectorSize;
+    }
+
+    private long readLong(String path) {
+        try (final FileInputStream fis = new FileInputStream(path);
+                final BufferedReader reader = new BufferedReader(new InputStreamReader(fis));) {
+            return Long.parseLong(reader.readLine());
+        } catch (Exception e) {
+            Slog.w("Could not read " + path, e);
+            return 0;
+        }
+    }
+
     /** @removed */
     public @NonNull StorageVolume[] getVolumeList() {
         return getVolumeList(mContext.getUserId(), 0);
diff --git a/core/java/android/preference/PreferenceFragment.java b/core/java/android/preference/PreferenceFragment.java
index 3e496b6..d4a3582 100644
--- a/core/java/android/preference/PreferenceFragment.java
+++ b/core/java/android/preference/PreferenceFragment.java
@@ -189,12 +189,10 @@
                 0);
 
         ListView lv = (ListView) view.findViewById(android.R.id.list);
-        if (lv != null) {
-            Drawable divider =
-                    a.getDrawable(com.android.internal.R.styleable.PreferenceFragment_divider);
-            if (divider != null) {
-                lv.setDivider(divider);
-            }
+        if (lv != null
+                && a.hasValueOrEmpty(com.android.internal.R.styleable.PreferenceFragment_divider)) {
+            lv.setDivider(
+                    a.getDrawable(com.android.internal.R.styleable.PreferenceFragment_divider));
         }
 
         a.recycle();
diff --git a/core/java/android/print/PrintServiceRecommendationsLoader.java b/core/java/android/print/PrintServiceRecommendationsLoader.java
index bb5d065..c6a4d51 100644
--- a/core/java/android/print/PrintServiceRecommendationsLoader.java
+++ b/core/java/android/print/PrintServiceRecommendationsLoader.java
@@ -36,7 +36,7 @@
     private final @NonNull PrintManager mPrintManager;
 
     /** Handler to sequentialize the delivery of the results to the main thread */
-    private final Handler mHandler;
+    private final @NonNull Handler mHandler;
 
     /** Listens for updates to the data from the platform */
     private PrintManager.PrintServiceRecommendationsChangeListener mListener;
@@ -90,9 +90,7 @@
             mListener = null;
         }
 
-        if (mHandler != null) {
-            mHandler.removeMessages(0);
-        }
+        mHandler.removeMessages(0);
     }
 
     @Override
diff --git a/core/java/android/print/PrintServicesLoader.java b/core/java/android/print/PrintServicesLoader.java
index 60d7d66..4c9a69a 100644
--- a/core/java/android/print/PrintServicesLoader.java
+++ b/core/java/android/print/PrintServicesLoader.java
@@ -39,7 +39,7 @@
     private final @NonNull PrintManager mPrintManager;
 
     /** Handler to sequentialize the delivery of the results to the main thread */
-    private Handler mHandler;
+    private final @NonNull Handler mHandler;
 
     /** Listens for updates to the data from the platform */
     private PrintManager.PrintServicesChangeListener mListener;
@@ -54,6 +54,7 @@
     public PrintServicesLoader(@NonNull PrintManager printManager, @NonNull Context context,
             int selectionFlags) {
         super(Preconditions.checkNotNull(context));
+        mHandler = new MyHandler();
         mPrintManager = Preconditions.checkNotNull(printManager);
         mSelectionFlags = Preconditions.checkFlagsArgument(selectionFlags,
                 PrintManager.ALL_SERVICES);
@@ -75,7 +76,6 @@
 
     @Override
     protected void onStartLoading() {
-        mHandler = new MyHandler();
         mListener = new PrintManager.PrintServicesChangeListener() {
             @Override public void onPrintServicesChanged() {
                 queueNewResult();
@@ -95,10 +95,7 @@
             mListener = null;
         }
 
-        if (mHandler != null) {
-            mHandler.removeMessages(0);
-            mHandler = null;
-        }
+        mHandler.removeMessages(0);
     }
 
     @Override
@@ -119,8 +116,6 @@
 
         @Override
         public void handleMessage(Message msg) {
-            super.handleMessage(msg);
-
             if (isStarted()) {
                 deliverResult((List<PrintServiceInfo>) msg.obj);
             }
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 893eb37..fbd61cf3 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -179,6 +179,7 @@
          * <li>{@link #VOICEMAIL_TYPE}</li>
          * <li>{@link #REJECTED_TYPE}</li>
          * <li>{@link #BLOCKED_TYPE}</li>
+         * <li>{@link #ANSWERED_EXTERNALLY_TYPE}</li>
          * </ul>
          * </p>
          */
@@ -200,7 +201,6 @@
          * Call log type for a call which was answered on another device.  Used in situations where
          * a call rings on multiple devices simultaneously and it ended up being answered on a
          * device other than the current one.
-         * @hide
          */
         public static final int ANSWERED_EXTERNALLY_TYPE = 7;
 
@@ -214,10 +214,7 @@
         /** Call had video. */
         public static final int FEATURES_VIDEO = 0x1;
 
-        /**
-         * Call was pulled externally.
-         * @hide
-         */
+        /** Call was pulled externally. */
         public static final int FEATURES_PULLED_EXTERNALLY = 0x2;
 
         /**
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 293eb9b..56610ed 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1548,7 +1548,7 @@
 
         private IContentProvider lazyGetProvider(ContentResolver cr) {
             IContentProvider cp = null;
-            synchronized (this) {
+            synchronized (NameValueCache.this) {
                 cp = mContentProvider;
                 if (cp == null) {
                     cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
@@ -1575,7 +1575,7 @@
         public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
             final boolean isSelf = (userHandle == UserHandle.myUserId());
             if (isSelf) {
-                synchronized (this) {
+                synchronized (NameValueCache.this) {
                     if (mGenerationTracker != null) {
                         if (mGenerationTracker.isGenerationChanged()) {
                             if (DEBUG) {
@@ -1608,7 +1608,7 @@
                         args.putInt(CALL_METHOD_USER_KEY, userHandle);
                     }
                     boolean needsGenerationTracker = false;
-                    synchronized (this) {
+                    synchronized (NameValueCache.this) {
                         if (isSelf && mGenerationTracker == null) {
                             needsGenerationTracker = true;
                             if (args == null) {
@@ -1627,7 +1627,7 @@
                         String value = b.getString(Settings.NameValueTable.VALUE);
                         // Don't update our cache for reads of other users' data
                         if (isSelf) {
-                            synchronized (this) {
+                            synchronized (NameValueCache.this) {
                                 if (needsGenerationTracker) {
                                     MemoryIntArray array = b.getParcelable(
                                             CALL_METHOD_TRACK_GENERATION_KEY);
@@ -1644,7 +1644,7 @@
                                         }
                                         mGenerationTracker = new GenerationTracker(array, index,
                                                 generation, () -> {
-                                            synchronized (this) {
+                                            synchronized (NameValueCache.this) {
                                                 Log.e(TAG, "Error accessing generation"
                                                         + " tracker - removing");
                                                 if (mGenerationTracker != null) {
@@ -1685,7 +1685,7 @@
                 }
 
                 String value = c.moveToNext() ? c.getString(0) : null;
-                synchronized (this) {
+                synchronized (NameValueCache.this) {
                     mValues.put(name, value);
                 }
                 if (LOCAL_LOGV) {
@@ -6147,6 +6147,39 @@
                 "camera_double_tap_power_gesture_disabled";
 
         /**
+         * Whether the camera double twist gesture to flip between front and back mode should be
+         * enabled.
+         *
+         * @hide
+         */
+        public static final String CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED =
+                "camera_double_twist_to_flip_enabled";
+
+        /**
+         * Control whether Night display is currently activated.
+         * @hide
+         */
+        public static final String NIGHT_DISPLAY_ACTIVATED = "night_display_activated";
+
+        /**
+         * Control whether Night display will automatically activate/deactivate.
+         * @hide
+         */
+        public static final String NIGHT_DISPLAY_AUTO_MODE = "night_display_auto_mode";
+
+        /**
+         * Custom time when Night display is scheduled to activate.
+         * Represented as milliseconds from midnight (e.g. 79200000 == 10pm).
+         * @hide
+         */
+        public static final String NIGHT_DISPLAY_CUSTOM_START_TIME = "night_display_custom_start_time";
+
+        /**
+         * Custom time when Night display is scheduled to deactivate.
+         * Represented as milliseconds from midnight (e.g. 21600000 == 6am).
+         * @hide
+         */
+        public static final String NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time";
 
         /**
          * Behavior of twilight on the device.
@@ -6236,6 +6269,55 @@
                 "managed_profile_contact_remote_search";
 
         /**
+         * Whether or not the automatic storage manager is enabled and should run on the device.
+         *
+         * @hide
+         */
+        public static final String AUTOMATIC_STORAGE_MANAGER_ENABLED =
+                "automatic_storage_manager_enabled";
+
+        /**
+         * How many days of information for the automatic storage manager to retain on the device.
+         *
+         * @hide
+         */
+        public static final String AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN =
+                "automatic_storage_manager_days_to_retain";
+
+        /**
+         * Default number of days of information for the automatic storage manager to retain.
+         *
+         * @hide
+         */
+        public static final int AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN_DEFAULT = 90;
+
+        /**
+         * How many bytes the automatic storage manager has cleared out.
+         *
+         * @hide
+         */
+        public static final String AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED =
+                "automatic_storage_manager_bytes_cleared";
+
+
+        /**
+         * Last run time for the automatic storage manager.
+         *
+         * @hide
+         */
+        public static final String AUTOMATIC_STORAGE_MANAGER_LAST_RUN =
+                "automatic_storage_manager_last_run";
+
+
+        /**
+         * Whether SystemUI navigation keys is enabled.
+         * @hide
+         */
+        public static final String SYSTEM_NAVIGATION_KEYS_ENABLED =
+                "system_navigation_keys_enabled";
+
+
+        /**
          * This are the settings to be backed up.
          *
          * NOTE: Settings are backed up and restored in the order they appear
@@ -8473,8 +8555,6 @@
 
         /**
          * The name of the device
-         *
-         * @hide
          */
         public static final String DEVICE_NAME = "device_name";
 
@@ -8558,6 +8638,24 @@
                 "ephemeral_cookie_max_size_bytes";
 
         /**
+         * A mask applied to the ephemeral hash to generate the hash prefix.
+         * <p>
+         * Type: int
+         *
+         * @hide
+         */
+        public static final String EPHEMERAL_HASH_PREFIX_MASK = "ephemeral_hash_prefix_mask";
+
+        /**
+         * Number of hash prefixes to send during ephemeral resolution.
+         * <p>
+         * Type: int
+         *
+         * @hide
+         */
+        public static final String EPHEMERAL_HASH_PREFIX_COUNT = "ephemeral_hash_prefix_count";
+
+        /**
          * The duration for caching uninstalled ephemeral apps.
          * <p>
          * Type: long
@@ -8593,6 +8691,31 @@
         public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed";
 
         /**
+         * Whether this device is currently in retail demo mode. If true, device
+         * usage is severely limited.
+         * <p>
+         * Type: int (0 for false, 1 for true)
+         * @hide
+         */
+        public static final String DEVICE_DEMO_MODE = "device_demo_mode";
+
+        /**
+         * Retail mode specific settings. This is encoded as a key=value list, separated by commas.
+         * Ex: "user_inactivity_timeout_ms=30000,warning_dialog_timeout_ms=10000". The following
+         * keys are supported:
+         *
+         * <pre>
+         * user_inactivity_timeout_ms  (long)
+         * warning_dialog_timeout_ms   (long)
+         * </pre>
+         * <p>
+         * Type: string
+         *
+         * @hide
+         */
+        public static final String RETAIL_DEMO_MODE_CONSTANTS = "retail_demo_mode_constants";
+
+        /**
          * Settings to backup. This is here so that it's in the same place as the settings
          * keys and easy to update.
          *
@@ -8991,12 +9114,27 @@
         public static final String ENABLE_CELLULAR_ON_BOOT = "enable_cellular_on_boot";
 
         /**
+         * Whether toggling OEM unlock is disallowed. If disallowed, it is not possible to enable or
+         * disable OEM unlock.
+         * <p>
+         * Type: int (0: allow OEM unlock setting. 1: disallow OEM unlock)
+         * @hide
+         */
+        public static final String OEM_UNLOCK_DISALLOWED = "oem_unlock_disallowed";
+
+        /**
          * The maximum allowed notification enqueue rate in Hertz.
          *
          * Should be a float, and includes both posts and updates.
          * @hide
          */
         public static final String MAX_NOTIFICATION_ENQUEUE_RATE = "max_notification_enqueue_rate";
+
+        /**
+         * Whether cell is enabled/disabled
+         * @hide
+         */
+        public static final String CELL_ON = "cell_on";
     }
 
     /**
diff --git a/core/java/android/provider/VoicemailContract.java b/core/java/android/provider/VoicemailContract.java
index 6a3cc02..27b0a8b 100644
--- a/core/java/android/provider/VoicemailContract.java
+++ b/core/java/android/provider/VoicemailContract.java
@@ -25,7 +25,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.database.ContentObserver;
-import android.database.Cursor;
 import android.net.Uri;
 import android.provider.CallLog.Calls;
 import android.telecom.PhoneAccount;
@@ -107,12 +106,60 @@
     public static final String ACTION_SYNC_VOICEMAIL = "android.provider.action.SYNC_VOICEMAIL";
 
     /**
+     * Broadcast intent to inform a new visual voicemail SMS has been received. This intent will
+     * only be delivered to the voicemail client. The intent will have the following extra values:
+     *
+     * <ul>
+     *   <li><em>{@link #EXTRA_VOICEMAIL_SMS_TYPE}</em> - (String) The event type of the SMS. Common
+     *   values are "SYNC" or "STATUS"</li>
+     *   <li><em>{@link #EXTRA_VOICEMAIL_SMS_DATA}</em> - (Bundle) The fields sent by the SMS</li>
+     *   <li><em>{@link #EXTRA_VOICEMAIL_SMS_SUBID}</em> - (Integer) The subscription ID of the
+     *   phone account that received the SMS</li>
+     * </ul>
+     */
+    /** @hide */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_VOICEMAIL_SMS_RECEIVED =
+            "android.intent.action.VOICEMAIL_SMS_RECEIVED";
+
+    /**
+     * Extra included in {@link #ACTION_VOICEMAIL_SMS_RECEIVED} broadcast intents to indicate the
+     * event type of the SMS. Common values are "SYNC" or "STATUS"
+     */
+    /** @hide */
+    public static final String EXTRA_VOICEMAIL_SMS_PREFIX =
+            "com.android.voicemail.extra.VOICEMAIL_SMS_PREFIX";
+
+    /**
+     * Extra included in {@link #ACTION_VOICEMAIL_SMS_RECEIVED} broadcast intents to indicate the
+     * fields sent by the SMS
+     */
+    /** @hide */
+    public static final String EXTRA_VOICEMAIL_SMS_FIELDS =
+            "com.android.voicemail.extra.VOICEMAIL_SMS_FIELDS";
+
+    /**
+     * Extra included in {@link #ACTION_VOICEMAIL_SMS_RECEIVED} broadcast intents to indicate he
+     * subscription ID of the phone account that received the SMS.
+     */
+    /** @hide */
+    public static final String EXTRA_VOICEMAIL_SMS_SUBID =
+            "com.android.voicemail.extra.VOICEMAIL_SMS_SUBID";
+
+    /**
      * Extra included in {@link Intent#ACTION_PROVIDER_CHANGED} broadcast intents to indicate if the
      * receiving package made this change.
      */
     public static final String EXTRA_SELF_CHANGE = "com.android.voicemail.extra.SELF_CHANGE";
 
     /**
+     * Extra included in {@link #ACTION_SYNC_VOICEMAIL} broadcast intents to indicate which {@link
+     * PhoneAccountHandle} to sync.
+     */
+    public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
+            "android.provider.extra.PHONE_ACCOUNT_HANDLE";
+
+    /**
      * Name of the source package field, which must be same across all voicemail related tables.
      * This is an internal field.
      * @hide
@@ -360,6 +407,20 @@
          */
         public static final String SOURCE_PACKAGE = SOURCE_PACKAGE_FIELD;
 
+        /**
+         * The type of the source, which determines how to interpret source-specific states.
+         * Typically this will be set to the same string as
+         * {@link android.telephony.CarrierConfigManager#KEY_VVM_TYPE_STRING}. For example,
+         * "vvm_type_omtp".
+         *
+         * <P>Type: TEXT</P>
+         *
+         * @see #CONFIGURATION_STATE
+         * @see #DATA_CHANNEL_STATE
+         * @see #NOTIFICATION_CHANNEL_STATE
+         */
+        public static final String SOURCE_TYPE = "source_type";
+
         // Note: Multiple entries may exist for a single source if they are differentiated by the
         // PHONE_ACCOUNT_* fields.
 
@@ -392,21 +453,21 @@
         public static final String VOICEMAIL_ACCESS_URI = "voicemail_access_uri";
         /**
          * The configuration state of the voicemail source.
+         *
+         * <P>Negative values are reserved to the source for source-specific states, see
+         * {@link #SOURCE_TYPE}
+         *
          * <P> Possible values:
          * {@link #CONFIGURATION_STATE_OK},
          * {@link #CONFIGURATION_STATE_NOT_CONFIGURED},
          * {@link #CONFIGURATION_STATE_CAN_BE_CONFIGURED}
+         * {@link #CONFIGURATION_STATE_CONFIGURING}
+         * {@link #CONFIGURATION_STATE_FAILED}
+         * {@link #CONFIGURATION_STATE_DISABLED}
          * <P>Type: INTEGER</P>
          */
         public static final String CONFIGURATION_STATE = "configuration_state";
-        /**
-         * Value of {@link #CONFIGURATION_STATE} passed into
-         * {@link #setStatus(Context, PhoneAccountHandle, int, int, int)} to indicate that the
-         * {@link #CONFIGURATION_STATE} field is not to be changed
-         *
-         * @hide
-         */
-        public static final int CONFIGURATION_STATE_IGNORE = -1;
+
         /** Value of {@link #CONFIGURATION_STATE} to indicate an all OK configuration status. */
         public static final int CONFIGURATION_STATE_OK = 0;
         /**
@@ -422,8 +483,27 @@
          */
         public static final int CONFIGURATION_STATE_CAN_BE_CONFIGURED = 2;
         /**
+         * Value of {@link #CONFIGURATION_STATE} to indicate that visual voicemail still is being
+         * configured.
+         */
+        public static final int CONFIGURATION_STATE_CONFIGURING = 3;
+        /**
+         * Value of {@link #CONFIGURATION_STATE} to indicate that visual voicemail has failed to
+         * be configured.
+         */
+        public static final int CONFIGURATION_STATE_FAILED = 4;
+        /**
+         * Value of {@link #CONFIGURATION_STATE} to indicate that visual voicemail is disabled by
+         * the user.
+         */
+        public static final int CONFIGURATION_STATE_DISABLED = 5;
+        /**
          * The data channel state of the voicemail source. This the channel through which the source
          * pulls voicemail data from a remote server.
+         *
+         * <P>Negative values are reserved to the source for source-specific states, see
+         * {@link #SOURCE_TYPE}
+         *
          * <P> Possible values:
          * {@link #DATA_CHANNEL_STATE_OK},
          * {@link #DATA_CHANNEL_STATE_NO_CONNECTION}
@@ -431,14 +511,7 @@
          * <P>Type: INTEGER</P>
          */
         public static final String DATA_CHANNEL_STATE = "data_channel_state";
-        /**
-         * Value of {@link #DATA_CHANNEL_STATE} passed into
-         * {@link #setStatus(Context, PhoneAccountHandle, int, int, int)} to indicate that the
-         * {@link #DATA_CHANNEL_STATE} field is not to be changed
-         *
-         * @hide
-         */
-        public static final int DATA_CHANNEL_STATE_IGNORE = -1;
+
         /**
          *  Value of {@link #DATA_CHANNEL_STATE} to indicate that data channel is working fine.
          */
@@ -478,6 +551,10 @@
         /**
          * The notification channel state of the voicemail source. This is the channel through which
          * the source gets notified of new voicemails on the remote server.
+         *
+         * <P>Negative values are reserved to the source for source-specific states, see
+         * {@link #SOURCE_TYPE}
+         *
          * <P> Possible values:
          * {@link #NOTIFICATION_CHANNEL_STATE_OK},
          * {@link #NOTIFICATION_CHANNEL_STATE_NO_CONNECTION},
@@ -486,14 +563,7 @@
          * <P>Type: INTEGER</P>
          */
         public static final String NOTIFICATION_CHANNEL_STATE = "notification_channel_state";
-        /**
-         * Value of {@link #NOTIFICATION_CHANNEL_STATE} passed into
-         * {@link #setStatus(Context, PhoneAccountHandle, int, int, int)} to indicate that the
-         * {@link #NOTIFICATION_CHANNEL_STATE} field is not to be changed
-         *
-         * @hide
-         */
-        public static final int NOTIFICATION_CHANNEL_STATE_IGNORE = -1;
+
         /**
          * Value of {@link #NOTIFICATION_CHANNEL_STATE} to indicate that the notification channel is
          * working fine.
@@ -543,67 +613,5 @@
             return Status.CONTENT_URI.buildUpon()
                     .appendQueryParameter(PARAM_KEY_SOURCE_PACKAGE, packageName).build();
         }
-
-        /**
-         * A helper method to set the status of a voicemail source.
-         *
-         * @param context The context from the package calling the method. This will be the source.
-         * @param accountHandle The handle for the account the source is associated with.
-         * @param configurationState See {@link Status#CONFIGURATION_STATE}
-         * @param dataChannelState See {@link Status#DATA_CHANNEL_STATE}
-         * @param notificationChannelState See {@link Status#NOTIFICATION_CHANNEL_STATE}
-         *
-         * @hide
-         */
-        public static void setStatus(Context context, PhoneAccountHandle accountHandle,
-                int configurationState, int dataChannelState, int notificationChannelState) {
-            ContentValues values = new ContentValues();
-            values.put(Status.PHONE_ACCOUNT_COMPONENT_NAME,
-                    accountHandle.getComponentName().flattenToString());
-            values.put(Status.PHONE_ACCOUNT_ID, accountHandle.getId());
-            if(configurationState != CONFIGURATION_STATE_IGNORE) {
-                values.put(Status.CONFIGURATION_STATE, configurationState);
-            }
-            if(dataChannelState != DATA_CHANNEL_STATE_IGNORE) {
-                values.put(Status.DATA_CHANNEL_STATE, dataChannelState);
-            }
-            if(notificationChannelState != NOTIFICATION_CHANNEL_STATE_IGNORE) {
-                values.put(Status.NOTIFICATION_CHANNEL_STATE, notificationChannelState);
-            }
-            ContentResolver contentResolver = context.getContentResolver();
-            Uri statusUri = buildSourceUri(context.getPackageName());
-            contentResolver.insert(statusUri, values);
-        }
-
-        /**
-         * A helper method to set the quota of a voicemail source. Unit is unspecified.
-         *
-         * @param context The context from the package calling the method. This will be the source.
-         * @param accountHandle The handle for the account the source is associated with.
-         * @param occupied See {@link Status#QUOTA_OCCUPIED}
-         * @param total See {@link Status#QUOTA_TOTAL}
-         *
-         * @hide
-         */
-        public static void setQuota(Context context, PhoneAccountHandle accountHandle, int occupied,
-                int total) {
-            if (occupied == QUOTA_UNAVAILABLE && total == QUOTA_UNAVAILABLE) {
-                return;
-            }
-            ContentValues values = new ContentValues();
-            values.put(Status.PHONE_ACCOUNT_COMPONENT_NAME,
-                    accountHandle.getComponentName().flattenToString());
-            values.put(Status.PHONE_ACCOUNT_ID, accountHandle.getId());
-            if (occupied != QUOTA_UNAVAILABLE) {
-                values.put(Status.QUOTA_OCCUPIED,occupied);
-            }
-            if (total != QUOTA_UNAVAILABLE) {
-                values.put(Status.QUOTA_TOTAL,total);
-            }
-
-            ContentResolver contentResolver = context.getContentResolver();
-            Uri statusUri = buildSourceUri(context.getPackageName());
-            contentResolver.insert(statusUri, values);
-        }
     }
 }
diff --git a/core/java/android/service/carrier/CarrierIdentifier.java b/core/java/android/service/carrier/CarrierIdentifier.java
index a70c24d..b47e872 100644
--- a/core/java/android/service/carrier/CarrierIdentifier.java
+++ b/core/java/android/service/carrier/CarrierIdentifier.java
@@ -126,4 +126,13 @@
         mGid1 = in.readString();
         mGid2 = in.readString();
     }
+
+    /** @hide */
+    public interface MatchType {
+        int ALL = 0;
+        int SPN = 1;
+        int IMSI_PREFIX = 2;
+        int GID1 = 3;
+        int GID2 = 4;
+    }
 }
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index de8133b..06d87f8 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -55,6 +55,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
 import android.view.WindowManagerGlobal;
 
 import java.io.FileDescriptor;
@@ -628,9 +629,9 @@
                     mCurWindowFlags = mWindowFlags;
                     mLayout.flags = mWindowFlags
                             | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+                            | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR
                             | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-                            | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-                            ;
+                            | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
                     mCurWindowPrivateFlags = mWindowPrivateFlags;
                     mLayout.privateFlags = mWindowPrivateFlags;
 
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index 316c7e3..8823605 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -1941,6 +1941,26 @@
     }
 
     /**
+     * Force the transition to move to its end state, ending all the animators.
+     *
+     * @hide
+     */
+    void forceToEnd(ViewGroup sceneRoot) {
+        ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
+        int numOldAnims = runningAnimators.size();
+        if (sceneRoot != null) {
+            WindowId windowId = sceneRoot.getWindowId();
+            for (int i = numOldAnims - 1; i >= 0; i--) {
+                AnimationInfo info = runningAnimators.valueAt(i);
+                if (info.view != null && windowId != null && windowId.equals(info.windowId)) {
+                    Animator anim = runningAnimators.keyAt(i);
+                    anim.end();
+                }
+            }
+        }
+    }
+
+    /**
      * This method cancels a transition that is currently running.
      *
      * @hide
diff --git a/core/java/android/transition/TransitionManager.java b/core/java/android/transition/TransitionManager.java
index 71c8099..f2c871e3 100644
--- a/core/java/android/transition/TransitionManager.java
+++ b/core/java/android/transition/TransitionManager.java
@@ -440,7 +440,7 @@
             ArrayList<Transition> copy = new ArrayList(runningTransitions);
             for (int i = copy.size() - 1; i >= 0; i--) {
                 final Transition transition = copy.get(i);
-                transition.end();
+                transition.forceToEnd(sceneRoot);
             }
         }
 
diff --git a/core/java/android/transition/TransitionSet.java b/core/java/android/transition/TransitionSet.java
index 583dc0f..a41fe64 100644
--- a/core/java/android/transition/TransitionSet.java
+++ b/core/java/android/transition/TransitionSet.java
@@ -16,8 +16,6 @@
 
 package android.transition;
 
-import com.android.internal.R;
-
 import android.animation.TimeInterpolator;
 import android.content.Context;
 import android.content.res.TypedArray;
@@ -26,6 +24,8 @@
 import android.view.View;
 import android.view.ViewGroup;
 
+import com.android.internal.R;
+
 import java.util.ArrayList;
 
 /**
@@ -498,6 +498,16 @@
         }
     }
 
+    /** @hide */
+    @Override
+    void forceToEnd(ViewGroup sceneRoot) {
+        super.forceToEnd(sceneRoot);
+        int numTransitions = mTransitions.size();
+        for (int i = 0; i < numTransitions; ++i) {
+            mTransitions.get(i).forceToEnd(sceneRoot);
+        }
+    }
+
     @Override
     TransitionSet setSceneRoot(ViewGroup sceneRoot) {
         super.setSceneRoot(sceneRoot);
diff --git a/core/java/android/util/ArraySet.java b/core/java/android/util/ArraySet.java
index d39e91f..1e765b6 100644
--- a/core/java/android/util/ArraySet.java
+++ b/core/java/android/util/ArraySet.java
@@ -402,11 +402,14 @@
             throw new IllegalStateException("Array is full");
         }
         if (index > 0 && mHashes[index - 1] > hash) {
-            RuntimeException e = new RuntimeException("here");
-            e.fillInStackTrace();
-            Log.w(TAG, "New hash " + hash
-                    + " is before end of array hash " + mHashes[index - 1]
-                    + " at index " + index, e);
+            // Cannot optimize since it would break the sorted order - fallback to add()
+            if (DEBUG) {
+                RuntimeException e = new RuntimeException("here");
+                e.fillInStackTrace();
+                Log.w(TAG, "New hash " + hash
+                        + " is before end of array hash " + mHashes[index - 1]
+                        + " at index " + index, e);
+            }
             add(value);
             return;
         }
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index d201adef..f4db4d6 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -66,9 +66,23 @@
      * {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target,
      * instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them.
      */
+    public static final int DENSITY_260 = 260;
+
+    /**
+     * Intermediate density for screens that sit between {@link #DENSITY_HIGH} (240dpi) and
+     * {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target,
+     * instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them.
+     */
     public static final int DENSITY_280 = 280;
 
     /**
+     * Intermediate density for screens that sit between {@link #DENSITY_HIGH} (240dpi) and
+     * {@link #DENSITY_XHIGH} (320dpi). This is not a density that applications should target,
+     * instead relying on the system to scale their {@link #DENSITY_XHIGH} assets for them.
+     */
+    public static final int DENSITY_300 = 300;
+
+    /**
      * Standard quantized DPI for extra-high-density screens.
      */
     public static final int DENSITY_XHIGH = 320;
@@ -79,6 +93,14 @@
      * This is not a density that applications should target, instead relying
      * on the system to scale their {@link #DENSITY_XXHIGH} assets for them.
      */
+    public static final int DENSITY_340 = 340;
+
+    /**
+     * Intermediate density for screens that sit somewhere between
+     * {@link #DENSITY_XHIGH} (320 dpi) and {@link #DENSITY_XXHIGH} (480 dpi).
+     * This is not a density that applications should target, instead relying
+     * on the system to scale their {@link #DENSITY_XXHIGH} assets for them.
+     */
     public static final int DENSITY_360 = 360;
 
     /**
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 2f2fe57..8c49009 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -463,20 +463,29 @@
 
     /**
      * Gets the size of the display, in pixels.
+     * Value returned by this method does not necessarily represent the actual raw size
+     * (native resolution) of the display.
      * <p>
-     * Note that this value should <em>not</em> be used for computing layouts,
-     * since a device will typically have screen decoration (such as a status bar)
-     * along the edges of the display that reduce the amount of application
-     * space available from the size returned here.  Layouts should instead use
-     * the window size.
+     * 1. The returned size may be adjusted to exclude certain system decor elements
+     * that are always visible.
      * </p><p>
-     * The size is adjusted based on the current rotation of the display.
-     * </p><p>
-     * The size returned by this method does not necessarily represent the
-     * actual raw size (native resolution) of the display.  The returned size may
-     * be adjusted to exclude certain system decoration elements that are always visible.
-     * It may also be scaled to provide compatibility with older applications that
+     * 2. It may be scaled to provide compatibility with older applications that
      * were originally designed for smaller displays.
+     * </p><p>
+     * 3. It can be different depending on the WindowManager to which the display belongs.
+     * </p><p>
+     * - If requested from non-Activity context (e.g. Application context via
+     * {@code (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE)})
+     * it will report the size of the entire display based on current rotation and with subtracted
+     * system decoration areas.
+     * </p><p>
+     * - If requested from activity (either using {@code getWindowManager()} or
+     * {@code (WindowManager) getSystemService(Context.WINDOW_SERVICE)}) resulting size will
+     * correspond to current app window size. In this case it can be smaller than physical size in
+     * multi-window mode.
+     * </p><p>
+     * Typically for the purposes of layout apps should make a request from activity context
+     * to obtain size available for the app content.
      * </p>
      *
      * @param outSize A {@link Point} object to receive the size information.
@@ -785,13 +794,16 @@
      * were originally designed for smaller displays.
      * </p><p>
      * 3. It can be different depending on the WindowManager to which the display belongs.
-     * <pre>
+     * </p><p>
      * - If requested from non-Activity context (e.g. Application context via
      * {@code (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE)})
-     * metrics will report real size of the display based on current rotation.
-     * - If requested from activity resulting metrics will correspond to current window metrics.
-     * In this case the size can be smaller than physical size in multi-window mode.
-     * </pre>
+     * metrics will report the size of the entire display based on current rotation and with
+     * subtracted system decoration areas.
+     * </p><p>
+     * - If requested from activity (either using {@code getWindowManager()} or
+     * {@code (WindowManager) getSystemService(Context.WINDOW_SERVICE)}) resulting metrics will
+     * correspond to current app window metrics. In this case the size can be smaller than physical
+     * size in multi-window mode.
      * </p>
      *
      * @param outMetrics A {@link DisplayMetrics} object to receive the metrics.
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 72126d0..e3ff54d 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -112,7 +112,7 @@
             int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId,
             int configChanges, boolean voiceInteraction, boolean launchTaskBehind,
             in Rect taskBounds, in Configuration configuration, int taskResizeMode,
-            boolean alwaysFocusable, boolean homeTask, int targetSdkVersion);
+            boolean alwaysFocusable, boolean homeTask, int targetSdkVersion, int rotationAnimationHint);
     /**
      *
      * @param token The token we are adding to the input task Id.
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 636384c..990d553 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -796,8 +796,16 @@
     public static final int KEYCODE_COPY = 278;
     /** Key code constant: Paste key. */
     public static final int KEYCODE_PASTE = 279;
+    /** Key code constant: Consumed by the system for navigation up */
+    public static final int KEYCODE_SYSTEM_NAVIGATION_UP = 280;
+    /** Key code constant: Consumed by the system for navigation down */
+    public static final int KEYCODE_SYSTEM_NAVIGATION_DOWN = 281;
+    /** Key code constant: Consumed by the system for navigation left*/
+    public static final int KEYCODE_SYSTEM_NAVIGATION_LEFT = 282;
+    /** Key code constant: Consumed by the system for navigation right */
+    public static final int KEYCODE_SYSTEM_NAVIGATION_RIGHT = 283;
 
-    private static final int LAST_KEYCODE = KEYCODE_PASTE;
+    private static final int LAST_KEYCODE = KEYCODE_SYSTEM_NAVIGATION_RIGHT;
 
     // NOTE: If you add a new keycode here you must also add it to:
     //  isSystem()
@@ -1844,6 +1852,10 @@
             case KeyEvent.KEYCODE_BRIGHTNESS_DOWN:
             case KeyEvent.KEYCODE_BRIGHTNESS_UP:
             case KeyEvent.KEYCODE_MEDIA_AUDIO_TRACK:
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP:
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN:
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_LEFT:
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_RIGHT:
                 return true;
         }
 
@@ -2929,11 +2941,13 @@
 
     public static final Parcelable.Creator<KeyEvent> CREATOR
             = new Parcelable.Creator<KeyEvent>() {
+        @Override
         public KeyEvent createFromParcel(Parcel in) {
             in.readInt(); // skip token, we already know this is a KeyEvent
             return KeyEvent.createFromParcelBody(in);
         }
 
+        @Override
         public KeyEvent[] newArray(int size) {
             return new KeyEvent[size];
         }
@@ -2957,6 +2971,7 @@
         mEventTime = in.readLong();
     }
 
+    @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeInt(PARCEL_TOKEN_KEY_EVENT);
 
diff --git a/core/java/android/view/RenderNode.java b/core/java/android/view/RenderNode.java
index ab4cbcf..0164fcd 100644
--- a/core/java/android/view/RenderNode.java
+++ b/core/java/android/view/RenderNode.java
@@ -793,12 +793,12 @@
         return mOwningView != null && mOwningView.mAttachInfo != null;
     }
 
-    public void addAnimator(AnimatedVectorDrawable.VectorDrawableAnimatorRT animatorSet) {
+    public void registerVectorDrawableAnimator(
+            AnimatedVectorDrawable.VectorDrawableAnimatorRT animatorSet) {
         if (mOwningView == null || mOwningView.mAttachInfo == null) {
             throw new IllegalStateException("Cannot start this animator on a detached view!");
         }
-        nAddAnimator(mNativeRenderNode, animatorSet.getAnimatorNativePtr());
-        mOwningView.mAttachInfo.mViewRootImpl.registerAnimatingRenderNode(this);
+        mOwningView.mAttachInfo.mViewRootImpl.registerVectorDrawableAnimator(animatorSet);
     }
 
     public void endAllAnimators() {
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index 7da849a..286e097 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -58,6 +58,7 @@
 
     private static native long nativeGetNextFrameNumber(long nativeObject);
     private static native int nativeSetScalingMode(long nativeObject, int scalingMode);
+    private static native void nativeSetBuffersTransform(long nativeObject, long transform);
 
     public static final Parcelable.Creator<Surface> CREATOR =
             new Parcelable.Creator<Surface>() {
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 415e70c..f1abca8 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -51,7 +51,7 @@
 
     private static native void nativeSetLayer(long nativeObject, int zorder);
     private static native void nativeSetPosition(long nativeObject, float x, float y);
-    private static native void nativeSetPositionAppliesWithResize(long nativeObject);
+    private static native void nativeSetGeometryAppliesWithResize(long nativeObject);
     private static native void nativeSetSize(long nativeObject, int w, int h);
     private static native void nativeSetTransparentRegionHint(long nativeObject, Region region);
     private static native void nativeSetAlpha(long nativeObject, float alpha);
@@ -89,6 +89,8 @@
     private static native void nativeSetOverrideScalingMode(long nativeObject,
             int scalingMode);
     private static native IBinder nativeGetHandle(long nativeObject);
+    private static native boolean nativeGetTransformToDisplayInverse(long nativeObject);
+
     private static native Display.HdrCapabilities nativeGetHdrCapabilities(IBinder displayToken);
 
 
@@ -393,6 +395,10 @@
         return nativeGetHandle(mNativeObject);
     }
 
+    public boolean getTransformToDisplayInverse() {
+        return nativeGetTransformToDisplayInverse(mNativeObject);
+    }
+
     /** flag the transaction as an animation */
     public static void setAnimationTransaction() {
         nativeSetAnimationTransaction();
@@ -409,13 +415,15 @@
     }
 
     /**
-     * If the size changes in this transaction, position updates specified
+     * If the buffer size changes in this transaction, position and crop updates specified
      * in this transaction will not complete until a buffer of the new size
-     * arrives.
+     * arrives. As transform matrix and size are already frozen in this fashion,
+     * this enables totally freezing the surface until the resize has completed
+     * (at which point the geometry influencing aspects of this transaction will then occur)
      */
-    public void setPositionAppliesWithResize() {
+    public void setGeometryAppliesWithResize() {
         checkNotReleased();
-        nativeSetPositionAppliesWithResize(mNativeObject);
+        nativeSetGeometryAppliesWithResize(mNativeObject);
     }
 
     public void setSize(int w, int h) {
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 203b825..4818910 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -499,7 +499,7 @@
                               | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                               | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
                               ;
-                if (!creating && !force && !mUpdateWindowNeeded && !sizeChanged) {
+                if (!creating && !force && !sizeChanged) {
                     mLayout.privateFlags |=
                             WindowManager.LayoutParams.PRIVATE_FLAG_PRESERVE_GEOMETRY;
                 } else {
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index e650d95..e129a06 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -16,6 +16,7 @@
 
 package android.view;
 
+import android.app.ActivityManagerNative;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.content.Context;
@@ -23,6 +24,7 @@
 import android.graphics.Bitmap;
 import android.graphics.Point;
 import android.graphics.Rect;
+import android.graphics.drawable.AnimatedVectorDrawable;
 import android.os.Binder;
 import android.os.Handler;
 import android.os.IBinder;
@@ -881,6 +883,12 @@
         nRegisterAnimatingRenderNode(mRootNode.mNativeRenderNode, animator.mNativeRenderNode);
     }
 
+    void registerVectorDrawableAnimator(
+        AnimatedVectorDrawable.VectorDrawableAnimatorRT animator) {
+        nRegisterVectorDrawableAnimator(mRootNode.mNativeRenderNode,
+                animator.getAnimatorNativePtr());
+    }
+
     public void serializeDisplayListTree() {
         nSerializeDisplayListTree(mNativeProxy);
     }
@@ -910,10 +918,20 @@
         synchronized void init(Context context, long renderProxy) {
             if (mInitialized) return;
             mInitialized = true;
+            initSched(context, renderProxy);
             initGraphicsStats(context, renderProxy);
             initAssetAtlas(context, renderProxy);
         }
 
+        private static void initSched(Context context, long renderProxy) {
+            try {
+                int tid = nGetRenderThreadTid(renderProxy);
+                ActivityManagerNative.getDefault().setRenderThread(tid);
+            } catch (Throwable t) {
+                Log.w(LOG_TAG, "Failed to set scheduler for RenderThread", t);
+            }
+        }
+
         private static void initGraphicsStats(Context context, long renderProxy) {
             try {
                 IBinder binder = ServiceManager.getService("graphicsstats");
@@ -972,6 +990,7 @@
 
     private static native void nSetAtlas(long nativeProxy, GraphicBuffer buffer, long[] map);
     private static native void nSetProcessStatsBuffer(long nativeProxy, int fd);
+    private static native int nGetRenderThreadTid(long nativeProxy);
 
     private static native long nCreateRootRenderNode();
     private static native long nCreateProxy(boolean translucent, long rootRenderNode);
@@ -992,6 +1011,7 @@
     private static native int nSyncAndDrawFrame(long nativeProxy, long[] frameInfo, int size);
     private static native void nDestroy(long nativeProxy, long rootRenderNode);
     private static native void nRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode);
+    private static native void nRegisterVectorDrawableAnimator(long rootRenderNode, long animator);
 
     private static native void nInvokeFunctor(long functor, boolean waitForCompletion);
 
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 195786d..c427522 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -44,6 +44,7 @@
 import android.graphics.PorterDuff;
 import android.graphics.Rect;
 import android.graphics.Region;
+import android.graphics.drawable.AnimatedVectorDrawable;
 import android.graphics.drawable.Drawable;
 import android.hardware.display.DisplayManager;
 import android.hardware.display.DisplayManager.DisplayListener;
@@ -822,6 +823,13 @@
         }
     }
 
+    public void registerVectorDrawableAnimator(
+            AnimatedVectorDrawable.VectorDrawableAnimatorRT animator) {
+        if (mAttachInfo.mHardwareRenderer != null) {
+            mAttachInfo.mHardwareRenderer.registerVectorDrawableAnimator(animator);
+        }
+    }
+
     private void enableHardwareAcceleration(WindowManager.LayoutParams attrs) {
         mAttachInfo.mHardwareAccelerated = false;
         mAttachInfo.mHardwareAccelerationRequested = false;
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index e6f5b83..9a8c8a8 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -416,6 +416,8 @@
          * screen with other application windows.
          */
         public boolean isInMultiWindowMode();
+
+        public int getRotationAnimationHint();
     }
 
     /**
@@ -1410,4 +1412,6 @@
      * Called when the configuration has changed, and it's safe to load new values from resources.
      */
     public void onConfigurationChanged();
+
+    public boolean shouldRotateSeamlessly(int oldRotation, int newRotation);
 }
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index 89dec2d..38962a3 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -851,4 +851,11 @@
         
         endBatchEdit();
     }
+
+    /**
+     * The default implementation does nothing.
+     */
+    public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
+        return false;
+    }
 }
diff --git a/core/java/android/view/inputmethod/EditorInfo.java b/core/java/android/view/inputmethod/EditorInfo.java
index 7b7ccae..8038089 100644
--- a/core/java/android/view/inputmethod/EditorInfo.java
+++ b/core/java/android/view/inputmethod/EditorInfo.java
@@ -25,6 +25,8 @@
 import android.text.TextUtils;
 import android.util.Printer;
 
+import java.util.Arrays;
+
 /**
  * An EditorInfo describes several attributes of a text editing object
  * that an input method is communicating with (typically an EditText), most
@@ -363,6 +365,18 @@
     @Nullable
     public LocaleList hintLocales = null;
 
+
+    /**
+     * List of acceptable MIME types for
+     * {@link InputConnection#commitContent(InputContentInfo, int, Bundle)}.
+     *
+     * <p>{@code null} or an empty array means that
+     * {@link InputConnection#commitContent(InputContentInfo, int, Bundle)} is not supported in this
+     * editor.</p>
+     */
+    @Nullable
+    public String[] contentMimeTypes = null;
+
     /**
      * Ensure that the data in this EditorInfo is compatible with an application
      * that was developed against the given target API version.  This can
@@ -418,6 +432,7 @@
                 + " fieldName=" + fieldName);
         pw.println(prefix + "extras=" + extras);
         pw.println(prefix + "hintLocales=" + hintLocales);
+        pw.println(prefix + "contentMimeTypes=" + Arrays.toString(contentMimeTypes));
     }
 
     /**
@@ -446,6 +461,7 @@
         } else {
             LocaleList.getEmptyLocaleList().writeToParcel(dest, flags);
         }
+        dest.writeStringArray(contentMimeTypes);
     }
 
     /**
@@ -471,6 +487,7 @@
                     res.extras = source.readBundle();
                     LocaleList hintLocales = LocaleList.CREATOR.createFromParcel(source);
                     res.hintLocales = hintLocales.isEmpty() ? null : hintLocales;
+                    res.contentMimeTypes = source.readStringArray();
                     return res;
                 }
 
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index 9f66429..07910b6 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -16,6 +16,8 @@
 
 package android.view.inputmethod;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.os.Bundle;
 import android.os.Handler;
 import android.view.KeyCharacterMap;
@@ -836,4 +838,53 @@
      * <p>Note: This does nothing when called from input methods.</p>
      */
     public void closeConnection();
+
+    /**
+     * When this flag is used, the editor will be able to request read access to the content URI
+     * contained in the {@link InputContentInfo} object.
+     *
+     * <p>Make sure that the content provider owning the Uri sets the
+     * {@link android.R.styleable#AndroidManifestProvider_grantUriPermissions
+     * grantUriPermissions} attribute in its manifest or included the
+     * {@link android.R.styleable#AndroidManifestGrantUriPermission
+     * &lt;grant-uri-permissions&gt;} tag. Otherwise {@link InputContentInfo#requestPermission()}
+     * can fail.</p>
+     *
+     * <p>Although calling this API is allowed only for the IME that is currently selected, the
+     * client is able to request a temporary read-only access even after the current IME is switched
+     * to any other IME as long as the client keeps {@link InputContentInfo} object.</p>
+     **/
+    public static int INPUT_CONTENT_GRANT_READ_URI_PERMISSION =
+            android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION;  // 0x00000001
+
+    /**
+     * Called by the input method to commit a content such as PNG image to the editor.
+     *
+     * <p>In order to avoid variety of compatibility issues, this focuses on a simple use case,
+     * where we expect editors and IMEs work cooperatively as follows:</p>
+     * <ul>
+     *     <li>Editor must keep {@link EditorInfo#contentMimeTypes} to be {@code null} if it does
+     *     not support this method at all.</li>
+     *     <li>Editor can ignore this request when the MIME type specified in
+     *     {@code inputContentInfo} does not match to any of {@link EditorInfo#contentMimeTypes}.
+     *     </li>
+     *     <li>Editor can ignore the cursor position when inserting the provided context.</li>
+     *     <li>Editor can return {@code true} asynchronously, even before it starts loading the
+     *     content.</li>
+     *     <li>Editor should provide a way to delete the content inserted by this method, or revert
+     *     the effect caused by this method.</li>
+     *     <li>IME should not call this method when there is any composing text, in case calling
+     *     this method causes focus change.</li>
+     *     <li>IME should grant a permission for the editor to read the content. See
+     *     {@link EditorInfo#packageName} about how to obtain the package name of the editor.</li>
+     * </ul>
+     *
+     * @param inputContentInfo Content to be inserted.
+     * @param flags {@code 0} or {@link #INPUT_CONTENT_GRANT_READ_URI_PERMISSION}.
+     * @param opts optional bundle data. This can be {@code null}.
+     * @return {@code true} if this request is accepted by the application, no matter if the request
+     * is already handled or still being handled in background.
+     */
+    public boolean commitContent(@NonNull InputContentInfo inputContentInfo, int flags,
+            @Nullable Bundle opts);
 }
diff --git a/core/java/android/view/inputmethod/InputConnectionInspector.java b/core/java/android/view/inputmethod/InputConnectionInspector.java
index 118a61f..2b292bb 100644
--- a/core/java/android/view/inputmethod/InputConnectionInspector.java
+++ b/core/java/android/view/inputmethod/InputConnectionInspector.java
@@ -19,6 +19,7 @@
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.os.Bundle;
 
 import java.lang.annotation.Retention;
 import java.lang.reflect.Method;
@@ -41,6 +42,8 @@
             MissingMethodFlags.REQUEST_CURSOR_UPDATES,
             MissingMethodFlags.DELETE_SURROUNDING_TEXT_IN_CODE_POINTS,
             MissingMethodFlags.GET_HANDLER,
+            MissingMethodFlags.CLOSE_CONNECTION,
+            MissingMethodFlags.COMMIT_CONTENT,
     })
     public @interface MissingMethodFlags {
         /**
@@ -78,6 +81,11 @@
          * {@link android.os.Build.VERSION_CODES#N} and later.
          */
         int CLOSE_CONNECTION = 1 << 6;
+        /**
+         * {@link InputConnection#commitContent(InputContentInfo, int, Bundle)} is available in
+         * {@link android.os.Build.VERSION_CODES#N} MR-1 and later.
+         */
+        int COMMIT_CONTENT = 1 << 7;
     }
 
     private static final Map<Class, Integer> sMissingMethodsMap = Collections.synchronizedMap(
@@ -127,6 +135,9 @@
         if (!hasCloseConnection(clazz)) {
             flags |= MissingMethodFlags.CLOSE_CONNECTION;
         }
+        if (!hasCommitContent(clazz)) {
+            flags |= MissingMethodFlags.COMMIT_CONTENT;
+        }
         sMissingMethodsMap.put(clazz, flags);
         return flags;
     }
@@ -195,6 +206,16 @@
         }
     }
 
+    private static boolean hasCommitContent(@NonNull final Class clazz) {
+        try {
+            final Method method = clazz.getMethod("commitContent", InputContentInfo.class,
+                    int.class, Bundle.class);
+            return !Modifier.isAbstract(method.getModifiers());
+        } catch (NoSuchMethodException e) {
+            return false;
+        }
+    }
+
     public static String getMissingMethodFlagsAsString(@MissingMethodFlags final int flags) {
         final StringBuilder sb = new StringBuilder();
         boolean isEmpty = true;
@@ -242,6 +263,12 @@
             }
             sb.append("closeConnection()");
         }
+        if ((flags & MissingMethodFlags.COMMIT_CONTENT) != 0) {
+            if (!isEmpty) {
+                sb.append(",");
+            }
+            sb.append("commitContent(InputContentInfo, Bundle)");
+        }
         return sb.toString();
     }
 }
diff --git a/core/java/android/view/inputmethod/InputConnectionWrapper.java b/core/java/android/view/inputmethod/InputConnectionWrapper.java
index e743f62..317730c 100644
--- a/core/java/android/view/inputmethod/InputConnectionWrapper.java
+++ b/core/java/android/view/inputmethod/InputConnectionWrapper.java
@@ -269,4 +269,12 @@
     public void closeConnection() {
         mTarget.closeConnection();
     }
+
+    /**
+     * {@inheritDoc}
+     * @throws NullPointerException if the target is {@code null}.
+     */
+    public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
+        return mTarget.commitContent(inputContentInfo, flags, opts);
+    }
 }
diff --git a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl b/core/java/android/view/inputmethod/InputContentInfo.aidl
similarity index 73%
copy from telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
copy to core/java/android/view/inputmethod/InputContentInfo.aidl
index b7e78d1..1afeee3b 100644
--- a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
+++ b/core/java/android/view/inputmethod/InputContentInfo.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright 2016, The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,9 +14,6 @@
  * limitations under the License.
  */
 
-package android.telecom;
+package android.view.inputmethod;
 
-/**
- * {@hide}
- */
-parcelable ParcelableCallAnalytics;
+parcelable InputContentInfo;
diff --git a/core/java/android/view/inputmethod/InputContentInfo.java b/core/java/android/view/inputmethod/InputContentInfo.java
new file mode 100644
index 0000000..b39705e
--- /dev/null
+++ b/core/java/android/view/inputmethod/InputContentInfo.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package android.view.inputmethod;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.ClipDescription;
+import android.net.Uri;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.RemoteException;
+
+import com.android.internal.inputmethod.IInputContentUriToken;
+
+import java.security.InvalidParameterException;
+
+/**
+ * A container object with which input methods can send content files to the target application.
+ */
+public final class InputContentInfo implements Parcelable {
+
+    @NonNull
+    private final Uri mContentUri;
+    @NonNull
+    private final ClipDescription mDescription;
+    @Nullable
+    private final Uri mLinkUri;
+    @NonNull
+    private IInputContentUriToken mUriToken;
+
+    /**
+     * Constructs {@link InputContentInfo} object only with mandatory data.
+     *
+     * @param contentUri Content URI to be exported from the input method.
+     * This cannot be {@code null}.
+     * @param description A {@link ClipDescription} object that contains the metadata of
+     * {@code contentUri} such as MIME type(s). This object cannot be {@code null}. Also
+     * {@link ClipDescription#getLabel()} should be describing the content specified by
+     * {@code contentUri} for accessibility reasons.
+     */
+    public InputContentInfo(@NonNull Uri contentUri, @NonNull ClipDescription description) {
+        this(contentUri, description, null /* link Uri */);
+    }
+
+    /**
+     * Constructs {@link InputContentInfo} object with additional link URI.
+     *
+     * @param contentUri Content URI to be exported from the input method.
+     * This cannot be {@code null}.
+     * @param description A {@link ClipDescription} object that contains the metadata of
+     * {@code contentUri} such as MIME type(s). This object cannot be {@code null}. Also
+     * {@link ClipDescription#getLabel()} should be describing the content specified by
+     * {@code contentUri} for accessibility reasons.
+     * @param linkUri An optional {@code http} or {@code https} URI. The editor author may provide
+     * a way to navigate the user to the specified web page if this is not {@code null}.
+     * @throws InvalidParameterException if any invalid parameter is specified.
+     */
+    public InputContentInfo(@NonNull Uri contentUri, @NonNull ClipDescription description,
+            @Nullable Uri linkUri) {
+        validateInternal(contentUri, description, linkUri, true /* throwException */);
+        mContentUri = contentUri;
+        mDescription = description;
+        mLinkUri = linkUri;
+    }
+
+    /**
+     * @return {@code true} if all the fields are valid.
+     * @hide
+     */
+    public boolean validate() {
+        return validateInternal(mContentUri, mDescription, mLinkUri, false /* throwException */);
+    }
+
+    /**
+     * Constructs {@link InputContentInfo} object with additional link URI.
+     *
+     * @param contentUri Content URI to be exported from the input method.
+     * This cannot be {@code null}.
+     * @param description A {@link ClipDescription} object that contains the metadata of
+     * {@code contentUri} such as MIME type(s). This object cannot be {@code null}. Also
+     * {@link ClipDescription#getLabel()} should be describing the content specified by
+     * {@code contentUri} for accessibility reasons.
+     * @param linkUri An optional {@code http} or {@code https} URI. The editor author may provide
+     * a way to navigate the user to the specified web page if this is not {@code null}.
+     * @param throwException {@code true} if this method should throw an
+     * {@link InvalidParameterException}.
+     * @throws InvalidParameterException if any invalid parameter is specified.
+     */
+    private static boolean validateInternal(@NonNull Uri contentUri,
+            @NonNull ClipDescription description, @Nullable Uri linkUri, boolean throwException) {
+        if (contentUri == null) {
+            if (throwException) {
+                throw new NullPointerException("contentUri");
+            }
+            return false;
+        }
+        if (description == null) {
+            if (throwException) {
+                throw new NullPointerException("description");
+            }
+            return false;
+        }
+        final String contentUriScheme = contentUri.getScheme();
+        if (!"content".equals(contentUriScheme)) {
+            if (throwException) {
+                throw new InvalidParameterException("contentUri must have content scheme");
+            }
+            return false;
+        }
+        if (linkUri != null) {
+            final String scheme = linkUri.getScheme();
+            if (scheme == null ||
+                    (!scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https"))) {
+                if (throwException) {
+                    throw new InvalidParameterException(
+                            "linkUri must have either http or https scheme");
+                }
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * @return Content URI with which the content can be obtained.
+     */
+    @NonNull
+    public Uri getContentUri() { return mContentUri; }
+
+    /**
+     * @return {@link ClipDescription} object that contains the metadata of {@code #getContentUri()}
+     * such as MIME type(s). {@link ClipDescription#getLabel()} can be used for accessibility
+     * purpose.
+     */
+    @NonNull
+    public ClipDescription getDescription() { return mDescription; }
+
+    /**
+     * @return An optional {@code http} or {@code https} URI that is related to this content.
+     */
+    @Nullable
+    public Uri getLinkUri() { return mLinkUri; }
+
+    void setUriToken(IInputContentUriToken token) {
+        if (mUriToken != null) {
+            throw new IllegalStateException("URI token is already set");
+        }
+        mUriToken = token;
+    }
+
+    /**
+     * Requests a temporary read-only access permission for content URI associated with this object.
+     *
+     * <p>Does nothing if the temporary permission is already granted.</p>
+     */
+    public void requestPermission() {
+        if (mUriToken == null) {
+            return;
+        }
+        try {
+            mUriToken.take();
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Releases a temporary read-only access permission for content URI associated with this object.
+     *
+     * <p>Does nothing if the temporary permission is not granted.</p>
+     */
+    public void releasePermission() {
+        if (mUriToken == null) {
+            return;
+        }
+        try {
+            mUriToken.release();
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Used to package this object into a {@link Parcel}.
+     *
+     * @param dest The {@link Parcel} to be written.
+     * @param flags The flags used for parceling.
+     */
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        Uri.writeToParcel(dest, mContentUri);
+        mDescription.writeToParcel(dest, flags);
+        Uri.writeToParcel(dest, mLinkUri);
+        if (mUriToken != null) {
+            dest.writeInt(1);
+            dest.writeStrongBinder(mUriToken.asBinder());
+        } else {
+            dest.writeInt(0);
+        }
+    }
+
+    private InputContentInfo(@NonNull Parcel source) {
+        mContentUri = Uri.CREATOR.createFromParcel(source);
+        mDescription = ClipDescription.CREATOR.createFromParcel(source);
+        mLinkUri = Uri.CREATOR.createFromParcel(source);
+        if (source.readInt() == 1) {
+            mUriToken = IInputContentUriToken.Stub.asInterface(source.readStrongBinder());
+        } else {
+            mUriToken = null;
+        }
+    }
+
+    /**
+     * Used to make this class parcelable.
+     */
+    public static final Parcelable.Creator<InputContentInfo> CREATOR
+            = new Parcelable.Creator<InputContentInfo>() {
+        @Override
+        public InputContentInfo createFromParcel(Parcel source) {
+            return new InputContentInfo(source);
+        }
+
+        @Override
+        public InputContentInfo[] newArray(int size) {
+            return new InputContentInfo[size];
+        }
+    };
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 4013b30..c0c8e64 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -16,6 +16,7 @@
 
 package android.view.inputmethod;
 
+import com.android.internal.inputmethod.IInputContentUriToken;
 import com.android.internal.os.SomeArgs;
 import com.android.internal.view.IInputConnectionWrapper;
 import com.android.internal.view.IInputContext;
@@ -30,6 +31,7 @@
 import android.annotation.RequiresPermission;
 import android.content.Context;
 import android.graphics.Rect;
+import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
@@ -56,6 +58,7 @@
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.security.InvalidParameterException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -2288,6 +2291,40 @@
         }
     }
 
+    /**
+     * Allow the receiver of {@link InputContentInfo} to obtain a temporary read-only access
+     * permission to the content.
+     *
+     * <p>See {@link android.inputmethodservice.InputMethodService#exposeContent(InputContentInfo, EditorInfo)}
+     * for details.</p>
+     *
+     * @param token Supplies the identifying token given to an input method when it was started,
+     * which allows it to perform this operation on itself.
+     * @param inputContentInfo Content to be temporarily exposed from the input method to the
+     * application.
+     * This cannot be {@code null}.
+     * @param editorInfo The editor that receives {@link InputContentInfo}.
+     * @hide
+     */
+    public void exposeContent(@NonNull IBinder token, @NonNull InputContentInfo inputContentInfo,
+            @NonNull EditorInfo editorInfo) {
+        final IInputContentUriToken uriToken;
+        final Uri contentUri = inputContentInfo.getContentUri();
+        try {
+            uriToken = mService.createInputContentUriToken(token, contentUri,
+                    editorInfo.packageName);
+            if (uriToken == null) {
+                return;
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "createInputContentAccessToken failed. contentUri=" + contentUri.toString()
+                    + " packageName=" + editorInfo.packageName, e);
+            return;
+        }
+        inputContentInfo.setUriToken(uriToken);
+        return;
+    }
+
     void doDump(FileDescriptor fd, PrintWriter fout, String[] args) {
         final Printer p = new PrintWriterPrinter(fout);
         p.println("Input method client state for " + this + ":");
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index b331be7..7d7b880 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -75,6 +75,7 @@
 import android.view.inputmethod.ExtractedText;
 import android.view.inputmethod.ExtractedTextRequest;
 import android.view.inputmethod.InputConnection;
+import android.view.inputmethod.InputContentInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.RemoteViews.OnClickHandler;
 
@@ -5982,6 +5983,11 @@
         public void closeConnection() {
             getTarget().closeConnection();
         }
+
+        @Override
+        public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
+            return getTarget().commitContent(inputContentInfo, flags, opts);
+        }
     }
 
     /**
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 1f745185..c33288b 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -3195,7 +3195,9 @@
         // we don't add a filter to the static version returned by getSystemService.
         inflater = inflater.cloneInContext(inflationContext);
         inflater.setFilter(this);
-        return inflater.inflate(rv.getLayoutId(), parent, false);
+        View v = inflater.inflate(rv.getLayoutId(), parent, false);
+        v.setTagInternal(R.id.widget_frame, rv.getLayoutId());
+        return v;
     }
 
     private static void loadTransitionOverride(Context context,
@@ -3373,7 +3375,7 @@
         // across orientation change, and has the RemoteViews re-applied in the new orientation,
         // we throw an exception, since the layouts may be completely unrelated.
         if (hasLandscapeAndPortraitLayouts()) {
-            if (v.getId() != rvToApply.getLayoutId()) {
+            if ((Integer) v.getTag(R.id.widget_frame) != rvToApply.getLayoutId()) {
                 throw new RuntimeException("Attempting to re-apply RemoteViews to a view that" +
                         " that does not share the same root layout id.");
             }
@@ -3409,7 +3411,7 @@
         // across orientation change, and has the RemoteViews re-applied in the new orientation,
         // we throw an exception, since the layouts may be completely unrelated.
         if (hasLandscapeAndPortraitLayouts()) {
-            if (v.getId() != rvToApply.getLayoutId()) {
+            if ((Integer) v.getTag(R.id.widget_frame) != rvToApply.getLayoutId()) {
                 throw new RuntimeException("Attempting to re-apply RemoteViews to a view that" +
                         " that does not share the same root layout id.");
             }
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index 9cdb73a..0988c92 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -161,7 +161,7 @@
     private int mTitleMarginTop;
     private int mTitleMarginBottom;
 
-    private final RtlSpacingHelper mContentInsets = new RtlSpacingHelper();
+    private RtlSpacingHelper mContentInsets;
     private int mContentInsetStartWithNavigation;
     private int mContentInsetEndWithActions;
 
@@ -270,6 +270,7 @@
         final int contentInsetRight =
                 a.getDimensionPixelSize(R.styleable.Toolbar_contentInsetRight, 0);
 
+        ensureContentInsets();
         mContentInsets.setAbsolute(contentInsetLeft, contentInsetRight);
 
         if (contentInsetStart != RtlSpacingHelper.UNDEFINED ||
@@ -463,13 +464,13 @@
      */
     public void setTitleMarginBottom(int margin) {
         mTitleMarginBottom = margin;
-
         requestLayout();
     }
 
     @Override
     public void onRtlPropertiesChanged(@ResolvedLayoutDir int layoutDirection) {
         super.onRtlPropertiesChanged(layoutDirection);
+        ensureContentInsets();
         mContentInsets.setDirection(layoutDirection == LAYOUT_DIRECTION_RTL);
     }
 
@@ -1092,6 +1093,7 @@
      * @attr ref android.R.styleable#Toolbar_contentInsetStart
      */
     public void setContentInsetsRelative(int contentInsetStart, int contentInsetEnd) {
+        ensureContentInsets();
         mContentInsets.setRelative(contentInsetStart, contentInsetEnd);
     }
 
@@ -1112,7 +1114,7 @@
      * @attr ref android.R.styleable#Toolbar_contentInsetStart
      */
     public int getContentInsetStart() {
-        return mContentInsets.getStart();
+        return mContentInsets != null ? mContentInsets.getStart() : 0;
     }
 
     /**
@@ -1132,7 +1134,7 @@
      * @attr ref android.R.styleable#Toolbar_contentInsetEnd
      */
     public int getContentInsetEnd() {
-        return mContentInsets.getEnd();
+        return mContentInsets != null ? mContentInsets.getEnd() : 0;
     }
 
     /**
@@ -1154,6 +1156,7 @@
      * @attr ref android.R.styleable#Toolbar_contentInsetRight
      */
     public void setContentInsetsAbsolute(int contentInsetLeft, int contentInsetRight) {
+        ensureContentInsets();
         mContentInsets.setAbsolute(contentInsetLeft, contentInsetRight);
     }
 
@@ -1174,7 +1177,7 @@
      * @attr ref android.R.styleable#Toolbar_contentInsetLeft
      */
     public int getContentInsetLeft() {
-        return mContentInsets.getLeft();
+        return mContentInsets != null ? mContentInsets.getLeft() : 0;
     }
 
     /**
@@ -1194,7 +1197,7 @@
      * @attr ref android.R.styleable#Toolbar_contentInsetRight
      */
     public int getContentInsetRight() {
-        return mContentInsets.getRight();
+        return mContentInsets != null ? mContentInsets.getRight() : 0;
     }
 
     /**
@@ -2128,6 +2131,12 @@
         }
     }
 
+    private void ensureContentInsets() {
+        if (mContentInsets == null) {
+            mContentInsets = new RtlSpacingHelper();
+        }
+    }
+
     /**
      * Accessor to enable LayoutLib to get ActionMenuPresenter directly.
      */
diff --git a/core/java/com/android/internal/app/AlertActivity.java b/core/java/com/android/internal/app/AlertActivity.java
index ed48b0d..35ffa71 100644
--- a/core/java/com/android/internal/app/AlertActivity.java
+++ b/core/java/com/android/internal/app/AlertActivity.java
@@ -49,7 +49,7 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        mAlert = new AlertController(this, this, getWindow());
+        mAlert = AlertController.create(this, this, getWindow());
         mAlertParams = new AlertController.AlertParams(this);
     }
 
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index b7ac600..2a40aeb 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -24,6 +24,7 @@
 import android.app.AlertDialog;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.res.Configuration;
 import android.content.res.TypedArray;
 import android.database.Cursor;
 import android.graphics.drawable.Drawable;
@@ -61,14 +62,15 @@
 import java.lang.ref.WeakReference;
 
 public class AlertController {
+    public static final int MICRO = 1;
 
     private final Context mContext;
     private final DialogInterface mDialogInterface;
-    private final Window mWindow;
+    protected final Window mWindow;
 
     private CharSequence mTitle;
-    private CharSequence mMessage;
-    private ListView mListView;
+    protected CharSequence mMessage;
+    protected ListView mListView;
     private View mView;
 
     private int mViewLayoutResId;
@@ -91,14 +93,14 @@
     private CharSequence mButtonNeutralText;
     private Message mButtonNeutralMessage;
 
-    private ScrollView mScrollView;
+    protected ScrollView mScrollView;
 
     private int mIconId = 0;
     private Drawable mIcon;
 
     private ImageView mIconView;
     private TextView mTitleView;
-    private TextView mMessageView;
+    protected TextView mMessageView;
     private View mCustomTitleView;
 
     private boolean mForceInverseBackground;
@@ -176,7 +178,26 @@
         return outValue.data != 0;
     }
 
-    public AlertController(Context context, DialogInterface di, Window window) {
+    private static boolean isWatch(Context context) {
+        return (context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_WATCH)
+                == Configuration.UI_MODE_TYPE_WATCH;
+    }
+
+    public static final AlertController create(Context context, DialogInterface di, Window window) {
+        final TypedArray a = context.obtainStyledAttributes(
+                null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0);
+        int controllerType = a.getInt(R.styleable.AlertDialog_controllerType, 0);
+        a.recycle();
+
+        switch (controllerType) {
+            case MICRO:
+                return new MicroAlertController(context, di, window);
+            default:
+                return new AlertController(context, di, window);
+        }
+    }
+
+    protected AlertController(Context context, DialogInterface di, Window window) {
         mContext = context;
         mDialogInterface = di;
         mWindow = window;
@@ -643,7 +664,7 @@
         }
     }
 
-    private void setupContent(ViewGroup contentPanel) {
+    protected void setupContent(ViewGroup contentPanel) {
         mScrollView = (ScrollView) contentPanel.findViewById(R.id.scrollView);
         mScrollView.setFocusable(false);
 
@@ -871,8 +892,14 @@
             listView.setAdapter(mAdapter);
             final int checkedItem = mCheckedItem;
             if (checkedItem > -1) {
-                listView.setItemChecked(checkedItem, true);
-                listView.setSelection(checkedItem);
+                // TODO: Remove temp watch specific code
+                if (isWatch(mContext)) {
+                    listView.setItemChecked(checkedItem + listView.getHeaderViewsCount(), true);
+                    listView.setSelection(checkedItem + listView.getHeaderViewsCount());
+                } else {
+                    listView.setItemChecked(checkedItem, true);
+                    listView.setSelection(checkedItem);
+                }
             }
         }
     }
@@ -1051,7 +1078,13 @@
                             if (mCheckedItems != null) {
                                 boolean isItemChecked = mCheckedItems[position];
                                 if (isItemChecked) {
-                                    listView.setItemChecked(position, true);
+                                    // TODO: Remove temp watch specific code
+                                    if (isWatch(mContext)) {
+                                        listView.setItemChecked(
+                                                position + listView.getHeaderViewsCount(), true);
+                                    } else {
+                                        listView.setItemChecked(position, true);
+                                    }
                                 }
                             }
                             return view;
@@ -1072,8 +1105,16 @@
                         public void bindView(View view, Context context, Cursor cursor) {
                             CheckedTextView text = (CheckedTextView) view.findViewById(R.id.text1);
                             text.setText(cursor.getString(mLabelIndex));
-                            listView.setItemChecked(cursor.getPosition(),
-                                    cursor.getInt(mIsCheckedIndex) == 1);
+                            // TODO: Remove temp watch specific code
+                            if (isWatch(mContext)) {
+                                listView.setItemChecked(
+                                        cursor.getPosition() + listView.getHeaderViewsCount(),
+                                        cursor.getInt(mIsCheckedIndex) == 1);
+                            } else {
+                                listView.setItemChecked(
+                                        cursor.getPosition(),
+                                        cursor.getInt(mIsCheckedIndex) == 1);
+                            }
                         }
 
                         @Override
@@ -1116,6 +1157,10 @@
                 listView.setOnItemClickListener(new OnItemClickListener() {
                     @Override
                     public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
+                        // TODO: Remove temp watch specific code
+                        if (isWatch(mContext)) {
+                            position -= listView.getHeaderViewsCount();
+                        }
                         mOnClickListener.onClick(dialog.mDialogInterface, position);
                         if (!mIsSingleChoice) {
                             dialog.mDialogInterface.dismiss();
@@ -1126,6 +1171,10 @@
                 listView.setOnItemClickListener(new OnItemClickListener() {
                     @Override
                     public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
+                        // TODO: Remove temp watch specific code
+                        if (isWatch(mContext)) {
+                            position -= listView.getHeaderViewsCount();
+                        }
                         if (mCheckedItems != null) {
                             mCheckedItems[position] = listView.isItemChecked(position);
                         }
diff --git a/core/java/com/android/internal/app/AssistUtils.java b/core/java/com/android/internal/app/AssistUtils.java
index d552e54..56c5cc9 100644
--- a/core/java/com/android/internal/app/AssistUtils.java
+++ b/core/java/com/android/internal/app/AssistUtils.java
@@ -132,6 +132,16 @@
         }
     }
 
+    public void registerVoiceInteractionSessionListener(IVoiceInteractionSessionListener listener) {
+        try {
+            if (mVoiceInteractionManagerService != null) {
+                mVoiceInteractionManagerService.registerVoiceInteractionSessionListener(listener);
+            }
+        } catch (RemoteException e) {
+            Log.w(TAG, "Failed to register voice interaction listener", e);
+        }
+    }
+
     public ComponentName getAssistComponentForUser(int userId) {
         final String setting = Settings.Secure.getStringForUser(mContext.getContentResolver(),
                 Settings.Secure.ASSISTANT, userId);
diff --git a/core/java/com/android/internal/app/EphemeralResolverService.java b/core/java/com/android/internal/app/EphemeralResolverService.java
index 6ba04a9..68724a7 100644
--- a/core/java/com/android/internal/app/EphemeralResolverService.java
+++ b/core/java/com/android/internal/app/EphemeralResolverService.java
@@ -39,14 +39,19 @@
 public abstract class EphemeralResolverService extends Service {
     public static final String EXTRA_RESOLVE_INFO = "com.android.internal.app.RESOLVE_INFO";
     public static final String EXTRA_SEQUENCE = "com.android.internal.app.SEQUENCE";
+    private static final String EXTRA_PREFIX = "com.android.internal.app.PREFIX";
     private Handler mHandler;
 
     /**
      * Called to retrieve resolve info for ephemeral applications.
      *
      * @param digestPrefix The hash prefix of the ephemeral's domain.
+     * @param prefixMask A mask that was applied to each digest prefix. This should
+     *      be used when comparing against the digest prefixes as all bits might
+     *      not be set.
      */
-    protected abstract List<EphemeralResolveInfo> getEphemeralResolveInfoList(int digestPrefix);
+    protected abstract List<EphemeralResolveInfo> getEphemeralResolveInfoList(
+            int digestPrefix[], int prefixMask);
 
     @Override
     protected final void attachBaseContext(Context base) {
@@ -59,10 +64,13 @@
         return new IEphemeralResolver.Stub() {
             @Override
             public void getEphemeralResolveInfoList(
-                    IRemoteCallback callback, int digestPrefix, int sequence) {
-                mHandler.obtainMessage(ServiceHandler.MSG_GET_EPHEMERAL_RESOLVE_INFO,
-                        digestPrefix, sequence, callback)
-                    .sendToTarget();
+                    IRemoteCallback callback, int digestPrefix[], int prefixMask, int sequence) {
+                final Message msg = mHandler.obtainMessage(
+                        ServiceHandler.MSG_GET_EPHEMERAL_RESOLVE_INFO, prefixMask, sequence, callback);
+                final Bundle data = new Bundle();
+                data.putIntArray(EXTRA_PREFIX, digestPrefix);
+                msg.setData(data);
+                msg.sendToTarget();
             }
         };
     }
@@ -81,8 +89,9 @@
             switch (action) {
                 case MSG_GET_EPHEMERAL_RESOLVE_INFO: {
                     final IRemoteCallback callback = (IRemoteCallback) message.obj;
+                    final int[] digestPrefix = message.getData().getIntArray(EXTRA_PREFIX);
                     final List<EphemeralResolveInfo> resolveInfo =
-                            getEphemeralResolveInfoList(message.arg1);
+                            getEphemeralResolveInfoList(digestPrefix, message.arg1);
                     final Bundle data = new Bundle();
                     data.putInt(EXTRA_SEQUENCE, message.arg2);
                     data.putParcelableList(EXTRA_RESOLVE_INFO, resolveInfo);
diff --git a/core/java/com/android/internal/app/IEphemeralResolver.aidl b/core/java/com/android/internal/app/IEphemeralResolver.aidl
index 40429ee..9ff1322 100644
--- a/core/java/com/android/internal/app/IEphemeralResolver.aidl
+++ b/core/java/com/android/internal/app/IEphemeralResolver.aidl
@@ -20,5 +20,6 @@
 import android.os.IRemoteCallback;
 
 oneway interface IEphemeralResolver {
-    void getEphemeralResolveInfoList(IRemoteCallback callback, int digestPrefix, int sequence);
+    void getEphemeralResolveInfoList(IRemoteCallback callback, in int[] digestPrefix,
+            int prefixMask, int sequence);
 }
diff --git a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
index 1a963f3..033dd13 100644
--- a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
+++ b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
@@ -22,6 +22,7 @@
 
 import com.android.internal.app.IVoiceInteractionSessionShowCallback;
 import com.android.internal.app.IVoiceInteractor;
+import com.android.internal.app.IVoiceInteractionSessionListener;
 import android.hardware.soundtrigger.IRecognitionStatusCallback;
 import android.hardware.soundtrigger.SoundTrigger;
 import android.service.voice.IVoiceInteractionService;
@@ -136,4 +137,9 @@
      * Called when the lockscreen got shown.
      */
     void onLockscreenShown();
+
+    /**
+     * Register a voice interaction listener.
+     */
+    void registerVoiceInteractionSessionListener(IVoiceInteractionSessionListener listener);
 }
diff --git a/core/java/com/android/internal/app/IVoiceInteractionSessionListener.aidl b/core/java/com/android/internal/app/IVoiceInteractionSessionListener.aidl
new file mode 100644
index 0000000..87749d2
--- /dev/null
+++ b/core/java/com/android/internal/app/IVoiceInteractionSessionListener.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ package com.android.internal.app;
+
+ oneway interface IVoiceInteractionSessionListener {
+    /**
+     * Called when a voice session is shown.
+     */
+    void onVoiceSessionShown();
+
+    /**
+     * Called when a voice session is hidden.
+     */
+    void onVoiceSessionHidden();
+ }
\ No newline at end of file
diff --git a/core/java/com/android/internal/app/MicroAlertController.java b/core/java/com/android/internal/app/MicroAlertController.java
new file mode 100644
index 0000000..085b226
--- /dev/null
+++ b/core/java/com/android/internal/app/MicroAlertController.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.app;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.widget.ScrollView;
+import android.widget.TextView;
+import android.widget.AbsListView;
+
+import com.android.internal.app.AlertController;
+import com.android.internal.R;
+
+public class MicroAlertController extends AlertController {
+    public MicroAlertController(Context context, DialogInterface di, Window window) {
+        super(context, di, window);
+    }
+
+    @Override
+    protected void setupContent(ViewGroup contentPanel) {
+        // Special case for small screen - the scroll view is higher in hierarchy
+        mScrollView = (ScrollView) mWindow.findViewById(R.id.scrollView);
+
+        // Special case for users that only want to display a String
+        mMessageView = (TextView) contentPanel.findViewById(R.id.message);
+        if (mMessageView == null) {
+            return;
+        }
+
+        if (mMessage != null) {
+            mMessageView.setText(mMessage);
+        } else {
+            // no message, remove associated views
+            mMessageView.setVisibility(View.GONE);
+            contentPanel.removeView(mMessageView);
+
+            if (mListView != null) {
+                // has ListView, swap ScrollView with ListView
+
+                // move topPanel into header of ListView
+                View topPanel = mScrollView.findViewById(R.id.topPanel);
+                ((ViewGroup) topPanel.getParent()).removeView(topPanel);
+                topPanel.setLayoutParams(
+                        new AbsListView.LayoutParams(topPanel.getLayoutParams()));
+                mListView.addHeaderView(topPanel, null, false);
+
+                // move buttonPanel into footer of ListView
+                View buttonPanel = mScrollView.findViewById(R.id.buttonPanel);
+                ((ViewGroup) buttonPanel.getParent()).removeView(buttonPanel);
+                buttonPanel.setLayoutParams(
+                        new AbsListView.LayoutParams(buttonPanel.getLayoutParams()));
+                mListView.addFooterView(buttonPanel, null, false);
+
+                // swap ScrollView w/ ListView
+                final ViewGroup scrollParent = (ViewGroup) mScrollView.getParent();
+                final int childIndex = scrollParent.indexOfChild(mScrollView);
+                scrollParent.removeViewAt(childIndex);
+                scrollParent.addView(mListView, childIndex,
+                        new ViewGroup.LayoutParams(
+                                ViewGroup.LayoutParams.MATCH_PARENT,
+                                ViewGroup.LayoutParams.MATCH_PARENT));
+            } else {
+                // no content, just hide everything
+                contentPanel.setVisibility(View.GONE);
+            }
+        }
+    }
+}
diff --git a/core/java/com/android/internal/app/NightDisplayController.java b/core/java/com/android/internal/app/NightDisplayController.java
new file mode 100644
index 0000000..03cd729
--- /dev/null
+++ b/core/java/com/android/internal/app/NightDisplayController.java
@@ -0,0 +1,421 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.app;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.UserHandle;
+import android.provider.Settings.Secure;
+import android.util.Slog;
+
+import com.android.internal.R;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Calendar;
+import java.util.Locale;
+
+/**
+ * Controller for managing Night display settings.
+ * <p/>
+ * Night display tints your screen red at night. This makes it easier to look at your screen in
+ * dim light and may help you fall asleep more easily.
+ */
+public final class NightDisplayController {
+
+    private static final String TAG = "NightDisplayController";
+    private static final boolean DEBUG = false;
+
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef({ AUTO_MODE_DISABLED, AUTO_MODE_CUSTOM, AUTO_MODE_TWILIGHT })
+    public @interface AutoMode {}
+
+    /**
+     * Auto mode value to prevent Night display from being automatically activated. It can still
+     * be activated manually via {@link #setActivated(boolean)}.
+     *
+     * @see #setAutoMode(int)
+     */
+    public static final int AUTO_MODE_DISABLED = 0;
+    /**
+     * Auto mode value to automatically activate Night display at a specific start and end time.
+     *
+     * @see #setAutoMode(int)
+     * @see #setCustomStartTime(LocalTime)
+     * @see #setCustomEndTime(LocalTime)
+     */
+    public static final int AUTO_MODE_CUSTOM = 1;
+    /**
+     * Auto mode value to automatically activate Night display from sunset to sunrise.
+     *
+     * @see #setAutoMode(int)
+     */
+    public static final int AUTO_MODE_TWILIGHT = 2;
+
+    private final Context mContext;
+    private final int mUserId;
+
+    private final ContentObserver mContentObserver;
+
+    private Callback mCallback;
+
+    public NightDisplayController(@NonNull Context context) {
+        this(context, UserHandle.myUserId());
+    }
+
+    public NightDisplayController(@NonNull Context context, int userId) {
+        mContext = context.getApplicationContext();
+        mUserId = userId;
+
+        mContentObserver = new ContentObserver(new Handler(Looper.getMainLooper())) {
+            @Override
+            public void onChange(boolean selfChange, Uri uri) {
+                super.onChange(selfChange, uri);
+
+                final String setting = uri == null ? null : uri.getLastPathSegment();
+                if (setting != null) {
+                    onSettingChanged(setting);
+                }
+            }
+        };
+    }
+
+    /**
+     * Returns {@code true} when Night display is activated (the display is tinted red).
+     */
+    public boolean isActivated() {
+        return Secure.getIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_ACTIVATED, 0, mUserId) == 1;
+    }
+
+    /**
+     * Sets whether Night display should be activated.
+     *
+     * @param activated {@code true} if Night display should be activated
+     * @return {@code true} if the activated value was set successfully
+     */
+    public boolean setActivated(boolean activated) {
+        return Secure.putIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_ACTIVATED, activated ? 1 : 0, mUserId);
+    }
+
+    /**
+     * Returns the current auto mode value controlling when Night display will be automatically
+     * activated. One of {@link #AUTO_MODE_DISABLED}, {@link #AUTO_MODE_CUSTOM}, or
+     * {@link #AUTO_MODE_TWILIGHT}.
+     */
+    public @AutoMode int getAutoMode() {
+        int autoMode = Secure.getIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_AUTO_MODE, -1, mUserId);
+        if (autoMode == -1) {
+            if (DEBUG) {
+                Slog.d(TAG, "Using default value for setting: " + Secure.NIGHT_DISPLAY_AUTO_MODE);
+            }
+            autoMode = mContext.getResources().getInteger(
+                    R.integer.config_defaultNightDisplayAutoMode);
+        }
+
+        if (autoMode != AUTO_MODE_DISABLED
+                && autoMode != AUTO_MODE_CUSTOM
+                && autoMode != AUTO_MODE_TWILIGHT) {
+            Slog.e(TAG, "Invalid autoMode: " + autoMode);
+            autoMode = AUTO_MODE_DISABLED;
+        }
+
+        return autoMode;
+    }
+
+    /**
+     * Sets the current auto mode value controlling when Night display will be automatically
+     * activated. One of {@link #AUTO_MODE_DISABLED}, {@link #AUTO_MODE_CUSTOM}, or
+     * {@link #AUTO_MODE_TWILIGHT}.
+     *
+     * @param autoMode the new auto mode to use
+     * @return {@code true} if new auto mode was set successfully
+     */
+    public boolean setAutoMode(@AutoMode int autoMode) {
+        if (autoMode != AUTO_MODE_DISABLED
+                && autoMode != AUTO_MODE_CUSTOM
+                && autoMode != AUTO_MODE_TWILIGHT) {
+            throw new IllegalArgumentException("Invalid autoMode: " + autoMode);
+        }
+
+        return Secure.putIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_AUTO_MODE, autoMode, mUserId);
+    }
+
+    /**
+     * Returns the local time when Night display will be automatically activated when using
+     * {@link #AUTO_MODE_CUSTOM}.
+     */
+    public @NonNull LocalTime getCustomStartTime() {
+        int startTimeValue = Secure.getIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_CUSTOM_START_TIME, -1, mUserId);
+        if (startTimeValue == -1) {
+            if (DEBUG) {
+                Slog.d(TAG, "Using default value for setting: "
+                        + Secure.NIGHT_DISPLAY_CUSTOM_START_TIME);
+            }
+            startTimeValue = mContext.getResources().getInteger(
+                    R.integer.config_defaultNightDisplayCustomStartTime);
+        }
+
+        return LocalTime.valueOf(startTimeValue);
+    }
+
+    /**
+     * Sets the local time when Night display will be automatically activated when using
+     * {@link #AUTO_MODE_CUSTOM}.
+     *
+     * @param startTime the local time to automatically activate Night display
+     * @return {@code true} if the new custom start time was set successfully
+     */
+    public boolean setCustomStartTime(@NonNull LocalTime startTime) {
+        if (startTime == null) {
+            throw new IllegalArgumentException("startTime cannot be null");
+        }
+        return Secure.putIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_CUSTOM_START_TIME, startTime.toMillis(), mUserId);
+    }
+
+    /**
+     * Returns the local time when Night display will be automatically deactivated when using
+     * {@link #AUTO_MODE_CUSTOM}.
+     */
+    public @NonNull LocalTime getCustomEndTime() {
+        int endTimeValue = Secure.getIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_CUSTOM_END_TIME, -1, mUserId);
+        if (endTimeValue == -1) {
+            if (DEBUG) {
+                Slog.d(TAG, "Using default value for setting: "
+                        + Secure.NIGHT_DISPLAY_CUSTOM_END_TIME);
+            }
+            endTimeValue = mContext.getResources().getInteger(
+                    R.integer.config_defaultNightDisplayCustomEndTime);
+        }
+
+        return LocalTime.valueOf(endTimeValue);
+    }
+
+    /**
+     * Sets the local time when Night display will be automatically deactivated when using
+     * {@link #AUTO_MODE_CUSTOM}.
+     *
+     * @param endTime the local time to automatically deactivate Night display
+     * @return {@code true} if the new custom end time was set successfully
+     */
+    public boolean setCustomEndTime(@NonNull LocalTime endTime) {
+        if (endTime == null) {
+            throw new IllegalArgumentException("endTime cannot be null");
+        }
+        return Secure.putIntForUser(mContext.getContentResolver(),
+                Secure.NIGHT_DISPLAY_CUSTOM_END_TIME, endTime.toMillis(), mUserId);
+    }
+
+    private void onSettingChanged(@NonNull String setting) {
+        if (DEBUG) {
+            Slog.d(TAG, "onSettingChanged: " + setting);
+        }
+
+        if (mCallback != null) {
+            switch (setting) {
+                case Secure.NIGHT_DISPLAY_ACTIVATED:
+                    mCallback.onActivated(isActivated());
+                    break;
+                case Secure.NIGHT_DISPLAY_AUTO_MODE:
+                    mCallback.onAutoModeChanged(getAutoMode());
+                    break;
+                case Secure.NIGHT_DISPLAY_CUSTOM_START_TIME:
+                    mCallback.onCustomStartTimeChanged(getCustomStartTime());
+                    break;
+                case Secure.NIGHT_DISPLAY_CUSTOM_END_TIME:
+                    mCallback.onCustomEndTimeChanged(getCustomEndTime());
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Register a callback to be invoked whenever the Night display settings are changed.
+     */
+    public void setListener(Callback callback) {
+        final Callback oldCallback = mCallback;
+        if (oldCallback != callback) {
+            mCallback = callback;
+
+            if (callback == null) {
+                // Stop listening for changes now that there IS NOT a listener.
+                mContext.getContentResolver().unregisterContentObserver(mContentObserver);
+            } else if (oldCallback == null) {
+                // Start listening for changes now that there IS a listener.
+                final ContentResolver cr = mContext.getContentResolver();
+                cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_ACTIVATED),
+                        false /* notifyForDescendants */, mContentObserver, mUserId);
+                cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_AUTO_MODE),
+                        false /* notifyForDescendants */, mContentObserver, mUserId);
+                cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_CUSTOM_START_TIME),
+                        false /* notifyForDescendants */, mContentObserver, mUserId);
+                cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_CUSTOM_END_TIME),
+                        false /* notifyForDescendants */, mContentObserver, mUserId);
+            }
+        }
+    }
+
+    /**
+     * Returns {@code true} if Night display is supported by the device.
+     */
+    public static boolean isAvailable(Context context) {
+        return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable);
+    }
+
+    /**
+     * A time without a time-zone or date.
+     */
+    public static class LocalTime {
+
+        /**
+         * The hour of the day from 0 - 23.
+         */
+        public final int hourOfDay;
+        /**
+         * The minute within the hour from 0 - 59.
+         */
+        public final int minute;
+
+        public LocalTime(int hourOfDay, int minute) {
+            if (hourOfDay < 0 || hourOfDay > 23) {
+                throw new IllegalArgumentException("Invalid hourOfDay: " + hourOfDay);
+            } else if (minute < 0 || minute > 59) {
+                throw new IllegalArgumentException("Invalid minute: " + minute);
+            }
+
+            this.hourOfDay = hourOfDay;
+            this.minute = minute;
+        }
+
+        /**
+         * Returns the first date time corresponding to this local time that occurs before the
+         * provided date time.
+         *
+         * @param time the date time to compare against
+         * @return the prior date time corresponding to this local time
+         */
+        public Calendar getDateTimeBefore(Calendar time) {
+            final Calendar c = Calendar.getInstance();
+            c.set(Calendar.YEAR, time.get(Calendar.YEAR));
+            c.set(Calendar.DAY_OF_YEAR, time.get(Calendar.DAY_OF_YEAR));
+
+            c.set(Calendar.HOUR_OF_DAY, hourOfDay);
+            c.set(Calendar.MINUTE, minute);
+            c.set(Calendar.SECOND, 0);
+            c.set(Calendar.MILLISECOND, 0);
+
+            // Check if the local time has past, if so return the same time tomorrow.
+            if (c.after(time)) {
+                c.add(Calendar.DATE, -1);
+            }
+
+            return c;
+        }
+
+        /**
+         * Returns the first date time corresponding to this local time that occurs after the
+         * provided date time.
+         *
+         * @param time the date time to compare against
+         * @return the next date time corresponding to this local time
+         */
+        public Calendar getDateTimeAfter(Calendar time) {
+            final Calendar c = Calendar.getInstance();
+            c.set(Calendar.YEAR, time.get(Calendar.YEAR));
+            c.set(Calendar.DAY_OF_YEAR, time.get(Calendar.DAY_OF_YEAR));
+
+            c.set(Calendar.HOUR_OF_DAY, hourOfDay);
+            c.set(Calendar.MINUTE, minute);
+            c.set(Calendar.SECOND, 0);
+            c.set(Calendar.MILLISECOND, 0);
+
+            // Check if the local time has past, if so return the same time tomorrow.
+            if (c.before(time)) {
+                c.add(Calendar.DATE, 1);
+            }
+
+            return c;
+        }
+
+        /**
+         * Returns a local time corresponding the given number of milliseconds from midnight.
+         *
+         * @param millis the number of milliseconds from midnight
+         * @return the corresponding local time
+         */
+        private static LocalTime valueOf(int millis) {
+            final int hourOfDay = (millis / 3600000) % 24;
+            final int minutes = (millis / 60000) % 60;
+            return new LocalTime(hourOfDay, minutes);
+        }
+
+        /**
+         * Returns the local time represented as milliseconds from midnight.
+         */
+        private int toMillis() {
+            return hourOfDay * 3600000 + minute * 60000;
+        }
+
+        @Override
+        public String toString() {
+            return String.format(Locale.US, "%02d:%02d", hourOfDay, minute);
+        }
+    }
+
+    /**
+     * Callback invoked whenever the Night display settings are changed.
+     */
+    public interface Callback {
+        /**
+         * Callback invoked when the activated state changes.
+         *
+         * @param activated {@code true} if Night display is activated
+         */
+        default void onActivated(boolean activated) {}
+        /**
+         * Callback invoked when the auto mode changes.
+         *
+         * @param autoMode the auto mode to use
+         */
+        default void onAutoModeChanged(int autoMode) {}
+        /**
+         * Callback invoked when the time to automatically activate Night display changes.
+         *
+         * @param startTime the local time to automatically activate Night display
+         */
+        default void onCustomStartTimeChanged(LocalTime startTime) {}
+        /**
+         * Callback invoked when the time to automatically deactivate Night display changes.
+         *
+         * @param endTime the local time to automatically deactivate Night display
+         */
+        default void onCustomEndTimeChanged(LocalTime endTime) {}
+    }
+}
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 085e159..0a4ac0d 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -69,9 +69,13 @@
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto;
 import com.android.internal.widget.ResolverDrawerLayout;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -359,6 +363,12 @@
         if (isVoiceInteraction()) {
             onSetupVoiceInteraction();
         }
+        final Set<String> categories = intent.getCategories();
+        MetricsLogger.action(this, mAdapter.hasFilteredItem()
+                ? MetricsProto.MetricsEvent.ACTION_SHOW_APP_DISAMBIG_APP_FEATURED
+                : MetricsProto.MetricsEvent.ACTION_SHOW_APP_DISAMBIG_NONE_FEATURED,
+                intent.getAction() + ":" + intent.getType() + ":"
+                        + (categories != null ? Arrays.toString(categories.toArray()) : ""));
     }
 
     public final void setFilteredComponents(ComponentName[] components) {
@@ -649,6 +659,19 @@
 
         TargetInfo target = mAdapter.targetInfoForPosition(which, filtered);
         if (onTargetSelected(target, always)) {
+            if (always && filtered) {
+                MetricsLogger.action(
+                        this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_ALWAYS);
+            } else if (filtered) {
+                MetricsLogger.action(
+                        this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_JUST_ONCE);
+            } else {
+                MetricsLogger.action(
+                        this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_TAP);
+            }
+            MetricsLogger.action(this, mAdapter.hasFilteredItem()
+                            ? MetricsProto.MetricsEvent.ACTION_HIDE_APP_DISAMBIG_APP_FEATURED
+                            : MetricsProto.MetricsEvent.ACTION_HIDE_APP_DISAMBIG_NONE_FEATURED);
             finish();
         }
     }
diff --git a/core/java/com/android/internal/app/UnlaunchableAppActivity.java b/core/java/com/android/internal/app/UnlaunchableAppActivity.java
index d24cefe..0a539f1 100644
--- a/core/java/com/android/internal/app/UnlaunchableAppActivity.java
+++ b/core/java/com/android/internal/app/UnlaunchableAppActivity.java
@@ -37,6 +37,7 @@
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.Window;
 import android.widget.TextView;
 
 import com.android.internal.R;
@@ -59,6 +60,9 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        // As this activity has nothing to show, we should hide the title bar also
+        // TODO: Use AlertActivity so we don't need to hide title bar and create a dialog
+        requestWindowFeature(Window.FEATURE_NO_TITLE);
         Intent intent = getIntent();
         mReason = intent.getIntExtra(EXTRA_UNLAUNCHABLE_REASON, -1);
         mUserId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
diff --git a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
index 4260e50..951a45a 100644
--- a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
+++ b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
@@ -34,7 +34,7 @@
     // for AppWidgetHost
     //
     ParceledListSlice startListening(IAppWidgetHost host, String callingPackage, int hostId,
-            in int[] appWidgetIds, out int[] updatedIds);
+            in int[] appWidgetIds);
     void stopListening(String callingPackage, int hostId);
     int allocateAppWidgetId(String callingPackage, int hostId);
     void deleteAppWidgetId(String callingPackage, int appWidgetId);
diff --git a/core/java/com/android/internal/inputmethod/IInputContentUriToken.aidl b/core/java/com/android/internal/inputmethod/IInputContentUriToken.aidl
new file mode 100644
index 0000000..8abc807
--- /dev/null
+++ b/core/java/com/android/internal/inputmethod/IInputContentUriToken.aidl
@@ -0,0 +1,27 @@
+/*
+** Copyright 2016, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package com.android.internal.inputmethod;
+
+import android.os.IBinder;
+
+/**
+ * {@hide}
+ */
+interface IInputContentUriToken {
+    void take();
+    void release();
+}
diff --git a/core/java/com/android/internal/net/VpnProfile.java b/core/java/com/android/internal/net/VpnProfile.java
index 5c92f3c..9a5543a 100644
--- a/core/java/com/android/internal/net/VpnProfile.java
+++ b/core/java/com/android/internal/net/VpnProfile.java
@@ -176,6 +176,11 @@
      * connection.
      */
     public boolean isValidLockdownProfile() {
+        // b/7064069: lockdown firewall blocks ports that would be used for PPTP
+        if (type == TYPE_PPTP) {
+            return false;
+        }
+
         try {
             InetAddress.parseNumericAddress(server);
 
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 9c960c0..73a3a0b 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -753,7 +753,7 @@
             closeServerSocket();
         } catch (MethodAndArgsCaller caller) {
             caller.run();
-        } catch (RuntimeException ex) {
+        } catch (Throwable ex) {
             Log.e(TAG, "Zygote died with exception", ex);
             closeServerSocket();
             throw ex;
diff --git a/core/java/com/android/internal/policy/BackdropFrameRenderer.java b/core/java/com/android/internal/policy/BackdropFrameRenderer.java
index 488f769..0ab3a41 100644
--- a/core/java/com/android/internal/policy/BackdropFrameRenderer.java
+++ b/core/java/com/android/internal/policy/BackdropFrameRenderer.java
@@ -371,6 +371,8 @@
                 systemInsets.bottom);
         final int rightInset = DecorView.getColorViewRightInset(stableInsets.right,
                 systemInsets.right);
+        final int leftInset = DecorView.getColorViewLeftInset(stableInsets.left,
+                systemInsets.left);
         if (mStatusBarColor != null) {
             mStatusBarColor.setBounds(0, 0, left + width, topInset);
             mStatusBarColor.draw(canvas);
@@ -380,9 +382,11 @@
         // don't want the navigation bar background be moving around when resizing in docked mode.
         // However, we need it for the transitions into/out of docked mode.
         if (mNavigationBarColor != null && fullscreen) {
-            final int size = DecorView.getNavBarSize(bottomInset, rightInset);
+            final int size = DecorView.getNavBarSize(bottomInset, rightInset, leftInset);
             if (DecorView.isNavBarToRightEdge(bottomInset, rightInset)) {
                 mNavigationBarColor.setBounds(width - size, 0, width, height);
+            } else if (DecorView.isNavBarToLeftEdge(bottomInset, rightInset)) {
+                mNavigationBarColor.setBounds(0, 0, size, height);
             } else {
                 mNavigationBarColor.setBounds(0, height - size, width, height);
             }
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 3cf7a4e..366fc1a 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -97,7 +97,6 @@
 import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
 import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
 import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
-import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
 import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
 import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
@@ -162,13 +161,13 @@
 
     private final ColorViewState mStatusColorViewState = new ColorViewState(
             SYSTEM_UI_FLAG_FULLSCREEN, FLAG_TRANSLUCENT_STATUS,
-            Gravity.TOP, Gravity.LEFT,
+            Gravity.TOP, Gravity.LEFT, Gravity.RIGHT,
             Window.STATUS_BAR_BACKGROUND_TRANSITION_NAME,
             com.android.internal.R.id.statusBarBackground,
             FLAG_FULLSCREEN);
     private final ColorViewState mNavigationColorViewState = new ColorViewState(
             SYSTEM_UI_FLAG_HIDE_NAVIGATION, FLAG_TRANSLUCENT_NAVIGATION,
-            Gravity.BOTTOM, Gravity.RIGHT,
+            Gravity.BOTTOM, Gravity.RIGHT, Gravity.LEFT,
             Window.NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME,
             com.android.internal.R.id.navigationBarBackground,
             0 /* hideWindowFlag */);
@@ -184,9 +183,11 @@
     private int mLastTopInset = 0;
     private int mLastBottomInset = 0;
     private int mLastRightInset = 0;
+    private int mLastLeftInset = 0;
     private boolean mLastHasTopStableInset = false;
     private boolean mLastHasBottomStableInset = false;
     private boolean mLastHasRightStableInset = false;
+    private boolean mLastHasLeftStableInset = false;
     private int mLastWindowFlags = 0;
     private boolean mLastShouldAlwaysConsumeNavBar = false;
 
@@ -991,12 +992,21 @@
         return Math.min(stableRight, systemRight);
     }
 
+    static int getColorViewLeftInset(int stableLeft, int systemLeft) {
+        return Math.min(stableLeft, systemLeft);
+    }
+
     static boolean isNavBarToRightEdge(int bottomInset, int rightInset) {
         return bottomInset == 0 && rightInset > 0;
     }
 
-    static int getNavBarSize(int bottomInset, int rightInset) {
-        return isNavBarToRightEdge(bottomInset, rightInset) ? rightInset : bottomInset;
+    static boolean isNavBarToLeftEdge(int bottomInset, int leftInset) {
+        return bottomInset == 0 && leftInset > 0;
+    }
+
+    static int getNavBarSize(int bottomInset, int rightInset, int leftInset) {
+        return isNavBarToRightEdge(bottomInset, rightInset) ? rightInset
+                : isNavBarToLeftEdge(bottomInset, leftInset) ? leftInset : bottomInset;
     }
 
     WindowInsets updateColorViews(WindowInsets insets, boolean animate) {
@@ -1016,6 +1026,8 @@
                         insets.getSystemWindowInsetBottom());
                 mLastRightInset = getColorViewRightInset(insets.getStableInsetRight(),
                         insets.getSystemWindowInsetRight());
+                mLastLeftInset = getColorViewRightInset(insets.getStableInsetLeft(),
+                        insets.getSystemWindowInsetLeft());
 
                 // Don't animate if the presence of stable insets has changed, because that
                 // indicates that the window was either just added and received them for the
@@ -1031,21 +1043,32 @@
                 boolean hasRightStableInset = insets.getStableInsetRight() != 0;
                 disallowAnimate |= (hasRightStableInset != mLastHasRightStableInset);
                 mLastHasRightStableInset = hasRightStableInset;
+
+                boolean hasLeftStableInset = insets.getStableInsetLeft() != 0;
+                disallowAnimate |= (hasLeftStableInset != mLastHasLeftStableInset);
+                mLastHasLeftStableInset = hasLeftStableInset;
+
                 mLastShouldAlwaysConsumeNavBar = insets.shouldAlwaysConsumeNavBar();
             }
 
             boolean navBarToRightEdge = isNavBarToRightEdge(mLastBottomInset, mLastRightInset);
-            int navBarSize = getNavBarSize(mLastBottomInset, mLastRightInset);
+            boolean navBarToLeftEdge = isNavBarToLeftEdge(mLastBottomInset, mLastLeftInset);
+            int navBarSize = getNavBarSize(mLastBottomInset, mLastRightInset, mLastLeftInset);
             updateColorViewInt(mNavigationColorViewState, sysUiVisibility,
-                    mWindow.mNavigationBarColor, navBarSize, navBarToRightEdge,
-                    0 /* rightInset */, animate && !disallowAnimate, false /* force */);
+                    mWindow.mNavigationBarColor, navBarSize, navBarToRightEdge || navBarToLeftEdge,
+                    navBarToLeftEdge,
+                    0 /* sideInset */, animate && !disallowAnimate, false /* force */);
 
             boolean statusBarNeedsRightInset = navBarToRightEdge
                     && mNavigationColorViewState.present;
-            int statusBarRightInset = statusBarNeedsRightInset ? mLastRightInset : 0;
+            boolean statusBarNeedsLeftInset = navBarToLeftEdge
+                    && mNavigationColorViewState.present;
+            int statusBarSideInset = statusBarNeedsRightInset ? mLastRightInset
+                    : statusBarNeedsLeftInset ? mLastLeftInset : 0;
             updateColorViewInt(mStatusColorViewState, sysUiVisibility,
                     calculateStatusBarColor(), mLastTopInset,
-                    false /* matchVertical */, statusBarRightInset, animate && !disallowAnimate,
+                    false /* matchVertical */, statusBarNeedsLeftInset, statusBarSideInset,
+                    animate && !disallowAnimate,
                     mForceWindowDrawsStatusBarBackground);
         }
 
@@ -1070,15 +1093,17 @@
         int consumedTop = consumingStatusBar ? mLastTopInset : 0;
         int consumedRight = consumingNavBar ? mLastRightInset : 0;
         int consumedBottom = consumingNavBar ? mLastBottomInset : 0;
+        int consumedLeft = consumingNavBar ? mLastLeftInset : 0;
 
         if (mContentRoot != null
                 && mContentRoot.getLayoutParams() instanceof MarginLayoutParams) {
             MarginLayoutParams lp = (MarginLayoutParams) mContentRoot.getLayoutParams();
             if (lp.topMargin != consumedTop || lp.rightMargin != consumedRight
-                    || lp.bottomMargin != consumedBottom) {
+                    || lp.bottomMargin != consumedBottom || lp.leftMargin != consumedLeft) {
                 lp.topMargin = consumedTop;
                 lp.rightMargin = consumedRight;
                 lp.bottomMargin = consumedBottom;
+                lp.leftMargin = consumedLeft;
                 mContentRoot.setLayoutParams(lp);
 
                 if (insets == null) {
@@ -1089,7 +1114,7 @@
             }
             if (insets != null) {
                 insets = insets.replaceSystemWindowInsets(
-                        insets.getSystemWindowInsetLeft(),
+                        insets.getSystemWindowInsetLeft() - consumedLeft,
                         insets.getSystemWindowInsetTop() - consumedTop,
                         insets.getSystemWindowInsetRight() - consumedRight,
                         insets.getSystemWindowInsetBottom() - consumedBottom);
@@ -1126,11 +1151,12 @@
      * @param size the current size in the non-parent-matching dimension.
      * @param verticalBar if true the view is attached to a vertical edge, otherwise to a
      *                    horizontal edge,
-     * @param rightMargin rightMargin for the color view.
+     * @param sideMargin sideMargin for the color view.
      * @param animate if true, the change will be animated.
      */
     private void updateColorViewInt(final ColorViewState state, int sysUiVis, int color,
-            int size, boolean verticalBar, int rightMargin, boolean animate, boolean force) {
+            int size, boolean verticalBar, boolean seascape, int sideMargin,
+            boolean animate, boolean force) {
         state.present = (sysUiVis & state.systemUiHideFlag) == 0
                 && (mWindow.getAttributes().flags & state.hideWindowFlag) == 0
                 && ((mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
@@ -1145,7 +1171,9 @@
 
         int resolvedHeight = verticalBar ? LayoutParams.MATCH_PARENT : size;
         int resolvedWidth = verticalBar ? size : LayoutParams.MATCH_PARENT;
-        int resolvedGravity = verticalBar ? state.horizontalGravity : state.verticalGravity;
+        int resolvedGravity = verticalBar
+                ? (seascape ? state.seascapeGravity : state.horizontalGravity)
+                : state.verticalGravity;
 
         if (view == null) {
             if (showView) {
@@ -1159,7 +1187,11 @@
 
                 LayoutParams lp = new LayoutParams(resolvedWidth, resolvedHeight,
                         resolvedGravity);
-                lp.rightMargin = rightMargin;
+                if (seascape) {
+                    lp.leftMargin = sideMargin;
+                } else {
+                    lp.rightMargin = sideMargin;
+                }
                 addView(view, lp);
                 updateColorViewTranslations();
             }
@@ -1168,12 +1200,16 @@
             visibilityChanged = state.targetVisibility != vis;
             state.targetVisibility = vis;
             LayoutParams lp = (LayoutParams) view.getLayoutParams();
+            int rightMargin = seascape ? 0 : sideMargin;
+            int leftMargin = seascape ? sideMargin : 0;
             if (lp.height != resolvedHeight || lp.width != resolvedWidth
-                    || lp.gravity != resolvedGravity || lp.rightMargin != rightMargin) {
+                    || lp.gravity != resolvedGravity || lp.rightMargin != rightMargin
+                    || lp.leftMargin != leftMargin) {
                 lp.height = resolvedHeight;
                 lp.width = resolvedWidth;
                 lp.gravity = resolvedGravity;
                 lp.rightMargin = rightMargin;
+                lp.leftMargin = leftMargin;
                 view.setLayoutParams(lp);
             }
             if (showView) {
@@ -2217,17 +2253,19 @@
         final int translucentFlag;
         final int verticalGravity;
         final int horizontalGravity;
+        final int seascapeGravity;
         final String transitionName;
         final int hideWindowFlag;
 
         ColorViewState(int systemUiHideFlag,
                 int translucentFlag, int verticalGravity, int horizontalGravity,
-                String transitionName, int id, int hideWindowFlag) {
+                int seascapeGravity, String transitionName, int id, int hideWindowFlag) {
             this.id = id;
             this.systemUiHideFlag = systemUiHideFlag;
             this.translucentFlag = translucentFlag;
             this.verticalGravity = verticalGravity;
             this.horizontalGravity = horizontalGravity;
+            this.seascapeGravity = seascapeGravity;
             this.transitionName = transitionName;
             this.hideWindowFlag = hideWindowFlag;
         }
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index 7706ff7..20f10b3 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -112,4 +112,5 @@
     void addQsTile(in ComponentName tile);
     void remQsTile(in ComponentName tile);
     void clickQsTile(in ComponentName tile);
+    void handleSystemNavigationKey(in int key);
 }
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 3d05422..698e387 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -66,4 +66,5 @@
     void addTile(in ComponentName tile);
     void remTile(in ComponentName tile);
     void clickTile(in ComponentName tile);
+    void handleSystemNavigationKey(in int key);
 }
diff --git a/core/java/com/android/internal/util/MimeIconUtils.java b/core/java/com/android/internal/util/MimeIconUtils.java
new file mode 100644
index 0000000..841ec7c
--- /dev/null
+++ b/core/java/com/android/internal/util/MimeIconUtils.java
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.util;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.provider.DocumentsContract;
+
+import com.android.internal.R;
+
+import java.util.HashMap;
+
+public class MimeIconUtils {
+
+    private static HashMap<String, Integer> sMimeIcons = new HashMap<>();
+
+    private static void add(String mimeType, int resId) {
+        if (sMimeIcons.put(mimeType, resId) != null) {
+            throw new RuntimeException(mimeType + " already registered!");
+        }
+    }
+
+    static {
+        int icon;
+
+        // Package
+        icon = R.drawable.ic_doc_apk;
+        add("application/vnd.android.package-archive", icon);
+
+        // Audio
+        icon = R.drawable.ic_doc_audio;
+        add("application/ogg", icon);
+        add("application/x-flac", icon);
+
+        // Certificate
+        icon = R.drawable.ic_doc_certificate;
+        add("application/pgp-keys", icon);
+        add("application/pgp-signature", icon);
+        add("application/x-pkcs12", icon);
+        add("application/x-pkcs7-certreqresp", icon);
+        add("application/x-pkcs7-crl", icon);
+        add("application/x-x509-ca-cert", icon);
+        add("application/x-x509-user-cert", icon);
+        add("application/x-pkcs7-certificates", icon);
+        add("application/x-pkcs7-mime", icon);
+        add("application/x-pkcs7-signature", icon);
+
+        // Source code
+        icon = R.drawable.ic_doc_codes;
+        add("application/rdf+xml", icon);
+        add("application/rss+xml", icon);
+        add("application/x-object", icon);
+        add("application/xhtml+xml", icon);
+        add("text/css", icon);
+        add("text/html", icon);
+        add("text/xml", icon);
+        add("text/x-c++hdr", icon);
+        add("text/x-c++src", icon);
+        add("text/x-chdr", icon);
+        add("text/x-csrc", icon);
+        add("text/x-dsrc", icon);
+        add("text/x-csh", icon);
+        add("text/x-haskell", icon);
+        add("text/x-java", icon);
+        add("text/x-literate-haskell", icon);
+        add("text/x-pascal", icon);
+        add("text/x-tcl", icon);
+        add("text/x-tex", icon);
+        add("application/x-latex", icon);
+        add("application/x-texinfo", icon);
+        add("application/atom+xml", icon);
+        add("application/ecmascript", icon);
+        add("application/json", icon);
+        add("application/javascript", icon);
+        add("application/xml", icon);
+        add("text/javascript", icon);
+        add("application/x-javascript", icon);
+
+        // Compressed
+        icon = R.drawable.ic_doc_compressed;
+        add("application/mac-binhex40", icon);
+        add("application/rar", icon);
+        add("application/zip", icon);
+        add("application/x-apple-diskimage", icon);
+        add("application/x-debian-package", icon);
+        add("application/x-gtar", icon);
+        add("application/x-iso9660-image", icon);
+        add("application/x-lha", icon);
+        add("application/x-lzh", icon);
+        add("application/x-lzx", icon);
+        add("application/x-stuffit", icon);
+        add("application/x-tar", icon);
+        add("application/x-webarchive", icon);
+        add("application/x-webarchive-xml", icon);
+        add("application/gzip", icon);
+        add("application/x-7z-compressed", icon);
+        add("application/x-deb", icon);
+        add("application/x-rar-compressed", icon);
+
+        // Contact
+        icon = R.drawable.ic_doc_contact;
+        add("text/x-vcard", icon);
+        add("text/vcard", icon);
+
+        // Event
+        icon = R.drawable.ic_doc_event;
+        add("text/calendar", icon);
+        add("text/x-vcalendar", icon);
+
+        // Font
+        icon = R.drawable.ic_doc_font;
+        add("application/x-font", icon);
+        add("application/font-woff", icon);
+        add("application/x-font-woff", icon);
+        add("application/x-font-ttf", icon);
+
+        // Image
+        icon = R.drawable.ic_doc_image;
+        add("application/vnd.oasis.opendocument.graphics", icon);
+        add("application/vnd.oasis.opendocument.graphics-template", icon);
+        add("application/vnd.oasis.opendocument.image", icon);
+        add("application/vnd.stardivision.draw", icon);
+        add("application/vnd.sun.xml.draw", icon);
+        add("application/vnd.sun.xml.draw.template", icon);
+
+        // PDF
+        icon = R.drawable.ic_doc_pdf;
+        add("application/pdf", icon);
+
+        // Presentation
+        icon = R.drawable.ic_doc_presentation;
+        add("application/vnd.stardivision.impress", icon);
+        add("application/vnd.sun.xml.impress", icon);
+        add("application/vnd.sun.xml.impress.template", icon);
+        add("application/x-kpresenter", icon);
+        add("application/vnd.oasis.opendocument.presentation", icon);
+
+        // Spreadsheet
+        icon = R.drawable.ic_doc_spreadsheet;
+        add("application/vnd.oasis.opendocument.spreadsheet", icon);
+        add("application/vnd.oasis.opendocument.spreadsheet-template", icon);
+        add("application/vnd.stardivision.calc", icon);
+        add("application/vnd.sun.xml.calc", icon);
+        add("application/vnd.sun.xml.calc.template", icon);
+        add("application/x-kspread", icon);
+
+        // Document
+        icon = R.drawable.ic_doc_document;
+        add("application/vnd.oasis.opendocument.text", icon);
+        add("application/vnd.oasis.opendocument.text-master", icon);
+        add("application/vnd.oasis.opendocument.text-template", icon);
+        add("application/vnd.oasis.opendocument.text-web", icon);
+        add("application/vnd.stardivision.writer", icon);
+        add("application/vnd.stardivision.writer-global", icon);
+        add("application/vnd.sun.xml.writer", icon);
+        add("application/vnd.sun.xml.writer.global", icon);
+        add("application/vnd.sun.xml.writer.template", icon);
+        add("application/x-abiword", icon);
+        add("application/x-kword", icon);
+
+        // Video
+        icon = R.drawable.ic_doc_video;
+        add("application/x-quicktimeplayer", icon);
+        add("application/x-shockwave-flash", icon);
+
+        // Word
+        icon = R.drawable.ic_doc_word;
+        add("application/msword", icon);
+        add("application/vnd.openxmlformats-officedocument.wordprocessingml.document", icon);
+        add("application/vnd.openxmlformats-officedocument.wordprocessingml.template", icon);
+
+        // Excel
+        icon = R.drawable.ic_doc_excel;
+        add("application/vnd.ms-excel", icon);
+        add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", icon);
+        add("application/vnd.openxmlformats-officedocument.spreadsheetml.template", icon);
+
+        // Powerpoint
+        icon = R.drawable.ic_doc_powerpoint;
+        add("application/vnd.ms-powerpoint", icon);
+        add("application/vnd.openxmlformats-officedocument.presentationml.presentation", icon);
+        add("application/vnd.openxmlformats-officedocument.presentationml.template", icon);
+        add("application/vnd.openxmlformats-officedocument.presentationml.slideshow", icon);
+    }
+
+    public static Drawable loadMimeIcon(Context context, String mimeType) {
+        if (DocumentsContract.Document.MIME_TYPE_DIR.equals(mimeType)) {
+            return context.getDrawable(R.drawable.ic_doc_folder);
+        }
+
+        // Look for exact match first
+        Integer resId = sMimeIcons.get(mimeType);
+        if (resId != null) {
+            return context.getDrawable(resId);
+        }
+
+        if (mimeType == null) {
+            // TODO: generic icon?
+            return null;
+        }
+
+        // Otherwise look for partial match
+        final String typeOnly = mimeType.split("/")[0];
+        if ("audio".equals(typeOnly)) {
+            return context.getDrawable(R.drawable.ic_doc_audio);
+        } else if ("image".equals(typeOnly)) {
+            return context.getDrawable(R.drawable.ic_doc_image);
+        } else if ("text".equals(typeOnly)) {
+            return context.getDrawable(R.drawable.ic_doc_text);
+        } else if ("video".equals(typeOnly)) {
+            return context.getDrawable(R.drawable.ic_doc_video);
+        } else {
+            return context.getDrawable(R.drawable.ic_doc_generic);
+        }
+    }
+}
diff --git a/core/java/com/android/internal/util/StateMachine.java b/core/java/com/android/internal/util/StateMachine.java
index 39fd36b..a5a3dba 100644
--- a/core/java/com/android/internal/util/StateMachine.java
+++ b/core/java/com/android/internal/util/StateMachine.java
@@ -29,8 +29,8 @@
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Vector;
 
 /**
@@ -1642,7 +1642,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessage(int what) {
+    public void sendMessage(int what) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1655,7 +1655,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessage(int what, Object obj) {
+    public void sendMessage(int what, Object obj) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1668,7 +1668,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessage(int what, int arg1) {
+    public void sendMessage(int what, int arg1) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1681,7 +1681,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessage(int what, int arg1, int arg2) {
+    public void sendMessage(int what, int arg1, int arg2) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1694,7 +1694,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessage(int what, int arg1, int arg2, Object obj) {
+    public void sendMessage(int what, int arg1, int arg2, Object obj) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1707,7 +1707,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessage(Message msg) {
+    public void sendMessage(Message msg) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1720,7 +1720,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessageDelayed(int what, long delayMillis) {
+    public void sendMessageDelayed(int what, long delayMillis) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1733,7 +1733,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessageDelayed(int what, Object obj, long delayMillis) {
+    public void sendMessageDelayed(int what, Object obj, long delayMillis) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1746,7 +1746,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessageDelayed(int what, int arg1, long delayMillis) {
+    public void sendMessageDelayed(int what, int arg1, long delayMillis) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1759,7 +1759,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessageDelayed(int what, int arg1, int arg2, long delayMillis) {
+    public void sendMessageDelayed(int what, int arg1, int arg2, long delayMillis) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
@@ -1772,7 +1772,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessageDelayed(int what, int arg1, int arg2, Object obj,
+    public void sendMessageDelayed(int what, int arg1, int arg2, Object obj,
             long delayMillis) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
@@ -1786,7 +1786,7 @@
      *
      * Message is ignored if state machine has quit.
      */
-    public final void sendMessageDelayed(Message msg, long delayMillis) {
+    public void sendMessageDelayed(Message msg, long delayMillis) {
         // mSmHandler can be null if the state machine has quit.
         SmHandler smh = mSmHandler;
         if (smh == null) return;
diff --git a/core/java/com/android/internal/util/WakeupMessage.java b/core/java/com/android/internal/util/WakeupMessage.java
index 2653745..7d222c7 100644
--- a/core/java/com/android/internal/util/WakeupMessage.java
+++ b/core/java/com/android/internal/util/WakeupMessage.java
@@ -45,24 +45,32 @@
     protected final String mCmdName;
     @VisibleForTesting
     protected final int mCmd, mArg1, mArg2;
+    @VisibleForTesting
+    protected final Object mObj;
     private boolean mScheduled;
 
     public WakeupMessage(Context context, Handler handler,
-            String cmdName, int cmd, int arg1, int arg2) {
+            String cmdName, int cmd, int arg1, int arg2, Object obj) {
         mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
         mHandler = handler;
         mCmdName = cmdName;
         mCmd = cmd;
         mArg1 = arg1;
         mArg2 = arg2;
+        mObj = obj;
     }
 
     public WakeupMessage(Context context, Handler handler, String cmdName, int cmd, int arg1) {
-        this(context, handler, cmdName, cmd, arg1, 0);
+        this(context, handler, cmdName, cmd, arg1, 0, null);
+    }
+
+    public WakeupMessage(Context context, Handler handler,
+            String cmdName, int cmd, int arg1, int arg2) {
+        this(context, handler, cmdName, cmd, arg1, arg2, null);
     }
 
     public WakeupMessage(Context context, Handler handler, String cmdName, int cmd) {
-        this(context, handler, cmdName, cmd, 0, 0);
+        this(context, handler, cmdName, cmd, 0, 0, null);
     }
 
     /**
@@ -99,7 +107,7 @@
             mScheduled = false;
         }
         if (stillScheduled) {
-            Message msg = mHandler.obtainMessage(mCmd, mArg1, mArg2);
+            Message msg = mHandler.obtainMessage(mCmd, mArg1, mArg2, mObj);
             mHandler.handleMessage(msg);
             msg.recycle();
         }
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index 59b4b35f..644c7e9 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -33,6 +33,7 @@
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputConnectionInspector;
 import android.view.inputmethod.InputConnectionInspector.MissingMethodFlags;
+import android.view.inputmethod.InputContentInfo;
 
 public abstract class IInputConnectionWrapper extends IInputContext.Stub {
     static final String TAG = "IInputConnectionWrapper";
@@ -61,6 +62,7 @@
     private static final int DO_CLEAR_META_KEY_STATES = 130;
     private static final int DO_REQUEST_UPDATE_CURSOR_ANCHOR_INFO = 140;
     private static final int DO_CLOSE_CONNECTION = 150;
+    private static final int DO_COMMIT_CONTENT = 160;
 
     @GuardedBy("mLock")
     @Nullable
@@ -241,6 +243,12 @@
         dispatchMessage(obtainMessage(DO_CLOSE_CONNECTION));
     }
 
+    public void commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts,
+            int seq, IInputContextCallback callback) {
+        dispatchMessage(obtainMessageIOOSC(DO_COMMIT_CONTENT, flags, inputContentInfo, opts, seq,
+                callback));
+    }
+
     void dispatchMessage(Message msg) {
         // If we are calling this from the main thread, then we can call
         // right through.  Otherwise, we need to send the message to the
@@ -552,6 +560,41 @@
                 }
                 return;
             }
+            case DO_COMMIT_CONTENT: {
+                final int flags = msg.arg1;
+                final boolean grantUriPermission =
+                        (flags & InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION) != 0;
+                SomeArgs args = (SomeArgs) msg.obj;
+                try {
+                    InputConnection ic = getInputConnection();
+                    if (ic == null || !isActive()) {
+                        Log.w(TAG, "commitContent on inactive InputConnection");
+                        args.callback.setCommitContentResult(false, args.seq);
+                        return;
+                    }
+                    final InputContentInfo inputContentInfo = (InputContentInfo) args.arg1;
+                    if (inputContentInfo == null || !inputContentInfo.validate()) {
+                        Log.w(TAG, "commitContent with invalid inputContentInfo="
+                                + inputContentInfo);
+                        args.callback.setCommitContentResult(false, args.seq);
+                        return;
+                    }
+                    if (grantUriPermission) {
+                        inputContentInfo.requestPermission();
+                    }
+                    final boolean result =
+                            ic.commitContent(inputContentInfo, flags, (Bundle) args.arg2);
+                    // If this request is not handled, then there is no reason to keep the URI
+                    // permission.
+                    if (grantUriPermission && !result) {
+                        inputContentInfo.releasePermission();
+                    }
+                    args.callback.setCommitContentResult(result, args.seq);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "Got RemoteException calling commitContent", e);
+                }
+                return;
+            }
         }
         Log.w(TAG, "Unhandled message code: " + msg.what);
     }
@@ -582,12 +625,14 @@
         return mH.obtainMessage(what, arg1, arg2, args);
     }
 
-    Message obtainMessageOSC(int what, Object arg1, int seq, IInputContextCallback callback) {
+    Message obtainMessageIOOSC(int what, int arg1, Object objArg1, Object objArg2, int seq,
+            IInputContextCallback callback) {
         SomeArgs args = new SomeArgs();
-        args.arg1 = arg1;
+        args.arg1 = objArg1;
+        args.arg2 = objArg2;
         args.callback = callback;
         args.seq = seq;
-        return mH.obtainMessage(what, 0, 0, args);
+        return mH.obtainMessage(what, arg1, 0, args);
     }
 
     Message obtainMessageIOSC(int what, int arg1, Object arg2, int seq,
diff --git a/core/java/com/android/internal/view/IInputContext.aidl b/core/java/com/android/internal/view/IInputContext.aidl
index f7ec420..728c557 100644
--- a/core/java/com/android/internal/view/IInputContext.aidl
+++ b/core/java/com/android/internal/view/IInputContext.aidl
@@ -21,6 +21,7 @@
 import android.view.inputmethod.CompletionInfo;
 import android.view.inputmethod.CorrectionInfo;
 import android.view.inputmethod.ExtractedTextRequest;
+import android.view.inputmethod.InputContentInfo;
 
 import com.android.internal.view.IInputContextCallback;
 
@@ -74,6 +75,9 @@
 
     void getSelectedText(int flags, int seq, IInputContextCallback callback);
 
-    void requestUpdateCursorAnchorInfo(in int cursorUpdateMode, int seq,
+    void requestUpdateCursorAnchorInfo(int cursorUpdateMode, int seq,
+            IInputContextCallback callback);
+
+    void commitContent(in InputContentInfo inputContentInfo, int flags, in Bundle opts, int sec,
             IInputContextCallback callback);
 }
diff --git a/core/java/com/android/internal/view/IInputContextCallback.aidl b/core/java/com/android/internal/view/IInputContextCallback.aidl
index 54ea306..0f40a83 100644
--- a/core/java/com/android/internal/view/IInputContextCallback.aidl
+++ b/core/java/com/android/internal/view/IInputContextCallback.aidl
@@ -28,4 +28,5 @@
     void setExtractedText(in ExtractedText extractedText, int seq);
     void setSelectedText(CharSequence selectedText, int seq);
     void setRequestUpdateCursorAnchorInfoResult(boolean result, int seq);
+    void setCommitContentResult(boolean result, int seq);
 }
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index cb7c3bf..9e4b43b 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -16,11 +16,13 @@
 
 package com.android.internal.view;
 
+import android.net.Uri;
 import android.os.ResultReceiver;
 import android.text.style.SuggestionSpan;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodSubtype;
 import android.view.inputmethod.EditorInfo;
+import com.android.internal.inputmethod.IInputContentUriToken;
 import com.android.internal.view.InputBindResult;
 import com.android.internal.view.IInputContext;
 import com.android.internal.view.IInputMethodClient;
@@ -81,5 +83,8 @@
     int getInputMethodWindowVisibleHeight();
     void clearLastInputMethodWindowForTransition(in IBinder token);
 
+    IInputContentUriToken createInputContentUriToken(in IBinder token, in Uri contentUri,
+            in String packageName);
+
     oneway void notifyUserAction(int sequenceNumber);
 }
diff --git a/core/java/com/android/internal/view/InputConnectionWrapper.java b/core/java/com/android/internal/view/InputConnectionWrapper.java
index f9884d8..9a09dcc 100644
--- a/core/java/com/android/internal/view/InputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/InputConnectionWrapper.java
@@ -16,6 +16,8 @@
 
 package com.android.internal.view;
 
+import android.annotation.NonNull;
+import android.inputmethodservice.AbstractInputMethodService;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.RemoteException;
@@ -29,10 +31,16 @@
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputConnectionInspector;
 import android.view.inputmethod.InputConnectionInspector.MissingMethodFlags;
+import android.view.inputmethod.InputContentInfo;
+
+import java.lang.ref.WeakReference;
 
 public class InputConnectionWrapper implements InputConnection {
     private static final int MAX_WAIT_TIME_MILLIS = 2000;
     private final IInputContext mIInputContext;
+    @NonNull
+    private final WeakReference<AbstractInputMethodService> mInputMethodService;
+
     @MissingMethodFlags
     private final int mMissingMethods;
 
@@ -46,7 +54,8 @@
         public ExtractedText mExtractedText;
         public int mCursorCapsMode;
         public boolean mRequestUpdateCursorAnchorInfoResult;
-        
+        public boolean mCommitContentResult;
+
         // A 'pool' of one InputContextCallback.  Each ICW request will attempt to gain
         // exclusive access to this object.
         private static InputContextCallback sInstance = new InputContextCallback();
@@ -172,6 +181,19 @@
             }
         }
 
+        public void setCommitContentResult(boolean result, int seq) {
+            synchronized (this) {
+                if (seq == mSeq) {
+                    mCommitContentResult = result;
+                    mHaveValue = true;
+                    notifyAll();
+                } else {
+                    Log.i(TAG, "Got out-of-sequence callback " + seq + " (expected " + mSeq
+                            + ") in setCommitContentResult, ignoring.");
+                }
+            }
+        }
+
         /**
          * Waits for a result for up to {@link #MAX_WAIT_TIME_MILLIS} milliseconds.
          * 
@@ -195,8 +217,10 @@
         }
     }
 
-    public InputConnectionWrapper(IInputContext inputContext,
-            @MissingMethodFlags final int missingMethods) {
+    public InputConnectionWrapper(
+            @NonNull WeakReference<AbstractInputMethodService> inputMethodService,
+            IInputContext inputContext, @MissingMethodFlags final int missingMethods) {
+        mInputMethodService = inputMethodService;
         mIInputContext = inputContext;
         mMissingMethods = missingMethods;
     }
@@ -491,6 +515,37 @@
         // Nothing should happen when called from input method.
     }
 
+    public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
+        boolean result = false;
+        if (isMethodMissing(MissingMethodFlags.COMMIT_CONTENT)) {
+            // This method is not implemented.
+            return false;
+        }
+        try {
+            if ((flags & InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION) != 0) {
+                final AbstractInputMethodService inputMethodService = mInputMethodService.get();
+                if (inputMethodService == null) {
+                    // This basically should not happen, because it's the the caller of this method.
+                    return false;
+                }
+                inputMethodService.exposeContent(inputContentInfo, this);
+            }
+
+            InputContextCallback callback = InputContextCallback.getInstance();
+            mIInputContext.commitContent(inputContentInfo, flags, opts, callback.mSeq, callback);
+            synchronized (callback) {
+                callback.waitForResultLocked();
+                if (callback.mHaveValue) {
+                    result = callback.mCommitContentResult;
+                }
+            }
+            callback.dispose();
+        } catch (RemoteException e) {
+            return false;
+        }
+        return result;
+    }
+
     private boolean isMethodMissing(@MissingMethodFlags final int methodFlag) {
         return (mMissingMethods & methodFlag) == methodFlag;
     }
diff --git a/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java b/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
index 9e2cbdb..d28ab078 100644
--- a/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
+++ b/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
@@ -30,6 +30,8 @@
 @HasNativeInterpolator
 public class FallbackLUTInterpolator implements NativeInterpolatorFactory, TimeInterpolator {
 
+    // If the duration of an animation is more than 300 frames, we cap the sample size to 300.
+    private static final int MAX_SAMPLE_POINTS = 300;
     private TimeInterpolator mSourceInterpolator;
     private final float mLut[];
 
@@ -47,6 +49,7 @@
         int animIntervalMs = (int) (frameIntervalNanos / TimeUtils.NANOS_PER_MS);
         // We need 2 frame values as the minimal.
         int numAnimFrames = Math.max(2, (int) Math.ceil(((double) duration) / animIntervalMs));
+        numAnimFrames = Math.min(numAnimFrames, MAX_SAMPLE_POINTS);
         float values[] = new float[numAnimFrames];
         float lastFrame = numAnimFrames - 1;
         for (int i = 0; i < numAnimFrames; i++) {
diff --git a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl b/core/java/com/android/internal/widget/ICheckCredentialProgressCallback.aidl
similarity index 67%
copy from telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
copy to core/java/com/android/internal/widget/ICheckCredentialProgressCallback.aidl
index b7e78d1..79717cf 100644
--- a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
+++ b/core/java/com/android/internal/widget/ICheckCredentialProgressCallback.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright 2016, The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package android.telecom;
+package com.android.internal.widget;
 
-/**
- * {@hide}
- */
-parcelable ParcelableCallAnalytics;
+/** {@hide} */
+oneway interface ICheckCredentialProgressCallback {
+    void onCredentialVerified();
+}
diff --git a/core/java/com/android/internal/widget/ILockSettings.aidl b/core/java/com/android/internal/widget/ILockSettings.aidl
index 05b839d..9fa558e 100644
--- a/core/java/com/android/internal/widget/ILockSettings.aidl
+++ b/core/java/com/android/internal/widget/ILockSettings.aidl
@@ -17,6 +17,7 @@
 package com.android.internal.widget;
 
 import android.app.trust.IStrongAuthTracker;
+import com.android.internal.widget.ICheckCredentialProgressCallback;
 import com.android.internal.widget.VerifyCredentialResponse;
 
 /** {@hide} */
@@ -29,10 +30,12 @@
     String getString(in String key, in String defaultValue, in int userId);
     void setLockPattern(in String pattern, in String savedPattern, int userId);
     void resetKeyStore(int userId);
-    VerifyCredentialResponse checkPattern(in String pattern, int userId);
+    VerifyCredentialResponse checkPattern(in String pattern, int userId,
+            in ICheckCredentialProgressCallback progressCallback);
     VerifyCredentialResponse verifyPattern(in String pattern, long challenge, int userId);
     void setLockPassword(in String password, in String savedPassword, int userId);
-    VerifyCredentialResponse checkPassword(in String password, int userId);
+    VerifyCredentialResponse checkPassword(in String password, int userId,
+            in ICheckCredentialProgressCallback progressCallback);
     VerifyCredentialResponse verifyPassword(in String password, long challenge, int userId);
     VerifyCredentialResponse verifyTiedProfileChallenge(String password, boolean isPattern, long challenge, int userId);
     boolean checkVoldPassword(int userId);
diff --git a/core/java/com/android/internal/widget/LockPatternChecker.java b/core/java/com/android/internal/widget/LockPatternChecker.java
index 713f56f..df9b0dd 100644
--- a/core/java/com/android/internal/widget/LockPatternChecker.java
+++ b/core/java/com/android/internal/widget/LockPatternChecker.java
@@ -14,6 +14,13 @@
      * Interface for a callback to be invoked after security check.
      */
     public interface OnCheckCallback {
+
+        /**
+         * Invoked as soon as possible we know that the credentials match. This will be called
+         * earlier than {@link #onChecked} but only if the credentials match.
+         */
+        default void onEarlyMatched() {}
+
         /**
          * Invoked when a security check is finished.
          *
@@ -92,7 +99,7 @@
             @Override
             protected Boolean doInBackground(Void... args) {
                 try {
-                    return utils.checkPattern(pattern, userId);
+                    return utils.checkPattern(pattern, userId, callback::onEarlyMatched);
                 } catch (RequestThrottledException ex) {
                     mThrottleTimeout = ex.getTimeoutMs();
                     return false;
@@ -199,7 +206,7 @@
             @Override
             protected Boolean doInBackground(Void... args) {
                 try {
-                    return utils.checkPassword(password, userId);
+                    return utils.checkPassword(password, userId, callback::onEarlyMatched);
                 } catch (RequestThrottledException ex) {
                     mThrottleTimeout = ex.getTimeoutMs();
                     return false;
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 2e0dfa5..eff116b 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -17,6 +17,7 @@
 package com.android.internal.widget;
 
 import android.annotation.IntDef;
+import android.annotation.Nullable;
 import android.app.admin.DevicePolicyManager;
 import android.app.trust.IStrongAuthTracker;
 import android.app.trust.TrustManager;
@@ -32,7 +33,6 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.SystemClock;
-import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.os.storage.IMountService;
@@ -149,6 +149,7 @@
     private DevicePolicyManager mDevicePolicyManager;
     private ILockSettings mLockSettingsService;
     private UserManager mUserManager;
+    private final Handler mHandler = new Handler();
 
     /**
      * Use {@link TrustManager#isTrustUsuallyManaged(int)}.
@@ -341,10 +342,23 @@
      */
     public boolean checkPattern(List<LockPatternView.Cell> pattern, int userId)
             throws RequestThrottledException {
+        return checkPattern(pattern, userId, null /* progressCallback */);
+    }
+
+    /**
+     * Check to see if a pattern matches the saved pattern.  If no pattern exists,
+     * always returns true.
+     * @param pattern The pattern to check.
+     * @return Whether the pattern matches the stored one.
+     */
+    public boolean checkPattern(List<LockPatternView.Cell> pattern, int userId,
+            @Nullable CheckCredentialProgressCallback progressCallback)
+            throws RequestThrottledException {
         throwIfCalledOnMainThread();
         try {
             VerifyCredentialResponse response =
-                    getLockSettings().checkPattern(patternToString(pattern), userId);
+                    getLockSettings().checkPattern(patternToString(pattern), userId,
+                            wrapCallback(progressCallback));
 
             if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
                 return true;
@@ -423,10 +437,22 @@
      * @return Whether the password matches the stored one.
      */
     public boolean checkPassword(String password, int userId) throws RequestThrottledException {
+        return checkPassword(password, userId, null /* progressCallback */);
+    }
+
+    /**
+     * Check to see if a password matches the saved password.  If no password exists,
+     * always returns true.
+     * @param password The password to check.
+     * @return Whether the password matches the stored one.
+     */
+    public boolean checkPassword(String password, int userId,
+            @Nullable CheckCredentialProgressCallback progressCallback)
+            throws RequestThrottledException {
         throwIfCalledOnMainThread();
         try {
             VerifyCredentialResponse response =
-                    getLockSettings().checkPassword(password, userId);
+                    getLockSettings().checkPassword(password, userId, wrapCallback(progressCallback));
             if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
                 return true;
             } else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
@@ -1475,6 +1501,33 @@
         return (getStrongAuthForUser(userId) & ~StrongAuthTracker.ALLOWING_FINGERPRINT) == 0;
     }
 
+    private ICheckCredentialProgressCallback wrapCallback(
+            final CheckCredentialProgressCallback callback) {
+        if (callback == null) {
+            return null;
+        } else {
+            return new ICheckCredentialProgressCallback.Stub() {
+
+                @Override
+                public void onCredentialVerified() throws RemoteException {
+                    mHandler.post(callback::onEarlyMatched);
+                }
+            };
+        }
+    }
+
+    /**
+     * Callback to be notified about progress when checking credentials.
+     */
+    public interface CheckCredentialProgressCallback {
+
+        /**
+         * Called as soon as possible when we know that the credentials match but the user hasn't
+         * been fully unlocked.
+         */
+        void onEarlyMatched();
+    }
+
     /**
      * Tracks the global strong authentication state.
      */
diff --git a/core/java/com/android/internal/widget/ViewPager.java b/core/java/com/android/internal/widget/ViewPager.java
index 277fafd..d5b6def 100644
--- a/core/java/com/android/internal/widget/ViewPager.java
+++ b/core/java/com/android/internal/widget/ViewPager.java
@@ -55,34 +55,7 @@
 import java.util.Comparator;
 
 /**
- * Layout manager that allows the user to flip left and right
- * through pages of data.  You supply an implementation of a
- * {@link android.support.v4.view.PagerAdapter} to generate the pages that the view shows.
- *
- * <p>Note this class is currently under early design and
- * development.  The API will likely change in later updates of
- * the compatibility library, requiring changes to the source code
- * of apps when they are compiled against the newer version.</p>
- *
- * <p>ViewPager is most often used in conjunction with {@link android.app.Fragment},
- * which is a convenient way to supply and manage the lifecycle of each page.
- * There are standard adapters implemented for using fragments with the ViewPager,
- * which cover the most common use cases.  These are
- * {@link android.support.v4.app.FragmentPagerAdapter} and
- * {@link android.support.v4.app.FragmentStatePagerAdapter}; each of these
- * classes have simple code showing how to build a full user interface
- * with them.
- *
- * <p>For more information about how to use ViewPager, read <a
- * href="{@docRoot}training/implementing-navigation/lateral.html">Creating Swipe Views with
- * Tabs</a>.</p>
- *
- * <p>Below is a more complicated example of ViewPager, using it in conjunction
- * with {@link android.app.ActionBar} tabs.  You can find other examples of using
- * ViewPager in the API 4+ Support Demos and API 13+ Support Demos sample code.
- *
- * {@sample development/samples/Support13Demos/src/com/example/android/supportv13/app/ActionBarTabsPager.java
- *      complete}
+ * Framework copy of the support-v4 ViewPager class.
  */
 public class ViewPager extends ViewGroup {
     private static final String TAG = "ViewPager";
diff --git a/core/jni/android_app_ApplicationLoaders.cpp b/core/jni/android_app_ApplicationLoaders.cpp
index 24ee959..3e7c039 100644
--- a/core/jni/android_app_ApplicationLoaders.cpp
+++ b/core/jni/android_app_ApplicationLoaders.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#define LOG_TAG "ApplicationLoaders"
+
 #include <nativehelper/ScopedUtfChars.h>
 #include <nativeloader/native_loader.h>
 #include <vulkan/vulkan_loader_data.h>
@@ -22,10 +24,17 @@
 
 static void setupVulkanLayerPath_native(JNIEnv* env, jobject clazz,
         jobject classLoader, jstring librarySearchPath) {
+    android_namespace_t* ns = android::FindNamespaceByClassLoader(env, classLoader);
     ScopedUtfChars layerPathChars(env, librarySearchPath);
+
     vulkan::LoaderData& loader_data = vulkan::LoaderData::GetInstance();
-    loader_data.layer_path = layerPathChars.c_str();
-    loader_data.app_namespace = android::FindNamespaceByClassLoader(env, classLoader);
+    if (loader_data.layer_path.empty()) {
+        loader_data.layer_path = layerPathChars.c_str();
+        loader_data.app_namespace = ns;
+    } else {
+        ALOGD("ignored Vulkan layer search path %s for namespace %p",
+                layerPathChars.c_str(), ns);
+    }
 }
 
 static const JNINativeMethod g_methods[] = {
diff --git a/core/jni/android_graphics_drawable_AnimatedVectorDrawable.cpp b/core/jni/android_graphics_drawable_AnimatedVectorDrawable.cpp
index 4b2a72d..47252ad 100644
--- a/core/jni/android_graphics_drawable_AnimatedVectorDrawable.cpp
+++ b/core/jni/android_graphics_drawable_AnimatedVectorDrawable.cpp
@@ -95,6 +95,12 @@
     return reinterpret_cast<jlong>(animatorSet);
 }
 
+static void setVectorDrawableTarget(JNIEnv*, jobject,jlong animatorPtr, jlong vectorDrawablePtr) {
+    VectorDrawable::Tree* tree = reinterpret_cast<VectorDrawable::Tree*>(vectorDrawablePtr);
+    PropertyValuesAnimatorSet* set = reinterpret_cast<PropertyValuesAnimatorSet*>(animatorPtr);
+    set->setVectorDrawable(tree);
+}
+
 static jlong createGroupPropertyHolder(JNIEnv*, jobject, jlong nativePtr, jint propertyId,
         jfloat startValue, jfloat endValue) {
     VectorDrawable::Group* group = reinterpret_cast<VectorDrawable::Group*>(nativePtr);
@@ -136,14 +142,24 @@
             startValue, endValue);
     return reinterpret_cast<jlong>(newHolder);
 }
-static void setPropertyHolderData(JNIEnv* env, jobject, jlong propertyHolderPtr,
+static void setFloatPropertyHolderData(JNIEnv* env, jobject, jlong propertyHolderPtr,
         jfloatArray srcData, jint length) {
-
     jfloat* propertyData = env->GetFloatArrayElements(srcData, nullptr);
-    PropertyValuesHolder* holder = reinterpret_cast<PropertyValuesHolder*>(propertyHolderPtr);
+    PropertyValuesHolderImpl<float>* holder =
+            reinterpret_cast<PropertyValuesHolderImpl<float>*>(propertyHolderPtr);
     holder->setPropertyDataSource(propertyData, length);
     env->ReleaseFloatArrayElements(srcData, propertyData, JNI_ABORT);
 }
+
+static void setIntPropertyHolderData(JNIEnv* env, jobject, jlong propertyHolderPtr,
+        jintArray srcData, jint length) {
+    jint* propertyData = env->GetIntArrayElements(srcData, nullptr);
+    PropertyValuesHolderImpl<int>* holder =
+            reinterpret_cast<PropertyValuesHolderImpl<int>*>(propertyHolderPtr);
+    holder->setPropertyDataSource(propertyData, length);
+    env->ReleaseIntArrayElements(srcData, propertyData, JNI_ABORT);
+}
+
 static void start(JNIEnv* env, jobject, jlong animatorSetPtr, jobject finishListener, jint id) {
     PropertyValuesAnimatorSet* set = reinterpret_cast<PropertyValuesAnimatorSet*>(animatorSetPtr);
     AnimationListener* listener = createAnimationListener(env, finishListener, id);
@@ -168,13 +184,15 @@
 
 static const JNINativeMethod gMethods[] = {
     {"nCreateAnimatorSet", "()J", (void*)createAnimatorSet},
+    {"nSetVectorDrawableTarget", "(JJ)V", (void*)setVectorDrawableTarget},
     {"nAddAnimator", "(JJJJJI)V", (void*)addAnimator},
     {"nCreateGroupPropertyHolder", "!(JIFF)J", (void*)createGroupPropertyHolder},
     {"nCreatePathDataPropertyHolder", "!(JJJ)J", (void*)createPathDataPropertyHolder},
     {"nCreatePathColorPropertyHolder", "!(JIII)J", (void*)createPathColorPropertyHolder},
     {"nCreatePathPropertyHolder", "!(JIFF)J", (void*)createPathPropertyHolder},
     {"nCreateRootAlphaPropertyHolder", "!(JFF)J", (void*)createRootAlphaPropertyHolder},
-    {"nSetPropertyHolderData", "(J[FI)V", (void*)setPropertyHolderData},
+    {"nSetPropertyHolderData", "(J[FI)V", (void*)setFloatPropertyHolderData},
+    {"nSetPropertyHolderData", "(J[II)V", (void*)setIntPropertyHolderData},
     {"nStart", "(JLandroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;I)V", (void*)start},
     {"nReverse", "(JLandroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;I)V", (void*)reverse},
     {"nEnd", "!(J)V", (void*)end},
diff --git a/core/jni/android_hardware_location_ContextHubService.cpp b/core/jni/android_hardware_location_ContextHubService.cpp
index 3881d6d9..a56eba6 100644
--- a/core/jni/android_hardware_location_ContextHubService.cpp
+++ b/core/jni/android_hardware_location_ContextHubService.cpp
@@ -186,9 +186,13 @@
 
 static void send_query_for_apps() {
     hub_message_t msg;
+    query_apps_request_t queryMsg;
+
+    queryMsg.app_name.id = NANOAPP_VENDOR_ALL_APPS;
 
     msg.message_type = CONTEXT_HUB_QUERY_APPS;
-    msg.message_len  = 0;
+    msg.message_len  = sizeof(queryMsg);
+    msg.message = &queryMsg;
 
     for (int i = 0; i < db.hubInfo.numHubs; i++ ) {
         ALOGD("Sending query for apps to hub %d", i);
diff --git a/core/jni/android_media_AudioFormat.h b/core/jni/android_media_AudioFormat.h
index 6513304..092aaf6 100644
--- a/core/jni/android_media_AudioFormat.h
+++ b/core/jni/android_media_AudioFormat.h
@@ -20,18 +20,20 @@
 #include <system/audio.h>
 
 // keep these values in sync with AudioFormat.java
-#define ENCODING_PCM_16BIT  2
-#define ENCODING_PCM_8BIT   3
-#define ENCODING_PCM_FLOAT  4
-#define ENCODING_AC3        5
-#define ENCODING_E_AC3      6
-#define ENCODING_DTS        7
-#define ENCODING_DTS_HD     8
-#define ENCODING_MP3        9
-#define ENCODING_AAC_LC     10
-#define ENCODING_AAC_HE_V1  11
-#define ENCODING_AAC_HE_V2  12
-#define ENCODING_IEC61937   13
+#define ENCODING_PCM_16BIT      2
+#define ENCODING_PCM_8BIT       3
+#define ENCODING_PCM_FLOAT      4
+#define ENCODING_AC3            5
+#define ENCODING_E_AC3          6
+#define ENCODING_DTS            7
+#define ENCODING_DTS_HD         8
+#define ENCODING_MP3            9
+#define ENCODING_AAC_LC         10
+#define ENCODING_AAC_HE_V1      11
+#define ENCODING_AAC_HE_V2      12
+#define ENCODING_IEC61937       13
+#define ENCODING_DOLBY_TRUEHD   14
+
 #define ENCODING_INVALID    0
 #define ENCODING_DEFAULT    1
 
@@ -65,6 +67,8 @@
         return AUDIO_FORMAT_AAC_HE_V1;
     case ENCODING_AAC_HE_V2:
         return AUDIO_FORMAT_AAC_HE_V2;
+    case ENCODING_DOLBY_TRUEHD:
+        return AUDIO_FORMAT_DOLBY_TRUEHD;
     case ENCODING_IEC61937:
         return AUDIO_FORMAT_IEC61937;
     case ENCODING_DEFAULT:
@@ -108,6 +112,8 @@
         return ENCODING_AAC_HE_V2;
     case AUDIO_FORMAT_IEC61937:
         return ENCODING_IEC61937;
+    case AUDIO_FORMAT_DOLBY_TRUEHD:
+        return ENCODING_DOLBY_TRUEHD;
     case AUDIO_FORMAT_DEFAULT:
         return ENCODING_DEFAULT;
     default:
diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 2364787..679e882 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -125,6 +125,99 @@
     }
 }
 
+static void android_net_utils_setupRaSocket(JNIEnv *env, jobject clazz, jobject javaFd,
+        jint ifIndex)
+{
+    static const int kLinkLocalHopLimit = 255;
+
+    int fd = jniGetFDFromFileDescriptor(env, javaFd);
+
+    // Set an ICMPv6 filter that only passes Router Solicitations.
+    struct icmp6_filter rs_only;
+    ICMP6_FILTER_SETBLOCKALL(&rs_only);
+    ICMP6_FILTER_SETPASS(ND_ROUTER_SOLICIT, &rs_only);
+    socklen_t len = sizeof(rs_only);
+    if (setsockopt(fd, IPPROTO_ICMPV6, ICMP6_FILTER, &rs_only, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "setsockopt(ICMP6_FILTER): %s", strerror(errno));
+        return;
+    }
+
+    // Most/all of the rest of these options can be set via Java code, but
+    // because we're here on account of setting an icmp6_filter go ahead
+    // and do it all natively for now.
+    //
+    // TODO: Consider moving these out to Java.
+
+    // Set the multicast hoplimit to 255 (link-local only).
+    int hops = kLinkLocalHopLimit;
+    len = sizeof(hops);
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hops, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "setsockopt(IPV6_MULTICAST_HOPS): %s", strerror(errno));
+        return;
+    }
+
+    // Set the unicast hoplimit to 255 (link-local only).
+    hops = kLinkLocalHopLimit;
+    len = sizeof(hops);
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &hops, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "setsockopt(IPV6_UNICAST_HOPS): %s", strerror(errno));
+        return;
+    }
+
+    // Explicitly disable multicast loopback.
+    int off = 0;
+    len = sizeof(off);
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &off, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "setsockopt(IPV6_MULTICAST_LOOP): %s", strerror(errno));
+        return;
+    }
+
+    // Specify the IPv6 interface to use for outbound multicast.
+    len = sizeof(ifIndex);
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifIndex, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "setsockopt(IPV6_MULTICAST_IF): %s", strerror(errno));
+        return;
+    }
+
+    // Additional options to be considered:
+    //     - IPV6_TCLASS
+    //     - IPV6_RECVPKTINFO
+    //     - IPV6_RECVHOPLIMIT
+
+    // Bind to [::].
+    const struct sockaddr_in6 sin6 = {
+            .sin6_family = AF_INET6,
+            .sin6_port = 0,
+            .sin6_flowinfo = 0,
+            .sin6_addr = IN6ADDR_ANY_INIT,
+            .sin6_scope_id = 0,
+    };
+    auto sa = reinterpret_cast<const struct sockaddr *>(&sin6);
+    len = sizeof(sin6);
+    if (bind(fd, sa, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "bind(IN6ADDR_ANY): %s", strerror(errno));
+        return;
+    }
+
+    // Join the all-routers multicast group, ff02::2%index.
+    struct ipv6_mreq all_rtrs = {
+        .ipv6mr_multiaddr = {{{0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2}}},
+        .ipv6mr_interface = ifIndex,
+    };
+    len = sizeof(all_rtrs);
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &all_rtrs, len) != 0) {
+        jniThrowExceptionFmt(env, "java/net/SocketException",
+                "setsockopt(IPV6_JOIN_GROUP): %s", strerror(errno));
+        return;
+    }
+}
+
 static jboolean android_net_utils_bindProcessToNetwork(JNIEnv *env, jobject thiz, jint netId)
 {
     return (jboolean) !setNetworkForProcess(netId);
@@ -173,6 +266,7 @@
     { "queryUserAccess", "(II)Z", (void*)android_net_utils_queryUserAccess },
     { "attachDhcpFilter", "(Ljava/io/FileDescriptor;)V", (void*) android_net_utils_attachDhcpFilter },
     { "attachRaFilter", "(Ljava/io/FileDescriptor;I)V", (void*) android_net_utils_attachRaFilter },
+    { "setupRaSocket", "(Ljava/io/FileDescriptor;I)V", (void*) android_net_utils_setupRaSocket },
 };
 
 int register_android_net_NetworkUtils(JNIEnv* env)
diff --git a/core/jni/android_view_RenderNode.cpp b/core/jni/android_view_RenderNode.cpp
index 4fc546c..b0028e1 100644
--- a/core/jni/android_view_RenderNode.cpp
+++ b/core/jni/android_view_RenderNode.cpp
@@ -573,8 +573,9 @@
                 bounds.roundOut();
             }
 
+            incStrong(0);
             auto functor = std::bind(
-                std::mem_fn(&SurfaceViewPositionUpdater::doUpdatePosition), this,
+                std::mem_fn(&SurfaceViewPositionUpdater::doUpdatePositionAsync), this,
                 (jlong) info.canvasContext.getFrameNumber(),
                 (jint) bounds.left, (jint) bounds.top,
                 (jint) bounds.right, (jint) bounds.bottom);
@@ -585,15 +586,18 @@
         virtual void onPositionLost(RenderNode& node, const TreeInfo* info) override {
             if (CC_UNLIKELY(!mWeakRef || (info && !info->updateWindowPositions))) return;
 
-            if (info) {
-                auto functor = std::bind(
-                    std::mem_fn(&SurfaceViewPositionUpdater::doNotifyPositionLost), this,
-                    (jlong) info->canvasContext.getFrameNumber());
-
-                info->canvasContext.enqueueFrameWork(std::move(functor));
-            } else {
-                doNotifyPositionLost(0);
+            ATRACE_NAME("SurfaceView position lost");
+            JNIEnv* env = jnienv();
+            jobject localref = env->NewLocalRef(mWeakRef);
+            if (CC_UNLIKELY(!localref)) {
+                jnienv()->DeleteWeakGlobalRef(mWeakRef);
+                mWeakRef = nullptr;
+                return;
             }
+
+            env->CallVoidMethod(localref, gSurfaceViewPositionLostMethod,
+                    info ? info->canvasContext.getFrameNumber() : 0);
+            env->DeleteLocalRef(localref);
         }
 
     private:
@@ -605,36 +609,23 @@
             return env;
         }
 
-        void doUpdatePosition(jlong frameNumber, jint left, jint top,
+        void doUpdatePositionAsync(jlong frameNumber, jint left, jint top,
                 jint right, jint bottom) {
             ATRACE_NAME("Update SurfaceView position");
 
             JNIEnv* env = jnienv();
             jobject localref = env->NewLocalRef(mWeakRef);
             if (CC_UNLIKELY(!localref)) {
-                jnienv()->DeleteWeakGlobalRef(mWeakRef);
+                env->DeleteWeakGlobalRef(mWeakRef);
                 mWeakRef = nullptr;
-                return;
+            } else {
+                env->CallVoidMethod(localref, gSurfaceViewPositionUpdateMethod,
+                        frameNumber, left, top, right, bottom);
+                env->DeleteLocalRef(localref);
             }
 
-            env->CallVoidMethod(localref, gSurfaceViewPositionUpdateMethod,
-                    frameNumber, left, top, right, bottom);
-            env->DeleteLocalRef(localref);
-        }
-
-        void doNotifyPositionLost(jlong frameNumber) {
-            ATRACE_NAME("SurfaceView position lost");
-
-            JNIEnv* env = jnienv();
-            jobject localref = env->NewLocalRef(mWeakRef);
-            if (CC_UNLIKELY(!localref)) {
-                jnienv()->DeleteWeakGlobalRef(mWeakRef);
-                mWeakRef = nullptr;
-                return;
-            }
-
-            env->CallVoidMethod(localref, gSurfaceViewPositionLostMethod, frameNumber);
-            env->DeleteLocalRef(localref);
+            // We need to release ourselves here
+            decStrong(0);
         }
 
         JavaVM* mVm;
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index ff75677..fa1313b 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -248,10 +248,10 @@
     }
 }
 
-static void nativeSetPositionAppliesWithResize(JNIEnv* env, jclass clazz,
+static void nativeSetGeometryAppliesWithResize(JNIEnv* env, jclass clazz,
         jlong nativeObject) {
     SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
-    status_t err = ctrl->setPositionAppliesWithResize();
+    status_t err = ctrl->setGeometryAppliesWithResize();
     if (err < 0 && err != NO_INIT) {
         doThrowIAE(env);
     }
@@ -626,6 +626,16 @@
     return javaObjectForIBinder(env, ctrl->getHandle());
 }
 
+static jboolean nativeGetTransformToDisplayInverse(JNIEnv* env, jclass clazz, jlong nativeObject) {
+    bool out = false;
+    auto ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
+    status_t status = ctrl->getTransformToDisplayInverse(&out);
+    if (status != NO_ERROR) {
+        return false;
+    }
+    return out;
+}
+
 static jobject nativeGetHdrCapabilities(JNIEnv* env, jclass clazz, jobject tokenObject) {
     sp<IBinder> token(ibinderForJavaObject(env, tokenObject));
     if (token == NULL) return NULL;
@@ -667,8 +677,8 @@
             (void*)nativeSetLayer },
     {"nativeSetPosition", "(JFF)V",
             (void*)nativeSetPosition },
-    {"nativeSetPositionAppliesWithResize", "(J)V",
-            (void*)nativeSetPositionAppliesWithResize },
+    {"nativeSetGeometryAppliesWithResize", "(J)V",
+            (void*)nativeSetGeometryAppliesWithResize },
     {"nativeSetSize", "(JII)V",
             (void*)nativeSetSize },
     {"nativeSetTransparentRegionHint", "(JLandroid/graphics/Region;)V",
@@ -722,7 +732,9 @@
     {"nativeSetOverrideScalingMode", "(JI)V",
             (void*)nativeSetOverrideScalingMode },
     {"nativeGetHandle", "(J)Landroid/os/IBinder;",
-            (void*)nativeGetHandle }
+            (void*)nativeGetHandle },
+    {"nativeGetTransformToDisplayInverse", "(J)Z",
+            (void*)nativeGetTransformToDisplayInverse },
 };
 
 int register_android_view_SurfaceControl(JNIEnv* env)
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 5b4bfe9..595d5c6 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -32,6 +32,7 @@
 #include <utils/Looper.h>
 #include <utils/RefBase.h>
 #include <utils/StrongPointer.h>
+#include <utils/Timers.h>
 #include <android_runtime/android_view_Surface.h>
 #include <system/window.h>
 
@@ -44,6 +45,7 @@
 #include <FrameMetricsObserver.h>
 #include <IContextFactory.h>
 #include <JankTracker.h>
+#include <PropertyValuesAnimatorSet.h>
 #include <RenderNode.h>
 #include <renderthread/CanvasContext.h>
 #include <renderthread/RenderProxy.h>
@@ -122,6 +124,31 @@
     std::vector<OnFinishedEvent> mOnFinishedEvents;
 };
 
+class FinishAndInvokeListener : public MessageHandler {
+public:
+    explicit FinishAndInvokeListener(PropertyValuesAnimatorSet* anim)
+            : mAnimator(anim) {
+        mListener = anim->getOneShotListener();
+        mRequestId = anim->getRequestId();
+    }
+
+    virtual void handleMessage(const Message& message) {
+        if (mAnimator->getRequestId() == mRequestId) {
+            // Request Id has not changed, meaning there's no animation lifecyle change since the
+            // message is posted, so go ahead and call finish to make sure the PlayState is properly
+            // updated. This is needed because before the next frame comes in from UI thread to
+            // trigger an animation update, there could be reverse/cancel etc. So we need to update
+            // the playstate in time to ensure all the subsequent events get chained properly.
+            mAnimator->end();
+        }
+        mListener->onAnimationFinished(nullptr);
+    }
+private:
+    sp<PropertyValuesAnimatorSet> mAnimator;
+    sp<AnimationListener> mListener;
+    uint32_t mRequestId;
+};
+
 class RenderingException : public MessageHandler {
 public:
     RenderingException(JavaVM* vm, const std::string& message)
@@ -160,6 +187,15 @@
 
     virtual void prepareTree(TreeInfo& info) override {
         info.errorHandler = this;
+
+        for (auto& anim : mVectorDrawableAnimators) {
+            // Assume that the property change in VD from the animators will not be consumed. Mark
+            // otherwise if the VDs are found in the display list tree. For VDs that are not in
+            // the display list tree, we stop providing animation pulses by 1) removing them from
+            // the animation list, 2) post a delayed message to end them at end time so their
+            // listeners can receive the corresponding callbacks.
+            anim->getVectorDrawable()->setPropertyChangeWillBeConsumed(false);
+        }
         // TODO: This is hacky
         info.windowInsetLeft = -stagingProperties().getLeft();
         info.windowInsetTop = -stagingProperties().getTop();
@@ -169,16 +205,46 @@
         info.windowInsetLeft = 0;
         info.windowInsetTop = 0;
         info.errorHandler = nullptr;
+
+        for (auto it = mVectorDrawableAnimators.begin(); it != mVectorDrawableAnimators.end();) {
+            if (!(*it)->getVectorDrawable()->getPropertyChangeWillBeConsumed()) {
+                // Vector Drawable is not in the display list, we should remove this animator from
+                // the list and post a delayed message to end the animator.
+                detachVectorDrawableAnimator(it->get());
+                it = mVectorDrawableAnimators.erase(it);
+            } else {
+                ++it;
+            }
+        }
+        info.out.hasAnimations |= !mVectorDrawableAnimators.empty();
     }
 
     void sendMessage(const sp<MessageHandler>& handler) {
         mLooper->sendMessage(handler, 0);
     }
 
+    void sendMessageDelayed(const sp<MessageHandler>& handler, nsecs_t delayInMs) {
+        mLooper->sendMessageDelayed(ms2ns(delayInMs), handler, 0);
+    }
+
     void attachAnimatingNode(RenderNode* animatingNode) {
         mPendingAnimatingRenderNodes.push_back(animatingNode);
     }
 
+    void attachPendingVectorDrawableAnimators() {
+        mVectorDrawableAnimators.insert(mPendingVectorDrawableAnimators.begin(),
+                mPendingVectorDrawableAnimators.end());
+        mPendingVectorDrawableAnimators.clear();
+    }
+
+    void detachAnimators() {
+        // Remove animators from the list and post a delayed message in future to end the animator
+        for (auto& anim : mVectorDrawableAnimators) {
+            detachVectorDrawableAnimator(anim.get());
+        }
+        mVectorDrawableAnimators.clear();
+    }
+
     void doAttachAnimatingNodes(AnimationContext* context) {
         for (size_t i = 0; i < mPendingAnimatingRenderNodes.size(); i++) {
             RenderNode* node = mPendingAnimatingRenderNodes[i].get();
@@ -187,17 +253,62 @@
         mPendingAnimatingRenderNodes.clear();
     }
 
+    void runVectorDrawableAnimators(AnimationContext* context) {
+        for (auto it = mVectorDrawableAnimators.begin(); it != mVectorDrawableAnimators.end();) {
+            if ((*it)->animate(*context)) {
+                it = mVectorDrawableAnimators.erase(it);
+            } else {
+                ++it;
+            }
+        }
+    }
+
+    void pushStagingVectorDrawableAnimators(AnimationContext* context) {
+        for (auto& anim : mVectorDrawableAnimators) {
+            anim->pushStaging(*context);
+        }
+    }
+
     void destroy() {
         for (auto& renderNode : mPendingAnimatingRenderNodes) {
             renderNode->animators().endAllStagingAnimators();
         }
         mPendingAnimatingRenderNodes.clear();
+        mPendingVectorDrawableAnimators.clear();
+    }
+
+    void addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim) {
+        mPendingVectorDrawableAnimators.insert(anim);
     }
 
 private:
     sp<Looper> mLooper;
     JavaVM* mVm;
     std::vector< sp<RenderNode> > mPendingAnimatingRenderNodes;
+    std::set< sp<PropertyValuesAnimatorSet> > mPendingVectorDrawableAnimators;
+    std::set< sp<PropertyValuesAnimatorSet> > mVectorDrawableAnimators;
+    void detachVectorDrawableAnimator(PropertyValuesAnimatorSet* anim) {
+        if (anim->isInfinite() || !anim->isRunning()) {
+            // Do not need to post anything if the animation is infinite (i.e. no meaningful
+            // end listener action), or if the animation has already ended.
+            return;
+        }
+        nsecs_t remainingTimeInMs = anim->getRemainingPlayTime();
+        // Post a delayed onFinished event that is scheduled to be handled when the animator ends.
+        if (anim->getOneShotListener()) {
+            // VectorDrawable's oneshot listener is updated when there are user triggered animation
+            // lifecycle changes, such as start(), end(), etc. By using checking and clearing
+            // one shot listener, we ensure the same end listener event gets posted only once.
+            // Therefore no duplicates. Another benefit of using one shot listener is that no
+            // removal is necessary: the end time of animation will not change unless triggered by
+            // user events, in which case the already posted listener's id will become stale, and
+            // the onFinished callback will then be ignored.
+            sp<FinishAndInvokeListener> message
+                    = new FinishAndInvokeListener(anim);
+            sendMessageDelayed(message, remainingTimeInMs);
+            anim->clearOneShotListener();
+        }
+    }
 };
 
 class AnimationContextBridge : public AnimationContext {
@@ -213,8 +324,19 @@
     virtual void startFrame(TreeInfo::TraversalMode mode) {
         if (mode == TreeInfo::MODE_FULL) {
             mRootNode->doAttachAnimatingNodes(this);
+            mRootNode->attachPendingVectorDrawableAnimators();
         }
         AnimationContext::startFrame(mode);
+        // Run VectorDrawable animators in the beginning of the frame instead of during prepareTree,
+        // because one VD can be in multiple render nodes' display list. So it's more simple to
+        // run them all at once before prepareTree than running them or checking whether they have
+        // already ran in each RenderNode. Note that these animators don't damage the RenderNodes.
+        // The damaging is done in prepareTree as needed after checking whether a VD has been
+        // modified.
+        if (mode == TreeInfo::MODE_FULL) {
+            mRootNode->pushStagingVectorDrawableAnimators(this);
+        }
+        mRootNode->runVectorDrawableAnimators(this);
     }
 
     // Runs any animations still left in mCurrentFrameAnimations
@@ -223,6 +345,10 @@
         postOnFinishedEvents();
     }
 
+    virtual void detachAnimators() override {
+        mRootNode->detachAnimators();
+    }
+
     virtual void callOnFinished(BaseRenderNodeAnimator* animator, AnimationListener* listener) {
         OnFinishedEvent event(animator, listener);
         mOnFinishedEvents.push_back(event);
@@ -230,6 +356,7 @@
 
     virtual void destroy() {
         AnimationContext::destroy();
+        detachAnimators();
         postOnFinishedEvents();
     }
 
@@ -416,6 +543,12 @@
     proxy->setProcessStatsBuffer(fd);
 }
 
+static jint android_view_ThreadedRenderer_getRenderThreadTid(JNIEnv* env, jobject clazz,
+        jlong proxyPtr) {
+    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
+    return proxy->getRenderThreadTid();
+}
+
 static jlong android_view_ThreadedRenderer_createRootRenderNode(JNIEnv* env, jobject clazz) {
     RootRenderNode* node = new RootRenderNode(env);
     node->incStrong(0);
@@ -528,6 +661,13 @@
     rootRenderNode->attachAnimatingNode(animatingNode);
 }
 
+static void android_view_ThreadedRenderer_registerVectorDrawableAnimator(JNIEnv* env, jobject clazz,
+        jlong rootNodePtr, jlong animatorPtr) {
+    RootRenderNode* rootRenderNode = reinterpret_cast<RootRenderNode*>(rootNodePtr);
+    PropertyValuesAnimatorSet* animator = reinterpret_cast<PropertyValuesAnimatorSet*>(animatorPtr);
+    rootRenderNode->addVectorDrawableAnimator(animator);
+}
+
 static void android_view_ThreadedRenderer_invokeFunctor(JNIEnv* env, jobject clazz,
         jlong functorPtr, jboolean waitForCompletion) {
     Functor* functor = reinterpret_cast<Functor*>(functorPtr);
@@ -724,6 +864,7 @@
 static const JNINativeMethod gMethods[] = {
     { "nSetAtlas", "(JLandroid/view/GraphicBuffer;[J)V",   (void*) android_view_ThreadedRenderer_setAtlas },
     { "nSetProcessStatsBuffer", "(JI)V", (void*) android_view_ThreadedRenderer_setProcessStatsBuffer },
+    { "nGetRenderThreadTid", "(J)I", (void*) android_view_ThreadedRenderer_getRenderThreadTid },
     { "nCreateRootRenderNode", "()J", (void*) android_view_ThreadedRenderer_createRootRenderNode },
     { "nCreateProxy", "(ZJ)J", (void*) android_view_ThreadedRenderer_createProxy },
     { "nDeleteProxy", "(J)V", (void*) android_view_ThreadedRenderer_deleteProxy },
@@ -739,6 +880,7 @@
     { "nSyncAndDrawFrame", "(J[JI)I", (void*) android_view_ThreadedRenderer_syncAndDrawFrame },
     { "nDestroy", "(JJ)V", (void*) android_view_ThreadedRenderer_destroy },
     { "nRegisterAnimatingRenderNode", "(JJ)V", (void*) android_view_ThreadedRenderer_registerAnimatingRenderNode },
+    { "nRegisterVectorDrawableAnimator", "(JJ)V", (void*) android_view_ThreadedRenderer_registerVectorDrawableAnimator },
     { "nInvokeFunctor", "(JZ)V", (void*) android_view_ThreadedRenderer_invokeFunctor },
     { "nCreateTextureLayer", "(J)J", (void*) android_view_ThreadedRenderer_createTextureLayer },
     { "nBuildLayer", "(JJ)V", (void*) android_view_ThreadedRenderer_buildLayer },
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index e9a3409..8388f05 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -193,6 +193,7 @@
     <protected-broadcast android:name="android.btopp.intent.action.OPEN" />
     <protected-broadcast android:name="android.btopp.intent.action.OPEN_INBOUND" />
     <protected-broadcast android:name="android.btopp.intent.action.TRANSFER_COMPLETE" />
+    <protected-broadcast android:name="com.android.bluetooth.gatt.REFRESH_BATCHED_SCAN" />
     <protected-broadcast android:name="com.android.bluetooth.pbap.authchall" />
     <protected-broadcast android:name="com.android.bluetooth.pbap.userconfirmtimeout" />
     <protected-broadcast android:name="com.android.bluetooth.pbap.authresponse" />
@@ -469,12 +470,6 @@
     <protected-broadcast android:name="android.net.wifi.PASSPOINT_ICON_RECEIVED" />
     <protected-broadcast android:name="com.android.server.notification.CountdownConditionProvider" />
 
-    <protected-broadcast android:name="com.android.ims.IMS_SERVICE_UP" />
-    <protected-broadcast android:name="com.android.ims.IMS_INCOMING_CALL" />
-    <protected-broadcast android:name="com.android.ims.internal.uce.UCE_SERVICE_UP" />
-    <protected-broadcast android:name="com.android.intent.action.IMS_FEATURE_CHANGED" />
-    <protected-broadcast android:name="com.android.intent.action.IMS_CONFIG_CHANGED" />
-
     <protected-broadcast android:name="com.android.internal.location.ALARM_WAKEUP" />
     <protected-broadcast android:name="com.android.internal.location.ALARM_TIMEOUT" />
     <protected-broadcast android:name="android.intent.action.GLOBAL_BUTTON" />
@@ -483,6 +478,8 @@
     <protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_UNAVAILABLE" />
     <protected-broadcast android:name="com.android.server.pm.DISABLE_QUIET_MODE_AFTER_UNLOCK" />
 
+    <protected-broadcast android:name="com.android.server.retaildemo.ACTION_RESET_DEMO" />
+
     <!-- ====================================================================== -->
     <!--                          RUNTIME PERMISSIONS                           -->
     <!-- ====================================================================== -->
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/drawable-watch/dialog_background_material.xml
similarity index 73%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/drawable-watch/dialog_background_material.xml
index 9e13001..de52f08 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/drawable-watch/dialog_background_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,8 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
-</resources>
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <solid android:color="?attr/colorBackground" />
+</shape>
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_apk.xml b/core/res/res/drawable/ic_doc_apk.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_apk.xml
rename to core/res/res/drawable/ic_doc_apk.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_audio.xml b/core/res/res/drawable/ic_doc_audio.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_audio.xml
rename to core/res/res/drawable/ic_doc_audio.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_certificate.xml b/core/res/res/drawable/ic_doc_certificate.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_certificate.xml
rename to core/res/res/drawable/ic_doc_certificate.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_codes.xml b/core/res/res/drawable/ic_doc_codes.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_codes.xml
rename to core/res/res/drawable/ic_doc_codes.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_compressed.xml b/core/res/res/drawable/ic_doc_compressed.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_compressed.xml
rename to core/res/res/drawable/ic_doc_compressed.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_contact.xml b/core/res/res/drawable/ic_doc_contact.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_contact.xml
rename to core/res/res/drawable/ic_doc_contact.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_document.xml b/core/res/res/drawable/ic_doc_document.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_document.xml
rename to core/res/res/drawable/ic_doc_document.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_event.xml b/core/res/res/drawable/ic_doc_event.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_event.xml
rename to core/res/res/drawable/ic_doc_event.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_excel.xml b/core/res/res/drawable/ic_doc_excel.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_excel.xml
rename to core/res/res/drawable/ic_doc_excel.xml
diff --git a/core/res/res/drawable/ic_doc_folder.xml b/core/res/res/drawable/ic_doc_folder.xml
new file mode 100644
index 0000000..dcbce01
--- /dev/null
+++ b/core/res/res/drawable/ic_doc_folder.xml
@@ -0,0 +1,24 @@
+<!--
+Copyright (C) 2015 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF737373"
+        android:pathData="M10 4H4c-1.1 0,-1.99.9,-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2,-.9 2,-2V8c0,-1.1,-.9,-2,-2,-2h-8l-2,-2z"/>
+</vector>
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_font.xml b/core/res/res/drawable/ic_doc_font.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_font.xml
rename to core/res/res/drawable/ic_doc_font.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_generic.xml b/core/res/res/drawable/ic_doc_generic.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_generic.xml
rename to core/res/res/drawable/ic_doc_generic.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_image.xml b/core/res/res/drawable/ic_doc_image.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_image.xml
rename to core/res/res/drawable/ic_doc_image.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_pdf.xml b/core/res/res/drawable/ic_doc_pdf.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_pdf.xml
rename to core/res/res/drawable/ic_doc_pdf.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_powerpoint.xml b/core/res/res/drawable/ic_doc_powerpoint.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_powerpoint.xml
rename to core/res/res/drawable/ic_doc_powerpoint.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_presentation.xml b/core/res/res/drawable/ic_doc_presentation.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_presentation.xml
rename to core/res/res/drawable/ic_doc_presentation.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml b/core/res/res/drawable/ic_doc_spreadsheet.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_spreadsheet.xml
rename to core/res/res/drawable/ic_doc_spreadsheet.xml
diff --git a/core/res/res/drawable/ic_doc_text.xml b/core/res/res/drawable/ic_doc_text.xml
new file mode 100644
index 0000000..7fc04e8
--- /dev/null
+++ b/core/res/res/drawable/ic_doc_text.xml
@@ -0,0 +1,24 @@
+<!--
+Copyright (C) 2015 The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF737373"
+        android:pathData="M14 2H6c-1.1 0,-1.99.9,-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2,-.9 2,-2V8l-6,-6zm2 16H8v-2h8v2zm0,-4H8v-2h8v2zm-3,-5V3.5L18.5 9H13z"/>
+</vector>
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_video.xml b/core/res/res/drawable/ic_doc_video.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_video.xml
rename to core/res/res/drawable/ic_doc_video.xml
diff --git a/packages/DocumentsUI/res/drawable/ic_doc_word.xml b/core/res/res/drawable/ic_doc_word.xml
similarity index 100%
rename from packages/DocumentsUI/res/drawable/ic_doc_word.xml
rename to core/res/res/drawable/ic_doc_word.xml
diff --git a/core/res/res/layout-notround-watch/alert_dialog_header_micro.xml b/core/res/res/layout-notround-watch/alert_dialog_header_micro.xml
new file mode 100644
index 0000000..fc840d9
--- /dev/null
+++ b/core/res/res/layout-notround-watch/alert_dialog_header_micro.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2016 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License
+  -->
+<LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:gravity="top|center_horizontal"
+        android:minHeight="@dimen/alert_dialog_title_height">
+    <ImageView android:id="@+id/icon"
+            android:maxHeight="24dp"
+            android:maxWidth="24dp"
+            android:layout_marginTop="8dp"
+            android:layout_marginStart="8dp"
+            android:layout_marginBottom="8dp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@null" />
+    <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
+            style="?android:attr/windowTitleStyle"
+            android:ellipsize="end"
+            android:layout_marginStart="8dp"
+            android:layout_marginBottom="8dp"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAlignment="viewStart" />
+</LinearLayout>
diff --git a/core/res/res/layout-round-watch/alert_dialog_header_micro.xml b/core/res/res/layout-round-watch/alert_dialog_header_micro.xml
new file mode 100644
index 0000000..6f7ae02
--- /dev/null
+++ b/core/res/res/layout-round-watch/alert_dialog_header_micro.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2016 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License
+  -->
+<FrameLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="top|center_horizontal"
+        android:minHeight="@dimen/alert_dialog_title_height">
+    <ImageView android:id="@+id/icon"
+            android:maxHeight="24dp"
+            android:maxWidth="24dp"
+            android:layout_marginTop="12dp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@null" />
+    <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
+            style="?android:attr/windowTitleStyle"
+            android:ellipsize="end"
+            android:layout_marginTop="36dp"
+            android:layout_marginBottom="4dp"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAlignment="center" />
+</FrameLayout>
diff --git a/core/res/res/layout-watch/alert_dialog_material.xml b/core/res/res/layout-watch/alert_dialog_material.xml
new file mode 100644
index 0000000..e627d42
--- /dev/null
+++ b/core/res/res/layout-watch/alert_dialog_material.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2016 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License
+  -->
+<FrameLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/parentPanel"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+    <ScrollView
+            android:id="@+id/scrollView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+        <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+            <!-- Top Panel -->
+            <FrameLayout
+                    android:paddingLeft="?dialogPreferredPadding"
+                    android:paddingRight="?dialogPreferredPadding"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/topPanel">
+                <include android:id="@+id/title_template"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        layout="@layout/alert_dialog_header_micro"/>
+            </FrameLayout>
+
+            <!-- Content Panel -->
+            <FrameLayout android:id="@+id/contentPanel"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:clipToPadding="false">
+                <TextView android:id="@+id/message"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:textAppearance="@style/TextAppearance.Material.Body1"
+                        android:paddingStart="?dialogPreferredPadding"
+                        android:paddingEnd="?dialogPreferredPadding"
+                        android:paddingTop="8dip"
+                        android:paddingBottom="8dip"/>
+            </FrameLayout>
+
+            <!-- Custom Panel, to replace content panel if needed -->
+            <FrameLayout android:id="@+id/customPanel"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:minHeight="64dp">
+                <FrameLayout android:id="@+android:id/custom"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content" />
+            </FrameLayout>
+
+            <!-- Button Panel -->
+            <FrameLayout
+                    android:id="@+id/buttonPanel"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:divider="?android:attr/dividerHorizontal"
+                        android:showDividers="beginning"
+                        android:dividerPadding="0dip"
+                        android:orientation="vertical"
+                        android:minHeight="@dimen/alert_dialog_button_bar_height"
+                        android:paddingBottom="?dialogPreferredPadding"
+                        style="?android:attr/buttonBarStyle"
+                        android:layoutDirection="locale"
+                        android:measureWithLargestChild="true">
+                    <Button android:id="@+id/button1"
+                            android:layout_gravity="start"
+                            android:layout_weight="1"
+                            android:layout_marginLeft="?dialogPreferredPadding"
+                            android:layout_marginRight="?dialogPreferredPadding"
+                            style="?android:attr/buttonBarButtonStyle"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content" />
+                    <Button android:id="@+id/button3"
+                            android:layout_gravity="start"
+                            android:layout_weight="1"
+                            android:layout_marginLeft="?dialogPreferredPadding"
+                            android:layout_marginRight="?dialogPreferredPadding"
+                            style="?android:attr/buttonBarButtonStyle"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content" />
+                    <Button android:id="@+id/button2"
+                            android:layout_gravity="start"
+                            android:layout_weight="1"
+                            android:layout_marginLeft="?dialogPreferredPadding"
+                            android:layout_marginRight="?dialogPreferredPadding"
+                            style="?android:attr/buttonBarButtonStyle"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content" />
+                </LinearLayout>
+            </FrameLayout>
+        </LinearLayout>
+    </ScrollView>
+</FrameLayout>
diff --git a/core/res/res/layout-watch/input_method_extract_view.xml b/core/res/res/layout-watch/input_method_extract_view.xml
index e3cd2ce..038b766 100644
--- a/core/res/res/layout-watch/input_method_extract_view.xml
+++ b/core/res/res/layout-watch/input_method_extract_view.xml
@@ -31,10 +31,10 @@
         android:inputType="text"
         android:layout_weight="1"
         android:fontFamily="sans-serif-condensed-light"
-        android:textColor="@color/primary_text_default_material_dark"
+        android:textColor="@color/primary_text_material_dark"
+        android:textColorHint="@color/secondary_text_material_dark"
         android:textColorHighlight="@color/accent_material_dark"
         android:textSize="18dp"
-        android:cursorVisible="false"
         android:gravity="bottom|right"
         />
 
diff --git a/core/res/res/layout/number_picker_with_selector_wheel_micro.xml b/core/res/res/layout-watch/number_picker_material.xml
similarity index 100%
rename from core/res/res/layout/number_picker_with_selector_wheel_micro.xml
rename to core/res/res/layout-watch/number_picker_material.xml
diff --git a/core/res/res/layout-watch/preference_material.xml b/core/res/res/layout-watch/preference_material.xml
new file mode 100644
index 0000000..ad217db
--- /dev/null
+++ b/core/res/res/layout-watch/preference_material.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- Layout for a Preference in a PreferenceActivity. The
+     Preference is able to place a specific widget for its particular
+     type in the "widget_frame" layout. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?attr/listPreferredItemHeightSmall"
+    android:gravity="center_vertical"
+    android:paddingStart="?attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?attr/listPreferredItemPaddingEnd"
+    android:background="?attr/activatedBackgroundIndicator"
+    android:clipToPadding="false">
+
+    <LinearLayout
+        android:id="@+id/icon_frame"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:gravity="center"
+        android:orientation="horizontal"
+        android:layout_marginEnd="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="8dp">
+        <com.android.internal.widget.PreferenceImageView
+            android:id="@+id/icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:maxWidth="40dp"
+            android:maxHeight="40dp" />
+    </LinearLayout>
+
+    <!-- Preference should place its actual preference widget here. -->
+    <LinearLayout android:id="@+id/widget_frame"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:gravity="center"
+        android:orientation="horizontal"
+        android:layout_marginEnd="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="8dp" />
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="8dp">
+
+        <TextView android:id="@+id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:maxLines="3"
+            android:textAppearance="?attr/textAppearanceListItem"
+            android:ellipsize="end" />
+
+        <TextView android:id="@+id/summary"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/title"
+            android:layout_alignStart="@id/title"
+            android:textAppearance="?attr/textAppearanceListItemSecondary"
+            android:textColor="?attr/textColorSecondary"
+            android:maxLines="10" />
+
+    </RelativeLayout>
+</LinearLayout>
diff --git a/core/res/res/layout/alert_dialog_micro.xml b/core/res/res/layout/alert_dialog_micro.xml
deleted file mode 100644
index abdbd16..0000000
--- a/core/res/res/layout/alert_dialog_micro.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2014 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/parentPanel"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@android:color/white"
-    android:layout_gravity="center"
-    android:orientation="vertical">
-
-    <LinearLayout android:id="@+id/topPanel"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
-        <View android:id="@+id/titleDividerTop"
-            android:layout_width="match_parent"
-            android:layout_height="2dip"
-            android:visibility="gone"
-            android:background="@android:color/holo_blue_light" />
-        <LinearLayout android:id="@+id/title_template"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:gravity="center_vertical|start"
-            android:minHeight="@dimen/alert_dialog_title_height"
-            android:layout_marginStart="16dip"
-            android:layout_marginEnd="16dip">
-            <ImageView android:id="@+id/icon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:paddingEnd="8dip"
-                android:src="@null" />
-            <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
-                style="?android:attr/windowTitleStyle"
-                android:singleLine="true"
-                android:ellipsize="end"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="viewStart" />
-        </LinearLayout>
-        <View android:id="@+id/titleDivider"
-            android:layout_width="match_parent"
-            android:layout_height="2dip"
-            android:visibility="gone"
-            android:background="@android:color/holo_blue_light" />
-        <!-- If the client uses a customTitle, it will be added here. -->
-    </LinearLayout>
-
-    <LinearLayout android:id="@+id/contentPanel"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical"
-        android:minHeight="64dp">
-        <ScrollView android:id="@+id/scrollView"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:clipToPadding="false">
-            <TextView android:id="@+id/message"
-                style="?android:attr/textAppearanceMedium"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:paddingStart="16dip"
-                android:paddingEnd="16dip"
-                android:paddingTop="8dip"
-                android:paddingBottom="8dip"/>
-        </ScrollView>
-    </LinearLayout>
-
-    <FrameLayout android:id="@+id/customPanel"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:minHeight="64dp">
-        <FrameLayout android:id="@+android:id/custom"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
-    </FrameLayout>
-
-    <LinearLayout android:id="@+id/buttonPanel"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:minHeight="@dimen/alert_dialog_button_bar_height"
-        android:orientation="vertical"
-        android:divider="?android:attr/dividerHorizontal"
-        android:showDividers="beginning"
-        android:dividerPadding="0dip">
-        <LinearLayout
-            style="?android:attr/buttonBarStyle"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:layoutDirection="locale"
-            android:measureWithLargestChild="true">
-            <Button android:id="@+id/button2"
-                android:layout_width="wrap_content"
-                android:layout_gravity="start"
-                android:layout_weight="1"
-                android:maxLines="2"
-                style="?android:attr/buttonBarButtonStyle"
-                android:textSize="14sp"
-                android:minHeight="@dimen/alert_dialog_button_bar_height"
-                android:layout_height="wrap_content" />
-            <Button android:id="@+id/button3"
-                android:layout_width="wrap_content"
-                android:layout_gravity="center_horizontal"
-                android:layout_weight="1"
-                android:maxLines="2"
-                style="?android:attr/buttonBarButtonStyle"
-                android:textSize="14sp"
-                android:minHeight="@dimen/alert_dialog_button_bar_height"
-                android:layout_height="wrap_content" />
-            <Button android:id="@+id/button1"
-                android:layout_width="wrap_content"
-                android:layout_gravity="end"
-                android:layout_weight="1"
-                android:maxLines="2"
-                android:minHeight="@dimen/alert_dialog_button_bar_height"
-                style="?android:attr/buttonBarButtonStyle"
-                android:textSize="14sp"
-                android:layout_height="wrap_content" />
-        </LinearLayout>
-     </LinearLayout>
-</LinearLayout>
diff --git a/core/res/res/layout/date_picker_header_material.xml b/core/res/res/layout/date_picker_header_material.xml
index a0e2b1d..755317e 100644
--- a/core/res/res/layout/date_picker_header_material.xml
+++ b/core/res/res/layout/date_picker_header_material.xml
@@ -54,7 +54,7 @@
             android:textAppearance="@style/TextAppearance.Material.DatePicker.DateLabel"
             android:includeFontPadding="false"
             android:gravity="start"
-            android:maxLines="2"
+            android:maxLines="@integer/date_picker_header_max_lines_material"
             android:ellipsize="none" />
     </LinearLayout>
 </LinearLayout>
diff --git a/core/res/res/layout/immersive_mode_cling.xml b/core/res/res/layout/immersive_mode_cling.xml
index 28fbea5..b08b0f4 100644
--- a/core/res/res/layout/immersive_mode_cling.xml
+++ b/core/res/res/layout/immersive_mode_cling.xml
@@ -16,7 +16,7 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:background="#ff009688"
+        android:background="?android:attr/colorAccent"
         android:gravity="center_vertical"
         android:paddingBottom="24dp">
 
@@ -47,7 +47,7 @@
                 android:paddingTop="8dp"
                 android:scaleType="center"
                 android:src="@drawable/ic_expand_more_48dp"
-                android:tint="#ff009688"/>
+                android:tint="?android:attr/colorAccent"/>
     </FrameLayout>
 
     <TextView
diff --git a/core/res/res/layout/preference_list_fragment.xml b/core/res/res/layout/preference_list_fragment.xml
index fc53a1a..c43975e 100644
--- a/core/res/res/layout/preference_list_fragment.xml
+++ b/core/res/res/layout/preference_list_fragment.xml
@@ -33,8 +33,6 @@
             style="?attr/preferenceFragmentListStyle"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:paddingTop="0dip"
-            android:paddingBottom="@dimen/preference_fragment_padding_bottom"
             android:scrollbarStyle="@integer/preference_fragment_scrollbarStyle"
             android:clipToPadding="false"
             android:drawSelectorOnTop="false"
diff --git a/core/res/res/layout/preference_list_fragment_material.xml b/core/res/res/layout/preference_list_fragment_material.xml
index e411c0e..db2fe7d 100644
--- a/core/res/res/layout/preference_list_fragment_material.xml
+++ b/core/res/res/layout/preference_list_fragment_material.xml
@@ -32,8 +32,6 @@
         <ListView android:id="@android:id/list"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:paddingTop="0dip"
-            android:paddingBottom="@dimen/preference_fragment_padding_bottom"
             style="?attr/preferenceFragmentListStyle"
             android:scrollbarStyle="@integer/preference_fragment_scrollbarStyle"
             android:clipToPadding="false"
diff --git a/core/res/res/values-af-watch/styles_material.xml b/core/res/res/values-af-watch/styles_material.xml
new file mode 100644
index 0000000..80a5fa6
--- /dev/null
+++ b/core/res/res/values-af-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"kandidate"</font></string>
+</resources>
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 9c16f7e..6eabd52 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Ontspeld"</string>
     <string name="app_info" msgid="6856026610594615344">"Programinligting"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Stel toestel terug?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tik om toestel terug te stel"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Begin tans demonstrasie …"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Stel toestel tans terug …"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Stel toestel terug?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Jy sal enige veranderinge verloor en die demonstrasie sal oor <xliff:g id="TIMEOUT">%1$s</xliff:g> sekondes weer begin …"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Kanselleer"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Stel nou terug"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Doen \'n fabriekterugstelling om hierdie toestel sonder beperkinge te gebruik"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Raak om meer te wete te kom."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Het <xliff:g id="LABEL">%1$s</xliff:g> gedeaktiveer"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferensie-oproep"</string>
 </resources>
diff --git a/core/res/res/values-am-watch/styles_material.xml b/core/res/res/values-am-watch/styles_material.xml
new file mode 100644
index 0000000..5ec383a8
--- /dev/null
+++ b/core/res/res/values-am-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"እጩዎች"</font></string>
+</resources>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index a3c18ac..e3cae6a 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ንቀል"</string>
     <string name="app_info" msgid="6856026610594615344">"የመተግበሪያ መረጃ"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"መሣሪያ ዳግም ይጀመር?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"መሣሪያን ዳግም ለማስጀመር መታ ያድርጉ"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ማሳያን በማስጀመር ላይ…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"መሣሪያን ዳግም በማስጀመር ላይ…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"መሣሪያ ዳግም ይጀመር?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ማንኛቸውም ለውጦች ይጠፋሉ፣ እና ማሳያው በ<xliff:g id="TIMEOUT">%1$s</xliff:g> ሰከንዶች ውስጥ እንደገና ይጀምራል…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"ይቅር"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"አሁን ዳግም አስጀምር"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ይህን መሣሪያ ያለምንም ገደብ ለመጠቀም የፋብሪካ ዳግም ያስጀምሩ"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"የበለጠ ለመረዳት ይንኩ።"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> ተሰናክሏል"</string>
+    <string name="conference_call" msgid="3751093130790472426">"የስብሰባ ጥሪ"</string>
 </resources>
diff --git a/core/res/res/values-ar-watch/styles_material.xml b/core/res/res/values-ar-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ar-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 2db0e15..1778e0c 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -1795,7 +1795,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"إزالة تثبيت"</string>
     <string name="app_info" msgid="6856026610594615344">"معلومات عن التطبيق"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"هل تريد إعادة تعيين الجهاز؟"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"انقر لإعادة تعيين الجهاز"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"جارٍ بدء العرض التوضيحي…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"جارٍ إعادة تعيين الجهاز…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"هل تريد إعادة تعيين الجهاز؟"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ستفقد أي تغييرات وسيبدأ العرض التوضيحي مرة أخرى خلال <xliff:g id="TIMEOUT">%1$s</xliff:g> من الثواني…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"إلغاء"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"إعادة التعيين الآن"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"يمكنك إعادة تعيين بيانات المصنع لاستخدام هذا الجهاز بدون قيود"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"المس للتعرف على مزيد من المعلومات."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"تم تعطيل <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"مكالمة جماعية"</string>
 </resources>
diff --git a/core/res/res/values-az-rAZ-watch/styles_material.xml b/core/res/res/values-az-rAZ-watch/styles_material.xml
new file mode 100644
index 0000000..b621266
--- /dev/null
+++ b/core/res/res/values-az-rAZ-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"namizədlər"</font></string>
+</resources>
diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az-rAZ/strings.xml
index 7f55ba1..a1e851b 100644
--- a/core/res/res/values-az-rAZ/strings.xml
+++ b/core/res/res/values-az-rAZ/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Çıxarın"</string>
     <string name="app_info" msgid="6856026610594615344">"Tətbiq məlumatı"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Cihaz sıfırlansın?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Cihazı sıfırlamaq üçün tıklayın"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo başlayır…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Cihaz sıfırlanır…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Cihaz sıfırlansın?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Hər hansı dəyişikliyi itirəcəksiniz və demo <xliff:g id="TIMEOUT">%1$s</xliff:g> saniyəyə yenidən başlayacaq…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Ləğv edin"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"İndi sıfırlayın"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Bu cihazı məhdudiyyətsiz istifadə etmək üçün zavod sıfırlaması edin"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Daha çox məlumat üçün toxunun."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> deaktiv edildi"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konfrans Zəngi"</string>
 </resources>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index ec8f5f3..fdeb9ed 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -125,15 +125,11 @@
     <string name="roamingTextSearching" msgid="8360141885972279963">"Pretraživanje usluge"</string>
     <string name="wfcRegErrorTitle" msgid="2301376280632110664">"Pozivanje preko Wi-Fi-ja"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
-    <item msgid="2254967670088539682">"Da biste upućivali pozive i slali poruke preko Wi-Fi-ja, prvo zatražite od mobilnog operatera da vam omogući ovu uslugu. Zatim u Podešavanjima ponovo uključite Pozivanje preko Wi-Fi-ja."</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
-    <item msgid="6177300162212449033">"Registrujte se kod mobilnog operatera"</item>
   </string-array>
-  <string-array name="wfcSpnFormats">
-    <item msgid="6830082633573257149">"%s"</item>
-    <item msgid="4397097370387921767">"Wi-Fi pozivanje preko operatera %s"</item>
-  </string-array>
+    <string name="wfcSpnFormat" msgid="8211621332478306568">"%s"</string>
+    <string name="wfcDataSpnFormat" msgid="1118052028767666883">"%s"</string>
     <string name="wifi_calling_off_summary" msgid="8720659586041656098">"Isključeno"</string>
     <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Prednost ima Wi-Fi"</string>
     <string name="wfc_mode_cellular_preferred_summary" msgid="5920549484600758786">"Prednost ima mobilna mreža"</string>
@@ -169,11 +165,7 @@
     <string name="low_memory" product="watch" msgid="4415914910770005166">"Memorija sata je puna. Izbrišite neke datoteke da biste oslobodili prostor."</string>
     <string name="low_memory" product="tv" msgid="516619861191025923">"Memorijski prostor na TV-u je popunjen. Izbrišite neke datoteke da biste oslobodili prostor."</string>
     <string name="low_memory" product="default" msgid="3475999286680000541">"Skladište telefona je puno! Izbrišite neke datoteke kako biste oslobodili prostor."</string>
-    <plurals name="ssl_ca_cert_warning" formatted="false" msgid="5106721205300213569">
-      <item quantity="one">Instalirani su autoriteti za izdavanje sertifikata</item>
-      <item quantity="few">Instalirani su autoriteti za izdavanje sertifikata</item>
-      <item quantity="other">Instalirani su autoriteti za izdavanje sertifikata</item>
-    </plurals>
+    <!-- no translation found for ssl_ca_cert_warning (5106721205300213569) -->
     <string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Od strane nepoznate treće strane"</string>
     <string name="ssl_ca_cert_noti_by_administrator" msgid="550758088185764312">"Od strane administratora profila za posao"</string>
     <string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"Od strane <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
@@ -220,9 +212,9 @@
     <string name="bugreport_title" msgid="2667494803742548533">"Napravi izveštaj o grešci"</string>
     <string name="bugreport_message" msgid="398447048750350456">"Ovim će se prikupiti informacije o trenutnom stanju uređaja kako bi bile poslate u poruci e-pošte. Od započinjanja izveštaja o grešci do trenutka za njegovo slanje proći će neko vreme; budite strpljivi."</string>
     <string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiv. izveštaj"</string>
-    <string name="bugreport_option_interactive_summary" msgid="229299488536107968">"Koristite ovo u većini slučajeva. To vam omogućava da pratite napredak izveštaja, da unosite dodatne detalje o problemu i da snimate snimke ekrana. Verovatno će izostaviti neke manje korišćene odeljke za koje pravljenje izveštaja dugo traje."</string>
+    <string name="bugreport_option_interactive_summary" msgid="8180152634022797629">"Koristite ovo u većini slučajeva. To vam omogućava da pratite napredak izveštaja i da unosite dodatne detalje o problemu. Verovatno će izostaviti neke manje korišćene odeljke za koje pravljenje izveštaja dugo traje."</string>
     <string name="bugreport_option_full_title" msgid="6354382025840076439">"Kompletan izveštaj"</string>
-    <string name="bugreport_option_full_summary" msgid="7210859858969115745">"Koristite ovu opciju radi minimalnih sistemskih smetnji kada uređaj ne reaguje, prespor je ili su vam potrebni svi odeljci izveštaja. Ne dozvoljava vam unos dodatnih detalja niti snimanje dodatnih snimaka ekrana."</string>
+    <string name="bugreport_option_full_summary" msgid="6687306111256813257">"Koristite ovu opciju radi minimalnih sistemskih smetnji kada uređaj ne reaguje, prespor je ili su vam potrebni svi odeljci izveštaja. Ne pravi snimak ekrana niti vam dozvoljava unos dodatnih detalja."</string>
     <plurals name="bugreport_countdown" formatted="false" msgid="6878900193900090368">
       <item quantity="one">Napravićemo snimak ekrana radi izveštaja o grešci za <xliff:g id="NUMBER_1">%d</xliff:g> sekundu.</item>
       <item quantity="few">Napravićemo snimak ekrana radi izveštaja o grešci za <xliff:g id="NUMBER_1">%d</xliff:g> sekunde.</item>
@@ -266,7 +258,7 @@
     <string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Preuzima sadržaj prozora"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Proverava sadržaj prozora sa kojim ostvarujete interakciju."</string>
     <string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Uključi Istraživanja dodirom"</string>
-    <string name="capability_desc_canRequestTouchExploration" msgid="7543249041581408313">"Stavke koje dodirnete će biti izgovorene naglas, a možete da se krećete po ekranu pokretima."</string>
+    <string name="capability_desc_canRequestTouchExploration" msgid="5800552516779249356">"Stavke koje dodirnete će biti izgovorene, a možete da se krećete po ekranu pokretima."</string>
     <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"Uključi poboljšanu pristupačnost veba"</string>
     <string name="capability_desc_canRequestEnhancedWebAccessibility" msgid="7881063961507511765">"Mogu da se instaliraju skripte da bi sadržaj aplikacija bio pristupačniji."</string>
     <string name="capability_title_canRequestFilterKeyEvents" msgid="2103440391902412174">"Prati tekst koji unosite"</string>
@@ -607,7 +599,7 @@
     <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
     <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string>
     <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
-    <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Poslovni mobilni"</string>
+    <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Broj poslovnog mobilnog telefona"</string>
     <string name="phoneTypeWorkPager" msgid="649938731231157056">"Poslovni pejdžer"</string>
     <string name="phoneTypeAssistant" msgid="5596772636128562884">"Pomoćnik"</string>
     <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
@@ -665,7 +657,7 @@
     <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"Unesite PUK i novi PIN kôd"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="1341112146710087048">"PUK kôd"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="8027680321614196258">"Novi PIN kôd"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="2644215452200037944"><font size="17">"Dodirnite za unos lozinke"</font></string>
+    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dodirnite da biste uneli lozinku"</font></string>
     <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Otkucajte lozinku da biste otključali"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Unesite PIN za otključavanje"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"PIN kôd je netačan."</string>
@@ -865,87 +857,6 @@
       <item quantity="few"><xliff:g id="COUNT">%d</xliff:g> sata</item>
       <item quantity="other"><xliff:g id="COUNT">%d</xliff:g> sati</item>
     </plurals>
-    <string name="now_string_shortest" msgid="8912796667087856402">"sada"</string>
-    <plurals name="duration_minutes_shortest" formatted="false" msgid="3957499975064245495">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> min</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> min</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> min</item>
-    </plurals>
-    <plurals name="duration_hours_shortest" formatted="false" msgid="3552182110578602356">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> č</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> č</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> č</item>
-    </plurals>
-    <plurals name="duration_days_shortest" formatted="false" msgid="5213655532597081640">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-    </plurals>
-    <plurals name="duration_years_shortest" formatted="false" msgid="7848711145196397042">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> god</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> god</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> god</item>
-    </plurals>
-    <plurals name="duration_minutes_shortest_future" formatted="false" msgid="3277614521231489951">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> min</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> min</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> min</item>
-    </plurals>
-    <plurals name="duration_hours_shortest_future" formatted="false" msgid="2152452368397489370">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> č</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> č</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> č</item>
-    </plurals>
-    <plurals name="duration_days_shortest_future" formatted="false" msgid="8088331502820295701">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-    </plurals>
-    <plurals name="duration_years_shortest_future" formatted="false" msgid="2317006667145250301">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> god</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> god</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> god</item>
-    </plurals>
-    <plurals name="duration_minutes_relative" formatted="false" msgid="3178131706192980192">
-      <item quantity="one">pre <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-      <item quantity="few">pre <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-      <item quantity="other">pre <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-    </plurals>
-    <plurals name="duration_hours_relative" formatted="false" msgid="676894109982008411">
-      <item quantity="one">pre <xliff:g id="COUNT_1">%d</xliff:g> sata</item>
-      <item quantity="few">pre <xliff:g id="COUNT_1">%d</xliff:g> sata</item>
-      <item quantity="other">pre <xliff:g id="COUNT_1">%d</xliff:g> sati</item>
-    </plurals>
-    <plurals name="duration_days_relative" formatted="false" msgid="2203515825765397130">
-      <item quantity="one">Pre <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-      <item quantity="few">Pre <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-      <item quantity="other">Pre <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-    </plurals>
-    <plurals name="duration_years_relative" formatted="false" msgid="4820062134188885734">
-      <item quantity="one">pre <xliff:g id="COUNT_1">%d</xliff:g> godine</item>
-      <item quantity="few">pre <xliff:g id="COUNT_1">%d</xliff:g> godine</item>
-      <item quantity="other">pre <xliff:g id="COUNT_1">%d</xliff:g> godina</item>
-    </plurals>
-    <plurals name="duration_minutes_relative_future" formatted="false" msgid="4655043589817680966">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> minut</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-    </plurals>
-    <plurals name="duration_hours_relative_future" formatted="false" msgid="8084579714205223891">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> sat</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> sata</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> sati</item>
-    </plurals>
-    <plurals name="duration_days_relative_future" formatted="false" msgid="333215369363433992">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-    </plurals>
-    <plurals name="duration_years_relative_future" formatted="false" msgid="8644862986413104011">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> godinu</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> godine</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> godina</item>
-    </plurals>
     <string name="VideoView_error_title" msgid="3534509135438353077">"Problem sa video snimkom"</string>
     <string name="VideoView_error_text_invalid_progressive_playback" msgid="3186670335938670444">"Ovaj video ne može da se strimuje na ovom uređaju."</string>
     <string name="VideoView_error_text_unknown" msgid="3450439155187810085">"Ne možete da pustite ovaj video."</string>
@@ -977,7 +888,7 @@
     <string name="low_internal_storage_view_text" msgid="6640505817617414371">"Neke sistemske funkcije možda ne funkcionišu"</string>
     <string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nema dovoljno memorijskog prostora za sistem. Uverite se da imate 250 MB slobodnog prostora i ponovo pokrenite."</string>
     <string name="app_running_notification_title" msgid="8718335121060787914">"Aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> je pokrenuta"</string>
-    <string name="app_running_notification_text" msgid="1197581823314971177">"Dodirnite za više informacija ili zaustavljanje aplikacije."</string>
+    <string name="app_running_notification_text" msgid="4653586947747330058">"Dodirnite za više informacija ili zaustavljanje aplikacije."</string>
     <string name="ok" msgid="5970060430562524910">"Potvrdi"</string>
     <string name="cancel" msgid="6442560571259935130">"Otkaži"</string>
     <string name="yes" msgid="5362982303337969312">"Potvrdi"</string>
@@ -1017,7 +928,8 @@
     <string name="aerr_process" msgid="6201597323218674729">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> je zaustavljen"</string>
     <string name="aerr_application_repeated" msgid="3146328699537439573">"<xliff:g id="APPLICATION">%1$s</xliff:g> se stalno zaustavlja"</string>
     <string name="aerr_process_repeated" msgid="6235302956890402259">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> se stalno zaustavlja"</string>
-    <string name="aerr_restart" msgid="7581308074153624475">"Ponovo otvori aplikaciju"</string>
+    <string name="aerr_restart" msgid="9001379185665886595">"Ponovo pokreni aplikaciju"</string>
+    <string name="aerr_reset" msgid="7645427603514220451">"Resetuj i ponovo pokreni aplikaciju"</string>
     <string name="aerr_report" msgid="5371800241488400617">"Pošaljite povratne informacije"</string>
     <string name="aerr_close" msgid="2991640326563991340">"Zatvori"</string>
     <string name="aerr_mute" msgid="1974781923723235953">"Ignoriši dok se uređaj ne pokrene ponovo"</string>
@@ -1038,21 +950,17 @@
     <string name="screen_compat_mode_scale" msgid="3202955667675944499">"Razmera"</string>
     <string name="screen_compat_mode_show" msgid="4013878876486655892">"Uvek prikazuj"</string>
     <string name="screen_compat_mode_hint" msgid="1064524084543304459">"Ponovo omogućite u meniju Sistemska podešavanja &gt; Aplikacije &gt; Preuzeto."</string>
-    <string name="unsupported_display_size_message" msgid="6545327290756295232">"<xliff:g id="APP_NAME">%1$s</xliff:g> ne podržava trenutno podešavanje veličine prikaza i može da se ponaša neočekivano."</string>
-    <string name="unsupported_display_size_show" msgid="7969129195360353041">"Uvek prikazuj"</string>
     <string name="smv_application" msgid="3307209192155442829">"Aplikacija <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) je prekršila samonametnute StrictMode smernice."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> je prekršio samonametnute StrictMode smernice."</string>
     <string name="android_upgrading_title" msgid="1584192285441405746">"Android se nadograđuje…"</string>
     <string name="android_start_title" msgid="8418054686415318207">"Android se pokreće…"</string>
     <string name="android_upgrading_fstrim" msgid="8036718871534640010">"Memorija se optimizuje."</string>
-    <string name="android_upgrading_notification_title" msgid="1619393112444671028">"Android se nadograđuje…"</string>
-    <string name="android_upgrading_notification_body" msgid="5761201379457064286">"Neke aplikacije možda neće ispravno funkcionisati dok se nadogradnja ne dovrši"</string>
     <string name="android_upgrading_apk" msgid="7904042682111526169">"Optimizovanje aplikacije <xliff:g id="NUMBER_0">%1$d</xliff:g> od <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
     <string name="android_preparing_apk" msgid="8162599310274079154">"Priprema se <xliff:g id="APPNAME">%1$s</xliff:g>."</string>
     <string name="android_upgrading_starting_apps" msgid="451464516346926713">"Pokretanje aplikacija."</string>
     <string name="android_upgrading_complete" msgid="1405954754112999229">"Završavanje pokretanja."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Aplikacija <xliff:g id="APP">%1$s</xliff:g> je pokrenuta"</string>
-    <string name="heavy_weight_notification_detail" msgid="867643381388543170">"Dodirnite da biste prešli na aplikaciju"</string>
+    <string name="heavy_weight_notification_detail" msgid="1721681741617898865">"Dodirnite da biste prešli na aplikaciju"</string>
     <string name="heavy_weight_switcher_title" msgid="7153167085403298169">"Želite li da pređete na drugu aplikaciju?"</string>
     <string name="heavy_weight_switcher_text" msgid="7022631924534406403">"Već je pokrenuta druga aplikacija koja mora da bude zaustavljena da biste mogli da pokrenete novu."</string>
     <string name="old_app_action" msgid="493129172238566282">"Vrati se u <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
@@ -1060,7 +968,7 @@
     <string name="new_app_action" msgid="5472756926945440706">"Pokreni <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
     <string name="new_app_description" msgid="1932143598371537340">"Zaustavlja staru aplikaciju bez čuvanja."</string>
     <string name="dump_heap_notification" msgid="2618183274836056542">"<xliff:g id="PROC">%1$s</xliff:g> premašuje ograničenje memorije"</string>
-    <string name="dump_heap_notification_detail" msgid="6901391084243999274">"Snimak dinamičkog dela memorije je napravljen; dodirnite za deljenje"</string>
+    <string name="dump_heap_notification_detail" msgid="2075673362317481664">"Snimak dinamičkog dela memorije je napravljen; dodirnite za deljenje"</string>
     <string name="dump_heap_title" msgid="5864292264307651673">"Želite li da delite snimak dinamičkog dela memorije?"</string>
     <string name="dump_heap_text" msgid="4809417337240334941">"Proces <xliff:g id="PROC">%1$s</xliff:g> je premašio ograničenje memorije za proces od <xliff:g id="SIZE">%2$s</xliff:g>. Snimak dinamičkog dela memorije je dostupan i možete da ga delite sa programerom. Budite oprezni: ovaj snimak dinamičkog dela memorije može da sadrži neke lične podatke kojima aplikacija može da pristupa."</string>
     <string name="sendText" msgid="5209874571959469142">"Izaberite radnju za tekst"</string>
@@ -1098,7 +1006,7 @@
     <!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
     <skip />
     <string name="wifi_no_internet" msgid="8451173622563841546">"Wi-Fi nema pristup internetu"</string>
-    <string name="wifi_no_internet_detailed" msgid="8083079241212301741">"Dodirnite za opcije"</string>
+    <string name="wifi_no_internet_detailed" msgid="7593858887662270131">"Dodirnite za opcije"</string>
     <string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Nije moguće povezati sa Wi-Fi mrežom"</string>
     <string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ima lošu internet vezu."</string>
     <string name="wifi_connect_alert_title" msgid="8455846016001810172">"Želite li da dozvolite povezivanje?"</string>
@@ -1108,7 +1016,7 @@
     <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Pokrenite Wi-Fi Direct. Time ćete isključiti klijenta/hotspot za Wi-Fi."</string>
     <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Nije moguće pokrenuti Wi-Fi Direct."</string>
     <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct je uključen"</string>
-    <string name="wifi_p2p_enabled_notification_message" msgid="8064677407830620023">"Dodirnite za podešavanja"</string>
+    <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Dodirnite za podešavanja"</string>
     <string name="accept" msgid="1645267259272829559">"Prihvati"</string>
     <string name="decline" msgid="2112225451706137894">"Odbij"</string>
     <string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Pozivnica je poslata"</string>
@@ -1160,9 +1068,9 @@
     <string name="usb_ptp_notification_title" msgid="1347328437083192112">"USB za prenos slika"</string>
     <string name="usb_midi_notification_title" msgid="4850904915889144654">"USB za MIDI"</string>
     <string name="usb_accessory_notification_title" msgid="7848236974087653666">"Povezano sa USB dodatkom"</string>
-    <string name="usb_notification_message" msgid="3370903770828407960">"Dodirnite za još opcija."</string>
+    <string name="usb_notification_message" msgid="7347368030849048437">"Dodirnite za još opcija."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Otklanjanje grešaka sa USB-a je uspostavljeno"</string>
-    <string name="adb_active_notification_message" msgid="4948470599328424059">"Dodirnite da biste onemogućili otklanjanje grešaka sa USB-a."</string>
+    <string name="adb_active_notification_message" msgid="1016654627626476142">"Dodirnite da biste onemogućili otklanjanje grešaka sa USB-a."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Izveštaj o grešci se generiše…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Želite li da podelite izveštaj o grešci?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Deli se izveštaj o grešci…"</string>
@@ -1182,9 +1090,9 @@
     <string name="ext_media_new_notification_message" msgid="7589986898808506239">"Novi uređaj <xliff:g id="NAME">%s</xliff:g> je otkriven"</string>
     <string name="ext_media_ready_notification_message" msgid="4083398150380114462">"Za prenos slika i medija"</string>
     <string name="ext_media_unmountable_notification_title" msgid="8295123366236989588">"Uređaj <xliff:g id="NAME">%s</xliff:g> je oštećen"</string>
-    <string name="ext_media_unmountable_notification_message" msgid="2343202057122495773">"Uređaj <xliff:g id="NAME">%s</xliff:g> je oštećen. Dodirnite da biste ga popravili."</string>
+    <string name="ext_media_unmountable_notification_message" msgid="1586311304430052169">"Uređaj <xliff:g id="NAME">%s</xliff:g> je oštećen. Dodirnite da biste ga popravili."</string>
     <string name="ext_media_unsupported_notification_title" msgid="3797642322958803257">"Uređaj <xliff:g id="NAME">%s</xliff:g> nije podržan"</string>
-    <string name="ext_media_unsupported_notification_message" msgid="6121601473787888589">"Ovaj uređaj ne podržava ovaj uređaj <xliff:g id="NAME">%s</xliff:g>. Dodirnite da biste podesili podržani format."</string>
+    <string name="ext_media_unsupported_notification_message" msgid="8789610369456474891">"Ovaj uređaj ne podržava uređaj <xliff:g id="NAME">%s</xliff:g>. Dodirnite da biste podesili podržani format."</string>
     <string name="ext_media_badremoval_notification_title" msgid="3206248947375505416">"Uređaj <xliff:g id="NAME">%s</xliff:g> je neočekivano uklonjen"</string>
     <string name="ext_media_badremoval_notification_message" msgid="380176703346946313">"Isključite uređaj <xliff:g id="NAME">%s</xliff:g> pre uklanjanja da ne biste izgubili podatke"</string>
     <string name="ext_media_nomedia_notification_title" msgid="1704840188641749091">"Uređaj <xliff:g id="NAME">%s</xliff:g> je uklonjen"</string>
@@ -1220,7 +1128,7 @@
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"Dozvoljava aplikaciji da čita sesije instaliranja. To joj dozvoljava da vidi detalje o aktivnim instalacijama paketa."</string>
     <string name="permlab_requestInstallPackages" msgid="5782013576218172577">"zahtevanje paketa za instaliranje"</string>
     <string name="permdesc_requestInstallPackages" msgid="5740101072486783082">"Omogućava da aplikacija zahteva instalaciju paketa."</string>
-    <string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Dodirnite dvaput za kontrolu zumiranja"</string>
+    <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"Dodirnite dvaput da biste kontrolisali zum"</string>
     <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Nije moguće dodati vidžet."</string>
     <string name="ime_action_go" msgid="8320845651737369027">"Idi"</string>
     <string name="ime_action_search" msgid="658110271822807811">"Pretraži"</string>
@@ -1251,20 +1159,20 @@
     <string name="notification_ranker_binding_label" msgid="774540592299064747">"Usluga rangiranja obaveštenja"</string>
     <string name="vpn_title" msgid="19615213552042827">"VPN je aktiviran"</string>
     <string name="vpn_title_long" msgid="6400714798049252294">"Aplikacija <xliff:g id="APP">%s</xliff:g> je aktivirala VPN"</string>
-    <string name="vpn_text" msgid="1610714069627824309">"Dodirnite da biste upravljali mrežom."</string>
-    <string name="vpn_text_long" msgid="4907843483284977618">"Povezano sa sesijom <xliff:g id="SESSION">%s</xliff:g>. Dodirnite da biste upravljali mrežom."</string>
+    <string name="vpn_text" msgid="3011306607126450322">"Dodirnite da biste upravljali mrežom."</string>
+    <string name="vpn_text_long" msgid="6407351006249174473">"Povezano sa sesijom <xliff:g id="SESSION">%s</xliff:g>. Dodirnite da biste upravljali mrežom."</string>
     <string name="vpn_lockdown_connecting" msgid="6443438964440960745">"Povezivanje stalno uključenog VPN-a..."</string>
     <string name="vpn_lockdown_connected" msgid="8202679674819213931">"Stalno uključeni VPN je povezan"</string>
     <string name="vpn_lockdown_error" msgid="6009249814034708175">"Greška stalno uključenog VPN-a"</string>
-    <string name="vpn_lockdown_config" msgid="4655589351146766608">"Dodirnite da biste konfigurisali"</string>
+    <string name="vpn_lockdown_config" msgid="6415899150671537970">"Dodirnite da biste konfigurisali"</string>
     <string name="upload_file" msgid="2897957172366730416">"Odaberi datoteku"</string>
     <string name="no_file_chosen" msgid="6363648562170759465">"Nije izabrana nijedna datoteka"</string>
     <string name="reset" msgid="2448168080964209908">"Ponovo postavi"</string>
     <string name="submit" msgid="1602335572089911941">"Pošalji"</string>
     <string name="car_mode_disable_notification_title" msgid="3164768212003864316">"Režim rada u automobilu je omogućen"</string>
-    <string name="car_mode_disable_notification_message" msgid="6301524980144350051">"Dodirnite da biste izašli iz režima rada u automobilu."</string>
+    <string name="car_mode_disable_notification_message" msgid="8035230537563503262">"Dodirnite da biste izašli iz režima rada u automobilu."</string>
     <string name="tethered_notification_title" msgid="3146694234398202601">"Aktivno povezivanje sa internetom preko mobilnog uređaja ili hotspot"</string>
-    <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite da biste podesili."</string>
+    <string name="tethered_notification_message" msgid="6857031760103062982">"Dodirnite da biste podesili."</string>
     <string name="back_button_label" msgid="2300470004503343439">"Nazad"</string>
     <string name="next_button_label" msgid="1080555104677992408">"Next"</string>
     <string name="skip_button_label" msgid="1275362299471631819">"Preskoči"</string>
@@ -1298,7 +1206,7 @@
     <string name="add_account_button_label" msgid="3611982894853435874">"Dodaj nalog"</string>
     <string name="number_picker_increment_button" msgid="2412072272832284313">"Povećavanje"</string>
     <string name="number_picker_decrement_button" msgid="476050778386779067">"Smanjivanje"</string>
-    <string name="number_picker_increment_scroll_mode" msgid="5259126567490114216">"<xliff:g id="VALUE">%s</xliff:g> dodirnite i zadržite."</string>
+    <string name="number_picker_increment_scroll_mode" msgid="3073101067441638428">"<xliff:g id="VALUE">%s</xliff:g> dodirnite i zadržite."</string>
     <string name="number_picker_increment_scroll_action" msgid="9101473045891835490">"Prevucite nagore da biste povećali, a nadole da biste smanjili."</string>
     <string name="time_picker_increment_minute_button" msgid="8865885114028614321">"Povećavanje minuta"</string>
     <string name="time_picker_decrement_minute_button" msgid="6246834937080684791">"Smanjivanje minuta"</string>
@@ -1342,7 +1250,7 @@
     <string name="storage_usb" msgid="3017954059538517278">"USB memorija"</string>
     <string name="extract_edit_menu_button" msgid="8940478730496610137">"Izmeni"</string>
     <string name="data_usage_warning_title" msgid="1955638862122232342">"Upozorenje o potrošnji podataka"</string>
-    <string name="data_usage_warning_body" msgid="6660692274311972007">"Dodirnite za potrošnju i podešavanja."</string>
+    <string name="data_usage_warning_body" msgid="2814673551471969954">"Dodirnite za pregled kor. i pod."</string>
     <string name="data_usage_3g_limit_title" msgid="4361523876818447683">"Nema više 2G-3G podataka"</string>
     <string name="data_usage_4g_limit_title" msgid="4609566827219442376">"Nema više 4G podataka"</string>
     <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Nema više podataka za mobilne"</string>
@@ -1354,7 +1262,7 @@
     <string name="data_usage_wifi_limit_snoozed_title" msgid="8743856006384825974">"Prekoračenje prenosa Wi-Fi podat."</string>
     <string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> preko navedenog ograničenja."</string>
     <string name="data_usage_restricted_title" msgid="5965157361036321914">"Pozadinski podaci su ograničeni"</string>
-    <string name="data_usage_restricted_body" msgid="469866376337242726">"Dodirnite za uklanjanje ograničenja."</string>
+    <string name="data_usage_restricted_body" msgid="6741521330997452990">"Dodirnite da biste uklonili ograničenje."</string>
     <string name="ssl_certificate" msgid="6510040486049237639">"Bezbednosni sertifikat"</string>
     <string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ovaj sertifikat je važeći."</string>
     <string name="issued_to" msgid="454239480274921032">"Izdato za:"</string>
@@ -1571,7 +1479,8 @@
     <string name="select_year" msgid="7952052866994196170">"Izaberite godinu"</string>
     <string name="deleted_key" msgid="7659477886625566590">"Izbrisali ste <xliff:g id="KEY">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge" msgid="2355652472854327647">"<xliff:g id="LABEL">%1$s</xliff:g> na poslu"</string>
-    <string name="lock_to_app_toast" msgid="1420543809500606964">"Da biste otkačili ovaj ekran, dodirnite i zadržite Nazad."</string>
+    <string name="lock_to_app_toast" msgid="7570091317001980053">"Da biste otkačili ovaj ekran, istovremeno dodirnite i zadržite Nazad i Pregled."</string>
+    <string name="lock_to_app_toast_accessible" msgid="8239120109365070664">"Da biste otkačili ovaj ekran, dodirnite i zadržite Pregled."</string>
     <string name="lock_to_app_toast_locked" msgid="9125176335701699164">"Aplikacija je zakačena: otkačinjanje nije dozvoljeno na ovom uređaju."</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekran je zakačen"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekran je otkačen"</string>
@@ -1582,9 +1491,8 @@
     <string name="package_updated_device_owner" msgid="8856631322440187071">"Ažurirao je administrator"</string>
     <string name="package_deleted_device_owner" msgid="7650577387493101353">"Izbrisao je vaš admiistrator"</string>
     <string name="battery_saver_description" msgid="1960431123816253034">"Da bi produžila vreme trajanja baterije, ušteda baterije smanjuje performanse uređaja i ograničava vibraciju, usluge lokacije i većinu pozadinskih podataka. Imejl, razmena poruka i druge aplikacije koje se oslanjaju na sinhronizaciju možda neće da se ažuriraju ako ih ne otvorite.\n\nUšteda baterije se automatski isključuje kada se uređaj puni."</string>
-    <string name="data_saver_description" msgid="6015391409098303235">"Da bi se smanjila potrošnja podataka, Ušteda podataka sprečava neke aplikacije da šalju ili primaju podatke u pozadini. Aplikacija koju trenutno koristite može da pristupa podacima, ali će to činiti ređe. Na primer, slike se neće prikazivati dok ih ne dodirnete."</string>
-    <string name="data_saver_enable_title" msgid="4674073932722787417">"Uključiti Uštedu podataka?"</string>
-    <string name="data_saver_enable_button" msgid="7147735965247211818">"Uključi"</string>
+    <!-- no translation found for data_saver_description (6015391409098303235) -->
+    <skip />
     <plurals name="zen_mode_duration_minutes_summary" formatted="false" msgid="4367877408072000848">
       <item quantity="one">%1$d minut (do <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="few">%1$d minuta (do <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
@@ -1646,8 +1554,6 @@
     <string name="stk_cc_ss_to_ussd" msgid="3951862188105305589">"SS zahtev je promenjen u USSD zahtev."</string>
     <string name="stk_cc_ss_to_ss" msgid="5470768854991452695">"SS zahtev je promenjen u novi SS zahtev."</string>
     <string name="notification_work_profile_content_description" msgid="4600554564103770764">"Profil za Work"</string>
-    <string name="expand_button_content_description" msgid="5855955413376384681">"Dugme Proširi"</string>
-    <string name="expand_action_accessibility" msgid="5307730695723718254">"uključite/isključite proširenje"</string>
     <string name="usb_midi_peripheral_name" msgid="7221113987741003817">"Android USB port za periferijske uređaje"</string>
     <string name="usb_midi_peripheral_manufacturer_name" msgid="7176526170008970168">"Android"</string>
     <string name="usb_midi_peripheral_product_name" msgid="4971827859165280403">"USB port za periferijske uređaje"</string>
@@ -1655,7 +1561,6 @@
     <string name="floating_toolbar_close_overflow_description" msgid="559796923090723804">"Zatvori preklopni meni"</string>
     <string name="maximize_button_text" msgid="7543285286182446254">"Uvećaj"</string>
     <string name="close_button_text" msgid="3937902162644062866">"Zatvori"</string>
-    <string name="notification_messaging_title_template" msgid="3452480118762691020">"<xliff:g id="CONVERSATION_TITLE">%1$s</xliff:g>: <xliff:g id="SENDER_NAME">%2$s</xliff:g>"</string>
     <plurals name="selected_count" formatted="false" msgid="7187339492915744615">
       <item quantity="one">Izabrana je <xliff:g id="COUNT_1">%1$d</xliff:g> stavka</item>
       <item quantity="few">Izabrane su <xliff:g id="COUNT_1">%1$d</xliff:g> stavke</item>
@@ -1689,5 +1594,4 @@
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Resetujte uređaj na fabrička podešavanja da biste ga koristili bez ograničenja"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Dodirnite da biste saznali više."</string>
-    <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Vidžet <xliff:g id="LABEL">%1$s</xliff:g> je onemogućen"</string>
 </resources>
diff --git a/core/res/res/values-be-rBY/strings.xml b/core/res/res/values-be-rBY/strings.xml
index 995e0a2..2e82a72 100644
--- a/core/res/res/values-be-rBY/strings.xml
+++ b/core/res/res/values-be-rBY/strings.xml
@@ -23,7 +23,7 @@
     <string name="byteShort" msgid="8340973892742019101">"B"</string>
     <string name="kilobyteShort" msgid="5973789783504771878">"Кб"</string>
     <string name="megabyteShort" msgid="6355851576770428922">"Мб"</string>
-    <string name="gigabyteShort" msgid="3259882455212193214">"ГБ"</string>
+    <string name="gigabyteShort" msgid="3259882455212193214">"Гб"</string>
     <string name="terabyteShort" msgid="231613018159186962">"Тб"</string>
     <string name="petabyteShort" msgid="5637816680144990219">"Пб"</string>
     <string name="fileSizeSuffix" msgid="8897567456150907538">"<xliff:g id="NUMBER">%1$s</xliff:g> <xliff:g id="UNIT">%2$s</xliff:g>"</string>
@@ -126,15 +126,11 @@
     <string name="roamingTextSearching" msgid="8360141885972279963">"Пошук службы"</string>
     <string name="wfcRegErrorTitle" msgid="2301376280632110664">"Wi-Fi-тэлефанія"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
-    <item msgid="2254967670088539682">"Каб рабіць выклікі і адпраўляць паведамленні па Wi-Fi, спачатку папрасіце свайго аператара наладзіць гэту паслугу. Затым зноў уключыце Wi-Fi-тэлефанію ў меню Налады."</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
-    <item msgid="6177300162212449033">"Зарэгіструйцеся ў свайго аператара"</item>
   </string-array>
-  <string-array name="wfcSpnFormats">
-    <item msgid="6830082633573257149">"%s"</item>
-    <item msgid="4397097370387921767">"Wi-Fi-тэлефанія %s"</item>
-  </string-array>
+    <string name="wfcSpnFormat" msgid="8211621332478306568">"%s"</string>
+    <string name="wfcDataSpnFormat" msgid="1118052028767666883">"%s"</string>
     <string name="wifi_calling_off_summary" msgid="8720659586041656098">"Выкл."</string>
     <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Прыярытэт Wi-Fi"</string>
     <string name="wfc_mode_cellular_preferred_summary" msgid="5920549484600758786">"Прыярытэт мабільнай сеткі"</string>
@@ -170,12 +166,7 @@
     <string name="low_memory" product="watch" msgid="4415914910770005166">"Сховішча гадзінніка перапоўнена. Выдаліце некаторыя файлы, каб вызваліць месца."</string>
     <string name="low_memory" product="tv" msgid="516619861191025923">"Сховішча тэлевізара перапоўнена. Выдаліце некаторыя файлы, каб вызваліць месца."</string>
     <string name="low_memory" product="default" msgid="3475999286680000541">"Памяць тэлефона поўная. Выдаліце ​​некаторыя файлы, каб вызваліць месца."</string>
-    <plurals name="ssl_ca_cert_warning" formatted="false" msgid="5106721205300213569">
-      <item quantity="one">Усталяваны цэнтры сертыфікацыі</item>
-      <item quantity="few">Усталяваны цэнтры сертыфікацыі</item>
-      <item quantity="many">Усталяваны цэнтры сертыфікацыі</item>
-      <item quantity="other">Усталяваны цэнтры сертыфікацыі</item>
-    </plurals>
+    <!-- no translation found for ssl_ca_cert_warning (5106721205300213569) -->
     <string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Невядомая трэцяя асоба"</string>
     <string name="ssl_ca_cert_noti_by_administrator" msgid="550758088185764312">"Адміністратар вашага працоўнага профілю"</string>
     <string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"<xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
@@ -211,7 +202,7 @@
     <string name="shutdown_confirm_question" msgid="2906544768881136183">"Закрыць?"</string>
     <string name="reboot_safemode_title" msgid="7054509914500140361">"Перазагрузка ў бяспечным рэжыме"</string>
     <string name="reboot_safemode_confirm" msgid="55293944502784668">"Хочаце перазагрузіцца ў бяспечным рэжыме? Гэта дазволіць адключыць усе іншыя ўсталяваныя прыкладанні. Пасля перазагрузкi iх праца будзе адноўлена."</string>
-    <string name="recent_tasks_title" msgid="3691764623638127888">"Нядаўнія"</string>
+    <string name="recent_tasks_title" msgid="3691764623638127888">"Апошнія"</string>
     <string name="no_recent_tasks" msgid="8794906658732193473">"Няма апошніх прыкладанняў."</string>
     <string name="global_actions" product="tablet" msgid="408477140088053665">"Параметры планшэта"</string>
     <string name="global_actions" product="tv" msgid="7240386462508182976">"Параметры ТБ"</string>
@@ -222,9 +213,9 @@
     <string name="bugreport_title" msgid="2667494803742548533">"Справаздача пра памылку"</string>
     <string name="bugreport_message" msgid="398447048750350456">"Будзе збiрацца iнфармацыя пра бягучы стан прылады, якая будзе адпраўляцца на электронную пошту. Стварэнне справаздачы пра памылкi зойме некаторы час."</string>
     <string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Інтэрактыўная справаздача"</string>
-    <string name="bugreport_option_interactive_summary" msgid="229299488536107968">"Выкарыстоўвайце ў большасці выпадкаў. Гэта дазваляе сачыць за ходам справаздачы, уводзіць дадатковыя звесткі аб праблеме і рабіць здымкі экрана. Могуць быць прапушчаны некаторыя раздзелы, якія выкарыстоўваюцца менш і паведамленне пра якія займае шмат часу."</string>
+    <string name="bugreport_option_interactive_summary" msgid="8180152634022797629">"Выкарыстоўвайце ў большасці выпадкаў. Гэта дазваляе сачыць за ходам справаздачы і ўводзіць дадатковыя звесткі аб праблеме. Могуць быць прапушчаны некаторыя раздзелы, якія выкарыстоўваюцца менш і паведаміць пра якія зойме шмат часу."</string>
     <string name="bugreport_option_full_title" msgid="6354382025840076439">"Поўная справаздача"</string>
-    <string name="bugreport_option_full_summary" msgid="7210859858969115745">"Выкарыстоўвайце гэту опцыю, каб забяспечыць мінімальнае ўмяшанне сістэмы, калі прылада не адказвае ці працуе занадта павольна, або калі вам патрэбны ўсе раздзелы справаздачы. Выкарыстоўваючы гэту опцыю, вы не зможаце ўвесці больш падрабязную інфармацыю або зрабіць дадатковыя здымкі экрана."</string>
+    <string name="bugreport_option_full_summary" msgid="6687306111256813257">"Выкарыстоўвайце гэту опцыю, каб забяспечыць мінімальнае ўмяшанне сістэмы, калі прылада не адказвае ці працуе занадта павольна або калі вам патрэбны ўсе раздзелы справаздачы. Выкарыстоўваючы гэту опцыю, вы не зможаце зрабіць здымак экрана або ўвесці больш падрабязную інфармацыю."</string>
     <plurals name="bugreport_countdown" formatted="false" msgid="6878900193900090368">
       <item quantity="one">Здымак экрана для справаздачы пра памылкі будзе зроблены праз <xliff:g id="NUMBER_1">%d</xliff:g> секунду.</item>
       <item quantity="few">Здымак экрана для справаздачы пра памылкі будзе зроблены праз <xliff:g id="NUMBER_1">%d</xliff:g> секунды.</item>
@@ -269,7 +260,7 @@
     <string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Атрымайце змесцiва акна"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Вывучыце змесцiва акна, з якiм вы працуеце."</string>
     <string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Уключыце Explore by Touch"</string>
-    <string name="capability_desc_canRequestTouchExploration" msgid="7543249041581408313">"Элементы, да якіх дакрануліся, будуць агучаны, а экранам можна даследаваць пры дапамозе жэстаў."</string>
+    <string name="capability_desc_canRequestTouchExploration" msgid="5800552516779249356">"Элемент, да якiх дакраналiся, могуць быць агучаны, а экран будзе працаваць з жэстамi."</string>
     <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"Уключыце паляпшэнне вэб-даступнасці"</string>
     <string name="capability_desc_canRequestEnhancedWebAccessibility" msgid="7881063961507511765">"Сцэнарыi могуць быць усталяваны, каб зрабіць змесцiва прыкладання больш даступным."</string>
     <string name="capability_title_canRequestFilterKeyEvents" msgid="2103440391902412174">"Глядзiце, што набiраеце"</string>
@@ -530,12 +521,12 @@
     <string name="policydesc_watchLogin_secondaryUser" product="default" msgid="2185480427217127147">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і блакіраваць тэлефон або сцерці ўсе даныя гэтага карыстальніка, калі няправільны пароль набраны занадта шмат разоў."</string>
     <string name="policylab_resetPassword" msgid="4934707632423915395">"Змяніць блакіроўку экрана"</string>
     <string name="policydesc_resetPassword" msgid="1278323891710619128">"Змяніць блакіроўку экрана."</string>
-    <string name="policylab_forceLock" msgid="2274085384704248431">"Заблакіраваць экран"</string>
-    <string name="policydesc_forceLock" msgid="1141797588403827138">"Кіраваць як і калі блакіруецца экран."</string>
-    <string name="policylab_wipeData" msgid="3910545446758639713">"Сцерці ўсе даныя"</string>
-    <string name="policydesc_wipeData" product="tablet" msgid="4306184096067756876">"Cцерці даныя з планшэта без папярэджання, выканаўшы скід да заводскіх даных."</string>
+    <string name="policylab_forceLock" msgid="2274085384704248431">"Заблакаваць экран"</string>
+    <string name="policydesc_forceLock" msgid="1141797588403827138">"Кіраванне часам і спосабам блакавання экрана"</string>
+    <string name="policylab_wipeData" msgid="3910545446758639713">"Сцерці ўсе дадзеныя"</string>
+    <string name="policydesc_wipeData" product="tablet" msgid="4306184096067756876">"Выдаліць дадзеныя з планшэта без папярэджання, выканаўшы скід налад."</string>
     <string name="policydesc_wipeData" product="tv" msgid="5816221315214527028">"Сцерці даныя з тэлевізара без папярэджання, выканаўшы скід да заводскіх налад."</string>
-    <string name="policydesc_wipeData" product="default" msgid="5096895604574188391">"Сцерці даныя з тэлефона без папярэджання, выканаўшы скід да заводскіх налад."</string>
+    <string name="policydesc_wipeData" product="default" msgid="5096895604574188391">"Выдаліць дадзеныя з тэлефона без папярэджання, выканаўшы скід налад."</string>
     <string name="policylab_wipeData_secondaryUser" msgid="8362863289455531813">"Сцерці карыстальніцкія даныя"</string>
     <string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="6336255514635308054">"Сцерці даныя гэтага карыстальніка на дадзеным планшэце без папярэджання."</string>
     <string name="policydesc_wipeData_secondaryUser" product="tv" msgid="2086473496848351810">"Сцерці даныя гэтага карыстальніка на дадзеным тэлевізары без папярэджання."</string>
@@ -551,7 +542,7 @@
     <string name="policylab_disableKeyguardFeatures" msgid="8552277871075367771">"Адкл.некат.функцыі блак.экрана"</string>
     <string name="policydesc_disableKeyguardFeatures" msgid="2044755691354158439">"Забараніць выкарыстанне некаторых функцый блакіроўкі экрана."</string>
   <string-array name="phoneTypes">
-    <item msgid="8901098336658710359">"Хатні"</item>
+    <item msgid="8901098336658710359">"Галоўная старонка"</item>
     <item msgid="869923650527136615">"Мабільны"</item>
     <item msgid="7897544654242874543">"Працоўны"</item>
     <item msgid="1103601433382158155">"Працоўны факс"</item>
@@ -594,7 +585,7 @@
     <item msgid="1648797903785279353">"Jabber"</item>
   </string-array>
     <string name="phoneTypeCustom" msgid="1644738059053355820">"Карыстальніцкі"</string>
-    <string name="phoneTypeHome" msgid="2570923463033985887">"Хатні"</string>
+    <string name="phoneTypeHome" msgid="2570923463033985887">"Галоўная старонка"</string>
     <string name="phoneTypeMobile" msgid="6501463557754751037">"Мабільны"</string>
     <string name="phoneTypeWork" msgid="8863939667059911633">"Працоўны"</string>
     <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Працоўны факс"</string>
@@ -602,7 +593,7 @@
     <string name="phoneTypePager" msgid="7582359955394921732">"Пэйджар"</string>
     <string name="phoneTypeOther" msgid="1544425847868765990">"Іншы"</string>
     <string name="phoneTypeCallback" msgid="2712175203065678206">"Зваротны выклік"</string>
-    <string name="phoneTypeCar" msgid="8738360689616716982">"Тэл. у машыне"</string>
+    <string name="phoneTypeCar" msgid="8738360689616716982">"Машына"</string>
     <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Асноўны тэлефон кампаніі"</string>
     <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
     <string name="phoneTypeMain" msgid="6766137010628326916">"Галоўны"</string>
@@ -619,16 +610,16 @@
     <string name="eventTypeAnniversary" msgid="3876779744518284000">"Гадавіна"</string>
     <string name="eventTypeOther" msgid="7388178939010143077">"Іншае"</string>
     <string name="emailTypeCustom" msgid="8525960257804213846">"Карыстальніцкі"</string>
-    <string name="emailTypeHome" msgid="449227236140433919">"Хатні"</string>
+    <string name="emailTypeHome" msgid="449227236140433919">"Галоўная старонка"</string>
     <string name="emailTypeWork" msgid="3548058059601149973">"Працоўны"</string>
     <string name="emailTypeOther" msgid="2923008695272639549">"Іншы"</string>
     <string name="emailTypeMobile" msgid="119919005321166205">"Мабільны"</string>
     <string name="postalTypeCustom" msgid="8903206903060479902">"Карыстальніцкі"</string>
-    <string name="postalTypeHome" msgid="8165756977184483097">"Хатні"</string>
+    <string name="postalTypeHome" msgid="8165756977184483097">"Галоўная старонка"</string>
     <string name="postalTypeWork" msgid="5268172772387694495">"Працоўны"</string>
     <string name="postalTypeOther" msgid="2726111966623584341">"Іншы"</string>
     <string name="imTypeCustom" msgid="2074028755527826046">"Карыстальніцкі"</string>
-    <string name="imTypeHome" msgid="6241181032954263892">"Хатні"</string>
+    <string name="imTypeHome" msgid="6241181032954263892">"Галоўная старонка"</string>
     <string name="imTypeWork" msgid="1371489290242433090">"Працоўны"</string>
     <string name="imTypeOther" msgid="5377007495735915478">"Іншы"</string>
     <string name="imProtocolCustom" msgid="6919453836618749992">"Карыстальніцкі"</string>
@@ -660,7 +651,7 @@
     <string name="relationTypeSister" msgid="1735983554479076481">"Сястра"</string>
     <string name="relationTypeSpouse" msgid="394136939428698117">"Муж/жонка"</string>
     <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Карыстальніцкі"</string>
-    <string name="sipAddressTypeHome" msgid="6093598181069359295">"Хатні"</string>
+    <string name="sipAddressTypeHome" msgid="6093598181069359295">"Галоўная старонка"</string>
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Працоўны"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Іншае"</string>
     <string name="quick_contacts_not_available" msgid="746098007828579688">"Адсутнічае праграма для прагляду гэтага кантакту."</string>
@@ -668,7 +659,7 @@
     <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"Увядзіце PUK-код і новы PIN-код"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="1341112146710087048">"PUK"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="8027680321614196258">"Новы PIN-код"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="2644215452200037944"><font size="17">"Дакраніцеся, каб увесці пароль"</font></string>
+    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Дакраніцеся, каб увесці пароль"</font></string>
     <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Увядзіце пароль для разблакавання"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Каб разблакаваць, увядзіце PIN-код"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Няправільны PIN-код."</string>
@@ -679,7 +670,7 @@
     <string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"Націсніце \"Меню\", каб разблакаваць, або зрабіце экстраны выклік."</string>
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Націсніце \"Меню\", каб разблакаваць."</string>
     <string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Намалюйце камбінацыю разблакоўкі, каб разблакаваць"</string>
-    <string name="lockscreen_emergency_call" msgid="5298642613417801888">"SOS-выклік"</string>
+    <string name="lockscreen_emergency_call" msgid="5298642613417801888">"Экстранная сітуацыя"</string>
     <string name="lockscreen_return_to_call" msgid="5244259785500040021">"Вярнуцца да выкліку"</string>
     <string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Правільна!"</string>
     <string name="lockscreen_pattern_wrong" msgid="4317955014948108794">"Паспрабуйце яшчэ раз"</string>
@@ -846,7 +837,7 @@
     <string name="days" msgid="4774547661021344602">"д."</string>
     <string name="hour" msgid="2126771916426189481">"гадзіна"</string>
     <string name="hours" msgid="894424005266852993">"г."</string>
-    <string name="minute" msgid="9148878657703769868">"хв"</string>
+    <string name="minute" msgid="9148878657703769868">"хв."</string>
     <string name="minutes" msgid="5646001005827034509">"хв."</string>
     <string name="second" msgid="3184235808021478">"с."</string>
     <string name="seconds" msgid="3161515347216589235">"с."</string>
@@ -872,103 +863,6 @@
       <item quantity="many"><xliff:g id="COUNT">%d</xliff:g> гадзін</item>
       <item quantity="other"><xliff:g id="COUNT">%d</xliff:g> гадзіны</item>
     </plurals>
-    <string name="now_string_shortest" msgid="8912796667087856402">"зараз"</string>
-    <plurals name="duration_minutes_shortest" formatted="false" msgid="3957499975064245495">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-    </plurals>
-    <plurals name="duration_hours_shortest" formatted="false" msgid="3552182110578602356">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-    </plurals>
-    <plurals name="duration_days_shortest" formatted="false" msgid="5213655532597081640">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> дз.</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> дні</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> дз.</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> дня</item>
-    </plurals>
-    <plurals name="duration_years_shortest" formatted="false" msgid="7848711145196397042">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-    </plurals>
-    <plurals name="duration_minutes_shortest_future" formatted="false" msgid="3277614521231489951">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> хв</item>
-    </plurals>
-    <plurals name="duration_hours_shortest_future" formatted="false" msgid="2152452368397489370">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> гадз</item>
-    </plurals>
-    <plurals name="duration_days_shortest_future" formatted="false" msgid="8088331502820295701">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> дз.</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> дні</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> дз.</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> дня</item>
-    </plurals>
-    <plurals name="duration_years_shortest_future" formatted="false" msgid="2317006667145250301">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> г.</item>
-    </plurals>
-    <plurals name="duration_minutes_relative" formatted="false" msgid="3178131706192980192">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> хвіліну таму</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> хвіліны таму</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> хвілін таму</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> хвіліны таму</item>
-    </plurals>
-    <plurals name="duration_hours_relative" formatted="false" msgid="676894109982008411">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> гадзіну таму</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> гадзіны таму</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> гадзін таму</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> гадзіны таму</item>
-    </plurals>
-    <plurals name="duration_days_relative" formatted="false" msgid="2203515825765397130">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> дзень таму</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> дні таму</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> дзён таму</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> дня таму</item>
-    </plurals>
-    <plurals name="duration_years_relative" formatted="false" msgid="4820062134188885734">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> год таму</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> гады таму</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> гадоў таму</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> года таму</item>
-    </plurals>
-    <plurals name="duration_minutes_relative_future" formatted="false" msgid="4655043589817680966">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> хвіліну</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> хвіліны</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> хвілін</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> хвіліны</item>
-    </plurals>
-    <plurals name="duration_hours_relative_future" formatted="false" msgid="8084579714205223891">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> гадзіну</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> гадзіны</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> гадзін</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> гадзіны</item>
-    </plurals>
-    <plurals name="duration_days_relative_future" formatted="false" msgid="333215369363433992">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> дзень</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> дні</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> дзён</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> дня</item>
-    </plurals>
-    <plurals name="duration_years_relative_future" formatted="false" msgid="8644862986413104011">
-      <item quantity="one">праз <xliff:g id="COUNT_1">%d</xliff:g> год</item>
-      <item quantity="few">праз <xliff:g id="COUNT_1">%d</xliff:g> гады</item>
-      <item quantity="many">праз <xliff:g id="COUNT_1">%d</xliff:g> гадоў</item>
-      <item quantity="other">праз <xliff:g id="COUNT_1">%d</xliff:g> года</item>
-    </plurals>
     <string name="VideoView_error_title" msgid="3534509135438353077">"Праблема з відэа"</string>
     <string name="VideoView_error_text_invalid_progressive_playback" msgid="3186670335938670444">"Відэа не падыходзіць для патокавай перадачы на ​​гэту прыладу."</string>
     <string name="VideoView_error_text_unknown" msgid="3450439155187810085">"Немагчыма прайграць гэта відэа."</string>
@@ -1000,15 +894,15 @@
     <string name="low_internal_storage_view_text" msgid="6640505817617414371">"Некаторыя сістэмныя функцыі могуць не працаваць"</string>
     <string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Не хапае сховішча для сістэмы. Пераканайцеся, што ў вас ёсць 250 МБ свабоднага месца, і перазапусціце."</string>
     <string name="app_running_notification_title" msgid="8718335121060787914">"Прыкладанне <xliff:g id="APP_NAME">%1$s</xliff:g> працуе"</string>
-    <string name="app_running_notification_text" msgid="1197581823314971177">"Дакраніцеся, каб атрымаць дадатковую інфармацыю або спыніць праграму."</string>
+    <string name="app_running_notification_text" msgid="4653586947747330058">"Націсніце, каб атрымаць дадатковую інфармацыю або спыніць праграму."</string>
     <string name="ok" msgid="5970060430562524910">"ОК"</string>
-    <string name="cancel" msgid="6442560571259935130">"Скасаваць"</string>
+    <string name="cancel" msgid="6442560571259935130">"Адмяніць"</string>
     <string name="yes" msgid="5362982303337969312">"ОК"</string>
-    <string name="no" msgid="5141531044935541497">"Скасаваць"</string>
+    <string name="no" msgid="5141531044935541497">"Адмяніць"</string>
     <string name="dialog_alert_title" msgid="2049658708609043103">"Увага"</string>
     <string name="loading" msgid="7933681260296021180">"Загрузка..."</string>
     <string name="capital_on" msgid="1544682755514494298">"Уключыць"</string>
-    <string name="capital_off" msgid="6815870386972805832">"Выключана"</string>
+    <string name="capital_off" msgid="6815870386972805832">"Адключана"</string>
     <string name="whichApplication" msgid="4533185947064773386">"Завяршыць дзеянне з дапамогай"</string>
     <string name="whichApplicationNamed" msgid="8260158865936942783">"Завяршыць дзеянне з дапамогай %1$s"</string>
     <string name="whichApplicationLabel" msgid="7425855495383818784">"Завяршыць дзеянне"</string>
@@ -1026,10 +920,10 @@
     <string name="whichSendToApplicationLabel" msgid="8878962419005813500">"Адправiць"</string>
     <string name="whichHomeApplication" msgid="4307587691506919691">"Выберыце праграму Галоўнай старонкі"</string>
     <string name="whichHomeApplicationNamed" msgid="4493438593214760979">"Выкарыстоўваць %1$s у якасці праграмы Галоўнай старонкі"</string>
-    <string name="whichHomeApplicationLabel" msgid="809529747002918649">"Зрабіць здымак"</string>
-    <string name="whichImageCaptureApplication" msgid="3680261417470652882">"Зрабіць здымак з дапамогай"</string>
-    <string name="whichImageCaptureApplicationNamed" msgid="8619384150737825003">"Зрабіць здымак з дапамогай %1$s"</string>
-    <string name="whichImageCaptureApplicationLabel" msgid="6390303445371527066">"Зрабіць здымак"</string>
+    <string name="whichHomeApplicationLabel" msgid="809529747002918649">"Зняць выяву"</string>
+    <string name="whichImageCaptureApplication" msgid="3680261417470652882">"Здымаць выявы з дапамогай"</string>
+    <string name="whichImageCaptureApplicationNamed" msgid="8619384150737825003">"Здымаць выявы з дапамогай %1$s"</string>
+    <string name="whichImageCaptureApplicationLabel" msgid="6390303445371527066">"Зняць выяву"</string>
     <string name="alwaysUse" msgid="4583018368000610438">"Выкарыстоўваць па змаўчанні для гэтага дзеяння."</string>
     <string name="use_a_different_app" msgid="8134926230585710243">"Выкарыстоўваць іншую праграму"</string>
     <string name="clearDefaultHintMsg" msgid="3252584689512077257">"Ачысціць па змаўчанні ў раздзеле \"Налады сістэмы &gt; Прыкладанні &gt; Спампаваныя\"."</string>
@@ -1040,7 +934,8 @@
     <string name="aerr_process" msgid="6201597323218674729">"Працэс <xliff:g id="PROCESS">%1$s</xliff:g> спыніўся"</string>
     <string name="aerr_application_repeated" msgid="3146328699537439573">"<xliff:g id="APPLICATION">%1$s</xliff:g> шматразова спыняе працу"</string>
     <string name="aerr_process_repeated" msgid="6235302956890402259">"<xliff:g id="PROCESS">%1$s</xliff:g> шматразова спыняе працу"</string>
-    <string name="aerr_restart" msgid="7581308074153624475">"Адкрыць праграму зноў"</string>
+    <string name="aerr_restart" msgid="9001379185665886595">"Перазапусціць праграму"</string>
+    <string name="aerr_reset" msgid="7645427603514220451">"Скінуць і перазапусціць праграму"</string>
     <string name="aerr_report" msgid="5371800241488400617">"Адправіць водгук"</string>
     <string name="aerr_close" msgid="2991640326563991340">"Закрыць"</string>
     <string name="aerr_mute" msgid="1974781923723235953">"Адключыць гук да перазагрузкі прылады"</string>
@@ -1061,21 +956,17 @@
     <string name="screen_compat_mode_scale" msgid="3202955667675944499">"Шкала"</string>
     <string name="screen_compat_mode_show" msgid="4013878876486655892">"Заўсёды паказваць"</string>
     <string name="screen_compat_mode_hint" msgid="1064524084543304459">"Зноў уключыце гэта ў раздзеле \"Сістэмныя налады &gt; Прыкладанні &gt; Спампаваныя\"."</string>
-    <string name="unsupported_display_size_message" msgid="6545327290756295232">"<xliff:g id="APP_NAME">%1$s</xliff:g> не падтрымлівае бягучую наладу Памеру дысплэя і можа паводзіць сябе непрадказальным чынам."</string>
-    <string name="unsupported_display_size_show" msgid="7969129195360353041">"Заўсёды паказваць"</string>
     <string name="smv_application" msgid="3307209192155442829">"Прыкладанне <xliff:g id="APPLICATION">%1$s</xliff:g> (працэс <xliff:g id="PROCESS">%2$s</xliff:g>) парушыла ўласную палітыку StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Працэс <xliff:g id="PROCESS">%1$s</xliff:g> парушыў уласную палітыку StrictMode."</string>
     <string name="android_upgrading_title" msgid="1584192285441405746">"Абнаўленне Android..."</string>
     <string name="android_start_title" msgid="8418054686415318207">"Android запускаецца..."</string>
     <string name="android_upgrading_fstrim" msgid="8036718871534640010">"Аптымізацыя сховішча."</string>
-    <string name="android_upgrading_notification_title" msgid="1619393112444671028">"Абнаўленне Android"</string>
-    <string name="android_upgrading_notification_body" msgid="5761201379457064286">"Пэўныя праграмы могуць не працаваць належным чынам, пакуль не скончыцца абнаўленне"</string>
     <string name="android_upgrading_apk" msgid="7904042682111526169">"Аптымізацыя прыкладання <xliff:g id="NUMBER_0">%1$d</xliff:g> з <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
     <string name="android_preparing_apk" msgid="8162599310274079154">"Падрыхтоўка <xliff:g id="APPNAME">%1$s</xliff:g>."</string>
     <string name="android_upgrading_starting_apps" msgid="451464516346926713">"Запуск прыкладанняў."</string>
     <string name="android_upgrading_complete" msgid="1405954754112999229">"Завяршэнне загрузкі."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Прыкладанне \"<xliff:g id="APP">%1$s</xliff:g>\" запушчанае"</string>
-    <string name="heavy_weight_notification_detail" msgid="867643381388543170">"Дакраніцеся, каб пераключыцца на праграму"</string>
+    <string name="heavy_weight_notification_detail" msgid="1721681741617898865">"Націсніце, каб перайсці да прыкладання"</string>
     <string name="heavy_weight_switcher_title" msgid="7153167085403298169">"Пераключыць прыкладанні?"</string>
     <string name="heavy_weight_switcher_text" msgid="7022631924534406403">"Ужо запушчана іншае прыкладанне, якое павінна быць спынена перад запускам новага."</string>
     <string name="old_app_action" msgid="493129172238566282">"Вярнуцца да <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
@@ -1083,7 +974,7 @@
     <string name="new_app_action" msgid="5472756926945440706">"Запусціць <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
     <string name="new_app_description" msgid="1932143598371537340">"Спыніць старыя прыкладанні без захавання."</string>
     <string name="dump_heap_notification" msgid="2618183274836056542">"Працэс <xliff:g id="PROC">%1$s</xliff:g> перавысіў ліміт памяці"</string>
-    <string name="dump_heap_notification_detail" msgid="6901391084243999274">"Быў сабраны дамп кучы; дакраніцеся, каб абагуліць"</string>
+    <string name="dump_heap_notification_detail" msgid="2075673362317481664">"Быў сабраны дамп кучы; дакраніцеся, каб абагуліць"</string>
     <string name="dump_heap_title" msgid="5864292264307651673">"Абагуліць дамп дынамічнай вобласці?"</string>
     <string name="dump_heap_text" msgid="4809417337240334941">"Працэс <xliff:g id="PROC">%1$s</xliff:g> перавысіў ліміт памяці працэсу <xliff:g id="SIZE">%2$s</xliff:g>. Дамп дынамічнай вобласці даступны для вас, вы можаце абагуліць яго з распрацоўшчыкам. Будзьце асцярожныя: гэты дамп дынамічнай вобласці можа ўтрымліваць асабістую інфармацыю, да якой маюць доступ праграмы."</string>
     <string name="sendText" msgid="5209874571959469142">"Выберыце дзеянне для тэкста"</string>
@@ -1101,8 +992,8 @@
     <string name="volume_icon_description_incall" msgid="8890073218154543397">"Гучнасць выкліка"</string>
     <string name="volume_icon_description_media" msgid="4217311719665194215">"Гучнасць прайгравальніка"</string>
     <string name="volume_icon_description_notification" msgid="7044986546477282274">"Гучнасць апавяшчэнняў"</string>
-    <string name="ringtone_default" msgid="3789758980357696936">"Стандартны рынгтон"</string>
-    <string name="ringtone_default_with_actual" msgid="8129563480895990372">"Стандартны рынгтон (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
+    <string name="ringtone_default" msgid="3789758980357696936">"Рынгтон па змаўчаннi"</string>
+    <string name="ringtone_default_with_actual" msgid="8129563480895990372">"Рынгтон па змаўчаннi (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
     <string name="ringtone_silent" msgid="7937634392408977062">"Няма"</string>
     <string name="ringtone_picker_title" msgid="3515143939175119094">"Рынгтоны"</string>
     <string name="ringtone_unknown" msgid="5477919988701784788">"Невядомы рынгтон"</string>
@@ -1123,7 +1014,7 @@
     <!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
     <skip />
     <string name="wifi_no_internet" msgid="8451173622563841546">"У Wi-Fi няма доступу да Інтэрнэту"</string>
-    <string name="wifi_no_internet_detailed" msgid="8083079241212301741">"Дакраніцеся, каб убачыць параметры"</string>
+    <string name="wifi_no_internet_detailed" msgid="7593858887662270131">"Дакраніцеся, каб убачыць параметры"</string>
     <string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Немагчыма падключыцца да Wi-Fi"</string>
     <string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" дрэннае падключэнне да Інтэрнэту."</string>
     <string name="wifi_connect_alert_title" msgid="8455846016001810172">"Дазволіць падключэнне?"</string>
@@ -1133,7 +1024,7 @@
     <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Пачаць работу Wi-Fi Direct. Гэта адключыць кліента або кропку доступу Wi-Fi."</string>
     <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Немагчыма запусціць Wi-Fi Direct."</string>
     <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct уключаны"</string>
-    <string name="wifi_p2p_enabled_notification_message" msgid="8064677407830620023">"Дакраніцеся, каб убачыць налады"</string>
+    <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Дакраніцеся, каб наладзіць"</string>
     <string name="accept" msgid="1645267259272829559">"Прыняць"</string>
     <string name="decline" msgid="2112225451706137894">"Адхіліць"</string>
     <string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Запрашэнне адпраўлена"</string>
@@ -1149,12 +1040,12 @@
     <string name="sms_control_title" msgid="7296612781128917719">"Адпраўка SMS"</string>
     <string name="sms_control_message" msgid="3867899169651496433">"Прыкладанне &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; дасылае вялікую колькасць SMS-паведамленняў. Дазволіць гэтаму прыкладанню працягваць адпраўляць паведамленні?"</string>
     <string name="sms_control_yes" msgid="3663725993855816807">"Дазволіць"</string>
-    <string name="sms_control_no" msgid="625438561395534982">"Адмовіць"</string>
+    <string name="sms_control_no" msgid="625438561395534982">"Забараніць"</string>
     <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; хоча адправiць паведамленне на адрас &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
     <string name="sms_short_code_details" msgid="5873295990846059400">"Гэта "<b>"можа прывесці да спагнання аплаты"</b>" з рахунку вашага мабільнага тэлефона."</string>
     <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Гэта прывядзе да спагнання аплаты з рахунку вашага мабільнага тэлефона."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Адправiць"</string>
-    <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Скасаваць"</string>
+    <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Адмена"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Захаваць мой выбар"</string>
     <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"Пазней гэта можна змянiць у раздзеле \"Налады &gt; Прыкладаннi\""</string>
     <string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"Заўсёды дазваляць"</string>
@@ -1170,8 +1061,8 @@
     <string name="carrier_app_dialog_not_now" msgid="6361378684292268027">"НЕ ЗАРАЗ"</string>
     <string name="carrier_app_notification_title" msgid="8921767385872554621">"Устаўлена новая SIM-карта"</string>
     <string name="carrier_app_notification_text" msgid="1132487343346050225">"Краніце, каб наладзіць"</string>
-    <string name="time_picker_dialog_title" msgid="8349362623068819295">"Задаць час"</string>
-    <string name="date_picker_dialog_title" msgid="5879450659453782278">"Задаць дату"</string>
+    <string name="time_picker_dialog_title" msgid="8349362623068819295">"Усталяваць час"</string>
+    <string name="date_picker_dialog_title" msgid="5879450659453782278">"Усталяваць дату"</string>
     <string name="date_time_set" msgid="5777075614321087758">"Задаць"</string>
     <string name="date_time_done" msgid="2507683751759308828">"Гатова"</string>
     <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ff33b5e5">"НОВАЕ: "</font></string>
@@ -1179,15 +1070,15 @@
     <string name="no_permissions" msgid="7283357728219338112">"Дазволу не патрабуецца"</string>
     <string name="perm_costs_money" msgid="4902470324142151116">"за гэта можа спаганяцца плата"</string>
     <string name="dlg_ok" msgid="7376953167039865701">"ОК"</string>
-    <string name="usb_charging_notification_title" msgid="6895185153353640787">"Праз USB зараджаецца гэта прылада"</string>
+    <string name="usb_charging_notification_title" msgid="6895185153353640787">"Па USB зараджаецца гэта прыладу"</string>
     <string name="usb_supplying_notification_title" msgid="5310642257296510271">"Па USB падачецца сілкаванне падключанай прыладзе"</string>
     <string name="usb_mtp_notification_title" msgid="8396264943589760855">"USB для перадачы файлаў"</string>
     <string name="usb_ptp_notification_title" msgid="1347328437083192112">"USB для перадачы фота"</string>
     <string name="usb_midi_notification_title" msgid="4850904915889144654">"USB для MIDI"</string>
     <string name="usb_accessory_notification_title" msgid="7848236974087653666">"Падключаны да USB-прылады"</string>
-    <string name="usb_notification_message" msgid="3370903770828407960">"Дакраніцеся, каб атрымаць іншыя параметры."</string>
-    <string name="adb_active_notification_title" msgid="6729044778949189918">"Адладка па USB падключана"</string>
-    <string name="adb_active_notification_message" msgid="4948470599328424059">"Дакраніцеся, каб адключыць адладку па USB."</string>
+    <string name="usb_notification_message" msgid="7347368030849048437">"Дакраніцеся, каб атрымаць больш параметраў."</string>
+    <string name="adb_active_notification_title" msgid="6729044778949189918">"Прылада адладкі USB падключана"</string>
+    <string name="adb_active_notification_message" msgid="1016654627626476142">"Націсніце, каб адключыць адладку USB."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Стварэнне справаздачы пра памылку…"</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Падзяліцца справаздачай пра памылку?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Перадача справаздачы пра памылку..."</string>
@@ -1207,9 +1098,9 @@
     <string name="ext_media_new_notification_message" msgid="7589986898808506239">"Выяўлены новы носьбіт <xliff:g id="NAME">%s</xliff:g>"</string>
     <string name="ext_media_ready_notification_message" msgid="4083398150380114462">"Для перадачы фатаграфій і медыяфайлаў"</string>
     <string name="ext_media_unmountable_notification_title" msgid="8295123366236989588">"Пашкоджаны носьбіт <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="ext_media_unmountable_notification_message" msgid="2343202057122495773">"Носьбіт <xliff:g id="NAME">%s</xliff:g> пашкоджаны. Дакраніцеся, каб выправіць."</string>
+    <string name="ext_media_unmountable_notification_message" msgid="1586311304430052169">"Носьбіт <xliff:g id="NAME">%s</xliff:g> пашкоджаны. Дакраніцеся, каб выправіць."</string>
     <string name="ext_media_unsupported_notification_title" msgid="3797642322958803257">"<xliff:g id="NAME">%s</xliff:g> не падтрымліваецца"</string>
-    <string name="ext_media_unsupported_notification_message" msgid="6121601473787888589">"Гэта прылада не падтрымлівае носьбіт <xliff:g id="NAME">%s</xliff:g>. Дакраніцеся, каб наладзіць яго ў фармаце, які падтрымліваецца."</string>
+    <string name="ext_media_unsupported_notification_message" msgid="8789610369456474891">"Гэта прылада не падтрымлівае носьбіт <xliff:g id="NAME">%s</xliff:g>. Дакраніцеся, каб наладзіць яго ў фармаце, які падтрымліваецца."</string>
     <string name="ext_media_badremoval_notification_title" msgid="3206248947375505416">"Носьбіт <xliff:g id="NAME">%s</xliff:g> нечакана выняты"</string>
     <string name="ext_media_badremoval_notification_message" msgid="380176703346946313">"Адключыце носьбіт <xliff:g id="NAME">%s</xliff:g>, перш чым вымаць яго, каб пазбегнуць страты даных."</string>
     <string name="ext_media_nomedia_notification_title" msgid="1704840188641749091">"Носьбіт <xliff:g id="NAME">%s</xliff:g> выдалены"</string>
@@ -1245,7 +1136,7 @@
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"Дазваляе праграме счытваць сеансы ўсталёўкі. Гэта дазваляе ёй праглядаць інфармацыю аб актыўных усталёўках пакета."</string>
     <string name="permlab_requestInstallPackages" msgid="5782013576218172577">"запытваць усталёўку пакетаў"</string>
     <string name="permdesc_requestInstallPackages" msgid="5740101072486783082">"Дазваляе праграме запытваць усталёўку пакетаў."</string>
-    <string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Націсніце двойчы, каб кіраваць маштабаваннем"</string>
+    <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"Двойчы дакраніцеся, каб змянiць маштаб"</string>
     <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Немагчыма дадаць віджэт."</string>
     <string name="ime_action_go" msgid="8320845651737369027">"Пачаць"</string>
     <string name="ime_action_search" msgid="658110271822807811">"Пошук"</string>
@@ -1260,7 +1151,7 @@
     <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Дазволіць гэты запыт?"</string>
     <string name="grant_permissions_header_text" msgid="6874497408201826708">"Запыт на доступ"</string>
     <string name="allow" msgid="7225948811296386551">"Дазволіць"</string>
-    <string name="deny" msgid="2081879885755434506">"Адмовіць"</string>
+    <string name="deny" msgid="2081879885755434506">"Забараніць"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Дазвол запытаны"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Запытаны дазвол\nдля ўліковага запісу <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
     <string name="forward_intent_to_owner" msgid="1207197447013960896">"Вы выкарыстоўваеце гэту праграму па-за межамі свайго працоўнага профілю"</string>
@@ -1276,20 +1167,20 @@
     <string name="notification_ranker_binding_label" msgid="774540592299064747">"Служба ацэнкі важнасці апавяшчэнняў"</string>
     <string name="vpn_title" msgid="19615213552042827">"VPN актываваны"</string>
     <string name="vpn_title_long" msgid="6400714798049252294">"VPN актывуецца прыкладаннем <xliff:g id="APP">%s</xliff:g>"</string>
-    <string name="vpn_text" msgid="1610714069627824309">"Націсніце, каб кіраваць сеткай."</string>
-    <string name="vpn_text_long" msgid="4907843483284977618">"Падлучаны да <xliff:g id="SESSION">%s</xliff:g>. Націсніце, каб кiраваць сеткай."</string>
+    <string name="vpn_text" msgid="3011306607126450322">"Дакраніцеся, каб кіраваць сеткай."</string>
+    <string name="vpn_text_long" msgid="6407351006249174473">"Падлучаны да сеанса \"<xliff:g id="SESSION">%s</xliff:g>\". Дакраніцеся, каб кiраваць сеткай."</string>
     <string name="vpn_lockdown_connecting" msgid="6443438964440960745">"Падключэнне заўсёды ўключанага VPN..."</string>
     <string name="vpn_lockdown_connected" msgid="8202679674819213931">"Заўсёды ўключаны i падключаны VPN"</string>
     <string name="vpn_lockdown_error" msgid="6009249814034708175">"Памылка заўсёды ўключанага VPN"</string>
-    <string name="vpn_lockdown_config" msgid="4655589351146766608">"Дакраніцеся, каб сканфігураваць"</string>
+    <string name="vpn_lockdown_config" msgid="6415899150671537970">"Націсніце, каб змяніць налады"</string>
     <string name="upload_file" msgid="2897957172366730416">"Выберыце файл"</string>
     <string name="no_file_chosen" msgid="6363648562170759465">"Файл не выбраны"</string>
     <string name="reset" msgid="2448168080964209908">"Скінуць"</string>
     <string name="submit" msgid="1602335572089911941">"Перадаць"</string>
     <string name="car_mode_disable_notification_title" msgid="3164768212003864316">"Рэжым \"У машыне\" ўключаны"</string>
-    <string name="car_mode_disable_notification_message" msgid="6301524980144350051">"Дакраніцеся, каб выйсці з рэжыму \"У машыне\"."</string>
+    <string name="car_mode_disable_notification_message" msgid="8035230537563503262">"Дакраніцеся, каб выйсці з рэжыму \"Штурман\"."</string>
     <string name="tethered_notification_title" msgid="3146694234398202601">"USB-мадэм або кропка доступу Wi-Fi актыўныя"</string>
-    <string name="tethered_notification_message" msgid="2113628520792055377">"Дакраніцеся, каб наладзіць."</string>
+    <string name="tethered_notification_message" msgid="6857031760103062982">"Націсніце, каб наладзіць."</string>
     <string name="back_button_label" msgid="2300470004503343439">"Назад"</string>
     <string name="next_button_label" msgid="1080555104677992408">"Далей"</string>
     <string name="skip_button_label" msgid="1275362299471631819">"Прапусціць"</string>
@@ -1304,7 +1195,7 @@
     <string name="action_mode_done" msgid="7217581640461922289">"Гатова"</string>
     <string name="progress_erasing" product="nosdcard" msgid="4521573321524340058">"Выдаленне дадзеных з USB-назапашвальнiка..."</string>
     <string name="progress_erasing" product="default" msgid="6596988875507043042">"Выдаленне дадзеных з SD-карты..."</string>
-    <string name="share" msgid="1778686618230011964">"Абагуліць"</string>
+    <string name="share" msgid="1778686618230011964">"Адкрыць доступ"</string>
     <string name="find" msgid="4808270900322985960">"Пошук"</string>
     <string name="websearch" msgid="4337157977400211589">"Вэб-пошук"</string>
     <string name="find_next" msgid="5742124618942193978">"Знайсці нiжэй"</string>
@@ -1324,7 +1215,7 @@
     <string name="add_account_button_label" msgid="3611982894853435874">"Дадаць уліковы запіс"</string>
     <string name="number_picker_increment_button" msgid="2412072272832284313">"Павялічыць"</string>
     <string name="number_picker_decrement_button" msgid="476050778386779067">"Паменшыць"</string>
-    <string name="number_picker_increment_scroll_mode" msgid="5259126567490114216">"<xliff:g id="VALUE">%s</xliff:g> – Націсніце і ўтрымлівайце."</string>
+    <string name="number_picker_increment_scroll_mode" msgid="3073101067441638428">"Націсніце і ўтрымлівайце <xliff:g id="VALUE">%s</xliff:g>."</string>
     <string name="number_picker_increment_scroll_action" msgid="9101473045891835490">"Правядзіце пальцам уверх, каб павялічыць, або ўніз, каб паменшыць."</string>
     <string name="time_picker_increment_minute_button" msgid="8865885114028614321">"Павялічыць лічбу хвілін."</string>
     <string name="time_picker_decrement_minute_button" msgid="6246834937080684791">"Паменшыць лічбу хвілін."</string>
@@ -1341,7 +1232,7 @@
     <string name="date_picker_prev_month_button" msgid="2858244643992056505">"Папярэдні месяц"</string>
     <string name="date_picker_next_month_button" msgid="5559507736887605055">"Наступны месяц"</string>
     <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string>
-    <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Скасаваць"</string>
+    <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Адмена"</string>
     <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Выдаліць"</string>
     <string name="keyboardview_keycode_done" msgid="1992571118466679775">"Гатова"</string>
     <string name="keyboardview_keycode_mode_change" msgid="4547387741906537519">"Змена рэжыму"</string>
@@ -1368,7 +1259,7 @@
     <string name="storage_usb" msgid="3017954059538517278">"USB-назапашвальнік"</string>
     <string name="extract_edit_menu_button" msgid="8940478730496610137">"Рэдагаваць"</string>
     <string name="data_usage_warning_title" msgid="1955638862122232342">"Папярэджанне выкарыстання дадзеных"</string>
-    <string name="data_usage_warning_body" msgid="6660692274311972007">"Прагляд выкарыстання і налад."</string>
+    <string name="data_usage_warning_body" msgid="2814673551471969954">"Дакраніцеся, каб прагледзець гісторыю выкарыстання і налады."</string>
     <string name="data_usage_3g_limit_title" msgid="4361523876818447683">"Дасягнуты ліміт трафіку 2G-3G"</string>
     <string name="data_usage_4g_limit_title" msgid="4609566827219442376">"Дасягнуты ліміт трафіку 4G"</string>
     <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Дасягн. ліміт маб.перадачы даных"</string>
@@ -1380,14 +1271,14 @@
     <string name="data_usage_wifi_limit_snoozed_title" msgid="8743856006384825974">"Перав. ліміт па дадзеным Wi-Fi"</string>
     <string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Аб\'ём <xliff:g id="SIZE">%s</xliff:g> перавышае устаноўл. мяжу."</string>
     <string name="data_usage_restricted_title" msgid="5965157361036321914">"Зыходныя дадзеныя абмежаваныя"</string>
-    <string name="data_usage_restricted_body" msgid="469866376337242726">"Дакраніцеся, каб зняць абмежав."</string>
+    <string name="data_usage_restricted_body" msgid="6741521330997452990">"Націсніце, каб зняць абмежаванне."</string>
     <string name="ssl_certificate" msgid="6510040486049237639">"Сертыфікат бяспекі"</string>
     <string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Гэты сертыфікат сапраўдны."</string>
-    <string name="issued_to" msgid="454239480274921032">"Каму выдадзена:"</string>
+    <string name="issued_to" msgid="454239480274921032">"Выдадзены:"</string>
     <string name="common_name" msgid="2233209299434172646">"Звычайнае імя:"</string>
     <string name="org_name" msgid="6973561190762085236">"Арганізацыя:"</string>
     <string name="org_unit" msgid="7265981890422070383">"Аддзел арганізацыі:"</string>
-    <string name="issued_by" msgid="2647584988057481566">"Хто выдаў:"</string>
+    <string name="issued_by" msgid="2647584988057481566">"Выдана:"</string>
     <string name="validity_period" msgid="8818886137545983110">"Тэрмін дзеяння:"</string>
     <string name="issued_on" msgid="5895017404361397232">"Выдадзены:"</string>
     <string name="expires_on" msgid="3676242949915959821">"Заканчваецца:"</string>
@@ -1430,7 +1321,7 @@
     <string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> кр. на цалю"</string>
     <string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", бяспечны"</string>
     <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забылі ключ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Няправільны ўзор"</string>
+    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Няправільна ключ"</string>
     <string name="kg_wrong_password" msgid="2333281762128113157">"Няправiльны пароль"</string>
     <string name="kg_wrong_pin" msgid="1131306510833563801">"Няправільны PIN-код"</string>
     <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Паўтарыце спробу праз <xliff:g id="NUMBER">%1$d</xliff:g> с."</string>
@@ -1598,7 +1489,8 @@
     <string name="select_year" msgid="7952052866994196170">"Выберыце год"</string>
     <string name="deleted_key" msgid="7659477886625566590">"Выдалена: <xliff:g id="KEY">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge" msgid="2355652472854327647">"<xliff:g id="LABEL">%1$s</xliff:g> (праца)"</string>
-    <string name="lock_to_app_toast" msgid="1420543809500606964">"Каб адмацаваць гэты экран, дакраніцеся і ўтрымлівайце кнопку \"Назад\"."</string>
+    <string name="lock_to_app_toast" msgid="7570091317001980053">"Каб адмацаваць гэты экран, краніце і ўтрымлівайце кнопкі «Назад» і «Агляд» адначасова."</string>
+    <string name="lock_to_app_toast_accessible" msgid="8239120109365070664">"Каб адмацаваць гэты экран, краніце і ўтрымлівайце кнопку «Агляд»."</string>
     <string name="lock_to_app_toast_locked" msgid="9125176335701699164">"Праграма замацавана: адмацаванне на гэтай прыладзе не дапускаецца."</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Экран замацаваны"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Экран адмацаваны"</string>
@@ -1609,9 +1501,8 @@
     <string name="package_updated_device_owner" msgid="8856631322440187071">"Абноўлена вашым адміністратарам"</string>
     <string name="package_deleted_device_owner" msgid="7650577387493101353">"Выдалена вашым адміністратарам"</string>
     <string name="battery_saver_description" msgid="1960431123816253034">"Каб падоўжыць час працы акумулятара, у рэжыме эканоміі зараду памяншаецца прадукцыйнасць вашай прылады, абмяжоўваецца выкарыстанне вібрацыі, службаў вызначэння месцазнаходжання і большасці задач фонавай перадачы даных. Электронная пошта, абмен паведамленнямі і іншыя праграмы, якія выкарыстоўваюць сінхранізацыю, могуць не абнаўляцца, пакуль вы іх не адкрыеце.\n\nРэжым эканоміі зараду адключаецца аўтаматычна, калі прылада зараджаецца."</string>
-    <string name="data_saver_description" msgid="6015391409098303235">"Каб паменшыць выкарыстанне даных, Эканомія трафіку не дазваляе некаторым праграмам адпраўляць ці атрымліваць даныя ў фонавым рэжыме. Праграма, якую вы зараз выкарыстоўваеце, можа атрымліваць доступ да даных, але можа рабіць гэта радзей. Гэта можа азначаць, напрыклад, што відарысы не паказваюцца, пакуль вы не дакраняцеся да іх."</string>
-    <string name="data_saver_enable_title" msgid="4674073932722787417">"Уключыць Эканомію трафіка?"</string>
-    <string name="data_saver_enable_button" msgid="7147735965247211818">"Уключыць"</string>
+    <!-- no translation found for data_saver_description (6015391409098303235) -->
+    <skip />
     <plurals name="zen_mode_duration_minutes_summary" formatted="false" msgid="4367877408072000848">
       <item quantity="one">На %1$d хвіліну (да <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="few">На %1$d хвіліны (да <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
@@ -1681,8 +1572,6 @@
     <string name="stk_cc_ss_to_ussd" msgid="3951862188105305589">"Запыт SS зменены на запыт USSD."</string>
     <string name="stk_cc_ss_to_ss" msgid="5470768854991452695">"Запыт SS зменены на новы запыт SS."</string>
     <string name="notification_work_profile_content_description" msgid="4600554564103770764">"Працоўны профіль"</string>
-    <string name="expand_button_content_description" msgid="5855955413376384681">"Кнопка \"Разгарнуць\""</string>
-    <string name="expand_action_accessibility" msgid="5307730695723718254">"разгарнуць/згарнуць"</string>
     <string name="usb_midi_peripheral_name" msgid="7221113987741003817">"Перыферыйны USB-порт Android"</string>
     <string name="usb_midi_peripheral_manufacturer_name" msgid="7176526170008970168">"Android"</string>
     <string name="usb_midi_peripheral_product_name" msgid="4971827859165280403">"Перыферыйны USB-порт"</string>
@@ -1690,7 +1579,6 @@
     <string name="floating_toolbar_close_overflow_description" msgid="559796923090723804">"Закрыць лішак"</string>
     <string name="maximize_button_text" msgid="7543285286182446254">"Разгарнуць"</string>
     <string name="close_button_text" msgid="3937902162644062866">"Закрыць"</string>
-    <string name="notification_messaging_title_template" msgid="3452480118762691020">"<xliff:g id="CONVERSATION_TITLE">%1$s</xliff:g>: <xliff:g id="SENDER_NAME">%2$s</xliff:g>"</string>
     <plurals name="selected_count" formatted="false" msgid="7187339492915744615">
       <item quantity="one"><xliff:g id="COUNT_1">%1$d</xliff:g> выбраны</item>
       <item quantity="few"><xliff:g id="COUNT_1">%1$d</xliff:g> выбрана</item>
@@ -1725,5 +1613,4 @@
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Выканайце скід да заводскіх налад, каб выкарыстоўваць гэту прыладу без абмежаванняў"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Краніце, каб даведацца больш."</string>
-    <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Адключаны <xliff:g id="LABEL">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-bg-watch/styles_material.xml b/core/res/res/values-bg-watch/styles_material.xml
new file mode 100644
index 0000000..89c3366
--- /dev/null
+++ b/core/res/res/values-bg-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"кандидати"</font></string>
+</resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index a70d9dc..17dfef1 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Освобождаване"</string>
     <string name="app_info" msgid="6856026610594615344">"Информация за приложението"</string>
     <string name="negative_duration" msgid="5688706061127375131">"-<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Да се нулира ли устройството?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Докоснете, за да нулирате устройството"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Демонстрацията се стартира…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Устройството се нулира…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Да се нулира ли устройството?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Ще загубите всички промени и демонстрацията ще започне отново след <xliff:g id="TIMEOUT">%1$s</xliff:g> секунди…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Отказ"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Нулиране сега"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Възстановете фабричните настройки на това устройство, за да го използвате без ограничения"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Докоснете, за да научите повече."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g>: Деактивирано"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конферентно обаждане"</string>
 </resources>
diff --git a/core/res/res/values-bn-rBD-watch/styles_material.xml b/core/res/res/values-bn-rBD-watch/styles_material.xml
new file mode 100644
index 0000000..cd59902
--- /dev/null
+++ b/core/res/res/values-bn-rBD-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"প্রার্থীরা"</font></string>
+</resources>
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index 2d88a1d..8435f96 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"আনপিন করুন"</string>
     <string name="app_info" msgid="6856026610594615344">"অ্যাপ্লিকেশানের তথ্য"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"ডিভাইস পুনরায় সেট করবেন?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ডিভাইসটিকে পুনরায় সেট করতে আলতো চাপুন"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ডেমো শুরু করা হচ্ছে…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"ডিভাইস পুনরায় সেট করা হচ্ছে…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"ডিভাইস পুনরায় সেট করবেন?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"আপনার করা যে কোনো পরিবর্তন মুছে যাবে এবং <xliff:g id="TIMEOUT">%1$s</xliff:g> সেকেন্ডের মধ্যে ডেমো আবার শুরু হবে…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"বাতিল করুন"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"এখনই পুনরায় সেট করুন"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"কোনো বিধিনিষেধ ছাড়াই এই ডিভাইসটিকে ব্যবহার করতে ফ্যাক্টরি রিসেট করুন"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"আরো জানতে স্পর্শ করুন৷"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"অক্ষম করা <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"কনফারেন্স কল"</string>
 </resources>
diff --git a/core/res/res/values-bs-rBA/strings.xml b/core/res/res/values-bs-rBA/strings.xml
index 272375b..8b0a04a 100644
--- a/core/res/res/values-bs-rBA/strings.xml
+++ b/core/res/res/values-bs-rBA/strings.xml
@@ -125,15 +125,11 @@
     <string name="roamingTextSearching" msgid="8360141885972279963">"Traženje usluge"</string>
     <string name="wfcRegErrorTitle" msgid="2301376280632110664">"Wi-Fi pozivanje"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
-    <item msgid="2254967670088539682">"Da biste pozivali i slali poruke preko Wi-Fi-ja, prvo zatražite od operatera da postavi tu uslugu. Potom u Postavkama ponovo uključite Wi-Fi pozivanje."</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
-    <item msgid="6177300162212449033">"Registrirajte se kod svog operatera"</item>
   </string-array>
-  <string-array name="wfcSpnFormats">
-    <item msgid="6830082633573257149">"%s"</item>
-    <item msgid="4397097370387921767">"Wi-Fi pozivanje preko operatera %s"</item>
-  </string-array>
+    <string name="wfcSpnFormat" msgid="8211621332478306568">"%s"</string>
+    <string name="wfcDataSpnFormat" msgid="1118052028767666883">"%s"</string>
     <string name="wifi_calling_off_summary" msgid="8720659586041656098">"Isključeno"</string>
     <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Prednost ima Wi-Fi"</string>
     <string name="wfc_mode_cellular_preferred_summary" msgid="5920549484600758786">"Prednost ima mobilna mreža"</string>
@@ -169,11 +165,7 @@
     <string name="low_memory" product="watch" msgid="4415914910770005166">"Prostor za gledanje je pun. Obrišite neke fajlove da oslobodite prostor."</string>
     <string name="low_memory" product="tv" msgid="516619861191025923">"Prostor TV-a za pohranu je pun. Obrišite neke fajlove da oslobodite prostor."</string>
     <string name="low_memory" product="default" msgid="3475999286680000541">"Pohrana telefona je puna. Izbrišite fajlove kako biste oslobodili prostor."</string>
-    <plurals name="ssl_ca_cert_warning" formatted="false" msgid="5106721205300213569">
-      <item quantity="one">Instalirane su ustanove za izdavanje certifikata</item>
-      <item quantity="few">Instalirane su ustanove za izdavanje certifikata</item>
-      <item quantity="other">Instalirane su ustanove za izdavanje certifikata</item>
-    </plurals>
+    <!-- no translation found for ssl_ca_cert_warning (5106721205300213569) -->
     <string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Od nepoznate treće strane"</string>
     <string name="ssl_ca_cert_noti_by_administrator" msgid="550758088185764312">"od strane administratora vašeg profila za posao"</string>
     <string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"Od <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
@@ -220,9 +212,9 @@
     <string name="bugreport_title" msgid="2667494803742548533">"Kreirajte izvještaj o greškama"</string>
     <string name="bugreport_message" msgid="398447048750350456">"Ovim će se prikupljati informacije o trenutnom stanju uređaja, koji će biti poslani kao poruka e-pošte. Može malo potrajati dok se izvještaj o greškama ne kreira i bude spreman za slanje. Budite strpljivi."</string>
     <string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktivni izvještaj"</string>
-    <string name="bugreport_option_interactive_summary" msgid="229299488536107968">"Koristite ovu opciju u većini slučajeva. Ova opcija vam omogućava praćenje napretka izvještaja, unos dodatnih detalja o problemu i pravljenje snimaka ekrana. Moglo bi doći do izostavljanja nekih manje korištenih dijelova za čije prijavljivanje je potrebno dugo vremena."</string>
+    <string name="bugreport_option_interactive_summary" msgid="8180152634022797629">"Koristite ovo u većini slučajeva. Omogućava vam praćenje progresa izvještaja i unošenje više detalja o datom problemu. Neke manje korištene oblasti za čiji izvještaj je potrebno mnogo vremena mogu biti izostavljene."</string>
     <string name="bugreport_option_full_title" msgid="6354382025840076439">"Kompletan izvještaj"</string>
-    <string name="bugreport_option_full_summary" msgid="7210859858969115745">"Koristite ovu opciju za minimalno ometanje sistema kada uređaj ne reagira ili je prespor, ili kada su vam potrebni svi dijelovi izvještaja. Ova opcija ne dozvoljava unos dodatnih detalja ili pravljenje dodatnih snimaka ekrana."</string>
+    <string name="bugreport_option_full_summary" msgid="6687306111256813257">"Koristite ovu opciju za minimalno ometanje sistema kad uređaj ne reaguje ili je prespor, ili kada su vam potrebni svi odjeljci izvještaja. Opcija ne uzima snimku ekrana i ne dozvoljava unošenje više detalja."</string>
     <plurals name="bugreport_countdown" formatted="false" msgid="6878900193900090368">
       <item quantity="one">Snimak ekrana za prijavu greške pravim za <xliff:g id="NUMBER_1">%d</xliff:g> sekundu.</item>
       <item quantity="few">Snimak ekrana za prijavu greške pravim za <xliff:g id="NUMBER_1">%d</xliff:g> sekunde.</item>
@@ -266,7 +258,7 @@
     <string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Ponovo prikaži sadržaj prozora"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Istražite sadržaj prozora koji trenutno koristite."</string>
     <string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Uključite Istraživanje dodirom"</string>
-    <string name="capability_desc_canRequestTouchExploration" msgid="7543249041581408313">"Stavke koje dodirnete bit će izgovorene naglas, a ekran možete istraživati koristeći pokrete."</string>
+    <string name="capability_desc_canRequestTouchExploration" msgid="5800552516779249356">"Stavke koje dotaknete će biti izgovorene naglas, a ekran možete istražiti pokretima"</string>
     <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"Uključite poboljšanu web pristupačnost"</string>
     <string name="capability_desc_canRequestEnhancedWebAccessibility" msgid="7881063961507511765">"Možda će biti instalirana skripta kako bi sadržaj aplikacije bio dostupniji."</string>
     <string name="capability_title_canRequestFilterKeyEvents" msgid="2103440391902412174">"Obratite pažnju na tekst koji tipkate"</string>
@@ -665,7 +657,7 @@
     <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"Unesite PUK i novi PIN"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="1341112146710087048">"PUK"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="8027680321614196258">"Novi PIN"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="2644215452200037944"><font size="17">"Dodirnite za unos lozinke"</font></string>
+    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"Dodirnite za unos lozinke"</font></string>
     <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Unesite lozinku za otključavanje tipkovnice"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Unesite PIN za otključavanje tipkovnice"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Pogrešan PIN."</string>
@@ -865,87 +857,6 @@
       <item quantity="few"><xliff:g id="COUNT">%d</xliff:g> sata</item>
       <item quantity="other"><xliff:g id="COUNT">%d</xliff:g> sati</item>
     </plurals>
-    <string name="now_string_shortest" msgid="8912796667087856402">"sada"</string>
-    <plurals name="duration_minutes_shortest" formatted="false" msgid="3957499975064245495">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> m</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g>m</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>m</item>
-    </plurals>
-    <plurals name="duration_hours_shortest" formatted="false" msgid="3552182110578602356">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g>h</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g>h</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>h</item>
-    </plurals>
-    <plurals name="duration_days_shortest" formatted="false" msgid="5213655532597081640">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> d</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g>d</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>d</item>
-    </plurals>
-    <plurals name="duration_years_shortest" formatted="false" msgid="7848711145196397042">
-      <item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g>g</item>
-      <item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g>g</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>g</item>
-    </plurals>
-    <plurals name="duration_minutes_shortest_future" formatted="false" msgid="3277614521231489951">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g>m</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g>m</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g>m</item>
-    </plurals>
-    <plurals name="duration_hours_shortest_future" formatted="false" msgid="2152452368397489370">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g>h</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g>h</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g>h</item>
-    </plurals>
-    <plurals name="duration_days_shortest_future" formatted="false" msgid="8088331502820295701">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g>d</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g>d</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g>d</item>
-    </plurals>
-    <plurals name="duration_years_shortest_future" formatted="false" msgid="2317006667145250301">
-      <item quantity="one">za <xliff:g id="COUNT_1">%d</xliff:g> g</item>
-      <item quantity="few">za <xliff:g id="COUNT_1">%d</xliff:g> g</item>
-      <item quantity="other">za <xliff:g id="COUNT_1">%d</xliff:g> g</item>
-    </plurals>
-    <plurals name="duration_minutes_relative" formatted="false" msgid="3178131706192980192">
-      <item quantity="one"> Prije <xliff:g id="COUNT_1">%d</xliff:g> minutu</item>
-      <item quantity="few"> Prije <xliff:g id="COUNT_1">%d</xliff:g> minute</item>
-      <item quantity="other"> Prije <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-    </plurals>
-    <plurals name="duration_hours_relative" formatted="false" msgid="676894109982008411">
-      <item quantity="one"> Prije <xliff:g id="COUNT_1">%d</xliff:g> sat</item>
-      <item quantity="few"> Prije <xliff:g id="COUNT_1">%d</xliff:g> sata</item>
-      <item quantity="other"> Prije <xliff:g id="COUNT_1">%d</xliff:g> sati</item>
-    </plurals>
-    <plurals name="duration_days_relative" formatted="false" msgid="2203515825765397130">
-      <item quantity="one"> Prije <xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="few"> Prije <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-      <item quantity="other"> Prije <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-    </plurals>
-    <plurals name="duration_years_relative" formatted="false" msgid="4820062134188885734">
-      <item quantity="one"> Prije <xliff:g id="COUNT_1">%d</xliff:g> godinu</item>
-      <item quantity="few"> Prije <xliff:g id="COUNT_1">%d</xliff:g> godine</item>
-      <item quantity="other"> Prije <xliff:g id="COUNT_1">%d</xliff:g> godina</item>
-    </plurals>
-    <plurals name="duration_minutes_relative_future" formatted="false" msgid="4655043589817680966">
-      <item quantity="one"> za <xliff:g id="COUNT_1">%d</xliff:g> minutu</item>
-      <item quantity="few"> za <xliff:g id="COUNT_1">%d</xliff:g> minute</item>
-      <item quantity="other"> za <xliff:g id="COUNT_1">%d</xliff:g> minuta</item>
-    </plurals>
-    <plurals name="duration_hours_relative_future" formatted="false" msgid="8084579714205223891">
-      <item quantity="one"> za <xliff:g id="COUNT_1">%d</xliff:g> sat</item>
-      <item quantity="few"> za <xliff:g id="COUNT_1">%d</xliff:g> sata</item>
-      <item quantity="other"> za <xliff:g id="COUNT_1">%d</xliff:g> sati</item>
-    </plurals>
-    <plurals name="duration_days_relative_future" formatted="false" msgid="333215369363433992">
-      <item quantity="one"> za <xliff:g id="COUNT_1">%d</xliff:g> dan</item>
-      <item quantity="few"> za <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-      <item quantity="other"> za <xliff:g id="COUNT_1">%d</xliff:g> dana</item>
-    </plurals>
-    <plurals name="duration_years_relative_future" formatted="false" msgid="8644862986413104011">
-      <item quantity="one"> za <xliff:g id="COUNT_1">%d</xliff:g> godinu</item>
-      <item quantity="few"> za <xliff:g id="COUNT_1">%d</xliff:g> godine</item>
-      <item quantity="other"> za <xliff:g id="COUNT_1">%d</xliff:g> godina</item>
-    </plurals>
     <string name="VideoView_error_title" msgid="3534509135438353077">"Problem sa prikazom video sadržaja"</string>
     <string name="VideoView_error_text_invalid_progressive_playback" msgid="3186670335938670444">"Prijenos ovog video sadržaja ne može se izvršiti na ovom uređaju."</string>
     <string name="VideoView_error_text_unknown" msgid="3450439155187810085">"Greška prilikom reproduciranja video sadržaja."</string>
@@ -977,11 +888,11 @@
     <string name="low_internal_storage_view_text" msgid="6640505817617414371">"Neke funkcije sistema možda neće raditi"</string>
     <string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nema dovoljno prostora za sistem. Obezbijedite 250MB slobodnog prostora i ponovo pokrenite uređaj."</string>
     <string name="app_running_notification_title" msgid="8718335121060787914">"Aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> je pokrenuta"</string>
-    <string name="app_running_notification_text" msgid="1197581823314971177">"Dodirnite za više informacija ili da biste zaustavili aplikaciju."</string>
+    <string name="app_running_notification_text" msgid="4653586947747330058">"Dodirnite za više informacija ili da zaustavite aplikaciju."</string>
     <string name="ok" msgid="5970060430562524910">"Uredu"</string>
-    <string name="cancel" msgid="6442560571259935130">"Otkaži"</string>
+    <string name="cancel" msgid="6442560571259935130">"Prekini"</string>
     <string name="yes" msgid="5362982303337969312">"Uredu"</string>
-    <string name="no" msgid="5141531044935541497">"Otkaži"</string>
+    <string name="no" msgid="5141531044935541497">"Prekini"</string>
     <string name="dialog_alert_title" msgid="2049658708609043103">"Pažnja"</string>
     <string name="loading" msgid="7933681260296021180">"Učitavanje..."</string>
     <string name="capital_on" msgid="1544682755514494298">"Uključeno"</string>
@@ -1019,7 +930,8 @@
     <string name="aerr_process" msgid="6201597323218674729">"<xliff:g id="PROCESS">%1$s</xliff:g> je zaustavljen"</string>
     <string name="aerr_application_repeated" msgid="3146328699537439573">"<xliff:g id="APPLICATION">%1$s</xliff:g> se stalno zaustavlja"</string>
     <string name="aerr_process_repeated" msgid="6235302956890402259">"<xliff:g id="PROCESS">%1$s</xliff:g> se stalno zaustavlja"</string>
-    <string name="aerr_restart" msgid="7581308074153624475">"Ponovo otvori aplikaciju"</string>
+    <string name="aerr_restart" msgid="9001379185665886595">"Ponovo pokreni aplikaciju"</string>
+    <string name="aerr_reset" msgid="7645427603514220451">"Vrati aplikaciju na zadano i pokreni ponovo"</string>
     <string name="aerr_report" msgid="5371800241488400617">"Pošalji povratne informacije"</string>
     <string name="aerr_close" msgid="2991640326563991340">"Zatvori"</string>
     <string name="aerr_mute" msgid="1974781923723235953">"Isključiti zvuk dok se uređaj ponovo ne pokrene"</string>
@@ -1040,21 +952,17 @@
     <string name="screen_compat_mode_scale" msgid="3202955667675944499">"Razmjer"</string>
     <string name="screen_compat_mode_show" msgid="4013878876486655892">"Uvijek prikaži"</string>
     <string name="screen_compat_mode_hint" msgid="1064524084543304459">"Ponovo omogućite ovu opciju u meniju Postavke sistema &gt; Aplikacije &gt; Preuzete aplikacije."</string>
-    <string name="unsupported_display_size_message" msgid="6545327290756295232">"Aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> ne podržava trenutnu postavku veličine ekrana i može se ponašati neočekivano."</string>
-    <string name="unsupported_display_size_show" msgid="7969129195360353041">"Uvijek prikaži"</string>
     <string name="smv_application" msgid="3307209192155442829">"Aplikacija <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) prekršila je vlastita StrictMode pravila."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> prekršio je vlastita StrictMode pravila."</string>
     <string name="android_upgrading_title" msgid="1584192285441405746">"Nadogradnja sistema Android u toku..."</string>
     <string name="android_start_title" msgid="8418054686415318207">"Android se pokreće..."</string>
     <string name="android_upgrading_fstrim" msgid="8036718871534640010">"Optimiziranje pohrane."</string>
-    <string name="android_upgrading_notification_title" msgid="1619393112444671028">"Android se nadograđuje"</string>
-    <string name="android_upgrading_notification_body" msgid="5761201379457064286">"Neke aplikacije možda neće raditi ispravno dok traje nadogradnja"</string>
     <string name="android_upgrading_apk" msgid="7904042682111526169">"Optimiziranje aplikacije <xliff:g id="NUMBER_0">%1$d</xliff:g> od <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
     <string name="android_preparing_apk" msgid="8162599310274079154">"Priprema se <xliff:g id="APPNAME">%1$s</xliff:g>."</string>
     <string name="android_upgrading_starting_apps" msgid="451464516346926713">"Pokretanje aplikacija."</string>
     <string name="android_upgrading_complete" msgid="1405954754112999229">"Pokretanje pri kraju."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Pokrenuta je aplikacija <xliff:g id="APP">%1$s</xliff:g>"</string>
-    <string name="heavy_weight_notification_detail" msgid="867643381388543170">"Dodirnite da biste se prebacili na aplikaciju"</string>
+    <string name="heavy_weight_notification_detail" msgid="1721681741617898865">"Dodirnite kako biste otvorili aplikaciju"</string>
     <string name="heavy_weight_switcher_title" msgid="7153167085403298169">"Želite se prebaciti na drugu aplikaciju?"</string>
     <string name="heavy_weight_switcher_text" msgid="7022631924534406403">"Već je pokrenuta jedna aplikacija koju morate zaustaviti prije pokretanja nove."</string>
     <string name="old_app_action" msgid="493129172238566282">"Vrati se na aplikaciju <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
@@ -1062,7 +970,7 @@
     <string name="new_app_action" msgid="5472756926945440706">"Pokreni <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
     <string name="new_app_description" msgid="1932143598371537340">"Zaustaviti staru aplikaciju bez spašavanja podataka."</string>
     <string name="dump_heap_notification" msgid="2618183274836056542">"<xliff:g id="PROC">%1$s</xliff:g> premašuje ograničenje memorije"</string>
-    <string name="dump_heap_notification_detail" msgid="6901391084243999274">"Snimak dinamičkog stanja memorije je napravljen; dodirnite da biste dijelili"</string>
+    <string name="dump_heap_notification_detail" msgid="2075673362317481664">"Snimak dinamičkog dijela memorije je napravljen; dodirnite za dijeljenje"</string>
     <string name="dump_heap_title" msgid="5864292264307651673">"Želite li dijeliti snimak dinamičkog dijela memorije?"</string>
     <string name="dump_heap_text" msgid="4809417337240334941">"Proces <xliff:g id="PROC">%1$s</xliff:g> je premašio ograničenje procesne memorije od <xliff:g id="SIZE">%2$s</xliff:g>. Snimak dinamičkog dijela memorije vam je dostupan i možete ga dijeliti sa njegovim programerom. Budite oprezni: ovaj snimak dinamičkog dijela memorije može sadržavati vaše lične podatke kojima aplikacija ima pristup."</string>
     <string name="sendText" msgid="5209874571959469142">"Biranje akcije za tekst"</string>
@@ -1082,7 +990,7 @@
     <string name="volume_icon_description_notification" msgid="7044986546477282274">"Jačina zvuka za obavještenja"</string>
     <string name="ringtone_default" msgid="3789758980357696936">"Zadana melodija zvona"</string>
     <string name="ringtone_default_with_actual" msgid="8129563480895990372">"Zadano zvono (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
-    <string name="ringtone_silent" msgid="7937634392408977062">"Bez zvuka"</string>
+    <string name="ringtone_silent" msgid="7937634392408977062">"Ne poduzimaj ništa"</string>
     <string name="ringtone_picker_title" msgid="3515143939175119094">"Melodije zvona"</string>
     <string name="ringtone_unknown" msgid="5477919988701784788">"Nepoznato zvono"</string>
     <plurals name="wifi_available" formatted="false" msgid="7900333017752027322">
@@ -1100,7 +1008,7 @@
     <!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
     <skip />
     <string name="wifi_no_internet" msgid="8451173622563841546">"Wi-Fi nema pristup Internetu"</string>
-    <string name="wifi_no_internet_detailed" msgid="8083079241212301741">"Dodirnite za opcije"</string>
+    <string name="wifi_no_internet_detailed" msgid="7593858887662270131">"Dodirnite za opcije"</string>
     <string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Problem prilikom spajanja na Wi-Fi mrežu"</string>
     <string name="wifi_watchdog_network_disabled_detailed" msgid="5548780776418332675">" ima lošu internet vezu."</string>
     <string name="wifi_connect_alert_title" msgid="8455846016001810172">"Želite li dozvoliti povezivanje?"</string>
@@ -1110,7 +1018,7 @@
     <string name="wifi_p2p_turnon_message" msgid="2909250942299627244">"Pokreni Wi-Fi Direct. To će isključiti Wi-Fi klijenta/pristupnu tačku."</string>
     <string name="wifi_p2p_failed_message" msgid="3763669677935623084">"Greška u pokretanju opcije Wi-Fi Direct."</string>
     <string name="wifi_p2p_enabled_notification_title" msgid="2068321881673734886">"Wi-Fi Direct je uključen"</string>
-    <string name="wifi_p2p_enabled_notification_message" msgid="8064677407830620023">"Dodirnite za postavke"</string>
+    <string name="wifi_p2p_enabled_notification_message" msgid="1638949953993894335">"Dodirnite za postavke"</string>
     <string name="accept" msgid="1645267259272829559">"Prihvati"</string>
     <string name="decline" msgid="2112225451706137894">"Odbijte"</string>
     <string name="wifi_p2p_invitation_sent_title" msgid="1318975185112070734">"Pozivnica poslana"</string>
@@ -1162,9 +1070,9 @@
     <string name="usb_ptp_notification_title" msgid="1347328437083192112">"USB za prijenos slika"</string>
     <string name="usb_midi_notification_title" msgid="4850904915889144654">"USB za MIDI"</string>
     <string name="usb_accessory_notification_title" msgid="7848236974087653666">"Uspostavljena veza sa USB pohranom"</string>
-    <string name="usb_notification_message" msgid="3370903770828407960">"Dodirnite za više opcija."</string>
+    <string name="usb_notification_message" msgid="7347368030849048437">"Dodirnite za više opcija."</string>
     <string name="adb_active_notification_title" msgid="6729044778949189918">"Uređaj za USB otklanjanje grešaka povezan"</string>
-    <string name="adb_active_notification_message" msgid="4948470599328424059">"Dodirnite da onemogućite otklanjanje grešaka preko USB veze."</string>
+    <string name="adb_active_notification_message" msgid="1016654627626476142">"Dodirnite da biste onemogućili USB otklanjanje grešaka."</string>
     <string name="taking_remote_bugreport_notification_title" msgid="6742483073875060934">"Prijem izvještaja o grešci..."</string>
     <string name="share_remote_bugreport_notification_title" msgid="4987095013583691873">"Podijeliti izvještaj o grešci?"</string>
     <string name="sharing_remote_bugreport_notification_title" msgid="7572089031496651372">"Dijeljenje izvještaja o grešci..."</string>
@@ -1184,9 +1092,9 @@
     <string name="ext_media_new_notification_message" msgid="7589986898808506239">"Novi uređaj <xliff:g id="NAME">%s</xliff:g> je otkriven"</string>
     <string name="ext_media_ready_notification_message" msgid="4083398150380114462">"Za prebacivanje slika i medijskih fajlova"</string>
     <string name="ext_media_unmountable_notification_title" msgid="8295123366236989588">"Uređaj <xliff:g id="NAME">%s</xliff:g> je oštećen"</string>
-    <string name="ext_media_unmountable_notification_message" msgid="2343202057122495773">"Uređaj <xliff:g id="NAME">%s</xliff:g> je oštećen. Dodirnite da biste popravili."</string>
+    <string name="ext_media_unmountable_notification_message" msgid="1586311304430052169">"Uređaj <xliff:g id="NAME">%s</xliff:g> je oštećen. Dodirnite da ga popravite."</string>
     <string name="ext_media_unsupported_notification_title" msgid="3797642322958803257">"Uređaj <xliff:g id="NAME">%s</xliff:g> nije podržan"</string>
-    <string name="ext_media_unsupported_notification_message" msgid="6121601473787888589">"Ovaj uređaj ne podržava uređaj <xliff:g id="NAME">%s</xliff:g>. Dodirnite da biste ga postavili u podržanom formatu."</string>
+    <string name="ext_media_unsupported_notification_message" msgid="8789610369456474891">"Ovaj uređaj ne podržava uređaj <xliff:g id="NAME">%s</xliff:g>. Dodirnite da ga postavite u podržanom formatu."</string>
     <string name="ext_media_badremoval_notification_title" msgid="3206248947375505416">"Neočekivano uklonjen uređaj <xliff:g id="NAME">%s</xliff:g>"</string>
     <string name="ext_media_badremoval_notification_message" msgid="380176703346946313">"Isključite uređaj <xliff:g id="NAME">%s</xliff:g> prije uklanjanja da izbjegnete gubitak podataka"</string>
     <string name="ext_media_nomedia_notification_title" msgid="1704840188641749091">"Uređaj <xliff:g id="NAME">%s</xliff:g> je uklonjen"</string>
@@ -1222,7 +1130,7 @@
     <string name="permdesc_readInstallSessions" msgid="2049771699626019849">"Dozvoljava aplikaciji da čita sesije instalacija. Ovim se aplikaciji omogućava da vidi detalje o aktivnim instalacijama paketa."</string>
     <string name="permlab_requestInstallPackages" msgid="5782013576218172577">"zahtijevanje paketa za instaliranje"</string>
     <string name="permdesc_requestInstallPackages" msgid="5740101072486783082">"Omogućava aplikaciji da zahtijeva instalaciju paket ā."</string>
-    <string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Dodirnite dvaput za kontrolu uvećanja"</string>
+    <string name="tutorial_double_tap_to_zoom_message_short" msgid="4070433208160063538">"Dodirnite dvaput za kontrolu uvećavanja"</string>
     <string name="gadget_host_error_inflating" msgid="4882004314906466162">"Dodavanje vidžeta nije uspjelo."</string>
     <string name="ime_action_go" msgid="8320845651737369027">"Počni"</string>
     <string name="ime_action_search" msgid="658110271822807811">"Traži"</string>
@@ -1253,20 +1161,20 @@
     <string name="notification_ranker_binding_label" msgid="774540592299064747">"Usluga rangiranja obavještenja"</string>
     <string name="vpn_title" msgid="19615213552042827">"VPN aktiviran"</string>
     <string name="vpn_title_long" msgid="6400714798049252294">"Aplikacija <xliff:g id="APP">%s</xliff:g> je aktivirala VPN"</string>
-    <string name="vpn_text" msgid="1610714069627824309">"Dodirnite da upravljate mrežom."</string>
-    <string name="vpn_text_long" msgid="4907843483284977618">"Povezano sa sesijom <xliff:g id="SESSION">%s</xliff:g>. Dodirnite da upravljate mrežom."</string>
+    <string name="vpn_text" msgid="3011306607126450322">"Dodirnite za upravljanje mrežom."</string>
+    <string name="vpn_text_long" msgid="6407351006249174473">"Uspostavljena veza sa <xliff:g id="SESSION">%s</xliff:g>. Dodirnite za upravljanje mrežom."</string>
     <string name="vpn_lockdown_connecting" msgid="6443438964440960745">"Povezivanje na uvijek aktivni VPN…"</string>
     <string name="vpn_lockdown_connected" msgid="8202679674819213931">"Povezan na uvijek aktivni VPN"</string>
     <string name="vpn_lockdown_error" msgid="6009249814034708175">"Greška u povezivanju na uvijek aktivni VPN"</string>
-    <string name="vpn_lockdown_config" msgid="4655589351146766608">"Dodirnite za konfiguriranje"</string>
+    <string name="vpn_lockdown_config" msgid="6415899150671537970">"Dodirnite da konfigurirate"</string>
     <string name="upload_file" msgid="2897957172366730416">"Odabir fajla"</string>
     <string name="no_file_chosen" msgid="6363648562170759465">"Nije izabran nijedan fajl"</string>
     <string name="reset" msgid="2448168080964209908">"Ponovno pokretanje"</string>
     <string name="submit" msgid="1602335572089911941">"Potvrdi"</string>
     <string name="car_mode_disable_notification_title" msgid="3164768212003864316">"Način rada u autu omogućen"</string>
-    <string name="car_mode_disable_notification_message" msgid="6301524980144350051">"Dodirnite za izlaz iz načina rada u automobilu"</string>
+    <string name="car_mode_disable_notification_message" msgid="8035230537563503262">"Dodirnite kako biste izašli iz načina rada u autu."</string>
     <string name="tethered_notification_title" msgid="3146694234398202601">"Uređaj dijeli vezu ili djeluje kao pristupna tačka"</string>
-    <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite za postavke"</string>
+    <string name="tethered_notification_message" msgid="6857031760103062982">"Dodirnite za postavljanje."</string>
     <string name="back_button_label" msgid="2300470004503343439">"Nazad"</string>
     <string name="next_button_label" msgid="1080555104677992408">"Naprijed"</string>
     <string name="skip_button_label" msgid="1275362299471631819">"Preskoči"</string>
@@ -1300,7 +1208,7 @@
     <string name="add_account_button_label" msgid="3611982894853435874">"Dodajte račun"</string>
     <string name="number_picker_increment_button" msgid="2412072272832284313">"Povećaj"</string>
     <string name="number_picker_decrement_button" msgid="476050778386779067">"Smanji"</string>
-    <string name="number_picker_increment_scroll_mode" msgid="5259126567490114216">"<xliff:g id="VALUE">%s</xliff:g> dodirnite i držite."</string>
+    <string name="number_picker_increment_scroll_mode" msgid="3073101067441638428">"Dodirnite <xliff:g id="VALUE">%s</xliff:g> i držite."</string>
     <string name="number_picker_increment_scroll_action" msgid="9101473045891835490">"Kliznite gore da povećate i dolje da smanjite."</string>
     <string name="time_picker_increment_minute_button" msgid="8865885114028614321">"Povećaj minute"</string>
     <string name="time_picker_decrement_minute_button" msgid="6246834937080684791">"Smanji minute"</string>
@@ -1317,7 +1225,7 @@
     <string name="date_picker_prev_month_button" msgid="2858244643992056505">"Prethodni mjesec"</string>
     <string name="date_picker_next_month_button" msgid="5559507736887605055">"Sljedeći mjesec"</string>
     <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Alt"</string>
-    <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Otkaži"</string>
+    <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"Prekini"</string>
     <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Izbriši"</string>
     <string name="keyboardview_keycode_done" msgid="1992571118466679775">"Gotovo"</string>
     <string name="keyboardview_keycode_mode_change" msgid="4547387741906537519">"Promjena načina rada"</string>
@@ -1344,7 +1252,7 @@
     <string name="storage_usb" msgid="3017954059538517278">"USB pohrana"</string>
     <string name="extract_edit_menu_button" msgid="8940478730496610137">"Uredi"</string>
     <string name="data_usage_warning_title" msgid="1955638862122232342">"Upozorenje za prijenos podataka"</string>
-    <string name="data_usage_warning_body" msgid="6660692274311972007">"Dodirnite za prikaz upotrebe i postavki."</string>
+    <string name="data_usage_warning_body" msgid="2814673551471969954">"Podaci o korištenju i postavke"</string>
     <string name="data_usage_3g_limit_title" msgid="4361523876818447683">"Dostignut limit za 2G-3G podatke"</string>
     <string name="data_usage_4g_limit_title" msgid="4609566827219442376">"Dostignut limit za 4G podatke"</string>
     <string name="data_usage_mobile_limit_title" msgid="557158376602636112">"Dostignut limit mob. podataka"</string>
@@ -1356,7 +1264,7 @@
     <string name="data_usage_wifi_limit_snoozed_title" msgid="8743856006384825974">"Premašeno Wi-Fi ograničenje"</string>
     <string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> preko navedenog ograničenja."</string>
     <string name="data_usage_restricted_title" msgid="5965157361036321914">"Pozadinski podaci su ograničeni"</string>
-    <string name="data_usage_restricted_body" msgid="469866376337242726">"Dodirnite da biste uklonili ograničenja."</string>
+    <string name="data_usage_restricted_body" msgid="6741521330997452990">"Dodirnuti za uklanjanje ogran."</string>
     <string name="ssl_certificate" msgid="6510040486049237639">"Sigurnosni certifikat"</string>
     <string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ovaj certifikat je važeći."</string>
     <string name="issued_to" msgid="454239480274921032">"Primalac:"</string>
@@ -1573,7 +1481,8 @@
     <string name="select_year" msgid="7952052866994196170">"Odaberite godinu"</string>
     <string name="deleted_key" msgid="7659477886625566590">"Broj <xliff:g id="KEY">%1$s</xliff:g> je izbrisan"</string>
     <string name="managed_profile_label_badge" msgid="2355652472854327647">"Poslovni <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <string name="lock_to_app_toast" msgid="1420543809500606964">"Da biste otkačili ovaj ekran, dodirnite i držite dugme Nazad."</string>
+    <string name="lock_to_app_toast" msgid="7570091317001980053">"Da otkačite ovaj ekran, istovremeno dodirnite i držite Nazad i Pregled."</string>
+    <string name="lock_to_app_toast_accessible" msgid="8239120109365070664">"Da otkačite ovaj ekran, dodirnite i držite Pregled."</string>
     <string name="lock_to_app_toast_locked" msgid="9125176335701699164">"Aplikacija je prikačena. Na ovom uređaju nije dozvoljeno otkačivanje."</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ekran je zakačen"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Ekran je otkačen"</string>
@@ -1584,9 +1493,8 @@
     <string name="package_updated_device_owner" msgid="8856631322440187071">"Ažurirao administrator"</string>
     <string name="package_deleted_device_owner" msgid="7650577387493101353">"Izbrisao administrator"</string>
     <string name="battery_saver_description" msgid="1960431123816253034">"Da bi se trajanje baterije produžilo, opcija za štednju baterije minimizira rad uređaja i ograničava vibriranje, usluge lokacije i većinu prijenosa podataka u pozadini. E-pošta, poruke i druge aplikacije koje se oslanjaju na sinhronizaciju ne mogu biti ažurirane dok ih ne otvorite.\n\nŠtednja baterije se automatski isključi prilikom punjenja uređaja."</string>
-    <string name="data_saver_description" msgid="6015391409098303235">"Da bi se smanjilo korištenje podataka, usluga Ušteda podataka sprečava da neke aplikacije šalju ili primaju podatke u pozadini. Aplikacija koju trenutno koristite može pristupiti podacima, ali se to može desiti rjeđe. To može značiti, naprimjer, da se slike ne prikazuju sve dok ih ne dodirnete."</string>
-    <string name="data_saver_enable_title" msgid="4674073932722787417">"Uključiti Uštedu podataka?"</string>
-    <string name="data_saver_enable_button" msgid="7147735965247211818">"Uključi"</string>
+    <!-- no translation found for data_saver_description (6015391409098303235) -->
+    <skip />
     <plurals name="zen_mode_duration_minutes_summary" formatted="false" msgid="4367877408072000848">
       <item quantity="one">%1$d minuta (do <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="few">%1$d minute (do <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
@@ -1648,8 +1556,6 @@
     <string name="stk_cc_ss_to_ussd" msgid="3951862188105305589">"SS zahtjev je izmijenjen u USSD zahtjev."</string>
     <string name="stk_cc_ss_to_ss" msgid="5470768854991452695">"SS zahtjev je izmijenjen u novi SS zahtjev."</string>
     <string name="notification_work_profile_content_description" msgid="4600554564103770764">"Profil za posao"</string>
-    <string name="expand_button_content_description" msgid="5855955413376384681">"Dugme za proširivanje"</string>
-    <string name="expand_action_accessibility" msgid="5307730695723718254">"prebaci na proširenje"</string>
     <string name="usb_midi_peripheral_name" msgid="7221113987741003817">"Android USB ulaz za periferijske uređaje"</string>
     <string name="usb_midi_peripheral_manufacturer_name" msgid="7176526170008970168">"Android"</string>
     <string name="usb_midi_peripheral_product_name" msgid="4971827859165280403">"USB ulaz za periferijske uređaje"</string>
@@ -1657,7 +1563,6 @@
     <string name="floating_toolbar_close_overflow_description" msgid="559796923090723804">"Zatvori preklopni meni"</string>
     <string name="maximize_button_text" msgid="7543285286182446254">"Povećaj maksimalno"</string>
     <string name="close_button_text" msgid="3937902162644062866">"Zatvori"</string>
-    <string name="notification_messaging_title_template" msgid="3452480118762691020">"<xliff:g id="CONVERSATION_TITLE">%1$s</xliff:g>: <xliff:g id="SENDER_NAME">%2$s</xliff:g>"</string>
     <plurals name="selected_count" formatted="false" msgid="7187339492915744615">
       <item quantity="one"><xliff:g id="COUNT_1">%1$d</xliff:g> stavka je odabrana</item>
       <item quantity="few"><xliff:g id="COUNT_1">%1$d</xliff:g> stavke su odabrane</item>
@@ -1691,5 +1596,4 @@
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Vratite uređaj na fabričke postavke kako biste ga koristili bez ograničenja"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Dodirnite da saznate više."</string>
-    <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Onemogućen <xliff:g id="LABEL">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ca-watch/styles_material.xml b/core/res/res/values-ca-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ca-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index e5a815d..59f7d95 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"No fixis"</string>
     <string name="app_info" msgid="6856026610594615344">"Informació de l\'aplicació"</string>
     <string name="negative_duration" msgid="5688706061127375131">"-<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Vols restablir el dispositiu?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Toca per restablir el dispositiu"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"S\'està iniciant la demostració…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"S\'està restablint el dispositiu…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Vols restablir el dispositiu?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Perdràs els canvis, i la demostració tornarà a començar d\'aquí a <xliff:g id="TIMEOUT">%1$s</xliff:g> segons…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancel·la"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Restableix ara"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Restableix les dades de fàbrica del dispositiu per utilitzar-lo sense restriccions"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toca per obtenir més informació."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> s\'ha desactivat"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conferència"</string>
 </resources>
diff --git a/core/res/res/values-cs-watch/styles_material.xml b/core/res/res/values-cs-watch/styles_material.xml
new file mode 100644
index 0000000..5b604e8
--- /dev/null
+++ b/core/res/res/values-cs-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"kandidáti"</font></string>
+</resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 4a142a2..1eb497f 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Odepnout"</string>
     <string name="app_info" msgid="6856026610594615344">"Informace o aplikaci"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Resetovat zařízení?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Zařízení resetujete klepnutím"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Spouštění ukázky…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Resetování zařízení…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Resetovat zařízení?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Ztratíte všechny provedené změny a ukázka se za <xliff:g id="TIMEOUT">%1$s</xliff:g> s spustí znovu…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Zrušit"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Resetovat"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Chcete-li toto zařízení používat bez omezení, obnovte jej do továrního nastavení"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Klepnutím zobrazíte další informace."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> – zakázáno"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferenční hovor"</string>
 </resources>
diff --git a/core/res/res/values-da-watch/styles_material.xml b/core/res/res/values-da-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-da-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 762c173..f5b7788 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Frigør"</string>
     <string name="app_info" msgid="6856026610594615344">"Oplysninger om appen"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Vil du nulstille enheden?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tryk for at nulstille enheden"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Starter demoen…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Nulstiller enheden…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Vil du nulstille enheden?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Du mister alle ændringer, og demoen starter igen om <xliff:g id="TIMEOUT">%1$s</xliff:g> sekunder…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Annuller"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Nulstil nu"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Gendan fabriksdataene på enheden for at bruge den uden begrænsninger"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Tryk for at få flere oplysninger."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> – deaktiveret"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Telefonmøde"</string>
 </resources>
diff --git a/core/res/res/values-de-watch/styles_material.xml b/core/res/res/values-de-watch/styles_material.xml
new file mode 100644
index 0000000..891a647
--- /dev/null
+++ b/core/res/res/values-de-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"Kandidaten"</font></string>
+</resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index b163d35..1345f76 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Markierung entfernen"</string>
     <string name="app_info" msgid="6856026610594615344">"App-Informationen"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Gerät zurücksetzen?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Zum Zurücksetzen des Geräts tippen"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo wird gestartet…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Gerät wird zurückgesetzt…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Gerät zurücksetzen?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Alle Änderungen gehen verloren und Demo wird in <xliff:g id="TIMEOUT">%1$s</xliff:g> Sekunden neu gestartet…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Abbrechen"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Jetzt zurücksetzen"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Gerät auf Werkseinstellungen zurücksetzen, um es ohne Einschränkungen zu nutzen"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Für weitere Informationen tippen."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> deaktiviert"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Telefonkonferenz"</string>
 </resources>
diff --git a/core/res/res/values-el-watch/styles_material.xml b/core/res/res/values-el-watch/styles_material.xml
new file mode 100644
index 0000000..a02b85e
--- /dev/null
+++ b/core/res/res/values-el-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"υποψήφιοι"</font></string>
+</resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 100ee81..8434fff 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Ξεκαρφίτσωμα"</string>
     <string name="app_info" msgid="6856026610594615344">"Πληροφορίες εφαρμογής"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Να γίνει επαναφορά της συσκευής;"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Πατήστε για επαναφορά της συσκευής"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Έναρξη επίδειξης…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Επαναφορά συσκευής…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Να γίνει επαναφορά της συσκευής;"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Τυχόν αλλαγές που πραγματοποιήσατε θα χαθούν και η επίδειξη θα ξεκινήσει ξανά σε <xliff:g id="TIMEOUT">%1$s</xliff:g> δευτερόλεπτα…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Ακύρωση"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Επαναφορά τώρα"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Επαναφέρετε τις εργοστασιακές ρυθμίσεις για να χρησιμοποιήσετε αυτήν τη συσκευή χωρίς περιορισμούς"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Αγγίξτε για να μάθετε περισσότερα."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Απενεργοποιημένο <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Κλήση συνδιάσκεψης"</string>
 </resources>
diff --git a/core/res/res/values-en-rAU-watch/styles_material.xml b/core/res/res/values-en-rAU-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-en-rAU-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 0522882..6c693bc 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Unpin"</string>
     <string name="app_info" msgid="6856026610594615344">"App info"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Reset device?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tap to reset device"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Starting demo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Resetting device…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Reset device?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"You\'ll lose any changes and the demo will start again in <xliff:g id="TIMEOUT">%1$s</xliff:g> seconds…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancel"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Reset now"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Factory reset to use this device without restrictions"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Touch to find out more."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Disabled <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conference Call"</string>
 </resources>
diff --git a/core/res/res/values-en-rGB-watch/styles_material.xml b/core/res/res/values-en-rGB-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-en-rGB-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 0522882..6c693bc 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Unpin"</string>
     <string name="app_info" msgid="6856026610594615344">"App info"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Reset device?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tap to reset device"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Starting demo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Resetting device…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Reset device?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"You\'ll lose any changes and the demo will start again in <xliff:g id="TIMEOUT">%1$s</xliff:g> seconds…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancel"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Reset now"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Factory reset to use this device without restrictions"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Touch to find out more."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Disabled <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conference Call"</string>
 </resources>
diff --git a/core/res/res/values-en-rIN-watch/styles_material.xml b/core/res/res/values-en-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-en-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 0522882..6c693bc 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Unpin"</string>
     <string name="app_info" msgid="6856026610594615344">"App info"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Reset device?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tap to reset device"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Starting demo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Resetting device…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Reset device?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"You\'ll lose any changes and the demo will start again in <xliff:g id="TIMEOUT">%1$s</xliff:g> seconds…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancel"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Reset now"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Factory reset to use this device without restrictions"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Touch to find out more."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Disabled <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conference Call"</string>
 </resources>
diff --git a/core/res/res/values-es-rUS-watch/styles_material.xml b/core/res/res/values-es-rUS-watch/styles_material.xml
new file mode 100644
index 0000000..898d2fd
--- /dev/null
+++ b/core/res/res/values-es-rUS-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidatos"</font></string>
+</resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 0786b1a..fcfc752 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"No fijar"</string>
     <string name="app_info" msgid="6856026610594615344">"Información de la app"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"¿Deseas restablecer el dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Presiona para restablecer el dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Iniciando demostración…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Restableciendo dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"¿Deseas restablecer el dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Se perderán los cambios y la demostración volverá a iniciarse en <xliff:g id="TIMEOUT">%1$s</xliff:g> segundos…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancelar"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Restablecer ahora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Restablece la configuración de fábrica para usar este dispositivo sin restricciones"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toca para obtener más información."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Se inhabilitó <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conferencia"</string>
 </resources>
diff --git a/core/res/res/values-es-watch/styles_material.xml b/core/res/res/values-es-watch/styles_material.xml
new file mode 100644
index 0000000..898d2fd
--- /dev/null
+++ b/core/res/res/values-es-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidatos"</font></string>
+</resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 1909e54..21b4af3 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"No fijar"</string>
     <string name="app_info" msgid="6856026610594615344">"Información de la aplicación"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"¿Restablecer el dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Toca para restablecer el dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Iniciando demostración…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Restableciendo dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"¿Restablecer el dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Se perderán todos los cambios y la demostración volverá a empezar en <xliff:g id="TIMEOUT">%1$s</xliff:g> segundos…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancelar"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Restablecer ahora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Restablece los datos de fábrica para usar este dispositivo sin restricciones"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toca para obtener más información."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> inhabilitado"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conferencia"</string>
 </resources>
diff --git a/core/res/res/values-et-rEE-watch/styles_material.xml b/core/res/res/values-et-rEE-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-et-rEE-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index 14695e3..e96c93f 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Vabasta"</string>
     <string name="app_info" msgid="6856026610594615344">"Rakenduse teave"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Kas soovite seadme lähtestada?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Puudutage seadme lähtestamiseks"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo käivitamine …"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Seadme lähtestamine …"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Kas soovite seadme lähtestada?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Kõik muudatused lähevad kaotsi ja demo käivitub uuesti <xliff:g id="TIMEOUT">%1$s</xliff:g> sekundi möödudes …"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Tühista"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Lähtesta kohe"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Seadme piiranguteta kasutamiseks lähtestage see tehaseandmetele"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Lisateabe saamiseks puudutage."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Keelatud <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konverentskõne"</string>
 </resources>
diff --git a/core/res/res/values-eu-rES-watch/styles_material.xml b/core/res/res/values-eu-rES-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-eu-rES-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index 98adc86..49ee82f 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Kendu aingura"</string>
     <string name="app_info" msgid="6856026610594615344">"Aplikazioari buruzko informazioa"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Gailua berrezarri nahi duzu?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Gailua berrezartzeko, sakatu hau"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demoa abiarazten…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Gailua berrezartzen…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Gailua berrezarri nahi duzu?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Aldaketak galduko dituzu eta <xliff:g id="TIMEOUT">%1$s</xliff:g> segundo barru hasiko da berriro demoa…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Utzi"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Berrezarri"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Berrezarri jatorrizko ezarpenak gailua murriztapenik gabe erabili ahal izateko"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Sakatu informazio gehiago lortzeko."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> desgaituta dago"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferentzia-deia"</string>
 </resources>
diff --git a/core/res/res/values-fa-watch/styles_material.xml b/core/res/res/values-fa-watch/styles_material.xml
new file mode 100644
index 0000000..23b9a7e
--- /dev/null
+++ b/core/res/res/values-fa-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"کاندیدها"</font></string>
+</resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 26684ac..71bdc2e 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1356,7 +1356,7 @@
     <string name="default_audio_route_name" product="tv" msgid="9158088547603019321">"تلویزیون"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"تلفن"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"هدفون‌ها"</string>
-    <string name="default_audio_route_name_dock_speakers" msgid="6240602982276591864">"بلندگوهای جایگاه اتصال"</string>
+    <string name="default_audio_route_name_dock_speakers" msgid="6240602982276591864">"بلندگوهای جایگاه"</string>
     <string name="default_media_route_name_hdmi" msgid="2450970399023478055">"HDMI"</string>
     <string name="default_audio_route_category_name" msgid="3722811174003886946">"سیستم"</string>
     <string name="bluetooth_a2dp_audio_route_name" msgid="8575624030406771015">"بلوتوث‌های صوتی"</string>
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"برداشتن پین"</string>
     <string name="app_info" msgid="6856026610594615344">"اطلاعات برنامه"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"دستگاه بازنشانی شود؟"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"برای بازنشانی دستگاه، ضربه بزنید"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"در حال شروع نسخه نمایشی…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"در حال بازنشانی دستگاه…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"دستگاه بازنشانی شود؟"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"همه تغییرات را از دست خواهید داد و نسخه نمایشی دوباره تا <xliff:g id="TIMEOUT">%1$s</xliff:g> ثانیه دیگر شروع می‌شود…‏"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"لغو"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"بازنشانی در این لحظه"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"برای استفاده بدون محدودیت از این دستگاه، بازنشانی کارخانه‌ای انجام دهید"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"برای یادگیری بیشتر لمس کنید."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> غیرفعال شد"</string>
+    <string name="conference_call" msgid="3751093130790472426">"تماس کنفرانسی"</string>
 </resources>
diff --git a/core/res/res/values-fi-watch/styles_material.xml b/core/res/res/values-fi-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-fi-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index ac827a1..62c148e 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Irrota"</string>
     <string name="app_info" msgid="6856026610594615344">"Sovelluksen tiedot"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Palautetaanko laitteen tehdasasetukset?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Palauta laite napauttamalla"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Aloitetaan esittelyä…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Palautetaan asetuksia…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Palautetaanko laitteen tehdasasetukset?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Muutokset poistetaan ja esittely aloitetaan uudelleen <xliff:g id="TIMEOUT">%1$s</xliff:g> sekunnin kuluttua…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Peruuta"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Palauta nyt"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Palauta tehdasasetukset, jotta voit käyttää tätä laitetta rajoituksitta"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Lue lisätietoja koskettamalla."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> ei ole käytössä."</string>
+    <string name="conference_call" msgid="3751093130790472426">"Puhelinneuvottelu"</string>
 </resources>
diff --git a/core/res/res/values-fr-rCA-watch/styles_material.xml b/core/res/res/values-fr-rCA-watch/styles_material.xml
new file mode 100644
index 0000000..f692d5c
--- /dev/null
+++ b/core/res/res/values-fr-rCA-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidats"</font></string>
+</resources>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 57119da..2df3680 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Annuler l\'épinglage"</string>
     <string name="app_info" msgid="6856026610594615344">"Détails de l\'application"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Réinitialiser l\'appareil?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Touchez pour réinitialiser l\'appareil"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Démarrage de la démonstration en cours…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Réinitialisation de l\'appareil en cours…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Réinitialiser l\'appareil?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Vous perdrez vos modifications, et la démo recommencera dans <xliff:g id="TIMEOUT">%1$s</xliff:g> secondes…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Annuler"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Réinitialiser maintenant"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Rétablissez la configuration d\'usine de cet appareil pour l\'utiliser sans restrictions"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Touchez ici pour en savoir plus."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Désactivé : <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conférence téléphonique"</string>
 </resources>
diff --git a/core/res/res/values-fr-watch/styles_material.xml b/core/res/res/values-fr-watch/styles_material.xml
new file mode 100644
index 0000000..f692d5c
--- /dev/null
+++ b/core/res/res/values-fr-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidats"</font></string>
+</resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b089991..90def0d 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Retirer"</string>
     <string name="app_info" msgid="6856026610594615344">"Infos sur l\'appli"</string>
     <string name="negative_duration" msgid="5688706061127375131">"− <xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Réinitialiser l\'appareil ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Appuyer pour réinitialiser l\'appareil"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Lancement de la démo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Réinitialisation…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Réinitialiser l\'appareil ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Vous perdrez vos modifications, et la démo recommencera dans <xliff:g id="TIMEOUT">%1$s</xliff:g> secondes…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Annuler"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Réinitialiser maintenant"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Rétablir la configuration d\'usine pour utiliser cet appareil sans restrictions"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Appuyez ici pour en savoir plus."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Élément \"<xliff:g id="LABEL">%1$s</xliff:g>\" désactivé"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conférence téléphonique"</string>
 </resources>
diff --git a/core/res/res/values-gl-rES-watch/styles_material.xml b/core/res/res/values-gl-rES-watch/styles_material.xml
new file mode 100644
index 0000000..898d2fd
--- /dev/null
+++ b/core/res/res/values-gl-rES-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidatos"</font></string>
+</resources>
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index 23669d4..85be7f3 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Soltar"</string>
     <string name="app_info" msgid="6856026610594615344">"Información da aplicación"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Queres restablecer o dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Toca aquí para restablecer o dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Iniciando demostración…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Restablecendo dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Queres restablecer o dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Perderás os cambios que fixeses e a demostración volverá comezar en <xliff:g id="TIMEOUT">%1$s</xliff:g> segundos…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancelar"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Restablecer agora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Restablecemento dos valores de fábrica para usar este dispositivo sen restricións"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toca para acceder a máis información"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Desactivouse <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conferencia telefónica"</string>
 </resources>
diff --git a/core/res/res/values-gu-rIN-watch/styles_material.xml b/core/res/res/values-gu-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..21c6871
--- /dev/null
+++ b/core/res/res/values-gu-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"ઉમેદવારો"</font></string>
+</resources>
diff --git a/core/res/res/values-gu-rIN/strings.xml b/core/res/res/values-gu-rIN/strings.xml
index 656061d..e611f30 100644
--- a/core/res/res/values-gu-rIN/strings.xml
+++ b/core/res/res/values-gu-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"અનપિન કરો"</string>
     <string name="app_info" msgid="6856026610594615344">"ઍપ્લિકેશન માહિતી"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"ઉપકરણ ફરીથી સેટ કરીએ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ઉપકરણને ફરીથી સેટ કરવા માટે ટૅપ કરો"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ડેમો પ્રારંભ કરી રહ્યાં છે…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"ઉપકરણ ફરીથી સેટ કરી રહ્યાં છે…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"ઉપકરણ ફરીથી સેટ કરીએ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"તમે કોઈપણ ફેરફારો ગુમાવશો અને ડેમો <xliff:g id="TIMEOUT">%1$s</xliff:g> સેકન્ડમાં ફરી શરૂ થશે…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"રદ કરો"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"હમણાં ફરીથી સેટ કરો"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"આ ઉપકરણનો પ્રતિબંધો વિના ઉપયોગ કરવા માટે ફેક્ટરી રીસેટ કરો"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"વધુ જાણવા માટે ટચ કરો."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> અક્ષમ કર્યું"</string>
+    <string name="conference_call" msgid="3751093130790472426">"કોન્ફરન્સ કૉલ"</string>
 </resources>
diff --git a/core/res/res/values-hi-watch/styles_material.xml b/core/res/res/values-hi-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-hi-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index b52ff25..76bc028 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"अनपिन करें"</string>
     <string name="app_info" msgid="6856026610594615344">"ऐप की जानकारी"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"डिवाइस रीसेट करें?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"डिवाइस को रीसेट करने के लिए टैप करें"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"डेमो प्रारंभ हो रहा है…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"डिवाइस पुन: रीसेट कर रहा है…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"डिवाइस रीसेट करें?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"आपके सभी बदलाव खो जाएंगे और डेमो <xliff:g id="TIMEOUT">%1$s</xliff:g> सेकंड में फिर से शुरू हो जाएगा…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"अभी नहीं"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"अभी रीसेट करें"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"इस डिवाइस को प्रतिबंधों के बिना उपयोग करने के लिए फ़ैक्टरी रीसेट करें"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"अधिक जानने के लिए स्पर्श करें."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"अक्षम <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"कॉन्फ़्रेंस कॉल"</string>
 </resources>
diff --git a/core/res/res/values-hr-watch/styles_material.xml b/core/res/res/values-hr-watch/styles_material.xml
new file mode 100644
index 0000000..88e5751
--- /dev/null
+++ b/core/res/res/values-hr-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"kandidati"</font></string>
+</resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index b90f9dd..461888a 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1687,7 +1687,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Otkvači"</string>
     <string name="app_info" msgid="6856026610594615344">"Informacije o aplikaciji"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Želite li vratiti uređaj na zadano?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Dodirnite za vraćanje uređaja na zadano"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Pokretanje demo-načina..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Vraćanje uređaja na zadano…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Želite li vratiti uređaj na zadano?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Sve će se promjene izbrisati, a demonstracija će se ponovo pokrenuti za <xliff:g id="TIMEOUT">%1$s</xliff:g> s…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Odustani"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Vrati na zadano sada"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Uređaj je vraćen na tvorničke postavke da biste ga mogli upotrebljavati bez ograničenja"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Dodirnite da biste saznali više."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> – onemogućeno"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferencijski poziv"</string>
 </resources>
diff --git a/core/res/res/values-hu-watch/styles_material.xml b/core/res/res/values-hu-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-hu-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 8187e43..920fc39 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Feloldás"</string>
     <string name="app_info" msgid="6856026610594615344">"Alkalmazásinformáció"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Visszaállítja eszközét?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Koppintson az eszköz visszaállítása érdekében"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Bemutató indítása…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Eszköz visszaállítása…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Visszaállítja eszközét?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"A módosítások elvesznek, és a bemutató újra elindul <xliff:g id="TIMEOUT">%1$s</xliff:g> másodperc múlva…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Mégse"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Visszaállítás most"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Állítsa vissza a gyári beállításokat az eszköz korlátozások nélküli használata érdekében"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Érintse meg a további információkért."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"A(z) <xliff:g id="LABEL">%1$s</xliff:g> letiltva"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferenciahívás"</string>
 </resources>
diff --git a/core/res/res/values-hy-rAM-watch/styles_material.xml b/core/res/res/values-hy-rAM-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-hy-rAM-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index 171d1a9..2f6efcb 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -1636,7 +1636,7 @@
     <string name="language_picker_section_all" msgid="3097279199511617537">"Բոլոր լեզուները"</string>
     <string name="locale_search_menu" msgid="2560710726687249178">"Որոնում"</string>
     <string name="work_mode_off_title" msgid="8954725060677558855">"Աշխատանքային ռեժիմն ԱՆՋԱՏՎԱԾ Է"</string>
-    <string name="work_mode_off_message" msgid="3286169091278094476">"Թույլատրել աշխատանքային պրոֆիլի (այդ թվում նաև հավելվածների, ֆոնային համաժամացման և առնչվող գործառական հնարավորությունների) աշխատանքը:"</string>
+    <string name="work_mode_off_message" msgid="3286169091278094476">"Միացնել աշխատանքային պրոֆիլը՝ հավելվածները, ֆոնային համաժամեցումը և առնչվող գործառույթները"</string>
     <string name="work_mode_turn_on" msgid="2062544985670564875">"Միացնել"</string>
     <string name="new_sms_notification_title" msgid="8442817549127555977">"Դուք ունեք նոր հաղորդագրություններ"</string>
     <string name="new_sms_notification_content" msgid="7002938807812083463">"Դիտելու համար բացել SMS հավելվածը"</string>
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Ապամրացնել"</string>
     <string name="app_info" msgid="6856026610594615344">"Հավելվածի տվյալներ"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Վերակայե՞լ սարքը:"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Հպեք՝ սարքը վերակայելու համար"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Ցուցադրական օգտվողը գործարկվում է…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Սարաքը վերակայվում է…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Վերակայե՞լ սարքը:"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Կատարված փոփոխությունները չեն պահվի, իսկ ցուցադրական նյութը կրկին կգործարկվի <xliff:g id="TIMEOUT">%1$s</xliff:g> վայրկյանից…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Չեղարկել"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Վերակայել հիմա"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Սարքն առանց սահմանափակումների օգտագործելու համար կատարեք գործարանային վերակայում"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Հպեք՝ ավելին իմանալու համար:"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Անջատած <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Կոնֆերանս զանգ"</string>
 </resources>
diff --git a/core/res/res/values-in-watch/styles_material.xml b/core/res/res/values-in-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-in-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index bd172604d..9a6f48e 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Lepas pin"</string>
     <string name="app_info" msgid="6856026610594615344">"Info aplikasi"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Setel ulang perangkat?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Ketuk untuk menyetel ulang perangkat"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Memulai demo..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Menyetel ulang perangkat..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Setel ulang perangkat?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Perubahan yang dibuat akan hilang dan demo akan dimulai lagi dalam <xliff:g id="TIMEOUT">%1$s</xliff:g> detik…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Batal"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Setel ulang sekarang"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Dikembalikan ke setelan pabrik agar perangkat ini dapat digunakan tanpa batasan"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Sentuh untuk mempelajari lebih lanjut."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> dinonaktifkan"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferensi Telepon"</string>
 </resources>
diff --git a/core/res/res/values-is-rIS-watch/styles_material.xml b/core/res/res/values-is-rIS-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-is-rIS-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index b575e79..a40db198 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Losa"</string>
     <string name="app_info" msgid="6856026610594615344">"Forritsupplýsingar"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Endurstilla tækið?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Ýttu til að endurstilla tækið"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Byrjar kynningu…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Endurstillir tækið…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Endurstilla tækið?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Þú glatar öllum breytingum og kynningin byrjar aftur eftir <xliff:g id="TIMEOUT">%1$s</xliff:g> sekúndur…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Hætta við"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Endurstilla núna"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Núllstilltu til að nota þetta tæki án takmarkana"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Snertu til að fá frekari upplýsingar."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Slökkt <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Símafundur"</string>
 </resources>
diff --git a/core/res/res/values-it-watch/styles_material.xml b/core/res/res/values-it-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-it-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index bfadb9d..12e18db 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Sblocca"</string>
     <string name="app_info" msgid="6856026610594615344">"Informazioni app"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Ripristinare il dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tocca per ripristinare il dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Avvio della demo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Ripristino del dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Ripristinare il dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Perderai tutte le modifiche e la demo verrà riavviata tra <xliff:g id="TIMEOUT">%1$s</xliff:g> secondi…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Annulla"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Ripristina ora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Esegui il ripristino dei dati di fabbrica per utilizzare il dispositivo senza limitazioni"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Tocca per ulteriori informazioni."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Widget <xliff:g id="LABEL">%1$s</xliff:g> disattivato"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Audioconferenza"</string>
 </resources>
diff --git a/core/res/res/values-iw-watch/styles_material.xml b/core/res/res/values-iw-watch/styles_material.xml
new file mode 100644
index 0000000..f44b272
--- /dev/null
+++ b/core/res/res/values-iw-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"מועמדים"</font></string>
+</resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index c2ba6f3..6efa246 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"בטל הצמדה"</string>
     <string name="app_info" msgid="6856026610594615344">"פרטי אפליקציה"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"האם לאפס את המכשיר?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"הקש כדי לאפס את המכשיר"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"מתחיל בהדגמה…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"מאפס את המכשיר…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"האם לאפס את המכשיר?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"תאבד את כל השינויים וההדגמה תתחיל שוב בעוד <xliff:g id="TIMEOUT">%1$s</xliff:g> שניות…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"בטל"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"אפס עכשיו"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"איפוס להגדרות היצרן כדי לאפשר שימוש במכשיר ללא מגבלות"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"גע לקבלת מידע נוסף."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> הושבת"</string>
+    <string name="conference_call" msgid="3751093130790472426">"שיחת ועידה"</string>
 </resources>
diff --git a/core/res/res/values-ja-watch/styles_material.xml b/core/res/res/values-ja-watch/styles_material.xml
new file mode 100644
index 0000000..7712090
--- /dev/null
+++ b/core/res/res/values-ja-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"候補"</font></string>
+</resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index c7c404e..ef63264 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"固定を解除"</string>
     <string name="app_info" msgid="6856026610594615344">"アプリ情報"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"端末をリセットしますか?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"端末をリセットするにはタップしてください"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"デモを開始しています…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"端末をリセットしています…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"端末をリセットしますか?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"変更が失われ、<xliff:g id="TIMEOUT">%1$s</xliff:g> 秒後にデモがもう一度開始されます…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"キャンセル"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"今すぐリセット"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"制限なしでこの端末を使用するには初期状態にリセットしてください"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"タップして詳細をご確認ください。"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"停止済みの「<xliff:g id="LABEL">%1$s</xliff:g>」"</string>
+    <string name="conference_call" msgid="3751093130790472426">"グループ通話"</string>
 </resources>
diff --git a/core/res/res/values-ka-rGE-watch/styles_material.xml b/core/res/res/values-ka-rGE-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ka-rGE-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index 0d27ea5..2091e4a 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ჩამაგრების მოხსნა"</string>
     <string name="app_info" msgid="6856026610594615344">"აპის შესახებ"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"გსურთ მოწყობილობის გადაყენება?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"შეეხეთ მოწყობილობის გადასაყენებლად"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"მიმდინარეობს დემონსტრაციის დაწყება…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"მიმდინარეობს მოწყობილობის გადაყენება…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"გსურთ მოწყობილობის გადაყენება?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"შეტანილი ცვლილებები დაიკარგება, ხოლო დემონსტრაცია ხელახლა <xliff:g id="TIMEOUT">%1$s</xliff:g> წამში დაიწყება…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"გაუქმება"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ახლავე გადაყენება"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ამ მოწყობილობის შეზღუდვების გარეშე გამოსაყენებლად, დააბრუნეთ ქარხნული პარამეტრები"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"შეეხეთ მეტის გასაგებად."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"გათიშული <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"საკონფერენციო ზარი"</string>
 </resources>
diff --git a/core/res/res/values-kk-rKZ-watch/styles_material.xml b/core/res/res/values-kk-rKZ-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-kk-rKZ-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index 9aad142..d8faa1a 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Босату"</string>
     <string name="app_info" msgid="6856026610594615344">"Қолданба ақпараты"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Құрылғыны бастапқы күйге қайтару керек пе?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Құрылғыны бастапқы күйге келтіру үшін түртіңіз"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Демо нұсқасы іске қосылуда..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Құрылғы бастапқы күйге қайтарылуда..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Құрылғыны басқапқы күйге қайтару керек пе?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Барлық өзгеріс жоғалады және демо нұсқасы <xliff:g id="TIMEOUT">%1$s</xliff:g> секундтан кейін қайта қосылады…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Бас тарту"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Қазір бастапқы күйге қайтару"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Осы құрылғыны шектеусіз пайдалану үшін зауыттық параметрлерді қалпына келтіріңіз"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Қосымша мәліметтер алу үшін түртіңіз."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> өшірулі"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конференциялық қоңырау"</string>
 </resources>
diff --git a/core/res/res/values-km-rKH-watch/styles_material.xml b/core/res/res/values-km-rKH-watch/styles_material.xml
new file mode 100644
index 0000000..e54cb00
--- /dev/null
+++ b/core/res/res/values-km-rKH-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"បេក្ខជន"</font></string>
+</resources>
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index 0256ddc..4584d21 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -1653,7 +1653,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"មិនខ្ទាស់"</string>
     <string name="app_info" msgid="6856026610594615344">"ព័ត៌មាន​កម្មវិធី"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"កំណត់ឧបករណ៍ឡើងវិញឬ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ប៉ះដើម្បីកំណត់ឧបករណ៍ឡើងវិញ"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"កំពុងចាប់ផ្តើមការបង្ហាញសាកល្បង…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"កំពុងកំណត់ឧបករណ៍ឡើងវិញ…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"កំណត់ឧបករណ៍ឡើងវិញឬ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"អ្នកនឹងបាត់បង់ការផ្លាស់ប្តូរណាមួយ ហើយការបង្ហាញសាកល្បងនឹងចាប់ផ្តើមម្តងទៀតក្នុងរយៈពេល <xliff:g id="TIMEOUT">%1$s</xliff:g> វិនាទីទៀត…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"បោះបង់"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"កំណត់ឡើងវិញឥឡូវនេះ"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"កំណត់ដូចចេញពីរោងចក្រឡើងវិញដើម្បីប្រើឧបករណ៍នេះដោយគ្មានការរឹតបន្តឹង"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"ប៉ះ​ ដើម្បី​​ស្វែងយល់​បន្ថែម។"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> ដែលបានបិទដំណើរការ"</string>
+    <string name="conference_call" msgid="3751093130790472426">"ការហៅជាក្រុម"</string>
 </resources>
diff --git a/core/res/res/values-kn-rIN-watch/styles_material.xml b/core/res/res/values-kn-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..1ec23a4
--- /dev/null
+++ b/core/res/res/values-kn-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"ಅಭ್ಯರ್ಥಿಗಳು"</font></string>
+</resources>
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index c172e91..a6d754d 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ಅನ್‌ಪಿನ್"</string>
     <string name="app_info" msgid="6856026610594615344">"ಅಪ್ಲಿಕೇಶನ್ ಮಾಹಿತಿ"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"ಸಾಧನವನ್ನು ಮರುಹೊಂದಿಸುವುದೇ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ಸಾಧನ ಮರುಹೊಂದಿಸಲು ಟ್ಯಾಪ್‌ ಮಾಡಿ"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ಡೆಮೋ ಪ್ರಾರಂಭಿಸಲಾಗುತ್ತಿದೆ..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"ಸಾಧನ ಮರುಹೊಂದಿಸಲಾಗುತ್ತಿದೆ..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"ಸಾಧನವನ್ನು ಮರುಹೊಂದಿಸುವುದೇ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ನೀವು ಯಾವುದೇ ಬದಲಾವಣೆಗಳನ್ನು ಕಳೆದುಕೊಳ್ಳುತ್ತೀರಿ ಮತ್ತು <xliff:g id="TIMEOUT">%1$s</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಡೆಮೋ ಮತ್ತೆ ಪ್ರಾರಂಭವಾಗುತ್ತದೆ..."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"ರದ್ದುಮಾಡು"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ಈಗಲೇ ಮರುಹೊಂದಿಸು"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ನಿರ್ಬಂಧಗಳು ಇಲ್ಲದೆಯೇ ಈ ಸಾಧನವನ್ನು ಬಳಸಲು ಫ್ಯಾಕ್ಟರಿ ಮರುಹೊಂದಿಸಿ"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"ಇನ್ನಷ್ಟು ತಿಳಿಯಲು ಸ್ಪರ್ಶಿಸಿ."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
+    <string name="conference_call" msgid="3751093130790472426">"ಕಾನ್ಫರೆನ್ಸ್ ಕರೆ"</string>
 </resources>
diff --git a/core/res/res/values-ko-watch/styles_material.xml b/core/res/res/values-ko-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ko-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 254adc82..6d07713 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"고정 해제"</string>
     <string name="app_info" msgid="6856026610594615344">"앱 정보"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"기기를 초기화하시겠습니까?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"기기를 초기화하려면 탭하세요."</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"데모 시작 중..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"기기 초기화 중..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"기기를 초기화하시겠습니까?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"변경사항이 사라지며 데모가 <xliff:g id="TIMEOUT">%1$s</xliff:g>초 후에 시작됩니다."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"취소"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"지금 초기화"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"제한 없이 기기를 사용하기 위한 초기화"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"자세한 내용을 보려면 터치하세요."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> 사용 중지됨"</string>
+    <string name="conference_call" msgid="3751093130790472426">"다자간 통화"</string>
 </resources>
diff --git a/core/res/res/values-ky-rKG-watch/styles_material.xml b/core/res/res/values-ky-rKG-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ky-rKG-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml
index 50340d4..a024db69 100644
--- a/core/res/res/values-ky-rKG/strings.xml
+++ b/core/res/res/values-ky-rKG/strings.xml
@@ -1654,7 +1654,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Кадоодон алып коюу"</string>
     <string name="app_info" msgid="6856026610594615344">"Колдонмо тууралуу"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Түзмөк баштапкы абалга келтирилсинби?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Түзмөктү баштапкы абалга келтирүү үчүн таптап коюңуз"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Демо режим башталууда…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Түзмөк баштапкы абалга келтирилүүдө…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Түзмөк баштапкы абалга келтирилсинби?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Бардык өзгөртүүлөр жоголуп, демо режим <xliff:g id="TIMEOUT">%1$s</xliff:g> секунддан кийин кайра башталат…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Жокко чыгаруу"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Баштапкы абалга келтирүү"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Бул түзмөктү чектөөсүз колдонуу үчүн аны баштапкы абалга келтириңиз"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Көбүрөөк билүү үчүн тийип коюңуз."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> өчүрүлдү"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конференц чалуу"</string>
 </resources>
diff --git a/core/res/res/values-land/integers.xml b/core/res/res/values-land/integers.xml
index 020fd23..a578989 100644
--- a/core/res/res/values-land/integers.xml
+++ b/core/res/res/values-land/integers.xml
@@ -23,4 +23,6 @@
     <integer name="kg_widget_region_weight">45</integer>
     <integer name="kg_security_flipper_weight">55</integer>
     <integer name="kg_glowpad_rotation_offset">-90</integer>
+
+    <integer name="date_picker_header_max_lines_material">4</integer>
 </resources>
diff --git a/core/res/res/values-lo-rLA-watch/styles_material.xml b/core/res/res/values-lo-rLA-watch/styles_material.xml
new file mode 100644
index 0000000..1f845b9
--- /dev/null
+++ b/core/res/res/values-lo-rLA-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"ແຄນດິເດດ"</font></string>
+</resources>
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index 1ef7622..0be6875 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ຖອນປັກໝຸດ"</string>
     <string name="app_info" msgid="6856026610594615344">"ຂໍ້ມູນແອັບ"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"ຣີເຊັດອຸປະກອນບໍ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ແຕະເພື່ອຣີເຊັດອຸປະກອນ"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ກຳລັງເລີ່ມເດໂມ…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"ກຳລັງຣີເຊັດອຸປະກອນ…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"ຣີເຊັດອຸປະກອນບໍ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ທ່ານຈະສູນເສຍການປ່ຽນແປງ ແລະ ເດໂມຈະເລີ່ມອີກຄັ້ງໃນອີກ <xliff:g id="TIMEOUT">%1$s</xliff:g> ວິນາທີ…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"ຍົກເລີກ"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ຣີເຊັດດຽວນີ້"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ຣີເຊັດໃຫ້ເປັນຄ່າໂຮງງານເພື່ອໃຊ້ອຸປະກອນນີ້ໂດຍບໍ່ມີຂໍ້ຈຳກັດ"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"ແຕະເພື່ອສຶກສາເພີ່ມເຕີມ."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"ປິດການນຳໃຊ້ <xliff:g id="LABEL">%1$s</xliff:g> ແລ້ວ"</string>
+    <string name="conference_call" msgid="3751093130790472426">"ການປະຊຸມສາຍ"</string>
 </resources>
diff --git a/core/res/res/values-lt-watch/styles_material.xml b/core/res/res/values-lt-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-lt-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 80ff67e..f4da72e 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Atsegti"</string>
     <string name="app_info" msgid="6856026610594615344">"Programos informacija"</string>
     <string name="negative_duration" msgid="5688706061127375131">"–<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Iš naujo nustatyti įrenginį?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Palieskite, kad iš naujo nustatytumėte įrenginį"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Paleidžiama demonstracinė versija…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Įrenginys nustatomas iš naujo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Iš naujo nustatyti įrenginį?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Prarasite visus pakeitimus, o demonstracinė versija bus paleista iš naujo po <xliff:g id="TIMEOUT">%1$s</xliff:g> sek…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Atšaukti"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Nustatyti iš naujo dabar"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Atkurkite gamyklinius nustatymus, kad galėtumėte naudoti šį įrenginį be apribojimų"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Palieskite, kad sužinotumėte daugiau."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Išj. valdiklis „<xliff:g id="LABEL">%1$s</xliff:g>“"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferencinis skambutis"</string>
 </resources>
diff --git a/core/res/res/values-lv-watch/styles_material.xml b/core/res/res/values-lv-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-lv-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 210d05b..dba8beb 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1687,7 +1687,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Atspraust"</string>
     <string name="app_info" msgid="6856026610594615344">"Lietotnes informācija"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Vai atiestatīt ierīci?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Pieskarieties, lai atiestatītu ierīci"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Notiek demonstrācijas palaišana..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Notiek ierīces atiestatīšana..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Vai atiestatīt ierīci?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Pēc <xliff:g id="TIMEOUT">%1$s</xliff:g> sekundēm zaudēsiet visas izmaiņas un tiks atkārtoti palaista demonstrācija..."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Atcelt"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Atiestatīt tūlīt"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Rūpnīcas datu atiestatīšana ierīces neierobežotai izmantošanai"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Pieskarieties, lai uzzinātu vairāk."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> atspējots"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferences zvans"</string>
 </resources>
diff --git a/core/res/res/values-mk-rMK-watch/styles_material.xml b/core/res/res/values-mk-rMK-watch/styles_material.xml
new file mode 100644
index 0000000..89c3366
--- /dev/null
+++ b/core/res/res/values-mk-rMK-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"кандидати"</font></string>
+</resources>
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index a24ad57..a6a7793 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -1653,7 +1653,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Откачете"</string>
     <string name="app_info" msgid="6856026610594615344">"Информации за апликација"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Да се ресетира уредот?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Допрете за да го ресетирате уредот"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Се вклучува демонстрацијата…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Се ресетира уредот…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Да се ресетира уредот?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Ќе ги изгубите измените и демонстрацијата ќе започне повторно по <xliff:g id="TIMEOUT">%1$s</xliff:g> секунди…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Откажи"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Ресетирај сега"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Ресетирајте до фабричките поставки за уредов да го користите без ограничувања"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Допрете за да дознаете повеќе."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Оневозможен <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конференциски повик"</string>
 </resources>
diff --git a/core/res/res/values-ml-rIN-watch/styles_material.xml b/core/res/res/values-ml-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..9d38c0d
--- /dev/null
+++ b/core/res/res/values-ml-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"കാൻഡിഡേറ്റുകൾ"</font></string>
+</resources>
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index f91db2d..284db98 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"അൺപിൻ ചെയ്യുക"</string>
     <string name="app_info" msgid="6856026610594615344">"ആപ്പ് വിവരം"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"ഉപകരണം പുനക്രമീകരിക്കണോ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ഉപകരണം പുനക്രമീകരിക്കാൻ ടാപ്പുചെയ്യുക"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ഡെമോ ആരംഭിക്കുന്നു…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"ഉപകരണം പുനക്രമീകരിക്കുന്നു…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"ഉപകരണം പുനക്രമീകരിക്കണോ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"മാറ്റങ്ങളെല്ലാം നിങ്ങൾക്ക് നഷ്ടപ്പെടും, <xliff:g id="TIMEOUT">%1$s</xliff:g> സെക്കൻഡിൽ ഡെമോ വീണ്ടും തുടങ്ങും…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"റദ്ദാക്കുക"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ഇപ്പോൾ പുനക്രമീകരിക്കുക"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"നിയന്ത്രണങ്ങൾ ഇല്ലാതെ ഈ ഉപകരണം ഉപയോഗിക്കാൻ ഫാക്ടറി റീസെറ്റ് നടത്തുക"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"കൂടുതലറിയുന്നതിന് സ്‌പർശിക്കുക."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> പ്രവർത്തനരഹിതമാക്കി"</string>
+    <string name="conference_call" msgid="3751093130790472426">"കോൺഫറൻസ് കോൾ"</string>
 </resources>
diff --git a/core/res/res/values-mn-rMN-watch/styles_material.xml b/core/res/res/values-mn-rMN-watch/styles_material.xml
new file mode 100644
index 0000000..f65ea48
--- /dev/null
+++ b/core/res/res/values-mn-rMN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"нэр дэвшигч"</font></string>
+</resources>
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index f54a485..8160813 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -1649,7 +1649,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Unpin"</string>
     <string name="app_info" msgid="6856026610594615344">"Апп-н мэдээлэл"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Төхөөрөмжийг шинэчлэх үү?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Төхөөрөмжийг шинэчлэхийн тулд товшино уу"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Жишээг эхлүүлж байна…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Төхөөрөмжийг шинэчилж байна…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Төхөөрөмжийг шинэчлэх үү?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Таны хийсэн өөрчлөлтийг хадгалахгүй бөгөөд жишээ <xliff:g id="TIMEOUT">%1$s</xliff:g> секундын дотор дахин эхлэх болно..."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Цуцлах"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Одоо шинэчлэх"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Энэ төхөөрөмжийг хязгаарлалтгүй ашиглахын тулд үйлдвэрийн тохиргоонд дахин тохируулна уу"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Дэлгэрэнгүй үзэх бол дарна уу."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g>-г цуцалсан"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Хурлын дуудлага"</string>
 </resources>
diff --git a/core/res/res/values-mr-rIN-watch/styles_material.xml b/core/res/res/values-mr-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-mr-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index c7d2191..7d0fa6d 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"अनपिन करा"</string>
     <string name="app_info" msgid="6856026610594615344">"अॅप माहिती"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"डिव्हाइस रीसेट करायचे?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"डिव्हाइस रीसेट करण्यासाठी टॅप करा"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"डेमो प्रारंभ करत आहे..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"डिव्हाइस रीसेट करत आहे..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"डिव्हाइस रीसेट करायचे?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"आपण कोणतेही बदल गमवाल आणि डेमो पुन्हा <xliff:g id="TIMEOUT">%1$s</xliff:g> सेकंदांमध्ये प्रारंभ होईल..."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"रद्द करा"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"आता रीसेट करा"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"हे डिव्हाइस निर्बंधांशिवाय वापरण्यासाठी फॅक्टरी रीसेट करा"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"अधिक जाणून घेण्यासाठी स्पर्श करा."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> अक्षम केले"</string>
+    <string name="conference_call" msgid="3751093130790472426">"परिषद कॉल"</string>
 </resources>
diff --git a/core/res/res/values-ms-rMY-watch/styles_material.xml b/core/res/res/values-ms-rMY-watch/styles_material.xml
new file mode 100644
index 0000000..3f5e687
--- /dev/null
+++ b/core/res/res/values-ms-rMY-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"calon"</font></string>
+</resources>
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index c4123ab..b66ea933 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Nyahsemat"</string>
     <string name="app_info" msgid="6856026610594615344">"Maklumat apl"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Tetapkan semula peranti?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Ketik untuk menetapkan semula peranti"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Memulakan tunjuk cara…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Menetapkan semula peranti…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Tetapkan semula peranti?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Anda akan kehilangan sebarang perubahan yang dibuat dan tunjuk cara akan dimulakan sekali lagi dalam masa <xliff:g id="TIMEOUT">%1$s</xliff:g> saat…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Batal"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Tetapkan semula sekarang"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Lakukan tetapan semula kilang untuk menggunakan peranti ini tanpa sekatan"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Ketik untuk mengetahui lebih lanjut."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> dilumpuhkan"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Panggilan Sidang"</string>
 </resources>
diff --git a/core/res/res/values-my-rMM-watch/styles_material.xml b/core/res/res/values-my-rMM-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-my-rMM-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index 5dbf517..664985a 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -176,7 +176,7 @@
     <string name="ssl_ca_cert_noti_by_administrator" msgid="550758088185764312">"သင့်အလုပ်ပရိုဖိုင် စီမံခန့်ခွဲသူမှ"</string>
     <string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"<xliff:g id="MANAGING_DOMAIN">%s</xliff:g> ဖြင့်"</string>
     <string name="work_profile_deleted" msgid="5005572078641980632">"အလုပ်ပရိုဖိုင် ဖျက်ပြီးဖြစ်၏"</string>
-    <string name="work_profile_deleted_description" msgid="6305147513054341102">"အက်ဒမင် အက်ပ် ပျောက်နေသောကြောင့် အလုပ်ပရိုဖိုင် ပျက်သွားသည်။"</string>
+    <string name="work_profile_deleted_description" msgid="6305147513054341102">"အက်ဒမင် အက်ပ်ပျောက်နေသောကြောင့် အလုပ်ပရိုဖိုင် ပျက်သွားသည်။"</string>
     <string name="work_profile_deleted_details" msgid="226615743462361248">"အလုပ်ပရိုဖိုင် အက်ဒမင် အပလီကေးရှင်းပျောက်နေသည် သို့မဟုတ် ပျက်စီးနေသည်။ ထို့ကြောင့် သင့်အလုပ်ပရိုဖိုင်နှင့် ဆက်စပ်နေသော ဒေတာများအား ပယ်ဖျက်ခြင်းခံရမည်။ အကူအညီတောင်းခံရန် သင့်အက်ဒမင်အား ဆက်သွယ်ပါ။"</string>
     <string name="work_profile_deleted_description_dpm_wipe" msgid="6019770344820507579">"ဤစက်ကိရိယာတွင် သင့်အလုပ်ပရိုဖိုင် မရှိတော့ပါ။"</string>
     <string name="factory_reset_warning" msgid="5423253125642394387">"သင့်ကိရိယာအား ပယ်ဖျက်လိမ့်မည်"</string>
@@ -296,14 +296,14 @@
     <string name="permdesc_sendSms" msgid="7094729298204937667">"အပလီကေးရှင်းအား စာတိုပို့ခွင့် ပြုပါ။ မမျှော်လင့်သော ကုန်ကျမှု ဖြစ်နိုင်ပါသည်။ အန္တရာယ်ရှိ အပလီကေးရှင်းများမှ သင် မသိပဲ စာပို့ခြင်းများ ပြုလုပ်ခြင်းကြောင့် ပိုက်ဆံ အပို ကုန်စေနိုင်သည်"</string>
     <string name="permlab_readSms" msgid="8745086572213270480">"သင့်ရဲ့ စာပေးပို့ခြင်းများ ဖတ်ခြင်း (စာတို နှင့် ရုပ်သံစာ)"</string>
     <string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"အပလီကေးရှင်းအား တက်ဘလက် သို့မဟုတ် ဆင်းမ်ကဒ်မှာ သိမ်းဆည်းထားသော စာတိုများ ဖတ်ရှုခွင့်ပြုပါ။ အပလီကေးရှင်းအနေဖြင့် အကြာင်းအရာ သို့မဟုတ် ယုံကြည်စိတ်ချရမှုကို ဂရုမပြုပဲ စာတိုအားလုံးကို ဖတ်နိုင်ပါလိမ်မည်။"</string>
-    <string name="permdesc_readSms" product="tv" msgid="5102425513647038535">"သင့်တီဗွီ သို့မဟုတ် ဆင်းမ်ကဒ်တွင် သိမ်းထားသည့် SMS စာများကို အက်ပ် အား ဖတ်ခွင့်ပြုပါ။ ထိုသို့ခွင့်ပြုခြင်းဖြင့် အက်ပ် သည် အကြောင်းအရာ သို့မဟုတ် ယုံကြည်စိတ်ချရမှု တို့နှင့် မသက်ဆိုင်ဘဲ၊ SMS စာများအားလုံးကို ဖတ်နိုင်မည်ဖြစ်၏။"</string>
+    <string name="permdesc_readSms" product="tv" msgid="5102425513647038535">"သင့်တီဗွီ သို့မဟုတ် ဆင်းမ်ကဒ်တွင် သိမ်းထားသည့် SMS စာများကို အက်ပ်အား ဖတ်ခွင့်ပြုပါ။ ထိုသို့ခွင့်ပြုခြင်းဖြင့် အက်ပ်သည် အကြောင်းအရာ သို့မဟုတ် ယုံကြည်စိတ်ချရမှု တို့နှင့် မသက်ဆိုင်ဘဲ၊ SMS စာများအားလုံးကို ဖတ်နိုင်မည်ဖြစ်၏။"</string>
     <string name="permdesc_readSms" product="default" msgid="3695967533457240550">"အပလီကေးရှင်းအား ဖုန်း သို့မဟုတ် ဆင်းမ်ကဒ်မှာ သိမ်းဆည်းထားသော စာတိုများ ဖတ်ရှုခွင့်ပြုပါ။ အပလီကေးရှင်းအနေဖြင့် အကြာင်းအရာ သို့မဟုတ် ယုံကြည်စိတ်ချရမှုကို ဂရုမပြုပဲ စာတိုအားလုံးကို ဖတ်နိုင်ပါလိမ်မည်။"</string>
     <string name="permlab_receiveWapPush" msgid="5991398711936590410">"စာပို့ခြင်းအား လက်ခံရယူခြင်း (WAP)"</string>
     <string name="permdesc_receiveWapPush" msgid="748232190220583385">"အပလီကေးရှင်းအား WAP စာများ လက်ခံခြင်း၊ ဆောင်ရွက်ခြင်း ခွင့်ပြုပါ။ ဤခွင့်ပြုချက်တွင် အပလီကေးရှင်းအနေဖြင့် သင် လက်ခံရရှိသော စာများအား သင့်အား မပြပဲစောင့်ကြည့်ခွင့်နှင့် ဖျက်ပစ်ခွင့်များ ပါဝင်ပါသည်။"</string>
     <string name="permlab_getTasks" msgid="6466095396623933906">"အလုပ်လုပ်နေကြသည့် အက်ပ်များကို ရယူခြင်း"</string>
     <string name="permdesc_getTasks" msgid="7454215995847658102">"အပလီကေးရှင်းအား လက်ရှိနဲ့ လတ်တလော လုပ်ဆောင်ခဲ့သော သတင်းအချက်အလက် အသေးစိတ်အား ထုတ်ယူခွင့်ပြုရန်။ အပလီကေးရှင်းမှ သင် ဘယ် အပလီကေးရှင်းများသုံးရှိကြောင့် တွေ့ရှိနိုင်ပါသည်"</string>
     <string name="permlab_manageProfileAndDeviceOwners" msgid="7918181259098220004">"ကိုယ်ရေးအချက်အလက်နှင့် စက်ပစ္စည်း ပိုင်ရှင်များကို စီမံပါ"</string>
-    <string name="permdesc_manageProfileAndDeviceOwners" msgid="106894851498657169">"ကိုယ်ရေးအချက်လက်ပိုင်ရှင်များနှင့်စက်ပစ္စည်းပိုင်ရှင်အား သတ်မှတ်ရန် App အားခွင့်ပြုပါ။"</string>
+    <string name="permdesc_manageProfileAndDeviceOwners" msgid="106894851498657169">"ကိုယ်ရေးအချက်လက်ပိုင်ရှင်များနှင့်စက်ပစ္စည်းပိုင်ရှင်အား သတ်မှတ်ရန် အက်ပ်အားခွင့်ပြုပါ။"</string>
     <string name="permlab_reorderTasks" msgid="2018575526934422779">"အလုပ်လုပ်နေကြသည့် အက်ပ်များကို ပြန်လည်စီစဉ်ခြင်း"</string>
     <string name="permdesc_reorderTasks" msgid="7734217754877439351">"အပလီကေးရှင်းအား နောက်ကွယ် နှင့် ရှေ့မှောက်တွင် လက်ရှိ လုပ်ဆောင်နေမှုများအား ဖယ်ခွင့် ပြုပါ။ သင့် ခွင့်ပြုချက်မပါပဲ လုပ်ဆောင်နိုင်ပါလိမ့်မည်"</string>
     <string name="permlab_enableCarMode" msgid="5684504058192921098">"ကားမောင်းနေစဥ်စနစ်အား ရရှိစေခြင်း"</string>
@@ -314,23 +314,23 @@
     <string name="permdesc_systemAlertWindow" msgid="8584678381972820118">"အပလီကေးရှင်းအား အခြားအပလီကေးရှင်းများ သို့ တခြား အသုံးပြုသူ မြင်ရသော နေရာများပေါ်တွင် ထပ်၍ ရေးဆွဲခွင့် ပေးသည်။ ဒီခွင့်ပြုမှုဟာ သင် အပလီကေးရှင်းများနဲ့ အသုံးပြုရန် စီစဉ်ထားမှု သို့ သင် မြင်ရသောမြင်ကွင်းအား ပြောင်းလဲမှု ဖြစ်စေနိုင်သည်"</string>
     <string name="permlab_persistentActivity" msgid="8841113627955563938">"အက်ပ်ကို အမြဲတမ်း အလုပ်လုပ်စေခြင်း"</string>
     <string name="permdesc_persistentActivity" product="tablet" msgid="8525189272329086137">"အပလီကေးရှင်းအား မှတ်ဉာဏ်ထဲတွင် ရေရှည်သိမ်းဆည်ထားရန် ခွင့်ပြုပါ။ ဒီခွင့်ပြုချက်ကြောင့် တခြားအပလီကေးရှင်းအများအတွက် မှတ်ဉာဏ်ရရှိမှု နည်းသွားနိုင်ပြီး တက်ဘလက်လည်း နှေးသွားနိုင်ပါသည်။"</string>
-    <string name="permdesc_persistentActivity" product="tv" msgid="5086862529499103587">"မှတ်ဉာဏ်တွင် ၎င်း၏အစိတ်အပိုင်းများကိုယ်တိုင် တည်မြဲနေစေရန် အက်ပ် အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် တီဗွီကို နှေးစေသော အခြား အက်ပ် များ၏ မှတ်ဉာဏ်ကို ကန့်သတ်ထားနိုင်သည်။"</string>
+    <string name="permdesc_persistentActivity" product="tv" msgid="5086862529499103587">"မှတ်ဉာဏ်တွင် ၎င်း၏အစိတ်အပိုင်းများကိုယ်တိုင် တည်မြဲနေစေရန် အက်ပ်အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် တီဗွီကို နှေးစေသော အခြား အက်ပ်များ၏ မှတ်ဉာဏ်ကို ကန့်သတ်ထားနိုင်သည်။"</string>
     <string name="permdesc_persistentActivity" product="default" msgid="4384760047508278272">"အပလီကေးရှင်းအား မှတ်ဉာဏ်ထဲတွင် ရေရှည်သိမ်းဆည်ထားရန် ခွင့်ပြုပါ။ ဒီခွင့်ပြုချက်ကြောင့် တခြားအပလီကေးရှင်းအများအတွက် မှတ်ဉာဏ်ရရှိမှု နည်းသွားနိုင်ပြီး ဖုန်းလည်း နှေးသွားနိုင်ပါသည်။"</string>
-    <string name="permlab_getPackageSize" msgid="7472921768357981986">"အက်ပ် သိုလ​ှောင်မှု နေရာကို တိုင်းထွာခြင်း"</string>
+    <string name="permlab_getPackageSize" msgid="7472921768357981986">"အက်ပ်သိုလ​ှောင်မှု နေရာကို တိုင်းထွာခြင်း"</string>
     <string name="permdesc_getPackageSize" msgid="3921068154420738296">"အက်ပ်အား ၎င်း၏ ကုဒ်၊ ဒေတာ၊ နှင့် ကက်ရှ ဆိုက်များကို ရယူခွင့် ပြုသည်။"</string>
     <string name="permlab_writeSettings" msgid="2226195290955224730">"စနစ်အပြင်အဆင်အား မွမ်းမံခြင်း"</string>
     <string name="permdesc_writeSettings" msgid="7775723441558907181">"အက်ပ်အား စနစ်၏ ဆက်တင် ဒေတာကို မွမ်းမံခွင့် ပြုသည်။ သာမန် အက်ပ်များက သင့် စနစ်၏ စီစဉ်ဖွဲ့စည်းမှုကို ဖျက်ဆီးပစ်နိုင်သည်။"</string>
     <string name="permlab_receiveBootCompleted" msgid="5312965565987800025">"အစတွင် လုပ်ဆောင်ရန်"</string>
     <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7390304664116880704">"အက်ပ်အား စနစ်၏ စတင်မှု ပြီးဆုံးသည့်နှင့် မိမိကိုမိမိ စတင်ခွင့် ပြုသည်။ သို့ဖြစ်၍ ဖုန်း စတင်မှုမှာ အချိန် ပိုကြာနိုင်ပြီး အက်ပ်က တချိန်လုံး အလုပ်လုပ်နေခြင်းကြောင့် တက်ဘလက်၏ အလုပ် တစ်ခုလုံးကို နှေးကွေးလာစေနိုင်သည်။"</string>
-    <string name="permdesc_receiveBootCompleted" product="tv" msgid="4525890122209673621">"စနစ် စတင်ပြီးသည်နှင့် တစ်ပြိုင်နက် အလိုလို အစပြုရန် အက်ပ် အားခွင့်ပြုပါ။ ထိုသို့ခွင့်ပြုခြင်းဖြင့် တီဗွီအား စရန် အချိန်ကြာစေပြီး အစဉ်အမြဲဖွင့်ထားခြင်းဖြင့် တက်ဘလက်အား နှေးသွားစေရန် အက်ပ် အား ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_receiveBootCompleted" product="tv" msgid="4525890122209673621">"စနစ် စတင်ပြီးသည်နှင့် တစ်ပြိုင်နက် အလိုလို အစပြုရန် အက်ပ်အားခွင့်ပြုပါ။ ထိုသို့ခွင့်ပြုခြင်းဖြင့် တီဗွီအား စရန် အချိန်ကြာစေပြီး အစဉ်အမြဲဖွင့်ထားခြင်းဖြင့် တက်ဘလက်အား နှေးသွားစေရန် အက်ပ်အား ခွင့်ပြုပါ။"</string>
     <string name="permdesc_receiveBootCompleted" product="default" msgid="513950589102617504">"အက်ပ်အား စနစ်၏ စတင်မှု ပြီးဆုံးသည့်နှင့် မိမိကိုမိမိ စတင်ခွင့် ပြုသည်။ သို့ဖြစ်၍ ဖုန်း စတင်မှုမှာ အချိန် ပိုကြာနိုင်ပြီး အက်ပ်က တချိန်လုံး အလုပ်လုပ်နေခြင်းကြောင့် ဖုန်း၏ အလုပ် တစ်ခုလုံးကို နှေးကွေးလာစေနိုင်သည်။"</string>
     <string name="permlab_broadcastSticky" msgid="7919126372606881614">"ကြာရှည်ခံ ထုတ်လွှတ်မှု အားပေးပို့ခြင်း"</string>
     <string name="permdesc_broadcastSticky" product="tablet" msgid="7749760494399915651">"အပလီကေးရှင်းအား ကြာရှည်ခံ ထုတ်လွှင့်မှု ပြုပါ။ ဒီထုတ်လွှင့်မှုများဟာ ထုတ်လွှင့်မှု ပြီးဆုံးပြီးသွားတည့်တိုင် ကျန်နေမည် ဖြစ်ပါသည်။ အလွန်အကျွံသုံးခြင်းကြောင့် မက်မိုရီ အသုံးများပြီး တက်ဘလက်နှေးခြင်း၊ မတည်ငြိမ်ခြင်း ဖြစ်နိုင်ပါသည်"</string>
-    <string name="permdesc_broadcastSticky" product="tv" msgid="6839285697565389467">"ထုတ်လွှင့်ခြင်းများ ပြီးဆုံးသည့်နောက် ဆက်လက်ရှိနေသည့်၊ တည်မြဲ ထုတ်လွှင့်မှုများပို့ရန် အက်ပ် အား ခွင့်ပြုပါ။ အလွန်အကျွံ လုပ်ဆောင်ပါက တီဗွီ နှေးသွားခြင်း သို့မဟုတ် မှတ်ဉာဏ်အသုံးများမှုကြောင့် မတည်မငြိမ်ဖြစ်ခြင်းများ ဖြစ်တတ်၏။"</string>
+    <string name="permdesc_broadcastSticky" product="tv" msgid="6839285697565389467">"ထုတ်လွှင့်ခြင်းများ ပြီးဆုံးသည့်နောက် ဆက်လက်ရှိနေသည့်၊ တည်မြဲ ထုတ်လွှင့်မှုများပို့ရန် အက်ပ်အား ခွင့်ပြုပါ။ အလွန်အကျွံ လုပ်ဆောင်ပါက တီဗွီ နှေးသွားခြင်း သို့မဟုတ် မှတ်ဉာဏ်အသုံးများမှုကြောင့် မတည်မငြိမ်ဖြစ်ခြင်းများ ဖြစ်တတ်၏။"</string>
     <string name="permdesc_broadcastSticky" product="default" msgid="2825803764232445091">"အပလီကေးရှင်းအား ကြာရှည်ခံ ထုတ်လွှင့်မှု ပြုပါ။ ဒီထုတ်လွှင့်မှုများဟာ ထုတ်လွှင့်မှု ပြီးဆုံးပြီးသွားတည့်တိုင် ကျန်နေမည် ဖြစ်ပါသည်။ အလွန်အကျွံသုံးခြင်းကြောင့် မှတ်ဉာဏ်အသုံးများပြီး ဖုန်းနှေးခြင်း၊ မတည်ငြိမ်ခြင်း ဖြစ်နိုင်ပါသည်"</string>
     <string name="permlab_readContacts" msgid="8348481131899886131">"အဆက်အသွယ်များအား ဖတ်ခြင်း"</string>
     <string name="permdesc_readContacts" product="tablet" msgid="5294866856941149639">"အပလီကေးရှင်းအား ခေါ်ဆိုသော အကြိမ်ရေ၊ အီးမေးလ်အကြိမ်ရေ၊ တခြားဆက်သွယ်မှုများစသည်ကဲ့သို့ သင့်တက်ဘလက်မှာ သိမ်းဆည်းထားသော အဆက်အသွယ်များရဲ့ အချက်အလက်ကို ဖတ်ခွင့်ပြုပါ။ ဤသို့ခွင့်ပြုခြင်းအားဖြင့် အပလီကေးရှင်းများကို သင့် အဆက်အသွယ်၏ အချက်မလက်များကို သိမ်းဆည်းရန် ခွင့်ပြုပြီး အန္တရာယ်ရှိသော အပလီကေးရှင်းများမှ ထိုအချက်အလက်များ ကို သင် မသိစေပဲ ဖြန့်ဝေနိုင််မည် ဖြစ်ပါသည်။"</string>
-    <string name="permdesc_readContacts" product="tv" msgid="1839238344654834087">"တစ်ဦးတစ်​ယောက်ထံ သင်ခေါ်ထားသော၊ အီးမေးိပု့ထားသော၊ သို့မဟုတ် တစ်ခြားနည်းဖြင့် အဆက်အသွယ်ပြုထားသော အကြိမ်အရေအတွက် အပါအဝင်၊ သင့်တီဗွီတွင် သိမ်းထားသည့် အဆက်အသွယ်ဆိုင်ရာ အချက်အလက်များ ဖတ်ရန် အက်ပ် အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် သင့် အဆက်အသွယ် အချက်အလက်များအား သိမ်းဆည်းရန် အက်ပ် အား ခွင့်ပြုထားခြင်းဖြစ်ပြီး၊  အဆက်အသွယ် အချက်အလက်များအား အန္တရာယ်ရှိသော အက်ပ် များက သင်မသိဘဲ ဝေမျှနိုင်သည်။"</string>
+    <string name="permdesc_readContacts" product="tv" msgid="1839238344654834087">"တစ်ဦးတစ်​ယောက်ထံ သင်ခေါ်ထားသော၊ အီးမေးိပု့ထားသော၊ သို့မဟုတ် တစ်ခြားနည်းဖြင့် အဆက်အသွယ်ပြုထားသော အကြိမ်အရေအတွက် အပါအဝင်၊ သင့်တီဗွီတွင် သိမ်းထားသည့် အဆက်အသွယ်ဆိုင်ရာ အချက်အလက်များ ဖတ်ရန် အက်ပ်အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် သင့် အဆက်အသွယ် အချက်အလက်များအား သိမ်းဆည်းရန် အက်ပ်အား ခွင့်ပြုထားခြင်းဖြစ်ပြီး၊  အဆက်အသွယ် အချက်အလက်များအား အန္တရာယ်ရှိသော အက်ပ်များက သင်မသိဘဲ ဝေမျှနိုင်သည်။"</string>
     <string name="permdesc_readContacts" product="default" msgid="8440654152457300662">"အပလီကေးရှင်းအား ခေါ်ဆိုသော အကြိမ်ရေ၊ အီးမေးလ်အကြိမ်ရေ၊ တခြားဆက်သွယ်မှုများစသည်ကဲ့သို့ သင့်ဖုန်းမှာ သိမ်းဆည်းထားသော အဆက်အသွယ်များရဲ့ အချက်အလက်ကို ဖတ်ခွင့်ပြုပါ။ ဤသို့ခွင့်ပြုခြင်းအားဖြင့် အပလီကေးရှင်းများကို သင့် အဆက်အသွယ်၏ အချက်မလက်များကို သိမ်းဆည်းရန် ခွင့်ပြုပြီး အန္တရာယ်ရှိသော အပလီကေးရှင်းများမှ ထိုအချက်အလက်များ ကို သင် မသိစေပဲ ဖြန့်ဝေနိုင််မည် ဖြစ်ပါသည်။"</string>
     <string name="permlab_writeContacts" msgid="5107492086416793544">"အဆက်အသွယ်များအား ပြင်ဆင်ခြင်း"</string>
     <string name="permdesc_writeContacts" product="tablet" msgid="897243932521953602">"အပလီကေးရှင်းအား သင့်တက်ဘလက်မှာ သိမ်းဆည်းထားသော အဆက်အသွယ်များရဲ့ အချက်အလက် (အထူးအဆက်အသွယ်များအား ခေါ်ဆိုသော အကြိမ်ရေ၊ အီးမေးလ်ပို့သောအကြိမ်ရေ သို့ အခြားနည်းလမ်းဖြင့်ဆက်သွယ်မှုများ) ကို ပြင်ဆင်ခွင့်ပြုခြင်း။ ဒီခွင့်ပြုချက်က အပလီကေးရှင်းများအား အဆက်အသွယ် အချက်အလက်များ ဖျက်စီးခြင်း လုပ်ဆောင်စေနိုင်မှာ ဖြစ်ပါသည်။"</string>
@@ -338,7 +338,7 @@
     <string name="permdesc_writeContacts" product="default" msgid="589869224625163558">"အပလီကေးရှင်းအား သင့်ဖုန်းမှာ သိမ်းဆည်းထားသော အဆက်အသွယ်များရဲ့ အချက်အလက် (အထူးအဆက်အသွယ်များအား ခေါ်ဆိုသော အကြိမ်ရေ၊ အီးမေးလ်ပို့သောအကြိမ်ရေ သို့ အခြားနည်းလမ်းဖြင့်ဆက်သွယ်မှုများ) ကို ပြင်ဆင်ခွင့်ပြုခြင်း။ ဒီခွင့်ပြုချက်က အပလီကေးရှင်းများအား အဆက်အသွယ် အချက်အလက်များ ဖျက်စီးခြင်း လုပ်ဆောင်စေနိုင်မှာ ဖြစ်ပါသည်။"</string>
     <string name="permlab_readCallLog" msgid="3478133184624102739">"ခေါ်ဆိုမှု မှတ်တမ်းအား ဖတ်ခြင်း"</string>
     <string name="permdesc_readCallLog" product="tablet" msgid="3700645184870760285">"အပလီကေးရှင်းအား တက်ဘလက်၏ အထွက် အဝင် ခေါ်ဆိုမှုများ အပါအဝင် ခေါ်ဆိုမှု မှတ်တမ်းအား ကြည့်ရှုခွင့်ပြုပါ။ အပလီကေးရှင်းအနေဖြင့် ခေါ်ဆိုမှု မှတ်တမ်းအား သိုလှောင်ခြင်း၊ မျှဝေခြင်းများကို သင် မသိရှိပဲ ပြုလုပ်နိုင်မှာ ဖြစ်ပါသည်"</string>
-    <string name="permdesc_readCallLog" product="tv" msgid="5611770887047387926">"အဝင်အထွက် ခေါ်ဆိုထားသော ဒေတာများ အပါအဝင်၊ သင့် တီဗွီ၏ ခေါ်ဆိုမှု မှတ်တမ်းအား ဖတ်ရန် အက်ပ် အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် သင့် ခေါ်ဆိုမှုမှတ်တမ်းဒေတာကို သိမ်းဆည်းရန် အက်ပ် အား ခွင့်ပြုပြီး၊ အန္တရာယ်ရှိသော အက်ပ် များက သင်အား အသိမပေးဘဲ ခေါ်ဆိုမှုမှတ်တမ်းဒေတာကို ဝေမျှနိုင်သည်။"</string>
+    <string name="permdesc_readCallLog" product="tv" msgid="5611770887047387926">"အဝင်အထွက် ခေါ်ဆိုထားသော ဒေတာများ အပါအဝင်၊ သင့် တီဗွီ၏ ခေါ်ဆိုမှု မှတ်တမ်းအား ဖတ်ရန် အက်ပ်အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် သင့် ခေါ်ဆိုမှုမှတ်တမ်းဒေတာကို သိမ်းဆည်းရန် အက်ပ်အား ခွင့်ပြုပြီး၊ အန္တရာယ်ရှိသော အက်ပ်များက သင်အား အသိမပေးဘဲ ခေါ်ဆိုမှုမှတ်တမ်းဒေတာကို ဝေမျှနိုင်သည်။"</string>
     <string name="permdesc_readCallLog" product="default" msgid="5777725796813217244">"အပလီကေးရှင်းအား ဖုန်း၏ အဝင်အထွက် ခေါ်ဆိုမှုများ အပါအဝင် ခေါ်ဆိုမှု မှတ်တမ်းအား ကြည့်ရှုခွင့်ပြုပါ။ အပလီကေးရှင်းအနေဖြင့် ခေါ်ဆိုမှု မှတ်တမ်းအား သိုလှောင်ခြင်း၊ မျှဝေခြင်းများကို သင် မသိရှိပဲ ပြုလုပ်နိုင်မှာ ဖြစ်ပါသည်။"</string>
     <string name="permlab_writeCallLog" msgid="8552045664743499354">"ခေါ်ဆိုမှုမှတ်တမ်း ရေးသားခြင်း"</string>
     <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"အပလီကေးရှင်းအား သင့်တက်ဘလက်၏ ဖုန်းခေါ်ဆိုမှု မှတ်တမ်း (အဝင်အထွက်ခေါ်ဆိုမှု အချက်အလက်များ) ကို ပြင်ဆင်ခွင့် ပေးခြင်း။ အန္တရာယ်ရှိ အပလီကေးရှင်းများမှ ဤအချက်ကို အသုံးပြု၍ သင့် ဖုန်းခေါ်ဆိုမှု မှတ်တမ်းကို ဖျက်ပစ်ခြင်း၊ ပြင်ဆင်ခြင်းများ ပြုလုပ်နိုင်ပါသည်"</string>
@@ -348,18 +348,18 @@
     <string name="permdesc_bodySensors" product="default" msgid="4380015021754180431">"သင်၏ နှလုံးခုန်နှုန်းလို ရုပ်ပိုင်း အခြေအနေကို စောင့်ကြပ်သည့် အာရုံခံစက်များထံမှ ဒေတာများကို အက်ပ်အား ရယူသုံးခွင့် ပြုပါ။"</string>
     <string name="permlab_readCalendar" msgid="5972727560257612398">"ပြက္ခဒိန်အဖြစ်အပျက်များနှင့် လှို့ဝှက်အချက်အလက်များအား ဖတ်ခြင်း"</string>
     <string name="permdesc_readCalendar" product="tablet" msgid="4216462049057658723">"အပလီကေးရှင်းအား တက်ဘလက်ထဲတွင် သိမ်းထားသော သူငယ်ချင်းနှင့် လုပ်ဖော်ကိုင်ဘက်များ၏ ပြက္ခဒိန် အဖြစ်အပျက်များအပါအဝင် အားလုံးကို ဖတ်ရှုခွင့်ပြုပါ။ ဒီခွင့်ပြုချက်ကြောင့် အပလီကေးရှင်းမှ ပြက္ခဒိန် အဖြစ်အပျက်များအား လျှို့ဝှက်မှု သို့ ဂရုပြုမှု ကို ထည့်သွင်းမစဉ်းစားပဲ သိမ်းဆည်းခြင်း၊ မျှဝေခြင်း ပြုလုပ်စေနိုင်ပါသည်"</string>
-    <string name="permdesc_readCalendar" product="tv" msgid="3191352452242394196">"သူငယ်ချင်းများ သို့မဟုတ် လုပ်ဖော်ကိုင်ဖက်များ၏ ဖြစ်ရပ်များ အပါအဝင်၊ သင့် တီဗွီတွင် သိမ်းထားသော ပြက္ခဒိန်ရှိ ဖြစ်ရပ်များအား ဖတ်ရန် အက်ပ် အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် ယုံကြည်စိတ်ချရမှု သို့မဟုတ် ထိခိုက်လွယ်မှုတို့နှင့် မသက်ဆိုင်ဘဲ၊ သင့် ပြက္ခဒိန်ရှိ ဒေတာကို ဝေမျှရန် သို့မဟုတ် သိမ်းဆည်းရန် အက်ပ် အား ခွင့်ပြုသည်။"</string>
+    <string name="permdesc_readCalendar" product="tv" msgid="3191352452242394196">"သူငယ်ချင်းများ သို့မဟုတ် လုပ်ဖော်ကိုင်ဖက်များ၏ ဖြစ်ရပ်များ အပါအဝင်၊ သင့် တီဗွီတွင် သိမ်းထားသော ပြက္ခဒိန်ရှိ ဖြစ်ရပ်များအား ဖတ်ရန် အက်ပ်အား ခွင့်ပြုပါ။ ဤနည်းဖြင့် ယုံကြည်စိတ်ချရမှု သို့မဟုတ် ထိခိုက်လွယ်မှုတို့နှင့် မသက်ဆိုင်ဘဲ၊ သင့် ပြက္ခဒိန်ရှိ ဒေတာကို ဝေမျှရန် သို့မဟုတ် သိမ်းဆည်းရန် အက်ပ်အား ခွင့်ပြုသည်။"</string>
     <string name="permdesc_readCalendar" product="default" msgid="7434548682470851583">"အပလီကေးရှင်းအားဖုန်းထဲတွင် သိမ်းထားသော သူငယ်ချင်းနှင့် လုပ်ဖော်ကိုင်ဘက်များ၏ ပြက္ခဒိန် အဖြစ်အပျက်များအပါအဝင် အားလုံးကို ဖတ်ရှုခွင့်ပြုပါ။ ဒီခွင့်ပြုချက်ကြောင့် အပလီကေးရှင်းမှ ပြက္ခဒိန် အဖြစ်အပျက်များအား လျှို့ဝှက်မှု သို့ ဂရုပြုမှု ကို ထည့်သွင်းမစဉ်းစားပဲ သိမ်းဆည်းခြင်း၊ မျှဝေခြင်း ပြုလုပ်စေနိုင်ပါသည်"</string>
     <string name="permlab_writeCalendar" msgid="8438874755193825647">"ပြက္ခဒိန်အဖြစ်အပျက်များကို ထပ်ထည့်ရန် သို့မဟုတ် မွမ်းမံရန်နှင့် ပိုင်ရှင်၏အသိမပေးပဲ ဧည့်သည်များထံ အီးမေးလ်ပို့ရန်"</string>
     <string name="permdesc_writeCalendar" product="tablet" msgid="6679035520113668528">"အပလီကေးရှင်းအား သင်၏ တက်ဘလက်တွင် သူငယ်ချင်း အလုပ်ဖော်များ အပါအဝင် သင်၏ ပြောင်းလဲအဖြစ်အပျက်များအား ထည့်ခြင်း၊ ထုတ်ခြင်းအား ခွင့်ပြုရန်။ ဤခွင့်ပြုချက်သည် အပလီကေးရှင်းအား သတင်းများပို့ခြင်းကို ပြက္ခဒိန်ပိုင်ရှင်ဆီမှ လာသလို အနေဖြင့် ပေးပို့ခြင်း သို့မဟုတ် အဖြစ်အပျက်များကို ပိုင်ရှင်မသိပဲ ပြင်ဆင်နိုင်ပါသည်။"</string>
-    <string name="permdesc_writeCalendar" product="tv" msgid="1273290605500902507">"သင့် သူငယ်ချင်းများ သို့မဟုတ် လုပ်ဖော်ကိုင်ဖက်များ၏ လှုပ်ရှားမှုများ အပါအဝင်၊ သင့်တီဗွီရှိ လှုပ်ရှားမှုများကို ထပ်ထည့်ရန်၊ ဖယ်ထုတ်ရန်၊ ပြောင်းလဲရန် အက်ပ် အား ခွင့်ပြုပါ။ ဤသို့ပြုပါက ပြက္ခဒိန် ပိုင်ရှင်ဆီမှ စာတိုများ လာသကဲ့သို့ စာများပို့ရန်၊ သို့မဟုတ် ပိုင်ရှင်၏ ခွင့်ပြုချက်မရှိဘဲ လှုပ်ရှားမှုများကို ပြင်ဆင်ရန် အက်ပ် အား ခွင့်ပြုထားခြင်း ဖြစ်၏။"</string>
+    <string name="permdesc_writeCalendar" product="tv" msgid="1273290605500902507">"သင့် သူငယ်ချင်းများ သို့မဟုတ် လုပ်ဖော်ကိုင်ဖက်များ၏ လှုပ်ရှားမှုများ အပါအဝင်၊ သင့်တီဗွီရှိ လှုပ်ရှားမှုများကို ထပ်ထည့်ရန်၊ ဖယ်ထုတ်ရန်၊ ပြောင်းလဲရန် အက်ပ်အား ခွင့်ပြုပါ။ ဤသို့ပြုပါက ပြက္ခဒိန် ပိုင်ရှင်ဆီမှ စာတိုများ လာသကဲ့သို့ စာများပို့ရန်၊ သို့မဟုတ် ပိုင်ရှင်၏ ခွင့်ပြုချက်မရှိဘဲ လှုပ်ရှားမှုများကို ပြင်ဆင်ရန် အက်ပ်အား ခွင့်ပြုထားခြင်း ဖြစ်၏။"</string>
     <string name="permdesc_writeCalendar" product="default" msgid="2324469496327249376">"အပလီကေးရှင်းအား သင်၏ ဖုန်းတွင် သူငယ်ချင်း အလုပ်ဖော်များ အပါအဝင် သင်၏ ပြောင်းလဲအဖြစ်အပျက်များအား ထည့်ခြင်း၊ ထုတ်ခြင်းအား ခွင့်ပြုရန်။ ဤခွင့်ပြုချက်သည် အပလီကေးရှင်းအား သတင်းများပို့ခြင်းကို ပြက္ခဒိန်ပိုင်ရှင်ဆီမှ လာသလို အနေဖြင့် ပေးပို့ခြင်း သို့မဟုတ် အဖြစ်အပျက်များကို ပိုင်ရှင်မသိပဲ ပြင်ဆင်နိုင်ပါသည်။"</string>
     <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"တည်နေရာပံ့ပိုးမှုညွှန်ကြားချက်အပိုအား ဝင်ရောက်ကြည့်ခြင်း"</string>
     <string name="permdesc_accessLocationExtraCommands" msgid="6078307221056649927">"အက်ပ်အား တည်နေရာ စီမံပေးရေး ညွှန်ကြားချက် အပိုများကို ရယူခွင့်ပြုသည်။ သို့ဖြစ်၍ အက်ပ်သည် GPS သို့မဟုတ် အခြား တည်နေရာ ရင်းမြစ်ကို သုံးကြသူတို့၏ လုပ်ငန်းများကို ဝင်စွက်ခွင့် ပြုနိုင်သည်။"</string>
     <string name="permlab_accessFineLocation" msgid="251034415460950944">"တိကျတဲ့ တည်နေရာ (GPS နှင့် ကွန်ရက် အခြေခံ)ကို ရယူသုံးရန်"</string>
     <string name="permdesc_accessFineLocation" msgid="5295047563564981250">"အပလီကေးရှင်းမှ သင့်ရဲ့ တိကျသောနေရာကို ဂျီပီအက်စ် သို့ ဆယ်လူလာတာဝါတိုင်၊ Wi-Fi  အချက်အလက်များ သုံးပြီး ရှာခြင်း ခွင့်ယူပါ။ နေရာပြ ဆားဗစ်များ စက်ပေါ်မှာ ရှိရမှာ ဖြစ်သလို ဖွင့်ထားရမှာလည်း ဖြစ်ပါသည်။ အပလီကေးရှင်းမှ ဒီဆားဗစ်များကို သုံး၍ ရှာဖွေသောကြောင့် ဘက်ထရီ ပိုကုန်နိုင်ပါသည်။"</string>
     <string name="permlab_accessCoarseLocation" msgid="7715277613928539434">"အနီးစပ်ဆုံး တည်နေရာ (ကွန်ရက် အခြေခံ)ကို ရယူသုံးရန်"</string>
-    <string name="permdesc_accessCoarseLocation" msgid="2538200184373302295">"သင့်ရဲ့ ပျမ်းမျတည်နေရာကို အက်ပ် အား သိခွင့် ပြုရန်။ ဒီ တည်နေရာကို တည်နေရာရှာဖွေရေး ဆားဗစ်မှ မိုဘိုင်း တာဝါတိုင်၊ Wi-Fi  စသည်တို့မှ တဆင့် ရယူပါသည်။  အက်ပ် အနေဖြင့် ဒီ ဆားဗစ်များ ရှိနေရန် လိုအပ်ပါသည်။ ဒီအရာများကို အသုံးပြု၍ သင့်နေရာကို သိနိုင်ပါသည်။"</string>
+    <string name="permdesc_accessCoarseLocation" msgid="2538200184373302295">"သင့်ရဲ့ ပျမ်းမျတည်နေရာကို အက်ပ်အား သိခွင့် ပြုရန်။ ဒီ တည်နေရာကို တည်နေရာရှာဖွေရေး ဆားဗစ်မှ မိုဘိုင်း တာဝါတိုင်၊ Wi-Fi  စသည်တို့မှ တဆင့် ရယူပါသည်။  အက်ပ်အနေဖြင့် ဒီ ဆားဗစ်များ ရှိနေရန် လိုအပ်ပါသည်။ ဒီအရာများကို အသုံးပြု၍ သင့်နေရာကို သိနိုင်ပါသည်။"</string>
     <string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"သင့်အသံအပြင်အဆင်အားပြောင်းခြင်း"</string>
     <string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"အပလီကေးရှင်းအား အသံအတိုးအကျယ်နှင့် အထွက်ကို မည်သည့်စပီကာကို သုံးရန်စသည်ဖြင့် စက်တစ်ခုလုံးနှင့်ဆိုင်သော အသံဆိုင်ရာ ဆက်တင်များ ပြင်ဆင်ခွင့် ပြုရန်"</string>
     <string name="permlab_recordAudio" msgid="3876049771427466323">"အသံဖမ်းခြင်း"</string>
@@ -380,11 +380,11 @@
     <string name="permlab_wakeLock" product="tv" msgid="2601193288949154131">"တီဗွီအား နားနေခြင်းမှ ကာကွယ်ရန်"</string>
     <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"ဖုန်းအနားယူခြင်းမပြုလုပ်စေရန်"</string>
     <string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"အက်ပ်အား တက်ဘလက်ကို အနားမယူနိုင်အောင် ဟန့်တားခွင့် ပြုသည်။"</string>
-    <string name="permdesc_wakeLock" product="tv" msgid="3208534859208996974">"တီဗွီ ရပ်နားသွားခြင်းအား ကာကွယ်ရန် အက်ပ် အား ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_wakeLock" product="tv" msgid="3208534859208996974">"တီဗွီ ရပ်နားသွားခြင်းအား ကာကွယ်ရန် အက်ပ်အား ခွင့်ပြုပါ။"</string>
     <string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"အက်ပ်အား ဖုန်းကို အနားမယူနိုင်အောင် ဟန့်တားခွင့် ပြုသည်။"</string>
     <string name="permlab_transmitIr" msgid="7545858504238530105">"အနီအောက်ရောင်ခြည် ထုတ်လွှတ်ခြင်း"</string>
     <string name="permdesc_transmitIr" product="tablet" msgid="5358308854306529170">"အပလီကေးရှင်းအား တက်ဘလက်ရဲ့ အနီအောက်ရောင်ခြည် ထုတ်လွှတ်ခြင်းအား သုံးခွင့်ပေးခြင်း"</string>
-    <string name="permdesc_transmitIr" product="tv" msgid="3926790828514867101">"တီဗွီ၏ အင်ဖရာရက် ထုတ်လွှတ်မှုအား အသုံးပြုရန် အက်ပ် အား ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_transmitIr" product="tv" msgid="3926790828514867101">"တီဗွီ၏ အင်ဖရာရက် ထုတ်လွှတ်မှုအား အသုံးပြုရန် အက်ပ်အား ခွင့်ပြုပါ။"</string>
     <string name="permdesc_transmitIr" product="default" msgid="7957763745020300725">"အပလီကေးရှင်းအား ဖုန်းရဲ့ အနီအောက်ရောင်ခြည် ထုတ်လွှတ်ခြင်းအား သုံးခွင့်ပေးခြင်း"</string>
     <string name="permlab_setWallpaper" msgid="6627192333373465143">"နောက်ခံအား သတ်မှတ်ရန်"</string>
     <string name="permdesc_setWallpaper" msgid="7373447920977624745">"အက်ပ်အား စနစ် နောက်ခံပုံကို သတ်မှတ်ခွင့် ပြုသည်။"</string>
@@ -392,11 +392,11 @@
     <string name="permdesc_setWallpaperHints" msgid="8235784384223730091">"အက်ပ်အား စနစ် နောက်ခံပုံ ဆိုက်ဆိုင်ရာ ညွှန်းချက်များကို သတ်မှတ်ခွင့် ပြုသည်။"</string>
     <string name="permlab_setTimeZone" msgid="2945079801013077340">"အချိန်ဇုန်းအား သတ်မှတ်ခြင်း"</string>
     <string name="permdesc_setTimeZone" product="tablet" msgid="1676983712315827645">"အက်ပ်အား တက်ဘလက်၏ နာရီ ဇုန်ကို ပြောင်းလဲခွင့် ပြုသည်။"</string>
-    <string name="permdesc_setTimeZone" product="tv" msgid="888864653946175955">"တီဗွီ၏ အချိန်အပိုင်းအခြားဇုန်အား ပြင်ဆင်ရန် အက်ပ် အား ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_setTimeZone" product="tv" msgid="888864653946175955">"တီဗွီ၏ အချိန်အပိုင်းအခြားဇုန်အား ပြင်ဆင်ရန် အက်ပ်အား ခွင့်ပြုပါ။"</string>
     <string name="permdesc_setTimeZone" product="default" msgid="4499943488436633398">"အက်ပ်အား ဖုန်း၏ နာရီ ဇုန်ကို ပြောင်းလဲခွင့် ပြုသည်။"</string>
     <string name="permlab_getAccounts" msgid="1086795467760122114">"စက်ပေါ်မှာ အကောင့်များ ရှာဖွေခြင်း"</string>
     <string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"အပလီကေးရှင်းအား တက်ဘလက်မှ သိရှိထားသော အကောင့်များအား ရယူခွင့်ပေးပါ။ ဒီထဲတွင် သင် ထည့်သွင်းထားသော အပလီကေးရှင်းများမှတဆင့် ပြုလုပ်ထားသော အကောင့်များပါ ပါဝင်နိုင်ပါသည်။"</string>
-    <string name="permdesc_getAccounts" product="tv" msgid="4190633395633907543">"တီဗွီ သိသော အကောင့်စာရင်းအား ရယူခွင့်ကို အက်ပ် အား ခွင့်ပြုပါ။ သင်ထည့်သွင်းထားသည့် အပလီကေးရှင်းများမှ ဖန်တီးထားသော မည်သည့်အကောင့်မဆို ပါဝင်မည်။"</string>
+    <string name="permdesc_getAccounts" product="tv" msgid="4190633395633907543">"တီဗွီ သိသော အကောင့်စာရင်းအား ရယူခွင့်ကို အက်ပ်အား ခွင့်ပြုပါ။ သင်ထည့်သွင်းထားသည့် အပလီကေးရှင်းများမှ ဖန်တီးထားသော မည်သည့်အကောင့်မဆို ပါဝင်မည်။"</string>
     <string name="permdesc_getAccounts" product="default" msgid="3448316822451807382">"အပလီကေးရှင်းအား ဖုန်းမှ သိရှိထားသော အကောင့်စာရင်းများအား ရယူခွင့်ပေးပါ။ ဒီထဲတွင် သင် ထည့်သွင်းထားသော အပလီကေးရှင်းများမှတဆင့် ပြုလုပ်ထားသော အကောင့်များပါ ပါဝင်နိုင်ပါသည်။"</string>
     <string name="permlab_accessNetworkState" msgid="4951027964348974773">"ကွန်ရက် ချိတ်ဆက်မှုများအား ကြည့်ရန်"</string>
     <string name="permdesc_accessNetworkState" msgid="8318964424675960975">"အပလီကေးရှင်းအား မည်သည့်ကွန်ရက်နက်ဝဘ်ရှိသလဲ၊ မည်သည့်ကွန်ရက်နှင့် ချိတ်ဆက်ထားလဲ စသည်ဖြင့် ကွန်ရက်ချိတ်ဆက်မှုများ၏ သတင်းအချက်အလက်များကို ကြည့်ခွင့်ပေးရန်"</string>
@@ -412,21 +412,21 @@
     <string name="permdesc_changeWifiState" msgid="7137950297386127533">"အပလီကေးရှင်းအား ဝိုင်ဖိုင်တည်နေရာများအား ဆက်သွယ်ခြင်း၊ ဆက်သွယ်မှု ရပ်ဆိုင်းခြင်း၊ ဝိုင်ဖိုင်ကွန်ရက်အတွက် စက်အပြင်အဆင်များ ပြုလုပ်ခြင်း ခွင့်ပြုပါ"</string>
     <string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"Wi-Fi Multicastလက်ခံခြင်းကိုခွင့်ပြုရန်"</string>
     <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="7969774021256336548">"အပလီကေးရှင်းအား ဝိုင်ဖိုင်ကွန်ရက်ပေါ်တွင် သင့်တက်ဘလက်တစ်ခုထဲအားမဟုတ်ပဲ multicast လိပ်စာအား သုံးပြီး လွှင့်ထုတ်သော အချက်အလက်များ လက်ခံခွင့် ပြုပါ။ ဒီလိုသုံးခြင်းမှာ  non-multicast ထက် ဘက်ထရီ ပိုကုန်ပါသည်။"</string>
-    <string name="permdesc_changeWifiMulticastState" product="tv" msgid="9031975661145014160">"သင့် တီဗွီနှင့်သာ မဟုတ်ဘဲ၊ ကွန်ယက်လိပ်စာများစွာ သုံးသော ဝိုင်ဖိုင်ကွန်ယက်ရှိ စက်ကိရိယာအားလုံးသို့ ပို့သော ပက်ကက်များအား လက်ခံရရှိရန် အက်ပ် အားခွင့်ပြုပါ။ ၎င်းသည် ကွန်ယက်လိပ်စာများစွာမသုံးသောမုဒ်ထက် စွမ်းအားပိုသုံး၏။"</string>
+    <string name="permdesc_changeWifiMulticastState" product="tv" msgid="9031975661145014160">"သင့် တီဗွီနှင့်သာ မဟုတ်ဘဲ၊ ကွန်ယက်လိပ်စာများစွာ သုံးသော ဝိုင်ဖိုင်ကွန်ယက်ရှိ စက်ကိရိယာအားလုံးသို့ ပို့သော ပက်ကက်များအား လက်ခံရရှိရန် အက်ပ်အားခွင့်ပြုပါ။ ၎င်းသည် ကွန်ယက်လိပ်စာများစွာမသုံးသောမုဒ်ထက် စွမ်းအားပိုသုံး၏။"</string>
     <string name="permdesc_changeWifiMulticastState" product="default" msgid="6851949706025349926">"အပလီကေးရှင်းအား ဝိုင်ဖိုင်နက်ဘ်ပေါ်တွင် သင့်ဖုန်းတစ်ခုထဲအားမဟုတ်ပဲ multicast လိပ်စာအား သုံးပြီး လွှင့်ထုတ်သော အချက်အလက်များ လက်ခံခွင့် ပြုပါ။ ဒီလိုသုံးခြင်းမှာ non-multicast ထက် ဘက်ထရီ ပိုကုန်ပါသည်။"</string>
     <string name="permlab_bluetoothAdmin" msgid="6006967373935926659">"ဘလူးတုသ် ဆက်တင်များအား သုံးခွင့်ပေးရန်"</string>
     <string name="permdesc_bluetoothAdmin" product="tablet" msgid="6921177471748882137">"အက်ပ်အား ဒေသန္တရ ဘလူးတုသ် တက်ဘလက်ကို စီစဉ်ဖွဲ့စည်းခွင့်ကို၎င်း၊ အဝေးထိန်း ကိရိယာများကို ရှာကြံလျက် ချိတ်တွဲခွင့်ကို၎င်း ပေးထားသည်။"</string>
-    <string name="permdesc_bluetoothAdmin" product="tv" msgid="3373125682645601429">"ကွန်ယက်တွင်းရှိ ဘလူးတုသ် တီဗွီအား ပုံစံပြင်ရန်နှင့်၊ အဝေးရှိ စက်ကိရိယာများအား ရှာဖွေတွဲဖက်ရန် အက်ပ် အား ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_bluetoothAdmin" product="tv" msgid="3373125682645601429">"ကွန်ယက်တွင်းရှိ ဘလူးတုသ် တီဗွီအား ပုံစံပြင်ရန်နှင့်၊ အဝေးရှိ စက်ကိရိယာများအား ရှာဖွေတွဲဖက်ရန် အက်ပ်အား ခွင့်ပြုပါ။"</string>
     <string name="permdesc_bluetoothAdmin" product="default" msgid="8931682159331542137">"အက်ပ်အား ဒေသန္တရ ဘလူးတုသ် ဖုန်းကို စီစဉ်ဖွဲ့စည်းခွင့်ကို၎င်း၊ အဝေးထိန်း ကိရိယာများကို ရှာကြံလျက် ချိတ်တွဲခွင့်ကို၎င်း ပေးထားသည်။"</string>
     <string name="permlab_accessWimaxState" msgid="4195907010610205703">"ဝိုင်မက်စ် နှင့် ချိတ်ဆက်ရန်နှင့် ဆက်သွယ်မှု ဖြတ်တောက်ရန်"</string>
     <string name="permdesc_accessWimaxState" msgid="6360102877261978887">"အပလီကေးရှင်းအား ဝိုင်မက်စ် အခြေအနေ ကြည့်ခွင့်ပေးရန် ဥပမာ ဝိုင်မက်စ် ဖွင့်ထား မထား၊ ဝိုင်မက်စ် ချိတ်ဆက်ထားသော ကွန်ရက်အခြေအနေ"</string>
     <string name="permlab_changeWimaxState" msgid="340465839241528618">"WiMAX အခြေအနေကို ပြောင်းရန် ပြင်ရန်"</string>
     <string name="permdesc_changeWimaxState" product="tablet" msgid="3156456504084201805">"အပလီကေးရှင်းအား တက်ဘလက်ကို ဝိုင်မက်စ် ကွန်ရက်များနဲ့ ဆက်သွယ်ခြင်း၊ ဆက်သွယ်မှု ရပ်ဆိုင်းခြင်းများ လုပ်ခွင့်ပြုပါ"</string>
-    <string name="permdesc_changeWimaxState" product="tv" msgid="6022307083934827718">"တီဗွီနှင့် ချိတ်ဆက်ရန် အက်ပ် အား ခွင့်ပြုပြီး တီဗွီနှင့် WiMAX ကွန်ယက်များ ချိတ်ဆက်ထားမှုအား ဖြတ်တောက်ပါ။"</string>
+    <string name="permdesc_changeWimaxState" product="tv" msgid="6022307083934827718">"တီဗွီနှင့် ချိတ်ဆက်ရန် အက်ပ်အား ခွင့်ပြုပြီး တီဗွီနှင့် WiMAX ကွန်ယက်များ ချိတ်ဆက်ထားမှုအား ဖြတ်တောက်ပါ။"</string>
     <string name="permdesc_changeWimaxState" product="default" msgid="697025043004923798">"အပလီကေးရှင်းအား ဖုန်းကို ဝိုင်မက်စ် ကွန်ရက်များနဲ့ ဆက်သွယ်ခြင်း၊ ဆက်သွယ်မှု ရပ်ဆိုင်းခြင်းများ လုပ်ခွင့်ပြုပါ"</string>
     <string name="permlab_bluetooth" msgid="6127769336339276828">"ဘလူးတုသ် စက်များနှင့် အတူတွဲချိတ်ရန်"</string>
     <string name="permdesc_bluetooth" product="tablet" msgid="3480722181852438628">"အပလီကေးရှင်းအား တက်ဘလက်ပေါ်မှ ဘလူးတုသ် အပြင်အဆင်အား ကြည့်ခွင့်၊ တခြားစက်များနဲ့ ဆက်သွယ်ခြင်း၊ ဆက်သွယ်ခြင်းကို လက်ခံခွင့်ပြုပါ။"</string>
-    <string name="permdesc_bluetooth" product="tv" msgid="3974124940101104206">"တီဗွီတွင် ဘလူးတုသ်အတွက် ပုံစံပြင်ခြင်းများ ဝင်ကြည့်ရန်နှင့်၊ တွဲဖက်ထားသည့် စက်ကိရိယာများအား ချိတ်ဆက်မှုပြုရန်နှင့်လက်ခံရန် အက်ပ် အား ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_bluetooth" product="tv" msgid="3974124940101104206">"တီဗွီတွင် ဘလူးတုသ်အတွက် ပုံစံပြင်ခြင်းများ ဝင်ကြည့်ရန်နှင့်၊ တွဲဖက်ထားသည့် စက်ကိရိယာများအား ချိတ်ဆက်မှုပြုရန်နှင့်လက်ခံရန် အက်ပ်အား ခွင့်ပြုပါ။"</string>
     <string name="permdesc_bluetooth" product="default" msgid="3207106324452312739">"အပလီကေးရှင်းအား ဖုန်းမှဘလူးတု အပြင်အဆင်အား ကြည့်ခွင့်၊ တခြားစက်များနဲ့ ဆက်သွယ်ခြင်း၊ ဆက်သွယ်ခြင်းကို လက်ခံခွင့်ပြုပါ။"</string>
     <string name="permlab_nfc" msgid="4423351274757876953">"Near Field Communicationအား ထိန်းချုပ်ရန်"</string>
     <string name="permdesc_nfc" msgid="7120611819401789907">"အက်ပ်အား တာတို စက်ကွင်း ဆက်သွယ်ရေး (NFC) တဲဂ်များ၊ ကဒ်များ နှင့် ဖတ်ကြသူတို့နှင့် ဆက်သွယ်ပြောဆိုခွင့် ပြုသည်။"</string>
@@ -454,9 +454,9 @@
   </string-array>
     <string name="fingerprint_icon_content_description" msgid="2340202869968465936">"လက်ဗွေ အိုင်ကွန်"</string>
     <string name="permlab_readSyncSettings" msgid="6201810008230503052">"ထပ်တူပြုအဆင်အပြင်အားဖတ်ခြင်း"</string>
-    <string name="permdesc_readSyncSettings" msgid="2706745674569678644">"အပလီကေးရှင်းအား အကောင့်တစ်ခုအတွက် ထပ်တူညီအောင် လုပ်ဆောင်မှု ဆက်တင်အား ကြည့်ခွင့် ပြုပါ။ ဥပမာ People အက်ပ် က အကောင့်တစ်ခုနဲ့ ထပ်တူညီအောင် လုပ်ရန် ဆက်သွယ်ထားမှု ရှိမရှိ သိရှိနိုင်ခြင်း"</string>
+    <string name="permdesc_readSyncSettings" msgid="2706745674569678644">"အပလီကေးရှင်းအား အကောင့်တစ်ခုအတွက် ထပ်တူညီအောင် လုပ်ဆောင်မှု ဆက်တင်အား ကြည့်ခွင့် ပြုပါ။ ဥပမာ People အက်ပ်က အကောင့်တစ်ခုနဲ့ ထပ်တူညီအောင် လုပ်ရန် ဆက်သွယ်ထားမှု ရှိမရှိ သိရှိနိုင်ခြင်း"</string>
     <string name="permlab_writeSyncSettings" msgid="5408694875793945314">"ထပ်တူညီအောင် လုပ်ခြင်းအား ပြုနိုင်၊ မပြုနိုင် အပြောင်းအလဲလုပ်ခြင်း"</string>
-    <string name="permdesc_writeSyncSettings" msgid="8956262591306369868">"အကောင့်တစ်ခုအတွက် ထပ်တူညီအောင်လုပ်သော ဆက်တင်များကို ပြင်ရန် အက်ပ်ကို ခွင့်ပြုရန်။ ဥပမာ People အက်ပ် က အကောင့်တစ်ခုနှင့် ထပ်တူညီအောင် လုပ်ဆောင်ခြင်းအား ဖွင့်ရန် သုံးနိုင်သည်။"</string>
+    <string name="permdesc_writeSyncSettings" msgid="8956262591306369868">"အကောင့်တစ်ခုအတွက် ထပ်တူညီအောင်လုပ်သော ဆက်တင်များကို ပြင်ရန် အက်ပ်ကို ခွင့်ပြုရန်။ ဥပမာ People အက်ပ်က အကောင့်တစ်ခုနှင့် ထပ်တူညီအောင် လုပ်ဆောင်ခြင်းအား ဖွင့်ရန် သုံးနိုင်သည်။"</string>
     <string name="permlab_readSyncStats" msgid="7396577451360202448">"ထပ်တူကူးခြင်း ကိန်းဂဏန်းအချက်အလက်များကို ဖတ်ခြင်း"</string>
     <string name="permdesc_readSyncStats" msgid="1510143761757606156">"အပလီကေးရှင်းအား အကောင့်တစ်ခု၏ ထပ်တူညီအောင် လုပ်ဆောင်မှု အခြေအနေ (ပြီးခဲ့သော အဖြစ်အပျက်၊ ဒေတာ ပမာဏ ပါဝင်မှု များအပါအဝင်)ကို ဖတ်ရှုခွင့် ပြုပါ။"</string>
     <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"USB သိုလှောင်မှုမှ အချက်အလက်များအား ဖတ်ခြင်း"</string>
@@ -468,7 +468,7 @@
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"အက်ပ်အား USB သိုလှောင်ခန်းသို့ ရေးခွင့် ပြုသည်။"</string>
     <string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"အက်ပ်အား SD ကဒ်သို့ ရေးခွင့် ပြုသည်။"</string>
     <string name="permlab_use_sip" msgid="2052499390128979920">"SIP ခေါ်ဆိုမှုများ ခေါ်ရန်/လက်ခံရန်"</string>
-    <string name="permdesc_use_sip" msgid="2297804849860225257">"SIP ခေါ်ဆိုမှုများ ခေါ်ရန်နှင့် လက်ခံနိုင်ရန် အက်ပ် ကို ခွင့်ပြုပါ။"</string>
+    <string name="permdesc_use_sip" msgid="2297804849860225257">"SIP ခေါ်ဆိုမှုများ ခေါ်ရန်နှင့် လက်ခံနိုင်ရန် အက်ပ်ကို ခွင့်ပြုပါ။"</string>
     <string name="permlab_register_sim_subscription" msgid="3166535485877549177">"တယ်လီကွမ် ဆင်းမ် ချိတ်ဆက်မှုများကို မှတ်ပုံတင်ပါ"</string>
     <string name="permdesc_register_sim_subscription" msgid="2138909035926222911">"အက်ပ်အား တယ်လီကွမ် ဆင်းမ် ချိတ်ဆက်မှုကို မှတ်ပုံတင်ခွင့် ပြုသည်။"</string>
     <string name="permlab_register_call_provider" msgid="108102120289029841">"တယ်လီကွမ် တယ်လီကွမ် ချိတ်ဆက်မှု အသစ်များကို မှတ်ပုံတင်ပါ"</string>
@@ -498,19 +498,19 @@
     <string name="permlab_invokeCarrierSetup" msgid="3699600833975117478">"မိုဘိုင်းဆက်သွယ်ရေးဝန်ဆောင်မှုဌာန မှ ထည့်သွင်းပေးသော အခြေအနေများအား ပယ်ဖျက်ခြင်း"</string>
     <string name="permdesc_invokeCarrierSetup" msgid="4159549152529111920">"ကိုင်ဆောင်သူအားမိုဘိုင်းဆက်သွယ်ရေးဝန်ဆောင်မှုဌာနမှ ထည့်သွင်းထားတဲ့ အပြင်အဆင်အား ပယ်ဖျက်ခွင့် ပေးခြင်း။ ပုံမှန် အပလီကေးရှင်းများမှာ မလိုပါ"</string>
     <string name="permlab_accessNetworkConditions" msgid="8206077447838909516">"ကွန်ယက်အခြေအနေအား လေ့လာနေမှုအား နားထောင်ခွင့်"</string>
-    <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"အက်ပ်ကို နက်ဝေါ့ ပေါ်က အခြေအနေကို သတိထားခွင့် ပေးခြင်း၊. ပုံမှန် အက်ပ် များတွင် မလိုအပ်ပါ"</string>
+    <string name="permdesc_accessNetworkConditions" msgid="6899102075825272211">"အက်ပ်ကို နက်ဝေါ့ ပေါ်က အခြေအနေကို သတိထားခွင့် ပေးခြင်း၊. ပုံမှန် အက်ပ်များတွင် မလိုအပ်ပါ"</string>
     <string name="permlab_setInputCalibration" msgid="4902620118878467615">"change ထည့်သွင်းရေး ကိရိယာ တိုင်းထွာညှိနှိုင်းမှု ပြောင်းလဲခြင်း"</string>
     <string name="permdesc_setInputCalibration" msgid="4527511047549456929">"အက်ပ်အား တို့ထိရေး မျက်နှာပြင် တိုင်းထွာစံညှိမှုကို မွမ်းမံခွင့် ပြုသည်။ သာမန် အက်ပ်များ  ဘယ်တော့မှ မလိုအပ်နိုင်ပါ။"</string>
     <string name="permlab_accessDrmCertificates" msgid="7436886640723203615">"DRM လက်မှတ်များကို ရယူသုံးခြင်း"</string>
-    <string name="permdesc_accessDrmCertificates" msgid="8073288354426159089">"အက်ပ် တစ်ခုအား စီမံလုပ်ကိုင်ခွင့် DRM လက်မှတ်များ သုံးခွင့် ပြုသည်။ သာမန် အက်ပ်များ အတွက် ဘယ်တော့မှ မလိုအပ်နိုင်ပါ။"</string>
+    <string name="permdesc_accessDrmCertificates" msgid="8073288354426159089">"အက်ပ်တစ်ခုအား စီမံလုပ်ကိုင်ခွင့် DRM လက်မှတ်များ သုံးခွင့် ပြုသည်။ သာမန် အက်ပ်များ အတွက် ဘယ်တော့မှ မလိုအပ်နိုင်ပါ။"</string>
     <string name="permlab_handoverStatus" msgid="7820353257219300883">"Android ရဲ့ အလင်းတန်းထိုး လွှဲပြောင်းမှု အခြေအနေကို ရယူရန်"</string>
     <string name="permdesc_handoverStatus" msgid="4788144087245714948">"ဒီအပလီကေးရှင်းအား အန်ဒရွိုက်၏ လက်ရှိ အလင်းတန်းထိုး လွှဲပြောင်းမှု အကြောင်း အချက်အလက်ကို ရယူခွင့် ပြုသည်"</string>
     <string name="permlab_removeDrmCertificates" msgid="7044888287209892751">"DRM လက်မှတ်များ ဖယ်ရှားရန်"</string>
     <string name="permdesc_removeDrmCertificates" msgid="7272999075113400993">"အပလီကေးရှင်းအား DRM လက်မှတ်များကို ဖယ်ရှားခွင့် ပြုသည်။  သာမန် အက်ပ်များ အတွက် ဘယ်တော့မှ မလိုအပ်နိုင်ပါ။"</string>
     <string name="permlab_bindCarrierMessagingService" msgid="1490229371796969158">"စာပို့စာယူ ဆက်သွယ်ရေးဝန်ဆောင်မှုတစ်ခုအား ပူးပေါင်းခွင့်ပြုရန်"</string>
-    <string name="permdesc_bindCarrierMessagingService" msgid="2762882888502113944">"စာပို့စာယူဆက်သွယ်ရေးဝန်ဆောင်မှုတစ်ခု၏ ထိပ်ဆုံးရှိအင်တာဖေ့စ်ဖြင့် ပူးပေါင်းရန် ပိုင်ရှင်အားခွင့်ပြုပါ။ ပုံမှန် အက်ပ် များအတွက် မလိုအပ်ပါ။"</string>
+    <string name="permdesc_bindCarrierMessagingService" msgid="2762882888502113944">"စာပို့စာယူဆက်သွယ်ရေးဝန်ဆောင်မှုတစ်ခု၏ ထိပ်ဆုံးရှိအင်တာဖေ့စ်ဖြင့် ပူးပေါင်းရန် ပိုင်ရှင်အားခွင့်ပြုပါ။ ပုံမှန် အက်ပ်များအတွက် မလိုအပ်ပါ။"</string>
     <string name="permlab_bindCarrierServices" msgid="3233108656245526783">"မိုဘိုင်းဖုန်းဝန်ဆောင်မှုပေးသူများနှင့် ပူးပေါင်းခွင့်ပြုရန်"</string>
-    <string name="permdesc_bindCarrierServices" msgid="1391552602551084192">"မိုဘိုင်းဖုန်းဝန်ဆောင်မှုစနစ်တစ်ခုအား ပူးပေါင်းခွင့်ပြုရန် ကိုင်ဆောင်ထားသူအား ခွင့်ပြုပါ။ သာမန် အက်ပ် များ အတွက် မည်သည့်အခါမျှ မလိုအပ်ပါ။"</string>
+    <string name="permdesc_bindCarrierServices" msgid="1391552602551084192">"မိုဘိုင်းဖုန်းဝန်ဆောင်မှုစနစ်တစ်ခုအား ပူးပေါင်းခွင့်ပြုရန် ကိုင်ဆောင်ထားသူအား ခွင့်ပြုပါ။ သာမန် အက်ပ်များ အတွက် မည်သည့်အခါမျှ မလိုအပ်ပါ။"</string>
     <string name="permlab_access_notification_policy" msgid="4247510821662059671">"မနှောင့်ယှက်ရန်ကို အသုံးပြုမည်"</string>
     <string name="permdesc_access_notification_policy" msgid="3296832375218749580">"မနှောင့်ယှက်ရန် ချိန်ညှိမှုကို အပ်ဖ်များ ဖတ်ခြင်း ပြင်ခြင်းပြုလုပ်နိုင်ရန် ခွင့်ပြုမည်။"</string>
     <string name="policylab_limitPassword" msgid="4497420728857585791">"စကားဝှက်စည်းမျဥ်းကိုသတ်မှတ်ရန်"</string>
@@ -657,7 +657,7 @@
     <string name="sipAddressTypeHome" msgid="6093598181069359295">"ပင်မစာမျက်နှာ"</string>
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"အလုပ်အကိုင်"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"တခြား"</string>
-    <string name="quick_contacts_not_available" msgid="746098007828579688">"ဒီအဆက်အသွယ်အား ကြည့်ရှုရန်  အက်ပ် မတွေ့ပါ"</string>
+    <string name="quick_contacts_not_available" msgid="746098007828579688">"ဒီအဆက်အသွယ်အား ကြည့်ရှုရန်  အက်ပ်မတွေ့ပါ"</string>
     <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN ကုဒ် ရိုက်ထည့်ပါ"</string>
     <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"PUK နှင့် PIN ကုဒ် အသစ်ကို ရိုက်ထည့်ပါ"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="1341112146710087048">"PUK နံပါတ်"</string>
@@ -761,7 +761,7 @@
     <string name="granularity_label_link" msgid="5815508880782488267">"အ​ခြား​စာ​မျက်​နှာ​သို့​ကွင်း​ဆက်"</string>
     <string name="granularity_label_line" msgid="5764267235026120888">"စာကြောင်း"</string>
     <string name="factorytest_failed" msgid="5410270329114212041">"စက်ရုံစမ်းသပ်ခြင်းမအောင်မြင်ပါ"</string>
-    <string name="factorytest_not_system" msgid="4435201656767276723">"စက်ရုံစမ်းသပ်မှုမှာ စနစ်/အပ်ပလီကေးရှင်း ထည့်သွင်းထားသောpackageများကိုသာ ပံ့ပိုးမှုပေးသည်။."</string>
+    <string name="factorytest_not_system" msgid="4435201656767276723">"စက်ရုံစမ်းသပ်မှုမှာ စနစ်/အက်ပ်ထည့်သွင်းထားသောpackageများကိုသာ ပံ့ပိုးမှုပေးသည်။."</string>
     <string name="factorytest_no_action" msgid="872991874799998561">"စက်ရုံစမ်းသပ်မှုအားလုပ်ဆောင်ရန် မည်သည့်packageမှ မတွေ့ပါ။"</string>
     <string name="factorytest_reboot" msgid="6320168203050791643">"လုပ်ငန်းစနစ်ထည့်သွင်းပြီး ပြန်လည်စတင်ရန်"</string>
     <string name="js_dialog_title" msgid="1987483977834603872">"ဒီ \"<xliff:g id="TITLE">%s</xliff:g>\" က စာမျက်နှာက ပြောဆိုတာက:"</string>
@@ -794,10 +794,10 @@
     <string name="permdesc_readHistoryBookmarks" msgid="8462378226600439658">"အပလီကေးရှင်းအား ဘရောင်ဇာမှ ယခင် သွားရောက်ထားသော URLများ၊ နေရာ အမှတ်အသားများအား ကြည့်ရှုခွင့်ပြုပါ။ မှတ်ချက်။ ဒီခွင့်ပြုချက်ကို တတိယပါတီ ဘရောင်ဇာများ နှင့် တခြား အပလီကေးရှင်းများမှ လုပ်ဆောင်မည် မဟုတ်ပါ။"</string>
     <string name="permlab_writeHistoryBookmarks" msgid="3714785165273314490">"သင့်ရဲ့ ဝဘ် အမှတ်နေရာများနှင့် သွားလာသော မှတ်တမ်း ရေးခြင်း"</string>
     <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="6825527469145760922">"အပလီကေးရှင်းအား ဘရောင်ဇာမှ မှတ်တမ်း သို့ မှတ်သားမှု အမှတ်များအား ပြင်ဆင်ခွင့် ပေးခြင်း။ အပလီကေးရှင်းမှ ဘရောင်ဇာ မှတ်တမ်းများကို ဖျက်ပစ်ခွင့် သို့ ပြင်ဆင်ခွင့် ရှိပါမည်။ မှတ်ချက်။ ဤခွင့်ပြုချက်ကို တတိယပါတီ ဘရောင်ဇာများ၊ တခြား အပလီကေးရှင်းများမှ သုံးမည် မဟုတ်ပါ။"</string>
-    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="7007393823197766548">"ဘရောင်ဇာ၏မှတ်တမ်း သို့မဟုတ် တီဗွီတွင်သိမ်းထားသည့် မှတ်သားချက်များအား ပြင်ဆင်ရန် အက်ပ် အား ခွင့်ပြုပါ။ ဤသို့ပြုခြင်းသည် ဘရောင်ဇာ၏ အချက်အလက်များအား ဖျက်ပစ်ရန် သို့မဟုတ် ပြင်ဆင်ရန် အက်ပ် အား ခွင့်ပြုထားခြင်းဖြစ်၏။ မှတ်ချက်၊ ဤသို့ခွင့်ပြုခြင်းသည် ပြင်ပဘရောင်ဇာများ သို့မဟုတ် ဝဘ်အား ကြည့်ရှုနိုင်သည့် တစ်ခြားသော အပလီကေးရှင်းများအား သက်ရောက်မှုရှိမည် မဟုတ်ပါ။"</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="7007393823197766548">"ဘရောင်ဇာ၏မှတ်တမ်း သို့မဟုတ် တီဗွီတွင်သိမ်းထားသည့် မှတ်သားချက်များအား ပြင်ဆင်ရန် အက်ပ်အား ခွင့်ပြုပါ။ ဤသို့ပြုခြင်းသည် ဘရောင်ဇာ၏ အချက်အလက်များအား ဖျက်ပစ်ရန် သို့မဟုတ် ပြင်ဆင်ရန် အက်ပ်အား ခွင့်ပြုထားခြင်းဖြစ်၏။ မှတ်ချက်၊ ဤသို့ခွင့်ပြုခြင်းသည် ပြင်ပဘရောင်ဇာများ သို့မဟုတ် ဝဘ်အား ကြည့်ရှုနိုင်သည့် တစ်ခြားသော အပလီကေးရှင်းများအား သက်ရောက်မှုရှိမည် မဟုတ်ပါ။"</string>
     <string name="permdesc_writeHistoryBookmarks" product="default" msgid="8497389531014185509">"အပလီကေးရှင်းအား ဘရောင်ဇာမှ မှတ်တမ်း သို့ မှတ်သားမှု အမှတ်များအား ပြင်ဆင်ခွင့် ပေးခြင်း။ အပလီကေးရှင်းမှ ဘရောင်ဇာ မှတ်တမ်းများကို ဖျက်ပစ်ခွင့် သို့ ပြင်ဆင်ခွင့် ရှိပါမည်။ မှတ်ချက်။ ဒီခွင့်ပြုချက်ကို တတိယပါတီ ဘရောင်ဇာများ၊ တခြား အပလီကေးရှင်းများမှ သုံးမည် မဟုတ်ပါ။"</string>
     <string name="permlab_setAlarm" msgid="1379294556362091814">"နှိုးစက်သတ်မှတ်ရန်"</string>
-    <string name="permdesc_setAlarm" msgid="316392039157473848">"အက်ပ်အား တပ်ဆင်ထားသည့် နှိုးစက်နာရီ အက်ပ် ထဲတွင် နှိုးစက်ကို သတ်မှတ်ခွင့် ပြုသည်။ အချို့ နှိုးစက် အက်ပ်များက ထိုအင်္ဂါရပ်ကို ပြီးမြောက်အောင် မလုပ်နိုင်ကြပါ။"</string>
+    <string name="permdesc_setAlarm" msgid="316392039157473848">"အက်ပ်အား တပ်ဆင်ထားသည့် နှိုးစက်နာရီ အက်ပ်ထဲတွင် နှိုးစက်ကို သတ်မှတ်ခွင့် ပြုသည်။ အချို့ နှိုးစက် အက်ပ်များက ထိုအင်္ဂါရပ်ကို ပြီးမြောက်အောင် မလုပ်နိုင်ကြပါ။"</string>
     <string name="permlab_addVoicemail" msgid="5525660026090959044">"အသံစာပို့စနစ်အားထည့်ရန်"</string>
     <string name="permdesc_addVoicemail" msgid="6604508651428252437">"အက်ပ်အား သင့် အသံမေးလ် ဝင်စာသို့ စာများကို ထည့်ခွင့် ပြုသည်။"</string>
     <string name="permlab_writeGeolocationPermissions" msgid="5962224158955273932">"ဘရောင်ဇာ ဘူမိဇုန်သတ်မှတ်မှု ခွင့်ပြုချက်များကို မွမ်းမံခြင်း"</string>
@@ -956,9 +956,9 @@
     <string name="app_running_notification_title" msgid="8718335121060787914">"<xliff:g id="APP_NAME">%1$s</xliff:g> က အလုပ်လုပ်နေသည်။"</string>
     <string name="app_running_notification_text" msgid="1197581823314971177">"နောက်ထပ်အချက်အလက်များကို ကြည့်ရန် သို့မဟုတ် အက်ပ်ကိုရပ်တန့်ရန် တို့ပါ။"</string>
     <string name="ok" msgid="5970060430562524910">"အိုကေ"</string>
-    <string name="cancel" msgid="6442560571259935130">"မလုပ်တော့ပါ"</string>
+    <string name="cancel" msgid="6442560571259935130">"မလုပ်တော့"</string>
     <string name="yes" msgid="5362982303337969312">"အိုကေ"</string>
-    <string name="no" msgid="5141531044935541497">"မလုပ်တော့ပါ"</string>
+    <string name="no" msgid="5141531044935541497">"မလုပ်တော့"</string>
     <string name="dialog_alert_title" msgid="2049658708609043103">"သတိပြုရန်"</string>
     <string name="loading" msgid="7933681260296021180">"တင်နေ…"</string>
     <string name="capital_on" msgid="1544682755514494298">"ဖွင့်ရန်"</string>
@@ -986,9 +986,9 @@
     <string name="whichImageCaptureApplicationLabel" msgid="6390303445371527066">"ဓာတ်ပုံရိုက်ပါ"</string>
     <string name="alwaysUse" msgid="4583018368000610438">"ဤလှုပ်ရှားမှုအတွက် မူရင်းအတိုင်း အသုံးပြုပါ။"</string>
     <string name="use_a_different_app" msgid="8134926230585710243">"အခြား အက်ပ်ကို သုံးပါ"</string>
-    <string name="clearDefaultHintMsg" msgid="3252584689512077257">"စနစ် ဆက်တင် ထဲမှာ ပုံသေကို ရှင်းလိုက်ပါ &gt; Appများ &gt; ဒေါင်းလုဒ် လုပ်ပြီး။"</string>
+    <string name="clearDefaultHintMsg" msgid="3252584689512077257">"စနစ် ဆက်တင် ထဲမှာ ပုံသေကို ရှင်းလိုက်ပါ &gt; အက်ပ်များ &gt; ဒေါင်းလုဒ် လုပ်ပြီး။"</string>
     <string name="chooseActivity" msgid="7486876147751803333">"လုပ်စရာ တစ်ခု ရွေးချယ်ပါ"</string>
-    <string name="chooseUsbActivity" msgid="6894748416073583509">"USB ကိရိယာ အတွက် အက်ပ် တစ်ခု ရွေးပါ"</string>
+    <string name="chooseUsbActivity" msgid="6894748416073583509">"USB ကိရိယာ အတွက် အက်ပ်တစ်ခု ရွေးပါ"</string>
     <string name="noApplications" msgid="2991814273936504689">"ဘယ် အက်ပ်ကမှ ဒီ လုပ်ဆောင်ချက်ကို မလုပ်ကိုင်နိုင်ပါ။"</string>
     <string name="aerr_application" msgid="250320989337856518">"<xliff:g id="APPLICATION">%1$s</xliff:g> ရပ်သွားပါပြီ"</string>
     <string name="aerr_process" msgid="6201597323218674729">"<xliff:g id="PROCESS">%1$s</xliff:g> ရပ်တန့်သွားပါပြီ"</string>
@@ -1009,7 +1009,7 @@
     <string name="report" msgid="4060218260984795706">"သတင်းပို့ပါ"</string>
     <string name="wait" msgid="7147118217226317732">"စောင့်ဆိုင်းရန်"</string>
     <string name="webpage_unresponsive" msgid="3272758351138122503">"စာမျက်နှာမှာ ပြန်လည် တုံ့ပြန်မှု မရှိတော့ပါ။\n\nပိတ်လိုက်ချင်ပါသလား?"</string>
-    <string name="launch_warning_title" msgid="1547997780506713581">"App ပြန်ညွှန်းခဲ့"</string>
+    <string name="launch_warning_title" msgid="1547997780506713581">"အက်ပ်ပြန်ညွှန်းခဲ့"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> သည် ယခုအလုပ်လုပ်နေသည်"</string>
     <string name="launch_warning_original" msgid="188102023021668683">"မူလ <xliff:g id="APP_NAME">%1$s</xliff:g> တွင် ထုတ်လွင့်သည်"</string>
     <string name="screen_compat_mode_scale" msgid="3202955667675944499">"စကေး"</string>
@@ -1031,11 +1031,11 @@
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> က အလုပ်လုပ်နေသည်"</string>
     <string name="heavy_weight_notification_detail" msgid="867643381388543170">"အက်ပ်သို့ပြောင်းရန် တို့ပါ"</string>
     <string name="heavy_weight_switcher_title" msgid="7153167085403298169">"အက်ပ်များကို ပြောင်းမလား?"</string>
-    <string name="heavy_weight_switcher_text" msgid="7022631924534406403">"အခြား အက်ပ် တစ်ခု အလုပ်လုပ်နေ၍ သင်က အသစ် တစ်ခုကို မစမီ ၎င်းကို ရပ်ပစ်ရမည်။"</string>
+    <string name="heavy_weight_switcher_text" msgid="7022631924534406403">"အခြား အက်ပ်တစ်ခု အလုပ်လုပ်နေ၍ သင်က အသစ် တစ်ခုကို မစမီ ၎င်းကို ရပ်ပစ်ရမည်။"</string>
     <string name="old_app_action" msgid="493129172238566282">"<xliff:g id="OLD_APP">%1$s</xliff:g>သို့ပြန်သွားရန်"</string>
     <string name="old_app_description" msgid="2082094275580358049">"pp အသစ်ကို မစတင်ပါနှင့်။"</string>
     <string name="new_app_action" msgid="5472756926945440706">"<xliff:g id="OLD_APP">%1$s</xliff:g>စတင်ပါ"</string>
-    <string name="new_app_description" msgid="1932143598371537340">"အက်ပ် အဟောင်းကို မသိမ်းဆည်းဘဲ ရပ်လိုက်ပါ။"</string>
+    <string name="new_app_description" msgid="1932143598371537340">"အက်ပ်အဟောင်းကို မသိမ်းဆည်းဘဲ ရပ်လိုက်ပါ။"</string>
     <string name="dump_heap_notification" msgid="2618183274836056542">"<xliff:g id="PROC">%1$s</xliff:g> သိမ်းထားနိုင်မှု အကန့်အသတ် ကျော်လွန်နေ"</string>
     <string name="dump_heap_notification_detail" msgid="6901391084243999274">"သိမ်းဆည်းနိုင်မှု ပမာဏကျော်လွန်သွားပါပြီ။ မျှဝေရန် တို့ပါ"</string>
     <string name="dump_heap_title" msgid="5864292264307651673">"အရေးပေါ် သိမ်းထားပေးမှု ကို မျှဝေမလား။"</string>
@@ -1104,7 +1104,7 @@
     <string name="sms_short_code_details" msgid="5873295990846059400"><b>"ဒါက သင့် မိုဘိုင်း အကောင့် အတွက် "</b>" ကုန်ကျမှု ရှိလာနိုင်သည်။"</string>
     <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"ဒါက သင့် မိုဘိုင်း အကောင့် အတွက် ကုန်ကျမှု ရှိလာနိုင်သည်။"</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"ပို့ရန်"</string>
-    <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"မလုပ်တော့ပါ"</string>
+    <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"မလုပ်တော့"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ကျွန်ပ်၏ရွေးချယ်မှုကို မှတ်ထားရန်"</string>
     <string name="sms_short_code_remember_undo_instruction" msgid="4960944133052287484">"နောင်တွင် ဆက်တင် &gt; အပလီကေးရှင်းများ မှပြောင်းနိုင်သည်"</string>
     <string name="sms_short_code_confirm_always_allow" msgid="3241181154869493368">"အမြဲခွင့်ပြုရန်"</string>
@@ -1206,7 +1206,7 @@
     <string name="ime_action_default" msgid="2840921885558045721">"လုပ်ဆောင်ချက်"</string>
     <string name="dial_number_using" msgid="5789176425167573586">\n"အား အသုံးပြု၍ <xliff:g id="NUMBER">%s</xliff:g>နံပါတ်ခေါ်ဆိုပါ"</string>
     <string name="create_contact_using" msgid="4947405226788104538">\n"အား အသုံးပြု၍<xliff:g id="NUMBER">%s</xliff:g>ဆက်သွယ်မည့်သူများအား ဖန်တီးခြင်း"</string>
-    <string name="grant_credentials_permission_message_header" msgid="2106103817937859662">"အောက်ပါထဲက အက်ပ် တစ်ခု သို့မဟုတ် ပိုလျက် သင်၏ အကောင့်ကို၊ ယခု နှင့် အနာဂတ်မှာ ရယူအသုံးချရန် ခွင့်ပြုချက်ကို တောင်းထားသည်။"</string>
+    <string name="grant_credentials_permission_message_header" msgid="2106103817937859662">"အောက်ပါထဲက အက်ပ်တစ်ခု သို့မဟုတ် ပိုလျက် သင်၏ အကောင့်ကို၊ ယခု နှင့် အနာဂတ်မှာ ရယူအသုံးချရန် ခွင့်ပြုချက်ကို တောင်းထားသည်။"</string>
     <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"ဤတောင်းခံမှုအားခွင့်ပြုမည်လား"</string>
     <string name="grant_permissions_header_text" msgid="6874497408201826708">"သုံးစွဲခွင့် တောင်းဆိုရန်"</string>
     <string name="allow" msgid="7225948811296386551">"ခွင့်ပြုသည်"</string>
@@ -1260,7 +1260,7 @@
     <string name="gpsNotifTicker" msgid="5622683912616496172">"<xliff:g id="NAME">%s</xliff:g>မှ တည်နေရာအား တောင်းခံသည်"</string>
     <string name="gpsNotifTitle" msgid="5446858717157416839">"တည်နေရာအား တောင်းခံသည်"</string>
     <string name="gpsNotifMessage" msgid="1374718023224000702">"<xliff:g id="NAME">%1$s</xliff:g> (<xliff:g id="SERVICE">%2$s</xliff:g>)မှတောင်းခံသည်"</string>
-    <string name="gpsVerifYes" msgid="2346566072867213563">"ဟုတ်ကဲ့"</string>
+    <string name="gpsVerifYes" msgid="2346566072867213563">"Yes"</string>
     <string name="gpsVerifNo" msgid="1146564937346454865">"No"</string>
     <string name="sync_too_many_deletes" msgid="5296321850662746890">"ပယ်ဖျက်မည့်ကန့်သတ်နှုန်းကျော်လွန်သည်"</string>
     <string name="sync_too_many_deletes_desc" msgid="496551671008694245">"<xliff:g id="TYPE_OF_SYNC">%2$s</xliff:g>၊  account <xliff:g id="ACCOUNT_NAME">%3$s</xliff:g> အတွက် စုစုပေါင်း <xliff:g id="NUMBER_OF_DELETED_ITEMS">%1$d</xliff:g> အရာဖျက်ထားပါသည်။ သင်ဘာလုပ်ချင်ပါလဲ?"</string>
@@ -1289,13 +1289,13 @@
     <string name="date_picker_prev_month_button" msgid="2858244643992056505">"ပြီးခဲ့သော လ"</string>
     <string name="date_picker_next_month_button" msgid="5559507736887605055">"လာမည့် လ"</string>
     <string name="keyboardview_keycode_alt" msgid="4856868820040051939">"Altခလုတ်"</string>
-    <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"မလုပ်တော့ပါ ခလုတ်"</string>
+    <string name="keyboardview_keycode_cancel" msgid="1203984017245783244">"မလုပ်တော့ ခလုတ်"</string>
     <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"ဖျက်ရန်ခလုတ်"</string>
     <string name="keyboardview_keycode_done" msgid="1992571118466679775">"ပြီးဆုံးသည့်ခလုတ်"</string>
     <string name="keyboardview_keycode_mode_change" msgid="4547387741906537519">"စနစ်ပြောင်းခြင်းခလုတ်"</string>
     <string name="keyboardview_keycode_shift" msgid="2270748814315147690">"Shiftခလုတ်"</string>
     <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enterခလုတ်"</string>
-    <string name="activitychooserview_choose_application" msgid="2125168057199941199">"အက်ပ် တစ်ခုကို ရွေးရန်"</string>
+    <string name="activitychooserview_choose_application" msgid="2125168057199941199">"အက်ပ်တစ်ခုကို ရွေးရန်"</string>
     <string name="activitychooserview_choose_application_error" msgid="8624618365481126668">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> ကို စတင်လို့ မရပါ"</string>
     <string name="shareactionprovider_share_with" msgid="806688056141131819">"မျှဝေဖို့ ရွေးပါ"</string>
     <string name="shareactionprovider_share_with_application" msgid="5627411384638389738">"<xliff:g id="APPLICATION_NAME">%s</xliff:g>နှင့် မျှဝေပါမည်"</string>
@@ -1344,7 +1344,7 @@
     <string name="sha256_fingerprint" msgid="4391271286477279263">"SHA-256 လက်ပွေ"</string>
     <string name="sha1_fingerprint" msgid="7930330235269404581">"SHA-1 လက်ပွေ"</string>
     <string name="activity_chooser_view_see_all" msgid="4292569383976636200">"အားလုံးကို ကြည့်ရန်"</string>
-    <string name="activity_chooser_view_dialog_title_default" msgid="4710013864974040615">"လှုပ်ရှားမှုကို ရွေးရန်"</string>
+    <string name="activity_chooser_view_dialog_title_default" msgid="4710013864974040615">"လုပ်ဆောင်ချက်ကို ရွေးရန်"</string>
     <string name="share_action_provider_share_with" msgid="5247684435979149216">"...နှင့် မျှဝေရန်"</string>
     <string name="sending" msgid="3245653681008218030">"ပေးပို့နေစဉ်…"</string>
     <string name="launchBrowserDefault" msgid="2057951947297614725">"ဘရောက်ဇာ ဖွင့်မည်လား။"</string>
@@ -1427,7 +1427,7 @@
     <string name="owner_name" msgid="2716755460376028154">"ပိုင်ရှင်"</string>
     <string name="error_message_title" msgid="4510373083082500195">"အမှား"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"ဒီအပြောင်းအလဲမျိုးကို သင့် စီမံအုပ်ချုပ်သူမှ ခွင့်မပြုပါ"</string>
-    <string name="app_not_found" msgid="3429141853498927379">"ဤလုပ်ဆောင်ချက်ကို ပြုလုပ်ပေးမည့် အက်ပ် မရှိပါ။"</string>
+    <string name="app_not_found" msgid="3429141853498927379">"ဤလုပ်ဆောင်ချက်ကို ပြုလုပ်ပေးမည့် အက်ပ်မရှိပါ။"</string>
     <string name="revoke" msgid="5404479185228271586">"မလုပ်တော့ပါ"</string>
     <string name="mediasize_iso_a0" msgid="1994474252931294172">"အိုက်အက်စ်အို အေ ဝ"</string>
     <string name="mediasize_iso_a1" msgid="3333060421529791786">"အိုက်အက်စ်အို အေ၁"</string>
@@ -1545,7 +1545,7 @@
     <string name="deleted_key" msgid="7659477886625566590">"<xliff:g id="KEY">%1$s</xliff:g> ကို ဖျက်ပြီးပါပြီ"</string>
     <string name="managed_profile_label_badge" msgid="2355652472854327647">"အလုပ် <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_toast" msgid="1420543809500606964">"ဤမျက်နှာပြင်ကို ပင်ဖြုတ်ရန် \"နောက်သို့\" ကိုထိပြီးဖိထားပါ။"</string>
-    <string name="lock_to_app_toast_locked" msgid="9125176335701699164">"Appကို ပင်ထိုးထားသည်။ ပင်ဖျက်ခြင်းကို ဒီစက်မှာ မရနိုင်ပါ။"</string>
+    <string name="lock_to_app_toast_locked" msgid="9125176335701699164">"အက်ပ်ကို ပင်ထိုးထားသည်။ ပင်ဖျက်ခြင်းကို ဒီစက်မှာ မရနိုင်ပါ။"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"မျက်နှာပြင်ကို ပင်ထိုးထား"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"မျက်နှာပြင် ပင်ထိုးမှု ဖြတ်လိုက်ပြီ"</string>
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"ပင်မဖြုတ်မီမှာ PIN ကို မေးကြည့်ရန်"</string>
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ဖြုတ်ပါ"</string>
     <string name="app_info" msgid="6856026610594615344">"အက်ပ်အချက်အလက်"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"စက်ပစ္စည်းကို ပြန်လည်သတ်မှတ်မလား။"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"စက်ပစ္စည်းကို ပြန်လည်သတ်မှတ်ရန် တို့ပါ"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"သရုပ်ပြချက်ကို စတင်နေသည်…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"စက်ပစ္စည်းကို ပြန်လည်သတ်မှတ်နေသည်…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"စက်ပစ္စည်းကို ပြန်လည်သတ်မှတ်မလား။"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ပြောင်းလဲမှုများကို ဆုံးရှုံးသွားမည်ဖြစ်ပြီး သရုပ်ပြချက်သည် <xliff:g id="TIMEOUT">%1$s</xliff:g> စက္ကန့်အတွင်း ပြန်လည်စတင်ပါမည်…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"မလုပ်တော့"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ယခုပြန်လည်သတ်မှတ်ပါ"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ဤစက်ပစ္စည်းကို ကန့်သတ်ချက်များမပါဘဲ အသုံးပြုရန် စက်ရုံထုတ်ဆက်တင်အတိုင်း ပြန်လည်သတ်မှတ်ပါ"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"ပိုမိုလေ့လာရန် တို့ပါ။"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"ပိတ်ထားသည့် <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"လူအမြောက်အများတပြိုင်နက် ခေါ်ဆိုမှု"</string>
 </resources>
diff --git a/core/res/res/values-nb-watch/styles_material.xml b/core/res/res/values-nb-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-nb-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index d17d69e..b53d86c 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Løsne"</string>
     <string name="app_info" msgid="6856026610594615344">"Info om appen"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Tilbakestille enheten?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Trykk for å tilbakestille enheten"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Starter demo …"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Tilbakestiller enheten …"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Tilbakestille enheten?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Du mister eventuelle endringer, og demoen starter på nytt om <xliff:g id="TIMEOUT">%1$s</xliff:g> sekunder."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Avbryt"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Tilbakestill nå"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Tilbakestill til fabrikkstandard for å bruke denne enheten uten begrensninger"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Trykk for å finne ut mer."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> er slått av"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferansesamtale"</string>
 </resources>
diff --git a/core/res/res/values-ne-rNP-watch/styles_material.xml b/core/res/res/values-ne-rNP-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ne-rNP-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 138c67f..8f382968 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -1657,7 +1657,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"अनपिन गर्नुहोस्"</string>
     <string name="app_info" msgid="6856026610594615344">"अनुप्रयोगका बारे जानकारी"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"यन्त्रलाई रिसेट गर्ने हो?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"यन्त्रलाई रिसेट गर्न ट्याप गर्नुहोस्"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"डेमो सुरु गर्दै…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"यन्त्रलाई रिसेट गर्दै…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"यन्त्रलाई रिसेट गर्ने हो?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"तपाईँ सबै परिवर्तनहरू गुमाउनु हुनेछ र <xliff:g id="TIMEOUT">%1$s</xliff:g> सेकेन्डमा डेमो फेरि सुरु हुनेछ…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"रद्द गर्नुहोस्"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"अहिले रिसेट गर्नुहोस्"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"यस यन्त्रलाई सीमितताहरू बिना प्रयोग गर्नका लागि फ्याक्ट्री रिसेट गर्नुहोस्"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"थप जान्नका लागि छुनुहोस्।"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> लाई असक्षम गरियो"</string>
+    <string name="conference_call" msgid="3751093130790472426">"सम्मेलन कल"</string>
 </resources>
diff --git a/core/res/res/values-nl-watch/styles_material.xml b/core/res/res/values-nl-watch/styles_material.xml
new file mode 100644
index 0000000..b821347
--- /dev/null
+++ b/core/res/res/values-nl-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"kandidaten"</font></string>
+</resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index c8a804b..d43d6c6 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Losmaken"</string>
     <string name="app_info" msgid="6856026610594615344">"App-info"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Apparaat resetten?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tik om apparaat te resetten"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo starten…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Apparaat resetten…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Apparaat resetten?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Je wijzigingen gaan verloren. De demo wordt opnieuw gestart over <xliff:g id="TIMEOUT">%1$s</xliff:g> seconden…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Annuleren"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Nu resetten"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Zet dit apparaat terug op de fabrieksinstellingen om het zonder beperkingen te gebruiken"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Tik voor meer informatie."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> uitgeschakeld"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Telefonische vergadering"</string>
 </resources>
diff --git a/core/res/res/values-watch/dimens.xml b/core/res/res/values-notround-watch/dimens.xml
similarity index 100%
rename from core/res/res/values-watch/dimens.xml
rename to core/res/res/values-notround-watch/dimens.xml
diff --git a/packages/SystemUI/res/layout/night_mode_settings.xml b/core/res/res/values-notround-watch/dimens_material.xml
similarity index 65%
copy from packages/SystemUI/res/layout/night_mode_settings.xml
copy to core/res/res/values-notround-watch/dimens_material.xml
index 3725e78..b02437b 100644
--- a/packages/SystemUI/res/layout/night_mode_settings.xml
+++ b/core/res/res/values-notround-watch/dimens_material.xml
@@ -13,12 +13,11 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
+<resources>
+    <dimen name="dialog_padding_material">8dp</dimen>
+    <dimen name="preference_fragment_padding_vertical_material">0dp</dimen>
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <include layout="@layout/switch_bar" />
-
-</LinearLayout>
+    <dimen name="list_item_padding_horizontal_material">16dp</dimen>
+    <dimen name="list_item_padding_start_material">16dp</dimen>
+    <dimen name="list_item_padding_end_material">16dp</dimen>
+</resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-notround-watch/styles_material.xml
similarity index 72%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-notround-watch/styles_material.xml
index 9e13001..cd8521f4 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-notround-watch/styles_material.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,5 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <style name="TextAppearance.Material.AlertDialogMessage" parent="TextAppearance.Material.Body1"/>
 </resources>
diff --git a/core/res/res/values-pa-rIN-watch/styles_material.xml b/core/res/res/values-pa-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-pa-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-pa-rIN/strings.xml b/core/res/res/values-pa-rIN/strings.xml
index a4e5b89..bea0682 100644
--- a/core/res/res/values-pa-rIN/strings.xml
+++ b/core/res/res/values-pa-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ਅਨਪਿੰਨ ਕਰੋ"</string>
     <string name="app_info" msgid="6856026610594615344">"ਐਪ ਜਾਣਕਾਰੀ"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"ਕੀ ਡੀਵਾਈਸ ਮੁੜ-ਸੈੱਟ ਕਰਨੀ ਹੈ?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"ਡੀਵਾਈਸ ਮੁੜ-ਸੈੱਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ਡੈਮੋ ਚਾਲੂ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"ਡੀਵਾਈਸ ਮੁੜ-ਸੈੱਟ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"ਕੀ ਡੀਵਾਈਸ ਮੁੜ-ਸੈੱਟ ਕਰਨੀ ਹੈ?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ਤੁਸੀਂ ਕਿਸੇ ਵੀ ਤਬਦੀਲੀਆਂ ਨੂੰ ਗੁਆ ਬੈਠੋਂਗੇ ਅਤੇ ਡੈਮੋ <xliff:g id="TIMEOUT">%1$s</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਚਾਲੂ ਕੀਤਾ ਜਾਵੇਗਾ…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"ਰੱਦ ਕਰੋ"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ਹੁਣੇ ਮੁੜ-ਸੈੱਟ ਕਰੋ"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ਇਸ ਡੀਵਾਈਸ ਨੂੰ ਬਿਨਾਂ ਪਾਬੰਦੀਆਂ ਦੇ ਵਰਤਣ ਲਈ ਫੈਕਟਰੀ ਰੀਸੈੱਟ ਕਰੋ"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"ਹੋਰ ਜਾਣਨ ਲਈ ਸਪਰਸ਼ ਕਰੋ।"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"ਕਾਨਫਰੰਸ ਕਾਲ"</string>
 </resources>
diff --git a/core/res/res/values-pl-watch/styles_material.xml b/core/res/res/values-pl-watch/styles_material.xml
new file mode 100644
index 0000000..384d91c
--- /dev/null
+++ b/core/res/res/values-pl-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"elementy"</font></string>
+</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index ade4bdc..cff4fe40 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Odepnij"</string>
     <string name="app_info" msgid="6856026610594615344">"O aplikacji"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Zresetować urządzenie?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Kliknij, by zresetować urządzenie"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Uruchamiam tryb demo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Resetuję urządzenie…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Zresetować urządzenie?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Stracisz wszystkie wprowadzone zmiany, a tryb demo uruchomi się ponownie za <xliff:g id="TIMEOUT">%1$s</xliff:g> s…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Anuluj"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Resetuj teraz"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Aby używać tego urządzenia bez ograniczeń, przywróć ustawienia fabryczne"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Kliknij, by dowiedzieć się więcej."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Wyłączono: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Połączenie konferencyjne"</string>
 </resources>
diff --git a/core/res/res/values-pt-rBR-watch/styles_material.xml b/core/res/res/values-pt-rBR-watch/styles_material.xml
new file mode 100644
index 0000000..898d2fd
--- /dev/null
+++ b/core/res/res/values-pt-rBR-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidatos"</font></string>
+</resources>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index c05931e..f5b2389 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Liberar guia"</string>
     <string name="app_info" msgid="6856026610594615344">"Informações do app"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Redefinir dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Toque para redefinir o dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Iniciando demonstração…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Redefinindo dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Redefinir dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Você perderá todas as alterações. A demonstração será iniciada novamente em <xliff:g id="TIMEOUT">%1$s</xliff:g> segundos…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancelar"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Reiniciar agora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Redefinir para a configuração original para usar este dispositivo sem restrições"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toque para saber mais."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Widget <xliff:g id="LABEL">%1$s</xliff:g> desativado"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Teleconferência"</string>
 </resources>
diff --git a/core/res/res/values-pt-rPT-watch/styles_material.xml b/core/res/res/values-pt-rPT-watch/styles_material.xml
new file mode 100644
index 0000000..898d2fd
--- /dev/null
+++ b/core/res/res/values-pt-rPT-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidatos"</font></string>
+</resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 398193e..3079a61 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Soltar"</string>
     <string name="app_info" msgid="6856026610594615344">"Informações da aplicação"</string>
     <string name="negative_duration" msgid="5688706061127375131">"-<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Pretende repor o dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Toque para repor o dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"A iniciar a demonstração…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"A repor o dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Pretende repor o dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Perderá todas as alterações e a demonstração começará novamente dentro de <xliff:g id="TIMEOUT">%1$s</xliff:g> segundos…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancelar"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Repor agora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Repor os dados de fábrica para utilizar o dispositivo sem restrições"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toque para saber mais."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> desativado"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conferência"</string>
 </resources>
diff --git a/core/res/res/values-pt-watch/styles_material.xml b/core/res/res/values-pt-watch/styles_material.xml
new file mode 100644
index 0000000..898d2fd
--- /dev/null
+++ b/core/res/res/values-pt-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidatos"</font></string>
+</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index c05931e..f5b2389 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Liberar guia"</string>
     <string name="app_info" msgid="6856026610594615344">"Informações do app"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Redefinir dispositivo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Toque para redefinir o dispositivo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Iniciando demonstração…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Redefinindo dispositivo…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Redefinir dispositivo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Você perderá todas as alterações. A demonstração será iniciada novamente em <xliff:g id="TIMEOUT">%1$s</xliff:g> segundos…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Cancelar"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Reiniciar agora"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Redefinir para a configuração original para usar este dispositivo sem restrições"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toque para saber mais."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Widget <xliff:g id="LABEL">%1$s</xliff:g> desativado"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Teleconferência"</string>
 </resources>
diff --git a/core/res/res/values-ro-watch/styles_material.xml b/core/res/res/values-ro-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ro-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index c61b41a..0cb12af 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1687,7 +1687,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Anulați fixarea"</string>
     <string name="app_info" msgid="6856026610594615344">"Informații despre aplicație"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Resetați dispozitivul?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Atingeți pentru a reseta dispozitivul"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Se pornește demonstrația…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Se resetează dispozitivul…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Resetați dispozitivul?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Veți pierde toate modificările, iar demonstrația va începe din nou peste <xliff:g id="TIMEOUT">%1$s</xliff:g> secunde…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Anulați"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Resetați acum"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Reveniți la setările din fabrică pentru a folosi acest dispozitiv fără restricții"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Atingeți pentru a afla mai multe."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> a fost dezactivat"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conferință telefonică"</string>
 </resources>
diff --git a/packages/SystemUI/res/layout/night_mode_settings.xml b/core/res/res/values-round-watch/config_material.xml
similarity index 64%
copy from packages/SystemUI/res/layout/night_mode_settings.xml
copy to core/res/res/values-round-watch/config_material.xml
index 3725e78..bf445ef 100644
--- a/packages/SystemUI/res/layout/night_mode_settings.xml
+++ b/core/res/res/values-round-watch/config_material.xml
@@ -14,11 +14,9 @@
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <include layout="@layout/switch_bar" />
-
-</LinearLayout>
+<!-- These resources are around just to allow their values to be customized
+     for watch products.  Do not translate. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Don't clip on round screens so the list can scroll past the rounded edges. -->
+    <bool name="config_preferenceFragmentClipToPadding">false</bool>
+</resources>
diff --git a/core/res/res/values-round-watch/dimens_material.xml b/core/res/res/values-round-watch/dimens_material.xml
new file mode 100644
index 0000000..db1f1f3
--- /dev/null
+++ b/core/res/res/values-round-watch/dimens_material.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <dimen name="dialog_padding_material">@dimen/screen_percentage_15</dimen>
+    <dimen name="preference_fragment_padding_vertical_material">@dimen/screen_percentage_15</dimen>
+
+    <dimen name="list_item_padding_horizontal_material">@dimen/screen_percentage_15</dimen>
+    <dimen name="list_item_padding_start_material">@dimen/screen_percentage_15</dimen>
+    <dimen name="list_item_padding_end_material">@dimen/screen_percentage_10</dimen>
+</resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-round-watch/styles_material.xml
similarity index 69%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-round-watch/styles_material.xml
index 9e13001..a2f3c02 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-round-watch/styles_material.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <style name="TextAppearance.Material.AlertDialogMessage" parent="TextAppearance.Material.Body1">
+        <item name="textAlignment">center</item>
+    </style>
 </resources>
diff --git a/core/res/res/values-ru-watch/styles_material.xml b/core/res/res/values-ru-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-ru-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 54fb905..abd9012 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Открепить"</string>
     <string name="app_info" msgid="6856026610594615344">"О приложении"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Сбросить настройки устройства?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Нажмите здесь, чтобы сбросить настройки"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Запуск деморежима…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Сброс настроек…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Сбросить настройки устройства?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Все изменения будут утеряны. Деморежим будет перезапущен через <xliff:g id="TIMEOUT">%1$s</xliff:g> сек."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Отмена"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Сбросить"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Сброс до заводских настроек для работы без ограничений"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Нажмите, чтобы узнать больше."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Виджет <xliff:g id="LABEL">%1$s</xliff:g> отключен"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конференц-связь"</string>
 </resources>
diff --git a/core/res/res/values-si-rLK-watch/styles_material.xml b/core/res/res/values-si-rLK-watch/styles_material.xml
new file mode 100644
index 0000000..37b4afe
--- /dev/null
+++ b/core/res/res/values-si-rLK-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"අපේක්ෂකයන්"</font></string>
+</resources>
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index f5878ce..c64d1ed 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -1653,7 +1653,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"ගලවන්න"</string>
     <string name="app_info" msgid="6856026610594615344">"යෙදුම් තොරතුරු"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"උපාංගය යළි සකසන්නද?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"උපාංගය යළි සැකසීමට තට්ටු කරන්න"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ආදර්ශනය ආරම්භ කරමින්..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"උපාංගය යළි සකසමින්..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"උපාංගය යළි සකසන්නද?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"ඔබට යම් වෙනස් කිරීම් අහිමි වනු ඇති අතර ආදර්ශනය තත්පර <xliff:g id="TIMEOUT">%1$s</xliff:g>කින් නැවත ආරම්භ වනු ඇත…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"අවලංගු කරන්න"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"දැන් යළි සකසන්න"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"සීමා කිරීම්වලින් තොරව මෙම උපාංගය භාවිත කිරීමට කර්මාන්ත ශාලා යළි සැකසීම"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"තව දැන ගැනීමට ස්පර්ශ කරන්න."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"අබල කළ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"සම්මන්ත්‍රණ ඇමතුම"</string>
 </resources>
diff --git a/core/res/res/values-sk-watch/styles_material.xml b/core/res/res/values-sk-watch/styles_material.xml
new file mode 100644
index 0000000..5b604e8
--- /dev/null
+++ b/core/res/res/values-sk-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"kandidáti"</font></string>
+</resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 2cb7ecd..97180db 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Uvoľniť"</string>
     <string name="app_info" msgid="6856026610594615344">"Info o aplikácii"</string>
     <string name="negative_duration" msgid="5688706061127375131">"-<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Resetovať zariadenie?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Klepnutím resetujete zariadenie"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Spúšťa sa ukážka…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Resetuje sa zariadenie…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Resetovať zariadenie?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Prídete o všetky zmeny a ukážka sa znova spustí o <xliff:g id="TIMEOUT">%1$s</xliff:g> s…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Zrušiť"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Resetovať"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Ak chcete toto zariadenie používať bez obmedzení, obnovte na ňom továrenské nastavenia"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Klepnutím získate ďalšie informácie."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Deaktivovaná miniaplikácia <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferenčný hovor"</string>
 </resources>
diff --git a/core/res/res/values-sl-watch/styles_material.xml b/core/res/res/values-sl-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-sl-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 9ece9eb..9653ff8 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Odpenjanje"</string>
     <string name="app_info" msgid="6856026610594615344">"Podatki o aplikaciji"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Želite ponastaviti napravo?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Dotaknite se, če želite ponastaviti napravo"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Začenjanje predstavitve …"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Ponastavljanje naprave …"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Želite ponastaviti napravo?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Morebitne spremembe bodo izgubljene in predstavitev se bo začela znova čez <xliff:g id="TIMEOUT">%1$s</xliff:g> s …"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Prekliči"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Ponastavi"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Ponastavitev naprave na tovarniške nastavitve za uporabo brez omejitev"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Dotaknite se, če želite izvedeti več."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> – onemogočeno"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferenčni klic"</string>
 </resources>
diff --git a/core/res/res/values-sq-rAL-watch/styles_material.xml b/core/res/res/values-sq-rAL-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-sq-rAL-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-sq-rAL/strings.xml b/core/res/res/values-sq-rAL/strings.xml
index 9dcd8e6..d9b14dc 100644
--- a/core/res/res/values-sq-rAL/strings.xml
+++ b/core/res/res/values-sq-rAL/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Zhgozhdo"</string>
     <string name="app_info" msgid="6856026610594615344">"Informacioni mbi aplikacionin"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Do ta rivendosësh pajisjen?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Trokit për ta rivendosur pajisjen"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Po nis demonstrimin..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Po rivendos pajisjen…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Do ta rivendosësh pajisjen?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Do të humbasësh çdo ndryshim dhe demonstrimi do të niset përsëri për <xliff:g id="TIMEOUT">%1$s</xliff:g> sekonda…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Anulo"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Rivendos tani"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Rivendos cilësimet e fabrikës për ta përdorur këtë pajisje pa kufizime"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Prek për të mësuar më shumë."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> u çaktivizua"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Telefonatë konferencë"</string>
 </resources>
diff --git a/core/res/res/values-sr-watch/styles_material.xml b/core/res/res/values-sr-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-sr-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 4eb13f5..b3fc8ca 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1687,7 +1687,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Откачи"</string>
     <string name="app_info" msgid="6856026610594615344">"Информације о апликацији"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Желите ли да ресетујете уређај?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Додирните да бисте ресетовали уређај"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Покрећемо демонстрацију..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Ресетујемо уређај..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Желите ли да ресетујете уређај?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Изгубићете све промене и демонстрација ће поново почети за <xliff:g id="TIMEOUT">%1$s</xliff:g> сек…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Откажи"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Ресетуј"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Ресетујте уређај на фабричка подешавања да бисте га користили без ограничења"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Додирните да бисте сазнали више."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Виџет <xliff:g id="LABEL">%1$s</xliff:g> је онемогућен"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конференцијски позив"</string>
 </resources>
diff --git a/core/res/res/values-sv-watch/styles_material.xml b/core/res/res/values-sv-watch/styles_material.xml
new file mode 100644
index 0000000..f2ab18a
--- /dev/null
+++ b/core/res/res/values-sv-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"kandidater"</font></string>
+</resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 21016d6..8557f28 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Lossa"</string>
     <string name="app_info" msgid="6856026610594615344">"Info om appen"</string>
     <string name="negative_duration" msgid="5688706061127375131">"-<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Vill du återställa enheten?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Tryck om du vill återställa enheten"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo startas …"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Enheten återställs …"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Vill du återställa enheten?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Ändringar som du har gjort sparas inte och demon börjar om om <xliff:g id="TIMEOUT">%1$s</xliff:g> sekunder …"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Avbryt"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Återställ nu"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Återställ enheten till standardinställningarna om du vill använda den utan begränsningar"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Tryck här om du vill läsa mer."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> har inaktiverats"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferenssamtal"</string>
 </resources>
diff --git a/core/res/res/values-sw-watch/styles_material.xml b/core/res/res/values-sw-watch/styles_material.xml
new file mode 100644
index 0000000..01392b2
--- /dev/null
+++ b/core/res/res/values-sw-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"yanayopendekezwa"</font></string>
+</resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 8d9b151..30f22ff 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -1649,7 +1649,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Bandua"</string>
     <string name="app_info" msgid="6856026610594615344">"Maelezo ya programu"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Ungependa kuweka upya mipangilio ya kifaa?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Gonga ili uweke upya kifaa"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Inaanzisha onyesho..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Inaweka upya kifaa..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Ungependa kuweka upya mipangilio ya kifaa?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Mabadiliko yoyote hayatahifadhiwa. Onyesho litaanza tena baada ya sekunde <xliff:g id="TIMEOUT">%1$s</xliff:g>..."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Ghairi"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Weka upya sasa"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Rejesha mipangilio iliyotoka nayo kiwandani ili utumie kifaa hiki bila vikwazo"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Gusa ili kupata maelezo zaidi."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> imezimwa"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Simu ya Kongamano"</string>
 </resources>
diff --git a/core/res/res/values-ta-rIN-watch/styles_material.xml b/core/res/res/values-ta-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..d4605e6
--- /dev/null
+++ b/core/res/res/values-ta-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"கேன்டிடேட்ஸ்"</font></string>
+</resources>
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index d2df8126..f606000 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -858,7 +858,7 @@
       <item quantity="other"><xliff:g id="COUNT">%d</xliff:g> மணிநேரம்</item>
       <item quantity="one">1 மணிநேரம்</item>
     </plurals>
-    <string name="now_string_shortest" msgid="8912796667087856402">"உடனே"</string>
+    <string name="now_string_shortest" msgid="8912796667087856402">"இப்போது"</string>
     <plurals name="duration_minutes_shortest" formatted="false" msgid="3957499975064245495">
       <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>நி</item>
       <item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g>நி</item>
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"பின்னை அகற்று"</string>
     <string name="app_info" msgid="6856026610594615344">"பயன்பாட்டுத் தகவல்"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"சாதனத்தை மீட்டமைக்கவா?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"சாதனத்தை மீட்டமைக்க, தட்டவும்"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"டெமோவைத் தொடங்குகிறது…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"சாதனத்தை மீட்டமைக்கிறது…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"சாதனத்தை மீட்டமைக்கவா?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"மாற்றங்கள் சேமிக்கப்படாது, <xliff:g id="TIMEOUT">%1$s</xliff:g> வினாடிகளில் டெமோ மீண்டும் தொடங்கும்…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"ரத்துசெய்"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"இப்போதே மீட்டமை"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"இந்தச் சாதனத்தைக் கட்டுப்பாடுகளின்றிப் பயன்படுத்த, ஆரம்ப நிலைக்கு மீட்டமைக்கவும்"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"மேலும் அறிய தொடவும்."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"முடக்கப்பட்டது: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"குழு அழைப்பு"</string>
 </resources>
diff --git a/core/res/res/values-te-rIN-watch/styles_material.xml b/core/res/res/values-te-rIN-watch/styles_material.xml
new file mode 100644
index 0000000..877cd58
--- /dev/null
+++ b/core/res/res/values-te-rIN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"క్యాండిడేట్‌లు"</font></string>
+</resources>
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index 1cfab6e..56c2eac 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"అన్‌‌పిన్‌ ‌చేయి"</string>
     <string name="app_info" msgid="6856026610594615344">"అనువర్తన సమాచారం"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"పరికరాన్ని రీసెట్ చేయాలా?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"పరికరాన్ని రీసెట్ చేయడానికి నొక్కండి"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"డెమోను ప్రారంభిస్తోంది..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"పరికరాన్ని రీసెట్ చేస్తోంది..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"పరికరాన్ని రీసెట్ చేయాలా?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"మీరు చేసిన ఏవైనా మార్పులను కోల్పోతారు మరియు డెమో <xliff:g id="TIMEOUT">%1$s</xliff:g> సెకన్లలో మళ్లీ ప్రారంభమవుతుంది…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"రద్దు చేయి"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ఇప్పుడే రీసెట్ చేయి"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"ఈ పరికరాన్ని ఎటువంటి పరిమితులు లేకుండా ఉపయోగించడానికి ఫ్యాక్టరీ రీసెట్ చేయండి"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"మరింత తెలుసుకోవడానికి తాకండి."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> నిలిపివేయబడింది"</string>
+    <string name="conference_call" msgid="3751093130790472426">"కాన్ఫరెన్స్ కాల్"</string>
 </resources>
diff --git a/core/res/res/values-th-watch/styles_material.xml b/core/res/res/values-th-watch/styles_material.xml
new file mode 100644
index 0000000..3227ced
--- /dev/null
+++ b/core/res/res/values-th-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"ผู้สมัคร"</font></string>
+</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 581bb81..b64eb8f 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"เลิกปักหมุด"</string>
     <string name="app_info" msgid="6856026610594615344">"ข้อมูลแอป"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"รีเซ็ตอุปกรณ์ไหม"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"แตะเพื่อรีเซ็ตอุปกรณ์"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"กำลังเริ่มการสาธิต…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"กำลังรีเซ็ตอุปกรณ์…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"รีเซ็ตอุปกรณ์ไหม"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"การเปลี่ยนแปลงของคุณจะหายไปและการสาธิตจะเริ่มต้นอีกครั้งใน <xliff:g id="TIMEOUT">%1$s</xliff:g> วินาที…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"ยกเลิก"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"รีเซ็ตทันที"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"รีเซ็ตเป็นค่าเริ่มต้นเพื่อใช้อุปกรณ์นี้โดยไร้ข้อจำกัด"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"แตะเพื่อเรียนรู้เพิ่มเติม"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"ปิดใช้ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"การประชุมสาย"</string>
 </resources>
diff --git a/core/res/res/values-tl-watch/styles_material.xml b/core/res/res/values-tl-watch/styles_material.xml
new file mode 100644
index 0000000..70e7a7a
--- /dev/null
+++ b/core/res/res/values-tl-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"mga kandidato"</font></string>
+</resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index df4dd9b..7c91c68 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"I-unpin"</string>
     <string name="app_info" msgid="6856026610594615344">"Impormasyon ng app"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Gusto mo bang i-reset ang device?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Mag-tap upang i-reset ang device"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Sinisimulan ang demo…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Nire-reset ang device…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Gusto mo bang i-reset ang device?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Mawawala mo ang anumang mga pagbabago at magsisimulang muli ang demo pagkalipas ng <xliff:g id="TIMEOUT">%1$s</xliff:g> (na) segundo…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Kanselahin"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"I-reset ngayon"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"I-factory reset upang magamit ang device na ito nang walang mga paghihigpit"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Pindutin upang matuto nang higit pa."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Na-disable ang <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Conference Call"</string>
 </resources>
diff --git a/core/res/res/values-tr-watch/styles_material.xml b/core/res/res/values-tr-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-tr-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index a1f6f64..805f1d2 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Sabitlemeyi kaldır"</string>
     <string name="app_info" msgid="6856026610594615344">"Uygulama bilgileri"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Cihaz sıfırlansın mı?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Cihazı sıfırlamak için dokunun"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo başlatılıyor…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Cihaz sıfırlanıyor…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Cihaz sıfırlansın mı?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Değişiklikleri kaybedeceksiniz ve demo <xliff:g id="TIMEOUT">%1$s</xliff:g> saniye içinde tekrar başlayacak…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"İptal"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Şimdi sıfırla"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Bu cihazı kısıtlama olmadan kullanmak için fabrika ayarlarına sıfırlayın"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Daha fazla bilgi edinmek için dokunun."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> devre dışı"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferans Çağrısı"</string>
 </resources>
diff --git a/core/res/res/values-uk-watch/styles_material.xml b/core/res/res/values-uk-watch/styles_material.xml
new file mode 100644
index 0000000..698d5b0
--- /dev/null
+++ b/core/res/res/values-uk-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"варіанти"</font></string>
+</resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index c8b3754..6694981 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1723,7 +1723,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Відкріпити"</string>
     <string name="app_info" msgid="6856026610594615344">"Про додаток"</string>
     <string name="negative_duration" msgid="5688706061127375131">"-<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Скинути налаштування пристрою?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Торкніться, щоб скинути налаштування пристрою"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Запуск демонстрації…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Скидання налаштувань пристрою…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Скинути налаштування пристрою?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Ви втратите всі зміни, а демонстрація знову почнеться через <xliff:g id="TIMEOUT">%1$s</xliff:g> с…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Скасувати"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Скинути"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Відновіть заводські параметри, щоб використовувати пристрій без обмежень"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Торкніться, щоб дізнатися більше."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> вимкнено"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Конференц-виклик"</string>
 </resources>
diff --git a/core/res/res/values-ur-rPK-watch/styles_material.xml b/core/res/res/values-ur-rPK-watch/styles_material.xml
new file mode 100644
index 0000000..e569c7c
--- /dev/null
+++ b/core/res/res/values-ur-rPK-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"امیدواران"</font></string>
+</resources>
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index 91a8c06..651d9ea 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"پن ہٹائیں"</string>
     <string name="app_info" msgid="6856026610594615344">"ایپ کی معلومات"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"آلہ ری سیٹ کریں؟"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"آلہ ری سیٹ کرنے کیلئے تھپتھپائیں"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"ڈیمو شروع ہو رہا ہے…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"آلہ ری سیٹ ہو رہا ہے…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"آلہ ری سیٹ کریں؟"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"آپ کی تمام تبدیلیاں ضائع ہو جائیں گی اور ڈیمو <xliff:g id="TIMEOUT">%1$s</xliff:g> سیکنڈز میں دوبارہ شروع ہوگا…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"منسوخ کریں"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"ابھی ری سیٹ کریں"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"بغیر کسی حدود کے استعمال کرنے کیلئے اس آلے کو فیکٹری ری سیٹ کریں"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"مزید جاننے کیلئے ٹچ کریں۔"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"غیر فعال کردہ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"کانفرنس کال"</string>
 </resources>
diff --git a/core/res/res/values-uz-rUZ-watch/styles_material.xml b/core/res/res/values-uz-rUZ-watch/styles_material.xml
new file mode 100644
index 0000000..3cb38d6
--- /dev/null
+++ b/core/res/res/values-uz-rUZ-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"nomzodlar"</font></string>
+</resources>
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index 32a1328..03d16b7 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Olib tashlash"</string>
     <string name="app_info" msgid="6856026610594615344">"Ilova haqida"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Qurilma asl holatga qaytarilsinmi?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Qurilmani asl holatga qaytarish uchun bosing"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Demo boshlanmoqda…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Qurilma asl holatga qaytarilmoqda…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Qurilma asl holatga qaytarilsinmi?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Har qanday o‘zgarishlar o‘chib ketadi va demo <xliff:g id="TIMEOUT">%1$s</xliff:g> soniyadan so‘ng yana qayta ishga tushadi…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Bekor qilish"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Asl holatga qaytarish"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Bu qurilmadan cheklovlarsiz foydalanish uchun zavod sozlamalarini tiklang"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Ko‘proq o‘rganish uchun bosing."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> vidjeti o‘chirilgan"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Konferens-aloqa"</string>
 </resources>
diff --git a/core/res/res/values-vi-watch/styles_material.xml b/core/res/res/values-vi-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-vi-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 3b86a37..a302ae4 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Bỏ ghim"</string>
     <string name="app_info" msgid="6856026610594615344">"Thông tin ứng dụng"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Đặt lại thiết bị?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Nhấn để đặt lại thiết bị"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Đang bắt đầu bản trình diễn..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Đang đặt lại thiết bị..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Đặt lại thiết bị?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Bạn sẽ bị mất mọi thay đổi và bản trình diễn sẽ bắt đầu lại sau <xliff:g id="TIMEOUT">%1$s</xliff:g> giây…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Hủy"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Đặt lại ngay bây giờ"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Khôi phục cài đặt gốc để sử dụng thiết bị này mà không bị hạn chế"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Chạm để tìm hiểu thêm."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"Đã tắt <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Cuộc gọi nhiều bên"</string>
 </resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-w194dp/dimens_material.xml
similarity index 74%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-w194dp/dimens_material.xml
index 9e13001..220c4b0 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-w194dp/dimens_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <dimen name="screen_percentage_05">9.7dp</dimen>
+    <dimen name="screen_percentage_10">19.4dp</dimen>
+    <dimen name="screen_percentage_15">29.1dp</dimen>
 </resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-w205dp/dimens_material.xml
similarity index 73%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-w205dp/dimens_material.xml
index 9e13001..94907ee 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-w205dp/dimens_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <dimen name="screen_percentage_05">10.25dp</dimen>
+    <dimen name="screen_percentage_10">20.5dp</dimen>
+    <dimen name="screen_percentage_15">30.75dp</dimen>
 </resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-w213dp/dimens_material.xml
similarity index 73%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-w213dp/dimens_material.xml
index 9e13001..8a4e3a0 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-w213dp/dimens_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <dimen name="screen_percentage_05">10.65dp</dimen>
+    <dimen name="screen_percentage_10">21.3dp</dimen>
+    <dimen name="screen_percentage_15">31.95dp</dimen>
 </resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-w228dp/dimens_material.xml
similarity index 73%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-w228dp/dimens_material.xml
index 9e13001..a200975 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-w228dp/dimens_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <dimen name="screen_percentage_05">11.4dp</dimen>
+    <dimen name="screen_percentage_10">22.8dp</dimen>
+    <dimen name="screen_percentage_15">34.2dp</dimen>
 </resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-w240dp/dimens_material.xml
similarity index 74%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to core/res/res/values-w240dp/dimens_material.xml
index 9e13001..a4b58fa9 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-w240dp/dimens_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <dimen name="screen_percentage_05">12dp</dimen>
+    <dimen name="screen_percentage_10">24dp</dimen>
+    <dimen name="screen_percentage_15">36dp</dimen>
 </resources>
diff --git a/core/res/res/values-watch/colors_material.xml b/core/res/res/values-watch/colors_material.xml
new file mode 100644
index 0000000..91eee7d
--- /dev/null
+++ b/core/res/res/values-watch/colors_material.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <color name="background_material_dark">#ff232e33</color>
+    <color name="background_floating_material_dark">#ff3e5059</color>
+
+    <color name="accent_material_dark">#ff5e97f6</color>
+    <color name="accent_material_light">#ff4285f4</color>
+
+    <color name="button_material_dark">#ff999999</color>
+</resources>
diff --git a/core/res/res/values-watch/config_material.xml b/core/res/res/values-watch/config_material.xml
new file mode 100644
index 0000000..81b53e7
--- /dev/null
+++ b/core/res/res/values-watch/config_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for watch products.  Do not translate. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Watch type devices have limited screen real-estate, and thus action bars should not be
+         used. -->
+    <bool name="config_windowActionBarSupported">false</bool>
+
+    <!-- Watch type devices have limited screen real-estate, and thus titles should not be used. -->
+    <bool name="config_windowNoTitleDefault">true</bool>
+
+    <!-- Use micro alert controller -->
+    <integer name="config_alertDialogController">1</integer>
+
+    <!-- Always overscan by default to ensure onApplyWindowInsets will always be called. -->
+    <bool name="config_windowOverscanByDefault">true</bool>
+
+    <!-- Due to the smaller screen size, have dialog titles occupy more than 1 line. -->
+    <integer name="config_dialogWindowTitleMaxLines">3</integer>
+</resources>
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/core/res/res/values-watch/dimens_material.xml
similarity index 77%
rename from packages/DocumentsUI/res/values/attrs.xml
rename to core/res/res/values-watch/dimens_material.xml
index 9e13001..d579434 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/core/res/res/values-watch/dimens_material.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,7 +14,5 @@
      limitations under the License.
 -->
 <resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
+    <item name="text_line_spacing_multiplier_material" format="float" type="dimen">1.2</item>
 </resources>
diff --git a/core/res/res/values-watch/donottranslate_material.xml b/core/res/res/values-watch/donottranslate_material.xml
new file mode 100644
index 0000000..a6f2ff4
--- /dev/null
+++ b/core/res/res/values-watch/donottranslate_material.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <string name="font_family_display_4_material">sans-serif-condensed-light</string>
+    <string name="font_family_display_3_material">sans-serif-condensed-light</string>
+    <string name="font_family_display_2_material">sans-serif-condensed-light</string>
+    <string name="font_family_display_1_material">sans-serif-condensed-light</string>
+    <string name="font_family_headline_material">sans-serif-condensed-light</string>
+    <string name="font_family_title_material">sans-serif-condensed</string>
+    <string name="font_family_subhead_material">sans-serif-condensed-light</string>
+    <string name="font_family_menu_material">sans-serif-condensed-light</string>
+    <string name="font_family_body_2_material">sans-serif-condensed</string>
+    <string name="font_family_body_1_material">sans-serif-condensed-light</string>
+    <string name="font_family_caption_material">sans-serif-condensed-light</string>
+    <string name="font_family_button_material">sans-serif-condensed</string>
+ </resources>
diff --git a/core/res/res/values-watch/styles_material.xml b/core/res/res/values-watch/styles_material.xml
new file mode 100644
index 0000000..daeeca2
--- /dev/null
+++ b/core/res/res/values-watch/styles_material.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!--
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+ -->
+<resources>
+    <style name="Animation.Material.Activity" parent="Animation.Activity">
+        <item name="activityOpenEnterAnimation">@anim/slide_in_enter_micro</item>
+        <item name="activityOpenRemoteViewsEnterAnimation">@anim/slide_in_enter_micro</item>
+        <item name="activityOpenExitAnimation">@anim/slide_in_exit_micro</item>
+        <item name="activityCloseEnterAnimation">@null</item>
+        <item name="activityCloseExitAnimation">@anim/slide_out_micro</item>
+        <item name="taskOpenEnterAnimation">@anim/slide_in_enter_micro</item>
+        <item name="taskOpenExitAnimation">@anim/slide_in_exit_micro</item>
+        <item name="taskCloseEnterAnimation">@null</item>
+        <item name="taskCloseExitAnimation">@anim/slide_out_micro</item>
+        <item name="taskToFrontEnterAnimation">@anim/slide_in_enter_micro</item>
+        <item name="taskToFrontExitAnimation">@anim/slide_in_exit_micro</item>
+        <item name="taskToBackEnterAnimation">@null</item>
+        <item name="taskToBackExitAnimation">@anim/slide_out_micro</item>
+        <item name="wallpaperOpenEnterAnimation">@null</item>
+        <item name="wallpaperOpenExitAnimation">@anim/slide_out_micro</item>
+        <item name="wallpaperCloseEnterAnimation">@anim/slide_in_enter_micro</item>
+        <item name="wallpaperCloseExitAnimation">@anim/slide_in_exit_micro</item>
+        <item name="wallpaperIntraOpenEnterAnimation">@null</item>
+        <item name="wallpaperIntraOpenExitAnimation">@anim/slide_out_micro</item>
+        <item name="wallpaperIntraCloseEnterAnimation">@anim/slide_in_enter_micro</item>
+        <item name="wallpaperIntraCloseExitAnimation">@anim/slide_in_exit_micro</item>
+    </style>
+
+    <style name="PreferenceFragment.Material" parent="BasePreferenceFragment">
+        <item name="divider">@empty</item>
+    </style>
+
+    <style name="Widget.Material.TextView" parent="Widget.TextView">
+        <item name="breakStrategy">balanced</item>
+    </style>
+
+    <!-- Alert dialog button bar button -->
+    <style name="Widget.Material.Button.ButtonBar.AlertDialog" parent="Widget.Material.Button.Borderless.Small">
+        <item name="gravity">center_vertical|left</item>
+        <item name="minWidth">64dp</item>
+        <item name="minHeight">@dimen/alert_dialog_button_bar_height</item>
+    </style>
+
+    <style name="Widget.Material.NumberPicker" parent="Widget.NumberPicker">
+        <item name="internalLayout">@layout/number_picker_material</item>
+        <item name="solidColor">@color/transparent</item>
+        <item name="selectionDivider">@drawable/numberpicker_selection_divider</item>
+        <item name="selectionDividerHeight">2dp</item>
+        <item name="selectionDividersDistance">48dp</item>
+        <item name="internalMinWidth">64dp</item>
+        <item name="internalMaxHeight">180dp</item>
+        <item name="virtualButtonPressedDrawable">?selectableItemBackground</item>
+        <item name="descendantFocusability">blocksDescendants</item>
+    </style>
+
+    <!-- DO NOTE TRANSLATE Spans within this text are applied to style composing regions
+    within an EditText widget. The text content is ignored and not used.
+    Note: This is @color/material_deep_teal_200, cannot use @color references here. -->
+    <string name="candidates_style"><font color="#80cbc4">candidates</font></string>
+</resources>
diff --git a/core/res/res/values-watch/themes.xml b/core/res/res/values-watch/themes.xml
index 6d6065f..04df180 100644
--- a/core/res/res/values-watch/themes.xml
+++ b/core/res/res/values-watch/themes.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -14,11 +14,10 @@
      limitations under the License.
 -->
 <resources>
-    <style name="Theme.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
-    <style name="Theme.Dialog.AppError" parent="Theme.Micro.Dialog.AppError" />
-    <style name="Theme.Holo.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
-    <style name="Theme.Holo.Light.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
-    <style name="Theme.InputMethod" parent="Theme.Micro.InputMethod" />
-    <style name="Theme.Material.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
-    <style name="Theme.Material.Light.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
+    <!-- Theme for the dialog shown when an app crashes or ANRs. Override to make it dark. -->
+    <style name="Theme.Dialog.AppError" parent="Theme.DeviceDefault.Dialog.Alert">
+        <item name="windowContentTransitions">false</item>
+        <item name="windowActivityTransitions">false</item>
+        <item name="windowCloseOnTouchOutside">false</item>
+    </style>
 </resources>
diff --git a/core/res/res/values-watch/themes_device_defaults.xml b/core/res/res/values-watch/themes_device_defaults.xml
index 66509fb..2313b26 100644
--- a/core/res/res/values-watch/themes_device_defaults.xml
+++ b/core/res/res/values-watch/themes_device_defaults.xml
@@ -13,22 +13,31 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<resources>
-    <style name="Theme.DeviceDefault" parent="Theme.Micro" />
-    <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Micro" />
-    <style name="Theme.DeviceDefault.Dialog" parent="Theme.Micro.Dialog" />
-    <style name="Theme.DeviceDefault.DialogWhenLarge" parent="Theme.Micro.Dialog" />
-    <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
-    <style name="Theme.DeviceDefault.InputMethod" parent="Theme.Micro.InputMethod"  />
-    <style name="Theme.DeviceDefault.Panel" parent="Theme.Micro.Panel"  />
-    <style name="Theme.DeviceDefault.Light" parent="Theme.Micro.Light" />
-    <style name="Theme.DeviceDefault.Light.NoActionBar" parent="Theme.Micro.Light" />
-    <style name="Theme.DeviceDefault.Light.DarkActionBar" parent="Theme.Micro.Light" />
-    <style name="Theme.DeviceDefault.Light.Dialog" parent="Theme.Micro.Dialog" />
-    <style name="Theme.DeviceDefault.Light.DialogWhenLarge" parent="Theme.Micro.Dialog" />
-    <style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Micro.Dialog.Alert" />
-    <style name="Theme.DeviceDefault.Light.Panel" parent="Theme.Micro.Light.Panel"  />
-    <style name="Theme.DeviceDefault.Settings" parent="Theme.Micro" />
-    <style name="Theme.DeviceDefault.Wallpaper" parent="Theme.Micro" />
-</resources>
 
+<!--
+===============================================================
+                        PLEASE READ
+===============================================================
+This file contains the themes that are the Device Defaults.
+If you want to edit themes to skin your device, do it here.
+We recommend that you do not edit themes.xml and instead edit
+this file.
+
+Editing this file instead of themes.xml will greatly simplify
+merges for future platform versions and CTS compliance will be
+easier.
+===============================================================
+                        PLEASE READ
+===============================================================
+ -->
+<resources>
+    <!-- Theme used for the intent picker activity. -->
+    <style name="Theme.DeviceDefault.Resolver" parent="Theme.Material">
+        <item name="colorControlActivated">?attr/colorControlHighlight</item>
+        <item name="listPreferredItemPaddingStart">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingEnd">?attr/dialogPreferredPadding</item>
+    </style>
+
+    <!-- Use a dark theme for watches. -->
+    <style name="Theme.DeviceDefault.System" parent="Theme.Material" />
+</resources>
diff --git a/core/res/res/values-watch/themes_material.xml b/core/res/res/values-watch/themes_material.xml
new file mode 100644
index 0000000..4ae4367
--- /dev/null
+++ b/core/res/res/values-watch/themes_material.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!--
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+ -->
+<resources>
+    <!-- Default theme for material style input methods, which is used by the
+         {@link android.inputmethodservice.InputMethodService} class.
+         this inherits from Theme.Panel, but sets up IME appropriate animations
+         and a few custom attributes. -->
+    <style name="Theme.Material.InputMethod" parent="Theme.Material.Panel">
+        <item name="windowAnimationStyle">@style/Animation.InputMethod</item>
+        <item name="imeFullscreenBackground">?colorBackground</item>
+        <item name="imeExtractEnterAnimation">@anim/input_method_extract_enter</item>
+    </style>
+
+    <!-- Override behaviour to set the theme colours for dialogs, keep them the same. -->
+    <style name="ThemeOverlay.Material.Dialog" parent="ThemeOverlay.Material.BaseDialog">
+        <item name="windowIsFloating">false</item>
+    </style>
+
+    <!-- Force the background and floating colours to be the default colours. -->
+    <style name="Theme.Material.Dialog" parent="Theme.Material.BaseDialog">
+        <item name="colorBackground">@color/background_material_dark</item>
+        <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
+        <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
+        <item name="windowIsFloating">false</item>
+    </style>
+
+    <!-- Force the background and floating colours to be the default colours. -->
+    <style name="Theme.Material.Light.Dialog" parent="Theme.Material.Light.BaseDialog">
+        <item name="colorBackground">@color/background_material_light</item>
+        <item name="colorBackgroundFloating">@color/background_floating_material_light</item>
+        <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
+        <item name="windowIsFloating">false</item>
+    </style>
+</resources>
diff --git a/core/res/res/values-zh-rCN-watch/styles_material.xml b/core/res/res/values-zh-rCN-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-zh-rCN-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index d7490c5..b5b87c7 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"取消固定"</string>
     <string name="app_info" msgid="6856026610594615344">"应用信息"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"要重置设备吗?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"点按即可重置设备"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"正在启动演示模式…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"正在重置设备…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"要重置设备吗?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"您将丢失所有更改,而且演示模式将在 <xliff:g id="TIMEOUT">%1$s</xliff:g> 秒后重新启动…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"取消"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"立即重置"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"恢复出厂设置即可正常使用此设备,不受任何限制"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"触摸即可了解详情。"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"已停用的<xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"电话会议"</string>
 </resources>
diff --git a/core/res/res/values-zh-rHK-watch/styles_material.xml b/core/res/res/values-zh-rHK-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-zh-rHK-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 6c896b2..d912ce5 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"取消固定"</string>
     <string name="app_info" msgid="6856026610594615344">"應用程式資料"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"要重設裝置嗎?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"輕按即可重設裝置"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"正在開始示範…"</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"正在重設裝置…"</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"要重設裝置嗎?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"系統將不會儲存變更,示範將於 <xliff:g id="TIMEOUT">%1$s</xliff:g> 秒後重新開始…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"取消"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"立即重設"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"將此裝置回復至原廠設定後,使用將不受限制"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"輕觸以瞭解詳情。"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"「<xliff:g id="LABEL">%1$s</xliff:g>」已停用"</string>
+    <string name="conference_call" msgid="3751093130790472426">"會議通話"</string>
 </resources>
diff --git a/core/res/res/values-zh-rTW-watch/styles_material.xml b/core/res/res/values-zh-rTW-watch/styles_material.xml
new file mode 100644
index 0000000..36a459d
--- /dev/null
+++ b/core/res/res/values-zh-rTW-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"candidates"</font></string>
+</resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index f3691cd..3c6c2b3 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"取消固定"</string>
     <string name="app_info" msgid="6856026610594615344">"應用程式資訊"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"要重設裝置嗎?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"輕觸即可重設裝置"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"正在啟動示範模式..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"正在重設裝置..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"要重設裝置嗎?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"系統不會儲存您所做的變更,示範模式將於 <xliff:g id="TIMEOUT">%1$s</xliff:g> 秒後重新開始…"</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"取消"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"立即重設"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"恢復原廠設定即可正常使用這個裝置"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"輕觸即可瞭解詳情。"</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"已停用的<xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="conference_call" msgid="3751093130790472426">"電話會議"</string>
 </resources>
diff --git a/core/res/res/values-zu-watch/styles_material.xml b/core/res/res/values-zu-watch/styles_material.xml
new file mode 100644
index 0000000..8b69fef
--- /dev/null
+++ b/core/res/res/values-zu-watch/styles_material.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+ -->
+
+<!-- 
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Material themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="candidates_style" msgid="8052530148128607468"><font color="#80cbc4">"amakhandidethi"</font></string>
+</resources>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index a2f5c13..e29b05f 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -1651,7 +1651,16 @@
     <string name="unpin_target" msgid="3556545602439143442">"Susa ukuphina"</string>
     <string name="app_info" msgid="6856026610594615344">"Ulwazi lohlelo lokusebenza"</string>
     <string name="negative_duration" msgid="5688706061127375131">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
+    <string name="reset_retail_demo_mode_title" msgid="2370249087943803584">"Setha kabusha idivayisi?"</string>
+    <string name="reset_retail_demo_mode_text" msgid="5481925817590883246">"Thepha ukuze usethe kabusha idivayisi"</string>
+    <string name="demo_starting_message" msgid="5268556852031489931">"Iqalisa i-demo..."</string>
+    <string name="demo_restarting_message" msgid="952118052531642451">"Isetha kabusha idivayisi..."</string>
+    <string name="demo_user_inactivity_timeout_title" msgid="6596109959002331334">"Setha kabusha idivayisi?"</string>
+    <string name="demo_user_inactivity_timeout_countdown" msgid="5675588824402569506">"Uzolahlekelwa inoma iluphi ushintsho futhi idemo izoqala futhi kumasekhondi angu-<xliff:g id="TIMEOUT">%1$s</xliff:g>..."</string>
+    <string name="demo_user_inactivity_timeout_left_button" msgid="5314271347014802475">"Khansela"</string>
+    <string name="demo_user_inactivity_timeout_right_button" msgid="5019306703066964808">"Setha kabusha manje"</string>
     <string name="audit_safemode_notification" msgid="6416076898350685856">"Setha kabusha ukuze usebenzise idivayisi ngaphandle kwemikhawulo"</string>
     <string name="audit_safemode_notification_details" msgid="1860601176690176413">"Thinta ukuze ufunde kabanzi."</string>
     <string name="suspended_widget_accessibility" msgid="6712143096475264190">"I-<xliff:g id="LABEL">%1$s</xliff:g> ekhutshaziwe"</string>
+    <string name="conference_call" msgid="3751093130790472426">"Ikholi yengqungquthela"</string>
 </resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index b61d6cf..a70c4fd 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1048,6 +1048,9 @@
              the status bar (via statusBarColor) and navigation bar (via navigationBarColor). -->
         <attr name="colorPrimaryDark" format="color" />
 
+        <!-- The secondary branding color for the app. -->
+        <attr name="colorSecondary" format="color" />
+
         <!-- Bright complement to the primary branding color. By default, this is the color applied
              to framework controls (via colorControlActivated). -->
         <attr name="colorAccent" format="color" />
@@ -1832,6 +1835,10 @@
         <enum name="KEYCODE_CUT" value="277" />
         <enum name="KEYCODE_COPY" value="278" />
         <enum name="KEYCODE_PASTE" value="279" />
+        <enum name="KEYCODE_SYSTEM_NAVIGATION_UP" value="280" />
+        <enum name="KEYCODE_SYSTEM_NAVIGATION_DOWN" value="281" />
+        <enum name="KEYCODE_SYSTEM_NAVIGATION_LEFT" value="282" />
+        <enum name="KEYCODE_SYSTEM_NAVIGATION_RIGHT" value="283" />
     </attr>
 
     <!-- ***************************************************************** -->
@@ -2043,6 +2050,13 @@
         <attr name="showTitle" format="boolean" />
         <!-- @hide Whether fullDark, etc. should use default values if null. -->
         <attr name="needsDefaultBackgrounds" format="boolean" />
+        <!-- @hide Workaround until we replace AlertController with custom layout. -->
+        <attr name="controllerType">
+            <!-- The default controller. -->
+            <enum name="normal" value="0" />
+            <!-- Controller for micro specific layout. -->
+            <enum name="micro" value="1" />
+        </attr>
     </declare-styleable>
 
     <!-- @hide -->
@@ -7324,14 +7338,28 @@
     <declare-styleable name="Wallpaper">
         <attr name="settingsActivity" />
 
-        <!-- Reference to a the wallpaper's thumbnail bitmap. -->
+        <!-- Reference to the wallpaper's thumbnail bitmap. -->
         <attr name="thumbnail" format="reference" />
 
-        <!-- Name of the author of this component, e.g. Google. -->
+        <!-- Name of the author and/or source/collection of this component, e.g. Art Collection, Picasso. -->
         <attr name="author" format="reference" />
 
         <!-- Short description of the component's purpose or behavior. -->
         <attr name="description" />
+
+        <!-- Uri that specifies a link for further context of this wallpaper, e.g. http://www.picasso.org. -->
+        <attr name="contextUri" format="reference" />
+
+        <!-- Title of the uri that specifies a link for further context of this wallpaper, e.g. Explore collection. -->
+        <attr name="contextDescription" format="reference" />
+
+        <!-- Whether to show any metadata when previewing the wallpaper. If this value is
+             set to true, any component that shows a preview of this live wallpaper should also show
+             accompanying information like the title, the description, the author and the context
+             description of this wallpaper so the user gets to know further information about this
+             wallpaper. -->
+        <attr name="showMetadataInPreview" format="boolean" />
+
     </declare-styleable>
 
     <!-- Use <code>dream</code> as the root tag of the XML resource that
@@ -8226,4 +8254,17 @@
                    color. -->
         <attr name="colorBackground" />
     </declare-styleable>
+
+    <declare-styleable name="Shortcut">
+        <attr name="shortcutId" format="string" />
+        <attr name="enabled" />
+        <attr name="icon" />
+        <attr name="shortcutShortLabel" format="reference" />
+        <attr name="shortcutLongLabel" format="reference" />
+        <attr name="shortcutDisabledMessage" format="reference" />
+    </declare-styleable>
+
+    <declare-styleable name="ShortcutCategories">
+        <attr name="name" />
+    </declare-styleable>
 </resources>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index d69d73d..0872ef9 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -62,6 +62,20 @@
          a reference to a Drawable resource containing the image definition. -->
     <attr name="icon" format="reference" />
 
+    <!-- A Drawable resource providing a graphical representation of its
+         associated item.  Use with the
+         application tag (to supply a default round icon for all application
+         components), or with the activity, receiver, service, or instrumentation
+         tag (to supply a specific round icon for that component).  It may also be
+         used with the intent-filter tag to supply a round icon to show to the
+         user when an activity is being selected based on a particular Intent.
+
+         <p>The given round icon will be used to display to the user a graphical
+         representation of its associated component; for example, as the round icon
+         for main activity that is displayed in the launcher.  This must be
+         a reference to a Drawable resource containing the image definition. -->
+    <attr name="roundIcon" format="reference" />
+
     <!-- A Drawable resource providing an extended graphical banner for its
          associated item. Use with the application tag (to supply a default
          banner for all application activities), or with the activity, tag to
@@ -1236,6 +1250,7 @@
         <attr name="theme" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="description" />
@@ -1335,6 +1350,7 @@
         <attr name="name" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="permissionGroup" />
@@ -1362,6 +1378,7 @@
         <attr name="name" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="description" />
@@ -1395,6 +1412,7 @@
         <attr name="name" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
     </declare-styleable>
@@ -1676,6 +1694,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="process" />
@@ -1759,6 +1778,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="permission" />
@@ -1807,6 +1827,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="permission" />
@@ -1843,6 +1864,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="launchMode" />
@@ -1926,6 +1948,7 @@
         <attr name="label" />
         <attr name="description" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="permission" />
@@ -1998,6 +2021,7 @@
          parent="AndroidManifestActivity AndroidManifestReceiver AndroidManifestService">
         <attr name="label" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="priority" />
@@ -2128,6 +2152,7 @@
         <attr name="targetPackage" />
         <attr name="label" />
         <attr name="icon" />
+        <attr name="roundIcon" />
         <attr name="banner" />
         <attr name="logo" />
         <attr name="handleProfiling" />
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index bddd225..10e2a4a 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -151,7 +151,7 @@
     <color name="battery_saver_mode_color">#fff4511e</color><!-- deep orange 600 -->
 
     <!-- Default user icon colors -->
-    <color name="user_icon_1">#ff00bcd4</color><!-- teal 500 -->
+    <color name="user_icon_1">#ff00bcd4</color><!-- cyan 500 -->
     <color name="user_icon_2">#ff3f51b5</color><!-- indigo 500 -->
     <color name="user_icon_3">#ff4285f4</color><!-- blue 500 -->
     <color name="user_icon_4">#ffe91e63</color><!-- pink 500 -->
diff --git a/core/res/res/values/colors_device_defaults.xml b/core/res/res/values/colors_device_defaults.xml
new file mode 100644
index 0000000..27ee27b
--- /dev/null
+++ b/core/res/res/values/colors_device_defaults.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- Colors specific to DeviceDefault themes. These are mostly pass-throughs to enable
+     overlaying new theme colors. -->
+<resources>
+    <color name="primary_device_default_dark">@color/primary_material_dark</color>
+    <color name="primary_device_default_light">@color/primary_material_light</color>
+    <color name="primary_device_default_settings">@color/primary_material_settings</color>
+    <color name="primary_dark_device_default_dark">@color/primary_dark_material_dark</color>
+    <color name="primary_dark_device_default_light">@color/primary_dark_material_light</color>
+    <color name="primary_dark_device_default_settings">@color/primary_dark_material_settings</color>
+
+    <color name="secondary_device_default_settings">@color/secondary_material_settings</color>
+    <color name="tertiary_device_default_settings">@color/tertiary_material_settings</color>
+    <color name="quaternary_device_default_settings">@color/quaternary_material_settings</color>
+
+    <color name="accent_device_default_700">@color/material_deep_teal_700</color>
+    <color name="accent_device_default_light">@color/accent_material_light</color>
+    <color name="accent_device_default_dark">@color/accent_material_dark</color>
+    <color name="accent_device_default_50">@color/material_deep_teal_50</color>
+</resources>
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index c8ca116..a864cf3 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -26,9 +26,15 @@
 
     <color name="primary_material_dark">@color/material_grey_900</color>
     <color name="primary_material_light">@color/material_grey_100</color>
+    <color name="primary_material_settings">@color/material_blue_grey_900</color>
     <color name="primary_dark_material_dark">@color/black</color>
     <color name="primary_dark_material_light">@color/material_grey_600</color>
     <color name="primary_dark_material_light_light_status_bar">@color/material_grey_300</color>
+    <color name="primary_dark_material_settings">@color/material_blue_grey_950</color>
+
+    <color name="secondary_material_settings">@color/material_blue_grey_800</color>
+    <color name="tertiary_material_settings">@color/material_blue_grey_700</color>
+    <color name="quaternary_material_settings">@color/material_blue_grey_200</color>
 
     <color name="accent_material_light">@color/material_deep_teal_500</color>
     <color name="accent_material_dark">@color/material_deep_teal_200</color>
@@ -75,11 +81,15 @@
     <color name="material_grey_100">#fff5f5f5</color>
     <color name="material_grey_50">#fffafafa</color>
 
+    <color name="material_deep_teal_50">#ffe0f2f1</color>
     <color name="material_deep_teal_100">#ffb2dfdb</color>
     <color name="material_deep_teal_200">#ff80cbc4</color>
     <color name="material_deep_teal_300">#ff4db6ac</color>
     <color name="material_deep_teal_500">#ff009688</color>
+    <color name="material_deep_teal_700">#ff00796b</color>
 
+    <color name="material_blue_grey_200">#ffb0bec5</color>
+    <color name="material_blue_grey_700">#ff455a64</color>
     <color name="material_blue_grey_800">#ff37474f</color>
     <color name="material_blue_grey_900">#ff263238</color>
     <color name="material_blue_grey_950">#ff21272b</color>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d0fd36a..7d19537 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -427,8 +427,11 @@
     <!-- Boolean indicating whether or not wifi firmware debugging is enabled -->
     <bool translatable="false" name="config_wifi_enable_wifi_firmware_debugging">true</bool>
 
-    <!-- Integer size limit, in KB, for a single WifiLogger ringbuffer -->
-    <integer translatable="false" name="config_wifi_logger_ring_buffer_size_limit_kb">32</integer>
+    <!-- Integer size limit, in KB, for a single WifiLogger ringbuffer, in default logging mode -->
+    <integer translatable="false" name="config_wifi_logger_ring_buffer_default_size_limit_kb">32</integer>
+
+    <!-- Integer size limit, in KB, for a single WifiLogger ringbuffer, in verbose logging mode -->
+    <integer translatable="false" name="config_wifi_logger_ring_buffer_verbose_size_limit_kb">1024</integer>
 
     <!-- Boolean indicating whether or not wifi should turn off when emergency call is made -->
     <bool translatable="false" name="config_wifi_turn_off_during_emergency_call">false</bool>
@@ -751,6 +754,26 @@
     -->
     <integer name="config_defaultNightMode">1</integer>
 
+    <!-- Control whether Night display is available. This should only be enabled on devices
+         with HWC 2.0 or higher. -->
+    <bool name="config_nightDisplayAvailable">false</bool>
+
+    <!-- Default mode to control how Night display is automatically activated.
+         One of the following values (see NightDisplayController.java):
+             0 - AUTO_MODE_DISABLED
+             1 - AUTO_MODE_CUSTOM
+             2 - AUTO_MODE_TWILIGHT
+    -->
+    <integer name="config_defaultNightDisplayAutoMode">1</integer>
+
+    <!-- Default time when Night display is automatically activated.
+         Represented as milliseconds from midnight (e.g. 79200000 == 10pm). -->
+    <integer name="config_defaultNightDisplayCustomStartTime">79200000</integer>
+
+    <!-- Default time when Night display is automatically deactivated.
+         Represented as milliseconds from midnight (e.g. 21600000 == 6am). -->
+    <integer name="config_defaultNightDisplayCustomEndTime">21600000</integer>
+
     <!-- Indicate whether to allow the device to suspend when the screen is off
          due to the proximity sensor.  This resource should only be set to true
          if the sensor HAL correctly handles the proximity sensor as a wake-up source.
@@ -2461,6 +2484,10 @@
     <!-- True if the device supports Sustained Performance Mode-->
     <bool name="config_sustainedPerformanceModeSupported">false</bool>
 
+    <!-- File used to enable the double touch gesture.
+         TODO: move to input HAL once ready. -->
+    <string name="config_doubleTouchGestureEnableFile"></string>
+
     <!-- Controls how we deal with externally connected physical keyboards.
          0 - When using this device, it is not clear for users to recognize when the physical
              keyboard is (should be) connected and when it is (should be) disconnected.  Most of
@@ -2486,4 +2513,18 @@
     <string-array translatable="false" name="config_defaultPinnerServiceFiles">
     </string-array>
 
+    <!-- True if camera app should be pinned via Pinner Service -->
+    <bool name="config_pinnerCameraApp">false</bool>
+
+    <!-- Component that is the default launcher when demo mode is enabled. -->
+    <string name="config_demoModeLauncherComponent">com.android.retaildemo/.DemoPlayer</string>
+
+    <!-- Flag indicating whether round icons should be parsed from the application manifest. -->
+    <bool name="config_useRoundIcon">false</bool>
+
+    <!-- True if the device supports system navigation keys. -->
+    <bool name="config_supportSystemNavigationKeys">false</bool>
+
+    <!-- Package name for the device provisioning package. -->
+    <string name="config_deviceProvisioningPackage"></string>
 </resources>
diff --git a/core/res/res/values/config_material.xml b/core/res/res/values/config_material.xml
new file mode 100644
index 0000000..a37be83
--- /dev/null
+++ b/core/res/res/values/config_material.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds, only for Material theme.  Do not translate.
+
+     NOTE: The naming convention is "config_camelCaseValue".  -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- True if the device supports action bars. -->
+    <bool name="config_windowActionBarSupported">true</bool>
+
+    <!-- True if the device should have titles by default. -->
+    <bool name="config_windowNoTitleDefault">false</bool>
+
+    <!-- The alert controller to use for alert dialogs. -->
+    <integer name="config_alertDialogController">0</integer>
+
+    <!-- True if windowOverscan should be on by default. -->
+    <bool name="config_windowOverscanByDefault">false</bool>
+
+    <!-- Max number of lines for the dialog title. -->
+    <integer name="config_dialogWindowTitleMaxLines">1</integer>
+
+    <!-- True if preference fragment should clip to padding. -->
+    <bool name="config_preferenceFragmentClipToPadding">true</bool>
+</resources>
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index 00e48a0..f96cef9 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -24,6 +24,8 @@
 
     <!-- Preference fragment padding, sides -->
     <dimen name="preference_fragment_padding_side_material">0dp</dimen>
+    <!-- Preference fragment padding, vertical -->
+    <dimen name="preference_fragment_padding_vertical_material">0dp</dimen>
 
     <!-- Preference breadcrumbs padding, start padding -->
     <dimen name="preference_breadcrumbs_padding_start_material">12dp</dimen>
@@ -53,6 +55,8 @@
     <!-- Default padding for list items. This should match the action bar
          content inset so that ListActivity items line up correctly. -->
     <dimen name="list_item_padding_horizontal_material">@dimen/action_bar_content_inset_material</dimen>
+    <dimen name="list_item_padding_start_material">@dimen/action_bar_content_inset_material</dimen>
+    <dimen name="list_item_padding_end_material">@dimen/action_bar_content_inset_material</dimen>
 
     <!-- Padding to add to the start of the overflow action button. -->
     <dimen name="action_bar_overflow_padding_start_material">6dp</dimen>
@@ -84,6 +88,8 @@
     <dimen name="text_size_medium_material">18sp</dimen>
     <dimen name="text_size_small_material">14sp</dimen>
 
+    <item name="text_line_spacing_multiplier_material" format="float" type="dimen">1.0</item>
+
     <dimen name="text_edit_floating_toolbar_elevation">2dp</dimen>
     <dimen name="text_edit_floating_toolbar_margin">20dp</dimen>
 
diff --git a/core/res/res/values/ids.xml b/core/res/res/values/ids.xml
index 7f8acd3..5c165e6 100644
--- a/core/res/res/values/ids.xml
+++ b/core/res/res/values/ids.xml
@@ -122,9 +122,11 @@
 
   <!-- Accessibility action identifier for {@link android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_SET_PROGRESS}. -->
   <item type="id" name="accessibilityActionSetProgress" />
-  
+
   <!-- Accessibility action identifier for {@link android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_CONTEXT_CLICK}. -->
   <item type="id" name="accessibilityActionContextClick" />
 
   <item type="id" name="remote_input_tag" />
+
+  <item type="id" name="cross_task_transition" />
 </resources>
diff --git a/core/res/res/values/integers.xml b/core/res/res/values/integers.xml
index 8f8d59e..71ac2f4 100644
--- a/core/res/res/values/integers.xml
+++ b/core/res/res/values/integers.xml
@@ -26,4 +26,5 @@
 
     <integer name="date_picker_mode">1</integer>
     <integer name="time_picker_mode">1</integer>
+    <integer name="date_picker_header_max_lines_material">2</integer>
 </resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 6797799..77de87d 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2728,4 +2728,18 @@
     <public type="id" name="icon_frame" id="0x0102003e" />
     <public type="id" name="list_container" id="0x0102003f" />
     <public type="id" name="switch_widget" id="0x01020040" />
+  <!-- ===============================================================
+       Resources added in version N MR1 of the platform
+       =============================================================== -->
+    <eat-comment />
+    <public type="attr" name="shortcutId" id="0x01010528" />
+    <public type="attr" name="shortcutShortLabel" id="0x01010529" />
+    <public type="attr" name="shortcutLongLabel" id="0x0101052a" />
+    <public type="attr" name="shortcutDisabledMessage" id="0x0101052b" />
+    <public type="attr" name="roundIcon" id="0x0101052c" />
+    <public type="attr" name="contextUri" id="0x0101052d" />
+    <public type="attr" name="contextDescription" id="0x0101052e" />
+    <public type="attr" name="showMetadataInPreview" id="0x0101052f" />
+    <public type="attr" name="colorSecondary" id="0x01010530" />
+
 </resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index b55a9b22..f0cfd2b 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4371,6 +4371,23 @@
     <!-- The representation of a time duration when negative. An example is -1:14. This can be used with a countdown timer for example.-->
     <string name="negative_duration">\u2212<xliff:g id="time" example="1:14">%1$s</xliff:g></string>
 
+    <!-- Title of notification to start a new demo session when device is in retail mode [CHAR LIMIT=NONE] -->
+    <string name="reset_retail_demo_mode_title">Reset device?</string>
+    <!-- Text of notification to start a new demo session when device is in retail mode [CHAR LIMIT=NONE] -->
+    <string name="reset_retail_demo_mode_text">Tap to reset device</string>
+    <!-- Text of dialog shown when starting a demo user for the first time [CHAR LIMIT=40] -->
+    <string name="demo_starting_message">Starting demo\u2026</string>
+    <!-- Text of dialog shown when starting a new demo user in retail demo mode [CHAR LIMIT=40] -->
+    <string name="demo_restarting_message">Resetting device\u2026</string>
+    <!-- Title of the dialog shown when user inactivity times out in retail demo mode [CHAR LIMIT=40] -->
+    <string name="demo_user_inactivity_timeout_title">Reset device?</string>
+    <!-- Warning message shown when user inactivity times out in retail demo mode [CHAR LIMIT=none] -->
+    <string name="demo_user_inactivity_timeout_countdown">You\u2019ll lose any changes and the demo will start again in <xliff:g id="timeout" example="9">%1$s</xliff:g> seconds\u2026</string>
+    <!-- Text of button to allow user to abort countdown and continue current session in retail demo mode [CHAR LIMIT=40] -->
+    <string name="demo_user_inactivity_timeout_left_button">Cancel</string>
+    <!-- Text of button to allow user to abort countdown and immediately start another session in retail demo mode [CHAR LIMIT=40] -->
+    <string name="demo_user_inactivity_timeout_right_button">Reset now</string>
+
     <!-- Title of notification shown when device has been forced to safe mode after a security compromise. -->
     <string name="audit_safemode_notification">Factory reset to use this device without restrictions</string>
     <!-- Description of notification shown when device has been forced to safe mode after a security compromise. -->
@@ -4379,4 +4396,6 @@
     <!-- Accessibilty string added to a widget that has been suspended [CHAR LIMIT=20] -->
     <string name="suspended_widget_accessibility">Disabled <xliff:g id="label" example="Calendar">%1$s</xliff:g></string>
 
+    <!-- Label used by Telephony code, assigned as the display name for conference calls [CHAR LIMIT=60] -->
+    <string name="conference_call">Conference Call</string>
 </resources>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 790dcfa..762cf31 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1122,6 +1122,8 @@
     <style name="PreferenceFragmentList">
         <item name="paddingStart">@dimen/preference_fragment_padding_side</item>
         <item name="paddingEnd">@dimen/preference_fragment_padding_side</item>
+        <item name="paddingTop">0dp</item>
+        <item name="paddingBottom">@dimen/preference_fragment_padding_bottom</item>
     </style>
 
     <!-- Other Misc Styles -->
@@ -1408,7 +1410,7 @@
         <item name="paddingEnd">?attr/dialogPreferredPadding</item>
         <item name="background">?attr/selectableItemBackground</item>
         <item name="drawablePadding">32dp</item>
-        <item name="drawableTint">@color/accent_material_light</item>
+        <item name="drawableTint">?android:attr/colorAccent</item>
         <item name="drawableTintMode">src_atop</item>
     </style>
 
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index bb07834..fad3488 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -36,13 +36,18 @@
         <item name="layout">@layout/preference_material</item>
     </style>
 
-    <style name="PreferenceFragment.Material">
+    <style name="BasePreferenceFragment">
         <item name="layout">@layout/preference_list_fragment_material</item>
         <item name="paddingStart">@dimen/preference_fragment_padding_side_material</item>
         <item name="paddingEnd">@dimen/preference_fragment_padding_side_material</item>
+        <item name="paddingTop">@dimen/preference_fragment_padding_vertical_material</item>
+        <item name="paddingBottom">@dimen/preference_fragment_padding_vertical_material</item>
         <item name="divider">?attr/listDivider</item>
+        <item name="clipToPadding">@bool/config_preferenceFragmentClipToPadding</item>
     </style>
 
+    <style name="PreferenceFragment.Material" parent="BasePreferenceFragment"/>
+
     <style name="PreferenceActivity.Material">
         <item name="layout">@layout/preference_list_content_material</item>
         <item name="headerLayout">@layout/preference_header_item_material</item>
@@ -134,6 +139,8 @@
     <style name="PreferenceFragmentList.Material">
         <item name="paddingStart">@dimen/preference_fragment_padding_side_material</item>
         <item name="paddingEnd">@dimen/preference_fragment_padding_side_material</item>
+        <item name="paddingTop">@dimen/preference_fragment_padding_vertical_material</item>
+        <item name="paddingBottom">@dimen/preference_fragment_padding_vertical_material</item>
     </style>
 
     <!-- Begin Material theme styles -->
@@ -147,6 +154,7 @@
         <item name="textColorLink">?attr/textColorLink</item>
         <item name="textSize">@dimen/text_size_body_1_material</item>
         <item name="fontFamily">@string/font_family_body_1_material</item>
+        <item name="lineSpacingMultiplier">@dimen/text_line_spacing_multiplier_material</item>
     </style>
 
     <style name="TextAppearance.Material.Display4">
@@ -1190,6 +1198,7 @@
         <item name="listItemLayout">@layout/select_dialog_item_material</item>
         <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
         <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
+        <item name="controllerType">@integer/config_alertDialogController</item>
     </style>
 
     <style name="AlertDialog.Material.Light" />
@@ -1224,7 +1233,7 @@
     <style name="DialogWindowTitleBackground.Material.Light" />
 
     <style name="DialogWindowTitle.Material">
-        <item name="maxLines">1</item>
+        <item name="maxLines">@integer/config_dialogWindowTitleMaxLines</item>
         <item name="scrollHorizontally">true</item>
         <item name="textAppearance">@style/TextAppearance.Material.DialogWindowTitle</item>
     </style>
diff --git a/core/res/res/values/styles_micro.xml b/core/res/res/values/styles_micro.xml
deleted file mode 100644
index 341a0a4c..0000000
--- a/core/res/res/values/styles_micro.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<resources>
-    <style name="Animation.Micro"/>
-
-    <style name="Animation.Micro.Activity" parent="Animation.Material.Activity">
-        <item name="activityOpenEnterAnimation">@anim/slide_in_enter_micro</item>
-        <item name="activityOpenRemoteViewsEnterAnimation">@anim/slide_in_enter_micro</item>
-        <item name="activityOpenExitAnimation">@anim/slide_in_exit_micro</item>
-        <item name="activityCloseEnterAnimation">@null</item>
-        <item name="activityCloseExitAnimation">@anim/slide_out_micro</item>
-        <item name="taskOpenEnterAnimation">@anim/slide_in_enter_micro</item>
-        <item name="taskOpenExitAnimation">@anim/slide_in_exit_micro</item>
-        <item name="taskCloseEnterAnimation">@null</item>
-        <item name="taskCloseExitAnimation">@anim/slide_out_micro</item>
-        <item name="taskToFrontEnterAnimation">@anim/slide_in_enter_micro</item>
-        <item name="taskToFrontExitAnimation">@anim/slide_in_exit_micro</item>
-        <item name="taskToBackEnterAnimation">@null</item>
-        <item name="taskToBackExitAnimation">@anim/slide_out_micro</item>
-        <item name="wallpaperOpenEnterAnimation">@null</item>
-        <item name="wallpaperOpenExitAnimation">@anim/slide_out_micro</item>
-        <item name="wallpaperCloseEnterAnimation">@anim/slide_in_enter_micro</item>
-        <item name="wallpaperCloseExitAnimation">@anim/slide_in_exit_micro</item>
-        <item name="wallpaperIntraOpenEnterAnimation">@null</item>
-        <item name="wallpaperIntraOpenExitAnimation">@anim/slide_out_micro</item>
-        <item name="wallpaperIntraCloseEnterAnimation">@anim/slide_in_enter_micro</item>
-        <item name="wallpaperIntraCloseExitAnimation">@anim/slide_in_exit_micro</item>
-    </style>
-
-    <style name="AlertDialog.Micro" parent="AlertDialog.Material.Light">
-        <item name="fullDark">@null</item>
-        <item name="topDark">@null</item>
-        <item name="centerDark">@null</item>
-        <item name="bottomDark">@null</item>
-        <item name="fullBright">@null</item>
-        <item name="topBright">@null</item>
-        <item name="centerBright">@null</item>
-        <item name="bottomBright">@null</item>
-        <item name="bottomMedium">@null</item>
-        <item name="centerMedium">@null</item>
-        <item name="layout">@layout/alert_dialog_micro</item>
-    </style>
-
-    <style name="DialogWindowTitle.Micro">
-        <item name="maxLines">1</item>
-        <item name="scrollHorizontally">true</item>
-        <item name="textAppearance">@style/TextAppearance.Micro.DialogWindowTitle</item>
-    </style>
-
-    <style name="TextAppearance.Micro" parent="TextAppearance.Material">
-        <item name="textSize">20sp</item>
-        <item name="fontFamily">sans-serif-condensed-light</item>
-        <item name="textColor">@color/micro_text_light</item>
-    </style>
-
-    <style name="TextAppearance.Micro.DialogWindowTitle" parent="TextAppearance.Material.DialogWindowTitle">
-        <item name="textSize">20sp</item>
-        <item name="fontFamily">sans-serif-condensed-light</item>
-        <item name="textColor">@color/micro_text_light</item>
-    </style>
-
-    <style name="Widget.Micro" parent="Widget.Material" />
-
-    <style name="Widget.Micro.TextView">
-        <item name="fontFamily">sans-serif-condensed</item>
-    </style>
-
-    <style name="Widget.Micro.NumberPicker">
-        <item name="internalLayout">@layout/number_picker_with_selector_wheel_micro</item>
-        <item name="solidColor">@color/transparent</item>
-        <item name="selectionDivider">@drawable/numberpicker_selection_divider</item>
-        <item name="selectionDividerHeight">0dip</item>
-        <item name="selectionDividersDistance">104dip</item>
-        <item name="internalMinWidth">64dip</item>
-        <item name="internalMaxHeight">180dip</item>
-        <item name="virtualButtonPressedDrawable">?attr/selectableItemBackground</item>
-        <item name="descendantFocusability">blocksDescendants</item>
-    </style>
-
-</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index d154b03..ff5f7d9 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -297,7 +297,8 @@
   <java-symbol type="bool" name="config_wifi_enable_disconnection_debounce" />
   <java-symbol type="bool" name="config_wifi_revert_country_code_on_cellular_loss" />
   <java-symbol type="bool" name="config_wifi_enable_wifi_firmware_debugging" />
-  <java-symbol type="integer" name="config_wifi_logger_ring_buffer_size_limit_kb" />
+  <java-symbol type="integer" name="config_wifi_logger_ring_buffer_default_size_limit_kb" />
+  <java-symbol type="integer" name="config_wifi_logger_ring_buffer_verbose_size_limit_kb" />
   <java-symbol type="bool" name="config_wifi_turn_off_during_emergency_call" />
   <java-symbol type="bool" name="config_supportMicNearUltrasound" />
   <java-symbol type="bool" name="config_supportSpeakerNearUltrasound" />
@@ -1103,6 +1104,11 @@
   <java-symbol type="string" name="lockscreen_transport_pause_description" />
   <java-symbol type="string" name="config_ethernet_tcp_buffers" />
   <java-symbol type="string" name="config_wifi_tcp_buffers" />
+  <java-symbol type="string" name="config_demoModeLauncherComponent" />
+  <java-symbol type="string" name="demo_starting_message" />
+  <java-symbol type="string" name="demo_restarting_message" />
+  <java-symbol type="string" name="conference_call" />
+
 
   <java-symbol type="plurals" name="bugreport_countdown" />
   <java-symbol type="plurals" name="duration_hours" />
@@ -1859,7 +1865,6 @@
   <java-symbol type="string" name="vpn_lockdown_config" />
   <java-symbol type="string" name="wallpaper_binding_label" />
   <java-symbol type="style" name="Theme.Dialog.AppError" />
-  <java-symbol type="style" name="Theme.Micro.Dialog.Alert" />
   <java-symbol type="style" name="Theme.Leanback.Dialog.Alert" />
   <java-symbol type="style" name="Theme.Toast" />
   <java-symbol type="xml" name="storage_list" />
@@ -1887,6 +1892,12 @@
   <java-symbol type="string" name="config_persistentDataPackageName" />
   <java-symbol type="string" name="audit_safemode_notification" />
   <java-symbol type="string" name="audit_safemode_notification_details" />
+  <java-symbol type="string" name="reset_retail_demo_mode_title" />
+  <java-symbol type="string" name="reset_retail_demo_mode_text" />
+  <java-symbol type="string" name="demo_user_inactivity_timeout_title" />
+  <java-symbol type="string" name="demo_user_inactivity_timeout_countdown" />
+  <java-symbol type="string" name="demo_user_inactivity_timeout_left_button" />
+  <java-symbol type="string" name="demo_user_inactivity_timeout_right_button" />
 
   <java-symbol type="layout" name="resolver_list" />
   <java-symbol type="id" name="resolver_list" />
@@ -2183,6 +2194,7 @@
   <java-symbol type="style" name="TextAppearance.Material.TimePicker.TimeLabel" />
   <java-symbol type="attr" name="seekBarPreferenceStyle" />
   <java-symbol type="style" name="Theme.DeviceDefault.Resolver" />
+  <java-symbol type="style" name="Theme.DeviceDefault.System" />
   <java-symbol type="attr" name="preferenceActivityStyle" />
   <java-symbol type="attr" name="preferenceFragmentStyle" />
   <java-symbol type="bool" name="skipHoldBeforeMerge" />
@@ -2607,9 +2619,53 @@
 
   <!-- Pinner Service -->
   <java-symbol type="array" name="config_defaultPinnerServiceFiles" />
+  <java-symbol type="bool" name="config_pinnerCameraApp" />
+
+  <java-symbol type="string" name="config_doubleTouchGestureEnableFile" />
 
   <java-symbol type="string" name="suspended_widget_accessibility" />
 
+  <!-- Used internally for assistant to launch activity transitions -->
+  <java-symbol type="id" name="cross_task_transition" />
+
+  <java-symbol type="bool" name="config_useRoundIcon" />
+
+  <!-- For System navigation keys -->
+  <java-symbol type="bool" name="config_supportSystemNavigationKeys" />
+
   <java-symbol type="layout" name="unsupported_display_size_dialog_content" />
   <java-symbol type="string" name="unsupported_display_size_message" />
+
+  <!-- Package name for the device provisioning package -->
+  <java-symbol type="string" name="config_deviceProvisioningPackage" />
+
+  <!-- Used for MimeIconUtils. -->
+  <java-symbol type="drawable" name="ic_doc_apk" />
+  <java-symbol type="drawable" name="ic_doc_audio" />
+  <java-symbol type="drawable" name="ic_doc_certificate" />
+  <java-symbol type="drawable" name="ic_doc_codes" />
+  <java-symbol type="drawable" name="ic_doc_compressed" />
+  <java-symbol type="drawable" name="ic_doc_contact" />
+  <java-symbol type="drawable" name="ic_doc_event" />
+  <java-symbol type="drawable" name="ic_doc_font" />
+  <java-symbol type="drawable" name="ic_doc_image" />
+  <java-symbol type="drawable" name="ic_doc_pdf" />
+  <java-symbol type="drawable" name="ic_doc_presentation" />
+  <java-symbol type="drawable" name="ic_doc_spreadsheet" />
+  <java-symbol type="drawable" name="ic_doc_document" />
+  <java-symbol type="drawable" name="ic_doc_video" />
+  <java-symbol type="drawable" name="ic_doc_word" />
+  <java-symbol type="drawable" name="ic_doc_excel" />
+  <java-symbol type="drawable" name="ic_doc_powerpoint" />
+  <java-symbol type="drawable" name="ic_doc_folder" />
+  <java-symbol type="drawable" name="ic_doc_audio" />
+  <java-symbol type="drawable" name="ic_doc_image" />
+  <java-symbol type="drawable" name="ic_doc_text" />
+  <java-symbol type="drawable" name="ic_doc_video" />
+  <java-symbol type="drawable" name="ic_doc_generic" />
+
+  <java-symbol type="bool" name="config_nightDisplayAvailable" />
+  <java-symbol type="integer" name="config_defaultNightDisplayAutoMode" />
+  <java-symbol type="integer" name="config_defaultNightDisplayCustomStartTime" />
+  <java-symbol type="integer" name="config_defaultNightDisplayCustomEndTime" />
 </resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index a77b951..5b2522f 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -57,6 +57,7 @@
 
         <item name="colorPrimaryDark">@color/legacy_primary_dark</item>
         <item name="colorPrimary">@color/legacy_primary</item>
+        <item name="colorSecondary">?attr/colorPrimary</item>
         <item name="colorControlActivated">@color/legacy_control_activated</item>
         <item name="colorControlNormal">@color/legacy_control_normal</item>
         <item name="colorControlHighlight">@color/legacy_button_pressed</item>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 11bb106..50e588d 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -199,25 +199,50 @@
 
         <item name="mediaRouteButtonStyle">@style/Widget.DeviceDefault.MediaRouteButton</item>
 
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar -->
-    <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Material.NoActionBar"  />
+    <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Material.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar.  This theme
          sets {@link android.R.attr#windowFullscreen} to true.  -->
-    <style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen"  />
+    <style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar and
     extending in to overscan region.  This theme
     sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
     to true. -->
-    <style name="Theme.DeviceDefault.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan"  />
+    <style name="Theme.DeviceDefault.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} that has no title bar and translucent
          system decor.  This theme sets {@link android.R.attr#windowTranslucentStatus} and
          {@link android.R.attr#windowTranslucentNavigation} to true. -->
-    <style name="Theme.DeviceDefault.NoActionBar.TranslucentDecor" parent="Theme.Material.NoActionBar.TranslucentDecor"  />
+    <style name="Theme.DeviceDefault.NoActionBar.TranslucentDecor" parent="Theme.Material.NoActionBar.TranslucentDecor">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault theme for dialog windows and activities. This changes the window to be
     floating (not fill the entire screen), and puts a frame around its contents. You can set this
@@ -231,18 +256,38 @@
 
         <item name="textAppearance">@style/TextAppearance.DeviceDefault</item>
         <item name="textAppearanceInverse">@style/TextAppearance.DeviceDefault.Inverse</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog} that has a nice minimum width for a
     regular dialog. -->
-    <style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth" />
+    <style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog} without an action bar -->
-    <style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar" />
+    <style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog_NoActionBar} that has a nice minimum width
     for a regular dialog. -->
-    <style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth" />
+    <style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of Theme.DeviceDefault.Dialog that has a fixed size. -->
     <style name="Theme.DeviceDefault.Dialog.FixedSize">
@@ -262,44 +307,99 @@
 
     <!-- DeviceDefault theme for a window that will be displayed either full-screen on smaller
     screens (small, normal) or as a dialog on larger screens (large, xlarge). -->
-    <style name="Theme.DeviceDefault.DialogWhenLarge" parent="Theme.Material.DialogWhenLarge"  />
+    <style name="Theme.DeviceDefault.DialogWhenLarge" parent="Theme.Material.DialogWhenLarge">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault theme for a window without an action bar that will be displayed either
     full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
     xlarge). -->
-    <style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar"  />
+    <style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault theme for a presentation window on a secondary display. -->
-    <style name="Theme.DeviceDefault.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation" />
+    <style name="Theme.DeviceDefault.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault theme for panel windows. This removes all extraneous window
     decorations, so you basically have an empty rectangle in which to place your content. It makes
     the window floating, with a transparent background, and turns off dimming behind the window. -->
-    <style name="Theme.DeviceDefault.Panel" parent="Theme.Material.Panel"  />
+    <style name="Theme.DeviceDefault.Panel" parent="Theme.Material.Panel">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
     behind them. -->
-    <style name="Theme.DeviceDefault.Wallpaper" parent="Theme.Material.Wallpaper"  />
+    <style name="Theme.DeviceDefault.Wallpaper" parent="Theme.Material.Wallpaper">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
     behind them and without an action bar. -->
-    <style name="Theme.DeviceDefault.Wallpaper.NoTitleBar" parent="Theme.Material.Wallpaper.NoTitleBar"  />
+    <style name="Theme.DeviceDefault.Wallpaper.NoTitleBar" parent="Theme.Material.Wallpaper.NoTitleBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- DeviceDefault style for input methods, which is used by the
          {@link android.inputmethodservice.InputMethodService} class.-->
-    <style name="Theme.DeviceDefault.InputMethod" parent="Theme.Material.InputMethod"  />
+    <style name="Theme.DeviceDefault.InputMethod" parent="Theme.Material.InputMethod">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- DeviceDefault style for input methods, which is used by the
          {@link android.service.voice.VoiceInteractionSession} class.-->
-    <style name="Theme.DeviceDefault.VoiceInteractionSession" parent="Theme.Material.VoiceInteractionSession" >
-
+    <style name="Theme.DeviceDefault.VoiceInteractionSession" parent="Theme.Material.VoiceInteractionSession">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
     </style>
+
     <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
         <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
     </style>
 
-    <style name="Theme.DeviceDefault.SearchBar" parent="Theme.Material.SearchBar" />
-    <style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Material.Dialog.NoFrame" />
+    <style name="Theme.DeviceDefault.SearchBar" parent="Theme.Material.SearchBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
+
+    <style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Material.Dialog.NoFrame">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with a light-colored style -->
     <style name="Theme.DeviceDefault.Light" parent="Theme.Material.Light" >
@@ -447,34 +547,63 @@
 
         <item name="mediaRouteButtonStyle">@style/Widget.DeviceDefault.Light.MediaRouteButton</item>
 
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
     </style>
 
     <!-- Variant of the DeviceDefault (light) theme that has a solid (opaque) action bar with an
     inverse color profile. -->
-    <style name="Theme.DeviceDefault.Light.DarkActionBar" parent="Theme.Material.Light.DarkActionBar" />
+    <style name="Theme.DeviceDefault.Light.DarkActionBar" parent="Theme.Material.Light.DarkActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar -->
-    <style name="Theme.DeviceDefault.Light.NoActionBar" parent="Theme.Material.Light.NoActionBar"  />
+    <style name="Theme.DeviceDefault.Light.NoActionBar" parent="Theme.Material.Light.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar.
          This theme sets {@link android.R.attr#windowFullscreen} to true.  -->
-    <style name="Theme.DeviceDefault.Light.NoActionBar.Fullscreen" parent="Theme.Material.Light.NoActionBar.Fullscreen"  />
+    <style name="Theme.DeviceDefault.Light.NoActionBar.Fullscreen" parent="Theme.Material.Light.NoActionBar.Fullscreen">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar
     and extending in to overscan region.  This theme
     sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
     to true. -->
-    <style name="Theme.DeviceDefault.Light.NoActionBar.Overscan" parent="Theme.Material.Light.NoActionBar.Overscan" />
+    <style name="Theme.DeviceDefault.Light.NoActionBar.Overscan" parent="Theme.Material.Light.NoActionBar.Overscan">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Light} that has no title bar and translucent
          system decor.  This theme sets {@link android.R.attr#windowTranslucentStatus} and
          {@link android.R.attr#windowTranslucentNavigation} to true. -->
-    <style name="Theme.DeviceDefault.Light.NoActionBar.TranslucentDecor" parent="Theme.Material.Light.NoActionBar.TranslucentDecor" />
+    <style name="Theme.DeviceDefault.Light.NoActionBar.TranslucentDecor" parent="Theme.Material.Light.NoActionBar.TranslucentDecor">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- DeviceDefault light theme for dialog windows and activities. This changes the window to be
     floating (not fill the entire screen), and puts a frame around its contents. You can set this
     theme on an activity if you would like to make an activity that looks like a Dialog.-->
-    <style name="Theme.DeviceDefault.Light.Dialog" parent="Theme.Material.Light.Dialog" >
+    <style name="Theme.DeviceDefault.Light.Dialog" parent="Theme.Material.Light.Dialog">
         <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault.Light</item>
         <item name="windowAnimationStyle">@style/Animation.DeviceDefault.Dialog</item>
 
@@ -483,18 +612,38 @@
 
         <item name="textAppearance">@style/TextAppearance.DeviceDefault</item>
         <item name="textAppearanceInverse">@style/TextAppearance.DeviceDefault.Inverse</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} that has a nice minimum width for a
     regular dialog. -->
-    <style name="Theme.DeviceDefault.Light.Dialog.MinWidth" parent="Theme.Material.Light.Dialog.MinWidth" />
+    <style name="Theme.DeviceDefault.Light.Dialog.MinWidth" parent="Theme.Material.Light.Dialog.MinWidth">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
      <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} without an action bar -->
-    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar" parent="Theme.Material.Light.Dialog.NoActionBar" />
+    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar" parent="Theme.Material.Light.Dialog.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog_NoActionBar} that has a nice minimum
     width for a regular dialog. -->
-    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Light.Dialog.NoActionBar.MinWidth" />
+    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Light.Dialog.NoActionBar.MinWidth">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Variant of Theme.DeviceDefault.Dialog that has a fixed size. -->
     <style name="Theme.DeviceDefault.Light.Dialog.FixedSize">
@@ -502,6 +651,11 @@
         <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
         <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
         <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
     </style>
 
     <!-- Variant of Theme.DeviceDefault.Dialog.NoActionBar that has a fixed size. -->
@@ -510,33 +664,119 @@
         <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
         <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
         <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
     </style>
 
     <!-- DeviceDefault light theme for a window that will be displayed either full-screen on smaller
     screens (small, normal) or as a dialog on larger screens (large, xlarge). -->
-    <style name="Theme.DeviceDefault.Light.DialogWhenLarge" parent="Theme.Material.Light.DialogWhenLarge"  />
+    <style name="Theme.DeviceDefault.Light.DialogWhenLarge" parent="Theme.Material.Light.DialogWhenLarge">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- DeviceDefault light theme for a window without an action bar that will be displayed either
     full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
     xlarge). -->
-    <style name="Theme.DeviceDefault.Light.DialogWhenLarge.NoActionBar" parent="Theme.Material.Light.DialogWhenLarge.NoActionBar"  />
+    <style name="Theme.DeviceDefault.Light.DialogWhenLarge.NoActionBar" parent="Theme.Material.Light.DialogWhenLarge.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- DeviceDefault light theme for a presentation window on a secondary display. -->
-    <style name="Theme.DeviceDefault.Light.Dialog.Presentation" parent="Theme.Material.Light.Dialog.Presentation" />
+    <style name="Theme.DeviceDefault.Light.Dialog.Presentation" parent="Theme.Material.Light.Dialog.Presentation">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- DeviceDefault light theme for panel windows. This removes all extraneous window
     decorations, so you basically have an empty rectangle in which to place your content. It makes
     the window floating, with a transparent background, and turns off dimming behind the window. -->
-    <style name="Theme.DeviceDefault.Light.Panel" parent="Theme.Material.Light.Panel"  />
+    <style name="Theme.DeviceDefault.Light.Panel" parent="Theme.Material.Light.Panel">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Material.Light.Dialog.Alert">
         <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault.Light</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
     </style>
 
-    <style name="Theme.DeviceDefault.Light.SearchBar" parent="Theme.Material.Light.SearchBar" />
+    <style name="Theme.DeviceDefault.Light.SearchBar" parent="Theme.Material.Light.SearchBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
+
 
     <!-- DeviceDefault theme for a window that should look like the Settings app.  -->
-    <style name="Theme.DeviceDefault.Settings" parent="Theme.Material.Settings" />
+    <style name="Theme.DeviceDefault.Settings" parent="Theme.Material.Settings">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+        <item name="colorSecondary">@color/secondary_device_default_settings</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
+
+    <!-- DeviceDefault theme for a window that should use Settings theme colors but has
+         a full dark palette (instead of Light with dark action bar like
+         Theme.DeviceDefault.Settings.  -->
+    <style name="Theme.DeviceDefault.Settings.Dark" parent="Theme.Material">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+        <item name="colorSecondary">@color/secondary_device_default_settings</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
+
+    <!-- Variant of {@link #Theme_DeviceDefault_Settings_Dark} with no action bar -->
+    <style name="Theme.DeviceDefault.Settings.Dark.NoActionBar" parent="Theme.Material.NoActionBar">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+        <item name="colorSecondary">@color/secondary_device_default_settings</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
+
+    <style name="Theme.DeviceDefault.Settings.Dialog" parent="Theme.Material.Settings.Dialog">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+        <item name="colorSecondary">@color/secondary_device_default_settings</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
+
+    <style name="Theme.DeviceDefault.Settings.DialogWhenLarge" parent="Theme.Material.Settings.DialogWhenLarge">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+        <item name="colorSecondary">@color/secondary_device_default_settings</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
+
+    <style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="Theme.Material.Settings.Dialog.Alert">
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+        <item name="colorSecondary">@color/secondary_device_default_settings</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
 
     <!-- Theme used for the intent picker activity. -->
     <style name="Theme.DeviceDefault.Resolver" parent="Theme.Material.Light">
@@ -549,6 +789,28 @@
         <item name="colorControlActivated">?attr/colorControlHighlight</item>
         <item name="listPreferredItemPaddingStart">?attr/dialogPreferredPadding</item>
         <item name="listPreferredItemPaddingEnd">?attr/dialogPreferredPadding</item>
+
+        <!-- Color palette -->
+        <item name="colorPrimary">@color/primary_device_default_light</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_light</item>
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
+
+    <!-- DeviceDefault theme for the default system theme.  -->
+    <style name="Theme.DeviceDefault.System" parent="Theme.DeviceDefault.Light.DarkActionBar" />
+
+    <style name="ThemeOverlay.DeviceDefault" />
+
+    <style name="ThemeOverlay.DeviceDefault.Accent">
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+    </style>
+
+    <style name="ThemeOverlay.DeviceDefault.Accent.Light">
+        <item name="colorAccent">@color/accent_device_default_light</item>
+    </style>
+
+    <style name="ThemeOverlay.DeviceDefault.Dark.ActionBar.Accent" parent="ThemeOverlay.Material.Dark.ActionBar">
+        <item name="colorAccent">@color/accent_device_default_dark</item>
     </style>
 
 </resources>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 2ea5c5e..35ce9b0 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -119,8 +119,8 @@
         <item name="textAppearanceListItemSecondary">@style/TextAppearance.Material.Body1</item>
         <item name="listPreferredItemPaddingLeft">@dimen/list_item_padding_horizontal_material</item>
         <item name="listPreferredItemPaddingRight">@dimen/list_item_padding_horizontal_material</item>
-        <item name="listPreferredItemPaddingStart">@dimen/list_item_padding_horizontal_material</item>
-        <item name="listPreferredItemPaddingEnd">@dimen/list_item_padding_horizontal_material</item>
+        <item name="listPreferredItemPaddingStart">@dimen/list_item_padding_start_material</item>
+        <item name="listPreferredItemPaddingEnd">@dimen/list_item_padding_end_material</item>
 
         <!-- @hide -->
         <item name="searchResultListItemHeight">58dip</item>
@@ -153,9 +153,9 @@
         <item name="windowBackground">?attr/colorBackground</item>
         <item name="windowClipToOutline">true</item>
         <item name="windowFrame">@null</item>
-        <item name="windowNoTitle">false</item>
+        <item name="windowNoTitle">@bool/config_windowNoTitleDefault</item>
         <item name="windowFullscreen">false</item>
-        <item name="windowOverscan">false</item>
+        <item name="windowOverscan">@bool/config_windowOverscanByDefault</item>
         <item name="windowIsFloating">false</item>
         <item name="windowContentOverlay">@null</item>
         <item name="windowShowWallpaper">false</item>
@@ -164,7 +164,7 @@
         <item name="windowTitleBackgroundStyle">@style/WindowTitleBackground.Material</item>
         <item name="windowAnimationStyle">@style/Animation.Material.Activity</item>
         <item name="windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
-        <item name="windowActionBar">true</item>
+        <item name="windowActionBar">@bool/config_windowActionBarSupported</item>
         <item name="windowActionModeOverlay">false</item>
         <item name="windowDrawsSystemBarBackgrounds">true</item>
         <item name="windowActionBarFullscreenDecorLayout">@layout/screen_toolbar</item>
@@ -480,8 +480,8 @@
         <item name="textAppearanceListItemSecondary">@style/TextAppearance.Material.Body1</item>
         <item name="listPreferredItemPaddingLeft">@dimen/list_item_padding_horizontal_material</item>
         <item name="listPreferredItemPaddingRight">@dimen/list_item_padding_horizontal_material</item>
-        <item name="listPreferredItemPaddingStart">@dimen/list_item_padding_horizontal_material</item>
-        <item name="listPreferredItemPaddingEnd">@dimen/list_item_padding_horizontal_material</item>
+        <item name="listPreferredItemPaddingStart">@dimen/list_item_padding_start_material</item>
+        <item name="listPreferredItemPaddingEnd">@dimen/list_item_padding_end_material</item>
 
         <!-- @hide -->
         <item name="searchResultListItemHeight">58dip</item>
@@ -514,9 +514,9 @@
         <item name="windowBackground">?attr/colorBackground</item>
         <item name="windowClipToOutline">true</item>
         <item name="windowFrame">@null</item>
-        <item name="windowNoTitle">false</item>
+        <item name="windowNoTitle">@bool/config_windowNoTitleDefault</item>
         <item name="windowFullscreen">false</item>
-        <item name="windowOverscan">false</item>
+        <item name="windowOverscan">@bool/config_windowOverscanByDefault</item>
         <item name="windowIsFloating">false</item>
         <item name="windowContentOverlay">@null</item>
         <item name="windowShowWallpaper">false</item>
@@ -525,7 +525,7 @@
         <item name="windowTitleBackgroundStyle">@style/WindowTitleBackground.Material</item>
         <item name="windowAnimationStyle">@style/Animation.Material.Activity</item>
         <item name="windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
-        <item name="windowActionBar">true</item>
+        <item name="windowActionBar">@bool/config_windowActionBarSupported</item>
         <item name="windowActionModeOverlay">false</item>
         <item name="windowDrawsSystemBarBackgrounds">true</item>
         <item name="windowActionBarFullscreenDecorLayout">@layout/screen_toolbar</item>
@@ -864,11 +864,8 @@
         <item name="searchViewStyle">@style/Widget.Material.SearchView.ActionBar</item>
     </style>
 
-    <!-- Theme overlay that overrides window properties to display as a dialog. -->
-    <style name="ThemeOverlay.Material.Dialog">
-        <item name="colorBackgroundCacheHint">@null</item>
-        <item name="colorBackground">?attr/colorBackgroundFloating</item>
-
+    <!-- Base theme for overlay dialogs, customize the colours in the actual dialog theme. -->
+    <style name="ThemeOverlay.Material.BaseDialog">
         <item name="windowFrame">@null</item>
         <item name="windowTitleStyle">@style/DialogWindowTitle.Material</item>
         <item name="windowTitleBackgroundStyle">@style/DialogWindowTitleBackground.Material</item>
@@ -897,6 +894,12 @@
         <item name="windowFixedHeightMinor">@null</item>
     </style>
 
+    <!-- Theme overlay that overrides window properties to display as a dialog. -->
+    <style name="ThemeOverlay.Material.Dialog" parent="ThemeOverlay.Material.BaseDialog">
+        <item name="colorBackgroundCacheHint">@null</item>
+        <item name="colorBackground">?attr/colorBackgroundFloating</item>
+    </style>
+
     <!-- Theme overlay that overrides window properties to display as a date picker dialog. -->
     <style name="ThemeOverlay.Material.Dialog.DatePicker">
         <item name="alertDialogStyle">@style/DatePickerDialog.Material</item>
@@ -1090,10 +1093,10 @@
 
         <item name="colorBackgroundCacheHint">@null</item>
 
-        <item name="listPreferredItemPaddingLeft">24dip</item>
-        <item name="listPreferredItemPaddingRight">24dip</item>
-        <item name="listPreferredItemPaddingStart">24dip</item>
-        <item name="listPreferredItemPaddingEnd">24dip</item>
+        <item name="listPreferredItemPaddingLeft">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingRight">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingStart">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingEnd">?attr/dialogPreferredPadding</item>
 
         <item name="listDivider">@null</item>
 
@@ -1201,10 +1204,10 @@
 
         <item name="colorBackgroundCacheHint">@null</item>
 
-        <item name="listPreferredItemPaddingLeft">24dip</item>
-        <item name="listPreferredItemPaddingRight">24dip</item>
-        <item name="listPreferredItemPaddingStart">24dip</item>
-        <item name="listPreferredItemPaddingEnd">24dip</item>
+        <item name="listPreferredItemPaddingLeft">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingRight">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingStart">?attr/dialogPreferredPadding</item>
+        <item name="listPreferredItemPaddingEnd">?attr/dialogPreferredPadding</item>
 
         <item name="listDivider">@null</item>
 
@@ -1300,8 +1303,9 @@
 
     <!-- Default theme for Settings and activities launched from Settings. -->
     <style name="Theme.Material.Settings" parent="Theme.Material.Light.DarkActionBar">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
 
         <item name="presentationTheme">@style/Theme.Material.Settings.Dialog.Presentation</item>
         <item name="searchDialogTheme">@style/Theme.Material.Settings.SearchBar</item>
@@ -1310,8 +1314,9 @@
 
     <!-- Default theme for Settings and activities launched from Settings. -->
     <style name="Theme.Material.Settings.NoActionBar" parent="Theme.Material.Light.NoActionBar">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
 
         <item name="presentationTheme">@style/Theme.Material.Settings.Dialog.Presentation</item>
         <item name="searchDialogTheme">@style/Theme.Material.Settings.SearchBar</item>
@@ -1319,41 +1324,48 @@
     </style>
 
     <style name="Theme.Material.Settings.BaseDialog" parent="Theme.Material.Light.BaseDialog">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 
     <style name="Theme.Material.Settings.Dialog" parent="Theme.Material.Settings.BaseDialog" />
 
     <style name="Theme.Material.Settings.Dialog.BaseAlert" parent="Theme.Material.Light.Dialog.BaseAlert">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 
     <style name="Theme.Material.Settings.Dialog.Alert" parent="Theme.Material.Settings.Dialog.BaseAlert" />
 
     <style name="Theme.Material.Settings.DialogWhenLarge" parent="Theme.Material.Light.DialogWhenLarge.DarkActionBar">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 
     <style name="Theme.Material.Settings.DialogWhenLarge.NoActionBar" parent="Theme.Material.Light.DialogWhenLarge.NoActionBar">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 
     <style name="Theme.Material.Settings.Dialog.Presentation" parent="Theme.Material.Light.Dialog.Presentation">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 
     <style name="Theme.Material.Settings.SearchBar" parent="Theme.Material.Light.SearchBar">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 
     <style name="Theme.Material.Settings.CompactMenu" parent="Theme.Material.Light.CompactMenu">
-        <item name="colorPrimary">@color/material_blue_grey_900</item>
-        <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
+        <item name="colorPrimary">@color/primary_material_settings</item>
+        <item name="colorPrimaryDark">@color/primary_dark_material_settings</item>
+        <item name="colorSecondary">@color/secondary_material_settings</item>
     </style>
 </resources>
diff --git a/core/res/res/values/themes_micro.xml b/core/res/res/values/themes_micro.xml
deleted file mode 100644
index 25a6e00..0000000
--- a/core/res/res/values/themes_micro.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<resources>
-    <style name="Theme.MicroBase" parent="Theme.Material.NoActionBar">
-        <item name="alertDialogTheme">@style/Theme.Micro.Dialog.Alert</item>
-        <item name="alertDialogStyle">@style/AlertDialog.Micro</item>
-        <item name="dialogTheme">@style/Theme.Micro.Dialog</item>
-        <item name="textViewStyle">@style/Widget.Micro.TextView</item>
-        <item name="numberPickerStyle">@style/Widget.Micro.NumberPicker</item>
-        <item name="windowAnimationStyle">@style/Animation.Micro.Activity</item>
-        <item name="windowBackground">@color/black</item>
-        <item name="windowContentOverlay">@null</item>
-        <item name="windowIsFloating">false</item>
-        <!-- Required to force windowInsets dispatch through application UI. -->
-        <item name="windowOverscan">true</item>
-    </style>
-
-    <style name="Theme.Micro" parent="Theme.MicroBase">
-    </style>
-
-    <style name="Theme.Micro.LightBase" parent="Theme.Material.Light.NoActionBar">
-        <item name="alertDialogTheme">@style/Theme.Micro.Dialog.Alert</item>
-        <item name="alertDialogStyle">@style/AlertDialog.Micro</item>
-        <item name="dialogTheme">@style/Theme.Micro.Dialog</item>
-        <item name="textViewStyle">@style/Widget.Micro.TextView</item>
-        <item name="numberPickerStyle">@style/Widget.Micro.NumberPicker</item>
-        <item name="windowAnimationStyle">@style/Animation.Micro.Activity</item>
-        <item name="windowBackground">@color/white</item>
-        <item name="windowContentOverlay">@null</item>
-        <item name="windowIsFloating">false</item>
-        <!-- Required to force windowInsets dispatch through application UI. -->
-        <item name="windowOverscan">true</item>
-    </style>
-
-    <!-- Indirection needed for overlays to make sure there is a common base parent -->
-    <style name="Theme.Micro.Light" parent="Theme.Micro.LightBase">
-    </style>
-
-    <style name="Theme.Micro.DialogBase" parent="Theme.Material.Light.Dialog">
-        <item name="windowTitleStyle">@android:style/DialogWindowTitle.Micro</item>
-        <item name="windowIsFloating">false</item>
-        <item name="windowFullscreen">true</item>
-        <item name="textAppearance">@style/TextAppearance.Micro</item>
-        <item name="textAppearanceInverse">@style/TextAppearance.Micro</item>
-        <!-- Required to force windowInsets dispatch through application UI. -->
-        <item name="windowOverscan">true</item>
-    </style>
-
-    <!-- Indirection needed for overlays to make sure there is a common base parent -->
-    <style name="Theme.Micro.Dialog" parent="Theme.Micro.DialogBase">
-    </style>
-
-    <style name="Theme.Micro.Dialog.Alert">
-        <item name="windowTitleStyle">@style/DialogWindowTitle.Micro</item>
-        <item name="alertDialogStyle">@style/AlertDialog.Micro</item>
-        <item name="windowIsFloating">false</item>
-        <item name="windowBackground">@android:color/transparent</item>
-        <item name="windowOverscan">true</item>
-        <item name="windowContentOverlay">@null</item>
-        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
-        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
-    </style>
-
-    <style name="Theme.Micro.Dialog.AppError" parent="Theme.Micro.Dialog">
-        <item name="windowBackground">@null</item>
-        <item name="alertDialogStyle">@style/AlertDialog.Micro</item>
-        <item name="windowOverscan">true</item>
-        <item name="windowCloseOnTouchOutside">false</item>
-        <item name="textSize">20sp</item>
-        <item name="fontFamily">sans-serif-condensed-light</item>
-        <item name="textColor">@color/micro_text_light</item>
-    </style>
-
-   <style name="Theme.Micro.Panel" parent="Theme.Material.Panel"  />
-   <style name="Theme.Micro.Light.Panel" parent="Theme.Material.Light.Panel"  />
-
-    <!-- Default theme for material style input methods, which is used by the
-         {@link android.inputmethodservice.InputMethodService} class.
-         This inherits from Theme.Panel, but sets up IME appropriate animations
-         and a few custom attributes. -->
-    <style name="Theme.Micro.InputMethod" parent="Theme.Micro.Panel">
-        <item name="windowAnimationStyle">@style/Animation.InputMethod</item>
-        <item name="imeFullscreenBackground">#1e282c</item>
-        <item name="imeExtractEnterAnimation">@anim/input_method_extract_enter</item>
-        <item name="imeExtractExitAnimation">@anim/input_method_extract_exit</item>
-    </style>
-</resources>
diff --git a/core/res/res/xml-watch/default_zen_mode_config.xml b/core/res/res/xml-watch/default_zen_mode_config.xml
new file mode 100644
index 0000000..26af10c
--- /dev/null
+++ b/core/res/res/xml-watch/default_zen_mode_config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright 2016, The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- Default configuration for zen mode.  See android.service.notification.ZenModeConfig. -->
+<zen version="2">
+    <!-- Allow starred contacts to go through only. Repeated calls on.
+         Calls, messages, reminders, events off.-->
+    <allow from="2" repeatCallers="true" calls="false" messages="false" reminders="false"
+           events="false"/>
+</zen>
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothStressTest.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothStressTest.java
index 755e7c4..31ce95e 100644
--- a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothStressTest.java
+++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothStressTest.java
@@ -35,6 +35,7 @@
     /** The amount of time to sleep between issuing start/stop SCO in ms. */
     private static final long SCO_SLEEP_TIME = 2 * 1000;
 
+    private BluetoothAdapter mAdapter;
     private BluetoothTestUtils mTestUtils;
 
     @Override
@@ -42,13 +43,18 @@
         super.setUp();
 
         Context context = getInstrumentation().getTargetContext();
+        mAdapter = BluetoothAdapter.getDefaultAdapter();
         mTestUtils = new BluetoothTestUtils(context, TAG, OUTPUT_FILE);
+
+        // Start all tests in a disabled state.
+        if (mAdapter.isEnabled()) {
+            mTestUtils.disable(mAdapter);
+        }
     }
 
     @Override
     protected void tearDown() throws Exception {
         super.tearDown();
-
         mTestUtils.close();
     }
 
@@ -61,13 +67,10 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        mTestUtils.disable(adapter);
-
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("enable iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.enable(adapter);
-            mTestUtils.disable(adapter);
+            mTestUtils.enable(mAdapter);
+            mTestUtils.disable(mAdapter);
         }
     }
 
@@ -80,18 +83,14 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.undiscoverable(adapter);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.undiscoverable(mAdapter);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("discoverable iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.discoverable(adapter);
-            mTestUtils.undiscoverable(adapter);
+            mTestUtils.discoverable(mAdapter);
+            mTestUtils.undiscoverable(mAdapter);
         }
-
-        mTestUtils.disable(adapter);
     }
 
     /**
@@ -103,18 +102,14 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.stopScan(adapter);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.stopScan(mAdapter);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("scan iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.startScan(adapter);
-            mTestUtils.stopScan(adapter);
+            mTestUtils.startScan(mAdapter);
+            mTestUtils.stopScan(mAdapter);
         }
-
-        mTestUtils.disable(adapter);
     }
 
     /**
@@ -125,19 +120,16 @@
         if (iterations == 0) {
             return;
         }
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.disablePan(adapter);
+
+        mTestUtils.enable(mAdapter);
+        mTestUtils.disablePan(mAdapter);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("testEnablePan iteration " + (i + 1) + " of "
                     + iterations);
-            mTestUtils.enablePan(adapter);
-            mTestUtils.disablePan(adapter);
+            mTestUtils.enablePan(mAdapter);
+            mTestUtils.disablePan(mAdapter);
         }
-
-        mTestUtils.disable(adapter);
     }
 
     /**
@@ -152,19 +144,16 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("pair iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+            mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                     BluetoothTestRunner.sDevicePairPin);
-            mTestUtils.unpair(adapter, device);
+            mTestUtils.unpair(mAdapter, device);
         }
-        mTestUtils.disable(adapter);
     }
 
     /**
@@ -178,19 +167,16 @@
         if (iterations == 0) {
             return;
         }
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("acceptPair iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.acceptPair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+            mTestUtils.acceptPair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                     BluetoothTestRunner.sDevicePairPin);
-            mTestUtils.unpair(adapter, device);
+            mTestUtils.unpair(mAdapter, device);
         }
-        mTestUtils.disable(adapter);
     }
 
     /**
@@ -205,25 +191,22 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                 BluetoothTestRunner.sDevicePairPin);
-        mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.A2DP, null);
+        mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.A2DP, null);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("connectA2dp iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.connectProfile(adapter, device, BluetoothProfile.A2DP,
+            mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.A2DP,
                     String.format("connectA2dp(device=%s)", device));
-            mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.A2DP,
+            mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.A2DP,
                     String.format("disconnectA2dp(device=%s)", device));
         }
 
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.disable(adapter);
+        mTestUtils.unpair(mAdapter, device);
     }
 
     /**
@@ -238,25 +221,22 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                 BluetoothTestRunner.sDevicePairPin);
-        mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.HEADSET, null);
+        mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET, null);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("connectHeadset iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.connectProfile(adapter, device, BluetoothProfile.HEADSET,
+            mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.HEADSET,
                     String.format("connectHeadset(device=%s)", device));
-            mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.HEADSET,
+            mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET,
                     String.format("disconnectHeadset(device=%s)", device));
         }
 
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.disable(adapter);
+        mTestUtils.unpair(mAdapter, device);
     }
 
     /**
@@ -271,25 +251,22 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                 BluetoothTestRunner.sDevicePairPin);
-        mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.INPUT_DEVICE, null);
+        mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.INPUT_DEVICE, null);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("connectInput iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.connectProfile(adapter, device, BluetoothProfile.INPUT_DEVICE,
+            mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.INPUT_DEVICE,
                     String.format("connectInput(device=%s)", device));
-            mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.INPUT_DEVICE,
+            mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.INPUT_DEVICE,
                     String.format("disconnectInput(device=%s)", device));
         }
 
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.disable(adapter);
+        mTestUtils.unpair(mAdapter, device);
     }
 
     /**
@@ -304,22 +281,19 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                 BluetoothTestRunner.sDevicePairPin);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("connectPan iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.connectPan(adapter, device);
-            mTestUtils.disconnectPan(adapter, device);
+            mTestUtils.connectPan(mAdapter, device);
+            mTestUtils.disconnectPan(mAdapter, device);
         }
 
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.disable(adapter);
+        mTestUtils.unpair(mAdapter, device);
     }
 
     /**
@@ -334,26 +308,23 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.disablePan(adapter);
-        mTestUtils.enablePan(adapter);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.acceptPair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.disablePan(mAdapter);
+        mTestUtils.enablePan(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.acceptPair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                 BluetoothTestRunner.sDevicePairPin);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("incomingPanConnection iteration " + (i + 1) + " of "
                     + iterations);
-            mTestUtils.incomingPanConnection(adapter, device);
-            mTestUtils.incomingPanDisconnection(adapter, device);
+            mTestUtils.incomingPanConnection(mAdapter, device);
+            mTestUtils.incomingPanDisconnection(mAdapter, device);
         }
 
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.disablePan(adapter);
-        mTestUtils.disable(adapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.disablePan(mAdapter);
     }
 
     /**
@@ -368,28 +339,25 @@
             return;
         }
 
-        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
-        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
-        mTestUtils.disable(adapter);
-        mTestUtils.enable(adapter);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
+        BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
+        mTestUtils.enable(mAdapter);
+        mTestUtils.unpair(mAdapter, device);
+        mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey,
                 BluetoothTestRunner.sDevicePairPin);
-        mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.HEADSET, null);
-        mTestUtils.connectProfile(adapter, device, BluetoothProfile.HEADSET, null);
-        mTestUtils.stopSco(adapter, device);
+        mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET, null);
+        mTestUtils.connectProfile(mAdapter, device, BluetoothProfile.HEADSET, null);
+        mTestUtils.stopSco(mAdapter, device);
 
         for (int i = 0; i < iterations; i++) {
             mTestUtils.writeOutput("startStopSco iteration " + (i + 1) + " of " + iterations);
-            mTestUtils.startSco(adapter, device);
+            mTestUtils.startSco(mAdapter, device);
             sleep(SCO_SLEEP_TIME);
-            mTestUtils.stopSco(adapter, device);
+            mTestUtils.stopSco(mAdapter, device);
             sleep(SCO_SLEEP_TIME);
         }
 
-        mTestUtils.disconnectProfile(adapter, device, BluetoothProfile.HEADSET, null);
-        mTestUtils.unpair(adapter, device);
-        mTestUtils.disable(adapter);
+        mTestUtils.disconnectProfile(mAdapter, device, BluetoothProfile.HEADSET, null);
+        mTestUtils.unpair(mAdapter, device);
     }
 
     private void sleep(long time) {
diff --git a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothTestUtils.java b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothTestUtils.java
index 0d9980a..ee15978 100644
--- a/core/tests/bluetoothtests/src/android/bluetooth/BluetoothTestUtils.java
+++ b/core/tests/bluetoothtests/src/android/bluetooth/BluetoothTestUtils.java
@@ -35,6 +35,8 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
 
 public class BluetoothTestUtils extends Assert {
 
@@ -423,57 +425,40 @@
      * @param adapter The BT adapter.
      */
     public void enable(BluetoothAdapter adapter) {
-        int mask = (BluetoothReceiver.STATE_TURNING_ON_FLAG | BluetoothReceiver.STATE_ON_FLAG
-                | BluetoothReceiver.SCAN_MODE_CONNECTABLE_FLAG);
-        long start = -1;
-        BluetoothReceiver receiver = getBluetoothReceiver(mask);
-
-        int state = adapter.getState();
-        switch (state) {
-            case BluetoothAdapter.STATE_ON:
-                assertTrue(adapter.isEnabled());
-                removeReceiver(receiver);
-                return;
-            case BluetoothAdapter.STATE_TURNING_ON:
-                assertFalse(adapter.isEnabled());
-                mask = 0; // Don't check for received intents since we might have missed them.
-                break;
-            case BluetoothAdapter.STATE_OFF:
-                assertFalse(adapter.isEnabled());
-                start = System.currentTimeMillis();
-                assertTrue(adapter.enable());
-                break;
-            case BluetoothAdapter.STATE_TURNING_OFF:
-                start = System.currentTimeMillis();
-                assertTrue(adapter.enable());
-                break;
-            default:
-                removeReceiver(receiver);
-                fail(String.format("enable() invalid state: state=%d", state));
-        }
-
-        long s = System.currentTimeMillis();
-        while (System.currentTimeMillis() - s < ENABLE_DISABLE_TIMEOUT) {
-            state = adapter.getState();
-            if (state == BluetoothAdapter.STATE_ON
-                    && (receiver.getFiredFlags() & mask) == mask) {
-                assertTrue(adapter.isEnabled());
-                long finish = receiver.getCompletedTime();
-                if (start != -1 && finish != -1) {
-                    writeOutput(String.format("enable() completed in %d ms", (finish - start)));
-                } else {
-                    writeOutput("enable() completed");
+        writeOutput("Enabling Bluetooth adapter.");
+        assertFalse(adapter.isEnabled());
+        int btState = adapter.getState();
+        final Semaphore completionSemaphore = new Semaphore(0);
+        final BroadcastReceiver receiver = new BroadcastReceiver() {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                final String action = intent.getAction();
+                if (!BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) {
+                    return;
                 }
-                removeReceiver(receiver);
-                return;
+                final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
+                        BluetoothAdapter.ERROR);
+                if (state == BluetoothAdapter.STATE_ON) {
+                    completionSemaphore.release();
+                }
             }
-            sleep(POLL_TIME);
-        }
+        };
 
-        int firedFlags = receiver.getFiredFlags();
-        removeReceiver(receiver);
-        fail(String.format("enable() timeout: state=%d (expected %d), flags=0x%x (expected 0x%x)",
-                state, BluetoothAdapter.STATE_ON, firedFlags, mask));
+        final IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
+        mContext.registerReceiver(receiver, filter);
+        assertTrue(adapter.enable());
+        boolean success = false;
+        try {
+            success = completionSemaphore.tryAcquire(ENABLE_DISABLE_TIMEOUT, TimeUnit.MILLISECONDS);
+            writeOutput(String.format("enable() completed in 0 ms"));
+        } catch (final InterruptedException e) {
+            // This should never happen but just in case it does, the test will fail anyway.
+        }
+        mContext.unregisterReceiver(receiver);
+        if (!success) {
+            fail(String.format("enable() timeout: state=%d (expected %d)", btState,
+                    BluetoothAdapter.STATE_ON));
+        }
     }
 
     /**
@@ -483,57 +468,40 @@
      * @param adapter The BT adapter.
      */
     public void disable(BluetoothAdapter adapter) {
-        int mask = (BluetoothReceiver.STATE_TURNING_OFF_FLAG | BluetoothReceiver.STATE_OFF_FLAG
-                | BluetoothReceiver.SCAN_MODE_NONE_FLAG);
-        long start = -1;
-        BluetoothReceiver receiver = getBluetoothReceiver(mask);
-
-        int state = adapter.getState();
-        switch (state) {
-            case BluetoothAdapter.STATE_OFF:
-                assertFalse(adapter.isEnabled());
-                removeReceiver(receiver);
-                return;
-            case BluetoothAdapter.STATE_TURNING_ON:
-                assertFalse(adapter.isEnabled());
-                start = System.currentTimeMillis();
-                break;
-            case BluetoothAdapter.STATE_ON:
-                assertTrue(adapter.isEnabled());
-                start = System.currentTimeMillis();
-                assertTrue(adapter.disable());
-                break;
-            case BluetoothAdapter.STATE_TURNING_OFF:
-                assertFalse(adapter.isEnabled());
-                mask = 0; // Don't check for received intents since we might have missed them.
-                break;
-            default:
-                removeReceiver(receiver);
-                fail(String.format("disable() invalid state: state=%d", state));
-        }
-
-        long s = System.currentTimeMillis();
-        while (System.currentTimeMillis() - s < ENABLE_DISABLE_TIMEOUT) {
-            state = adapter.getState();
-            if (state == BluetoothAdapter.STATE_OFF
-                    && (receiver.getFiredFlags() & mask) == mask) {
-                assertFalse(adapter.isEnabled());
-                long finish = receiver.getCompletedTime();
-                if (start != -1 && finish != -1) {
-                    writeOutput(String.format("disable() completed in %d ms", (finish - start)));
-                } else {
-                    writeOutput("disable() completed");
+        writeOutput("Disabling Bluetooth adapter.");
+        assertTrue(adapter.isEnabled());
+        int btState = adapter.getState();
+        final Semaphore completionSemaphore = new Semaphore(0);
+        final BroadcastReceiver receiver = new BroadcastReceiver() {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                final String action = intent.getAction();
+                if (!BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) {
+                    return;
                 }
-                removeReceiver(receiver);
-                return;
+                final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
+                        BluetoothAdapter.ERROR);
+                if (state == BluetoothAdapter.STATE_OFF) {
+                    completionSemaphore.release();
+                }
             }
-            sleep(POLL_TIME);
-        }
+        };
 
-        int firedFlags = receiver.getFiredFlags();
-        removeReceiver(receiver);
-        fail(String.format("disable() timeout: state=%d (expected %d), flags=0x%x (expected 0x%x)",
-                state, BluetoothAdapter.STATE_OFF, firedFlags, mask));
+        final IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
+        mContext.registerReceiver(receiver, filter);
+        assertTrue(adapter.disable());
+        boolean success = false;
+        try {
+            success = completionSemaphore.tryAcquire(ENABLE_DISABLE_TIMEOUT, TimeUnit.MILLISECONDS);
+            writeOutput(String.format("disable() completed in 0 ms"));
+        } catch (final InterruptedException e) {
+            // This should never happen but just in case it does, the test will fail anyway.
+        }
+        mContext.unregisterReceiver(receiver);
+        if (!success) {
+            fail(String.format("disable() timeout: state=%d (expected %d)", btState,
+                    BluetoothAdapter.STATE_OFF));
+        }
     }
 
     /**
@@ -543,40 +511,47 @@
      * @param adapter The BT adapter.
      */
     public void discoverable(BluetoothAdapter adapter) {
-        int mask = BluetoothReceiver.SCAN_MODE_CONNECTABLE_DISCOVERABLE_FLAG;
-
         if (!adapter.isEnabled()) {
             fail("discoverable() bluetooth not enabled");
         }
 
         int scanMode = adapter.getScanMode();
-        if (scanMode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
+        if (scanMode != BluetoothAdapter.SCAN_MODE_CONNECTABLE) {
             return;
         }
 
-        BluetoothReceiver receiver = getBluetoothReceiver(mask);
-
-        assertEquals(BluetoothAdapter.SCAN_MODE_CONNECTABLE, scanMode);
-        long start = System.currentTimeMillis();
-        assertTrue(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE));
-
-        while (System.currentTimeMillis() - start < DISCOVERABLE_UNDISCOVERABLE_TIMEOUT) {
-            scanMode = adapter.getScanMode();
-            if (scanMode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE
-                    && (receiver.getFiredFlags() & mask) == mask) {
-                writeOutput(String.format("discoverable() completed in %d ms",
-                        (receiver.getCompletedTime() - start)));
-                removeReceiver(receiver);
-                return;
+        final Semaphore completionSemaphore = new Semaphore(0);
+        final BroadcastReceiver receiver = new BroadcastReceiver() {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                final String action = intent.getAction();
+                if (!BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(action)) {
+                    return;
+                }
+                final int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE,
+                        BluetoothAdapter.SCAN_MODE_NONE);
+                if (mode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
+                    completionSemaphore.release();
+                }
             }
-            sleep(POLL_TIME);
-        }
+        };
 
-        int firedFlags = receiver.getFiredFlags();
-        removeReceiver(receiver);
-        fail(String.format("discoverable() timeout: scanMode=%d (expected %d), flags=0x%x "
-                + "(expected 0x%x)", scanMode, BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE,
-                firedFlags, mask));
+        final IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
+        mContext.registerReceiver(receiver, filter);
+        assertTrue(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE));
+        boolean success = false;
+        try {
+            success = completionSemaphore.tryAcquire(DISCOVERABLE_UNDISCOVERABLE_TIMEOUT,
+                    TimeUnit.MILLISECONDS);
+            writeOutput(String.format("discoverable() completed in 0 ms"));
+        } catch (final InterruptedException e) {
+            // This should never happen but just in case it does, the test will fail anyway.
+        }
+        mContext.unregisterReceiver(receiver);
+        if (!success) {
+            fail(String.format("discoverable() timeout: scanMode=%d (expected %d)", scanMode,
+                    BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE));
+        }
     }
 
     /**
@@ -586,40 +561,47 @@
      * @param adapter The BT adapter.
      */
     public void undiscoverable(BluetoothAdapter adapter) {
-        int mask = BluetoothReceiver.SCAN_MODE_CONNECTABLE_FLAG;
-
         if (!adapter.isEnabled()) {
             fail("undiscoverable() bluetooth not enabled");
         }
 
         int scanMode = adapter.getScanMode();
-        if (scanMode == BluetoothAdapter.SCAN_MODE_CONNECTABLE) {
+        if (scanMode != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
             return;
         }
 
-        BluetoothReceiver receiver = getBluetoothReceiver(mask);
-
-        assertEquals(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, scanMode);
-        long start = System.currentTimeMillis();
-        assertTrue(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE));
-
-        while (System.currentTimeMillis() - start < DISCOVERABLE_UNDISCOVERABLE_TIMEOUT) {
-            scanMode = adapter.getScanMode();
-            if (scanMode == BluetoothAdapter.SCAN_MODE_CONNECTABLE
-                    && (receiver.getFiredFlags() & mask) == mask) {
-                writeOutput(String.format("undiscoverable() completed in %d ms",
-                        (receiver.getCompletedTime() - start)));
-                removeReceiver(receiver);
-                return;
+        final Semaphore completionSemaphore = new Semaphore(0);
+        final BroadcastReceiver receiver = new BroadcastReceiver() {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                final String action = intent.getAction();
+                if (!BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(action)) {
+                    return;
+                }
+                final int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE,
+                        BluetoothAdapter.SCAN_MODE_NONE);
+                if (mode == BluetoothAdapter.SCAN_MODE_CONNECTABLE) {
+                    completionSemaphore.release();
+                }
             }
-            sleep(POLL_TIME);
-        }
+        };
 
-        int firedFlags = receiver.getFiredFlags();
-        removeReceiver(receiver);
-        fail(String.format("undiscoverable() timeout: scanMode=%d (expected %d), flags=0x%x "
-                + "(expected 0x%x)", scanMode, BluetoothAdapter.SCAN_MODE_CONNECTABLE, firedFlags,
-                mask));
+        final IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
+        mContext.registerReceiver(receiver, filter);
+        assertTrue(adapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE));
+        boolean success = false;
+        try {
+            success = completionSemaphore.tryAcquire(DISCOVERABLE_UNDISCOVERABLE_TIMEOUT,
+                    TimeUnit.MILLISECONDS);
+            writeOutput(String.format("undiscoverable() completed in 0 ms"));
+        } catch (InterruptedException e) {
+            // This should never happen but just in case it does, the test will fail anyway.
+        }
+        mContext.unregisterReceiver(receiver);
+        if (!success) {
+            fail(String.format("undiscoverable() timeout: scanMode=%d (expected %d)", scanMode,
+                    BluetoothAdapter.SCAN_MODE_CONNECTABLE));
+        }
     }
 
     /**
diff --git a/core/tests/utiltests/src/com/android/internal/util/WakeupMessageTest.java b/core/tests/utiltests/src/com/android/internal/util/WakeupMessageTest.java
index da8bc1d..7935880 100644
--- a/core/tests/utiltests/src/com/android/internal/util/WakeupMessageTest.java
+++ b/core/tests/utiltests/src/com/android/internal/util/WakeupMessageTest.java
@@ -45,6 +45,7 @@
     private static final int TEST_CMD = 18;
     private static final int TEST_ARG1 = 33;
     private static final int TEST_ARG2 = 182;
+    private static final Object TEST_OBJ = "hello";
 
     @Mock AlarmManager mAlarmManager;
     WakeupMessage mMessage;
@@ -92,7 +93,7 @@
                 mListenerCaptor.capture(), any(Handler.class));
 
         mMessage = new WakeupMessage(context, mHandler, TEST_CMD_NAME, TEST_CMD, TEST_ARG1,
-                TEST_ARG2);
+                TEST_ARG2, TEST_OBJ);
     }
 
     /**
@@ -114,6 +115,7 @@
         assertEquals("what", TEST_CMD, mHandler.getLastMessage().what);
         assertEquals("arg1", TEST_ARG1, mHandler.getLastMessage().arg1);
         assertEquals("arg2", TEST_ARG2, mHandler.getLastMessage().arg2);
+        assertEquals("obj", TEST_OBJ, mHandler.getLastMessage().obj);
     }
 
     /**
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index 774339a..11e06f1 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -149,9 +149,11 @@
   to: /google/play/licensing/index.html
 - from: /google/play/billing/billing_about.html
   to: /google/play/billing/index.html
-- from: /guide/developing/tools/
+- from: /guide/developing/tools/proguard.html
+  to: /studio/build/shrink-code.html
+- from: /guide/developing/tools/...
   to: /studio/command-line/
-- from: /guide/developing/
+- from: /guide/developing/...
   to: /studio/
 - from: /tools/aidl.html
   to: /guide/components/aidl.html
@@ -799,10 +801,24 @@
   to: http://android-developers.blogspot.com/2016/03/first-preview-of-android-n-developer.html
 - from: /reference/org/apache/http/...
   to: /about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
-- from: /shareables/...
-  to: https://commondatastorage.googleapis.com/androiddevelopers/shareables/...
-- from: /downloads/...
-  to: https://commondatastorage.googleapis.com/androiddevelopers/...
+- from: /shareables/
+  to: https://commondatastorage.googleapis.com/androiddevelopers/shareables/
+- from: /downloads/
+  to: https://commondatastorage.googleapis.com/androiddevelopers/
+- from: /training/performance/battery/network/action-any-traffic.html
+  to: /topic/performance/power/network/action-any-traffic.html
+- from: /training/performance/battery/network/action-app-traffic.html
+  to: /topic/performance/power/network/action-app-traffic.html
+- from: /training/performance/battery/network/action-server-traffic.html
+  to: /topic/performance/power/network/action-server-traffic.html
+- from: /training/performance/battery/network/action-user-traffic.html
+  to: /topic/performance/power/network/action-user-traffic.html
+- from: /training/performance/battery/network/analyze-data.html
+  to: /topic/performance/power/network/analyze-data.html
+- from: /training/performance/battery/network/gather-data.html
+  to: /topic/performance/power/network/gather-data.html
+- from: /training/performance/battery/network/index.html
+  to: /topic/performance/power/network/index.html
 
 # Redirects for the new [dac]/topic/libraries/ area
 
@@ -1176,4 +1192,4 @@
 - from: /r/studio-ui/experimental-to-stable-gradle.html
   to: http://tools.android.com/tech-docs/new-build-system/gradle-experimental/experimental-to-stable-gradle
 - from: /r/studio-ui/sdk-manager.html
-  to: https://developer.android.com/studio/intro/update.html#sdk-manager
\ No newline at end of file
+  to: https://developer.android.com/studio/intro/update.html#sdk-manager
diff --git a/docs/html/distribute/engage/_book.yaml b/docs/html/distribute/engage/_book.yaml
index 87e819a..c371268 100644
--- a/docs/html/distribute/engage/_book.yaml
+++ b/docs/html/distribute/engage/_book.yaml
@@ -31,3 +31,6 @@
 
 - title: Get Feedback with Beta Tests
   path: /distribute/engage/beta.html
+
+- title: Interact with Nearby Users
+  path: /distribute/engage/nearby.html
diff --git a/docs/html/distribute/engage/engage_toc.cs b/docs/html/distribute/engage/engage_toc.cs
index 4f3e0af..cc6e2844 100644
--- a/docs/html/distribute/engage/engage_toc.cs
+++ b/docs/html/distribute/engage/engage_toc.cs
@@ -66,6 +66,12 @@
         <span class="en">Get Feedback with Beta Tests</span></a>
     </div>
   </li>
+  <li class="nav-section">
+    <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs
+        var:toroot?>distribute/engage/nearby.html">
+        <span class="en">Interact with Nearby Users</span></a>
+    </div>
+  </li>
 </ul>
 
 <script type="text/javascript">
diff --git a/docs/html/distribute/engage/nearby.jd b/docs/html/distribute/engage/nearby.jd
new file mode 100644
index 0000000..b1571f6
--- /dev/null
+++ b/docs/html/distribute/engage/nearby.jd
@@ -0,0 +1,93 @@
+page.title=Interact with Nearby Users
+page.metaDescription=Use the Nearby feature to interact with nearby people, devices, and beacons.
+page.image=images/distribute/nearby_connections.png
+page.tags="users, nearby, engage"
+@jd:body
+
+<p>Create experiences that seem magical for users who are in close proximity by using the unique
+close-range and cross-platform capabilities of Nearby. Set up multiplayer games, ad-hoc groups,
+sharing, or collaborative sessions so that your users can work or play together more easily when
+they're close.</p>
+
+<p>Learn more about <a href="https://developers.google.com/nearby/">how to add nearby interactions
+to your app or game</a>.</p>
+
+<div class="wrap">
+  <div class="cols" style="margin-top:1em;">
+    <div class="col-4of12">
+      <h3>
+        Messaging
+      </h3>
+      <img src="{@docRoot}images/distribute/nearby_messaging.png">
+      <p class="figure-caption">
+        Find nearby devices and share messages to enable rich interactions and collaboration
+        among users.
+      </p>
+    </div>
+
+    <div class="col-4of12">
+      <h3>
+        Connections
+      </h3>
+      <img src="{@docRoot}images/distribute/nearby_connections.png">
+      <p class="figure-caption">
+        Discover other local devices and create connections that enable real-time, cross-device
+        experiences.
+      </p>
+    </div>
+
+    <div class="col-4of12">
+      <h3>
+        Beacons
+      </h3>
+      <img src="{@docRoot}images/distribute/nearby_beacons.png">
+      <p class="figure-caption">
+        Receive messages from beacons using
+        <a href="https://developers.google.com/beacons/eddystone">Eddystone</a> and add context to
+        location-based apps and games.
+      </p>
+    </div>
+  </div>
+</div>
+
+<p class="note"><strong>Note:</strong> Nearby uses Bluetooth 2.0, Bluetooth 4.0, Wi-Fi, and an
+ultrasonic modem to function over distances of up to 100 feet.</p>
+
+<h2 id="best-practices">Best practices</h2>
+
+<p>The following list contains some helpful tips and best practices that will help you set up
+and use Nearby effectively:
+
+<ul>
+  <li>Use Nearby features sparingly and only when they're needed because they can consume battery
+  life quickly (up to 3.5 times faster than normal).
+  </li>
+
+  <li>Invoke Nearby explicitly with a button, switch, or special screen, and provide a visual
+  indication when the features are actively sending or receiving content.
+  </li>
+
+  <li>Ensure that users are aware of the data that is made visible by Nearby before
+  they start using the features.
+  </li>
+
+  <li>Stop any publish or subscribe operations when the user exits the app or stops the
+  activity that requires Nearby.
+  </li>
+
+  <li>Use the <em>earshot</em> option, which uses only the ultrasonic modem to send and receive
+  messages, to limit the range of Nearby messages to about five feet when privacy is important.
+  </li>
+
+  <li>Accelerate the exchange of messages (when appropriate) by making one device the publisher
+  only, and all other devices subscribers.
+  </li>
+</ul>
+
+<h2 id="related-resources">Related resources</h2>
+
+<div class="resource-widget resource-flow-layout col-13"
+  data-query="collection:distribute/users/nearby"
+  data-sortOrder="-timestamp"
+  data-cardSizes="9x3"
+  data-maxResults="6"></div>
diff --git a/docs/html/distribute/monetize/_book.yaml b/docs/html/distribute/monetize/_book.yaml
index 2ebc695..974e9ed 100644
--- a/docs/html/distribute/monetize/_book.yaml
+++ b/docs/html/distribute/monetize/_book.yaml
@@ -16,3 +16,6 @@
 
 - title: Purchasing
   path: /distribute/monetize/payments.html
+
+- title: Drive Conversions
+  path: /distribute/monetize/conversions.html
diff --git a/docs/html/distribute/monetize/conversions.jd b/docs/html/distribute/monetize/conversions.jd
new file mode 100644
index 0000000..20b2333
--- /dev/null
+++ b/docs/html/distribute/monetize/conversions.jd
@@ -0,0 +1,100 @@
+page.title=Drive Conversions
+page.image=images/cards/card-drive-conversions_16-9_2x.png
+page.metaDescription=Discover where your users are coming from, drive engagement, and surface your in-app products to maximize your conversions.
+page.tags="conversions"
+
+@jd:body
+
+<div class="figure">
+  <img src="{@docRoot}images/cards/card-drive-conversions_16-9_2x.png">
+</div>
+
+<p>
+  Users who've made in-app purchases or converted in other ways are more likely
+  to do so again.
+  You can now easily discover where those users are coming from, drive engagement,
+  and surface your in-app products to maximize your conversions.
+</p>
+
+<div class="headerLine">
+  <h2 id="dicover">
+  Discover your most valuable channels
+  </h2>
+
+</div>
+
+<p>
+  From the <strong>User Acquisition</strong> page in the Google Play Developer Console, explore
+  how users convert into spenders across your acquisition channels and find the best prospects
+  for app install campaigns.
+</p>
+
+<p>For more information, view the guide on how to <a class="external-link"
+ href="https://support.google.com/googleplay/android-developer/answer/6263332">
+ measure your app's user acquisition</a> in the Google Play Developer Console Help Center.</p>
+
+</p>
+
+<div class="headerLine">
+  <h2 id="adwords">
+  Re-engage users with AdWords ads
+  </h2>
+
+</div>
+
+<p>
+  Bring users back to your app by creating an AdWords re-engagement campaign.
+  Use display and search ads that appear only to users who have installed your app.
+  Use deep links to bring them to where they'll find the content or actions they're
+  searching for.
+</p>
+
+<p>For more information, view the guide on <a class="external-link"
+ href="https://support.google.com/adwords/topic/3119078?hl=en">campaign settings</a> in the
+ AdWords Help Center.</p>
+
+<div class="headerLine">
+  <h2 id="gift-cards">
+  Drive spending with AdMob in-app purchase ads
+  </h2>
+</div>
+
+<p>Use your Google Analytics data to create Remarketing Audience lists for the high-value
+ users most likely to purchase products within your app. Then create an AdMob campaign that
+ targets these users to increase their awareness of your products.</p>
+
+<p>For more information, view the guide on how to <a class="external-link"
+ href="https://www.google.com/admob/promote.html">drive more in-app purchases and installs</a>
+ in the AdMob platform.</p>
+
+<div class="headerLine">
+  <h2 id="tips">
+  Tips
+  </h2>
+</div>
+<ul>
+<li>Add <a class="external-link"
+ href="https://developers.google.com/app-indexing/webmasters/app">deep links</a>
+ to your app so ads bring users directly to
+ conversion activities.</li>
+<li>Track what users do in your app by installing the
+ AdWords <a class="external-link"
+ href="https://developers.google.com/app-conversion-tracking">
+ Conversion Tracking SDK</a>.</li>
+<li>Link your Google Analytics and AdMob accounts to share audience lists.</li>
+<li>Make conversion ads compelling, such as promoting a booking search or
+ in-app product special offer.</li>
+<li>Use the AdMob Conversion Optimizer with existing campaigns. Predictions
+ are more accurate when there is more data to work with.</li>
+<li>Re-engage with your app's users across the Display Network with remarketing
+ lists in AdMob and with search keywords in AdWords.</li>
+</ul>
+
+
+<div class="headerLine"><h2 id="related-resources">Related resources</h2></div>
+
+<div class="resource-widget resource-flow-layout col-13"
+  data-query="collection:distribute/monetize/conversions"
+  data-sortOrder="-timestamp"
+  data-cardSizes="9x3"
+  data-maxResults="8"></div>
diff --git a/docs/html/distribute/monetize/monetize_toc.cs b/docs/html/distribute/monetize/monetize_toc.cs
index a3aa50fe..b586633 100644
--- a/docs/html/distribute/monetize/monetize_toc.cs
+++ b/docs/html/distribute/monetize/monetize_toc.cs
@@ -34,6 +34,12 @@
         </a>
     </div>
   </li>
+  <li class="nav-section">
+    <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/monetize/conversions.html">
+          <span class="en">Drive Conversions</span>
+        </a>
+    </div>
+  </li>
 
 </ul>
 
@@ -44,4 +50,3 @@
     changeNavLang(getLangPref());
 //-->
 </script>
-
diff --git a/docs/html/distribute/monetize/payments.jd b/docs/html/distribute/monetize/payments.jd
index 7d972bb..004e47e 100644
--- a/docs/html/distribute/monetize/payments.jd
+++ b/docs/html/distribute/monetize/payments.jd
@@ -15,36 +15,43 @@
   instantly with a streamlined, consistent purchasing process and convenient
   payment methods.
 </p>
-
+<p><strong>Key facts</strong></p>
+<ul>
+<li>Direct carrier billing in over 35 countries.</li>
+<li>Google Play gift cards in over 25 countries.</li>
+<li>PayPal in over 20 countries.</li>
+<li>Developers can sell their apps from over 75 countries.</li>
+<li>Users can buy apps in over 135 countries.</li>
+</ul>
 <div class="headerLine">
   <h2 id="dcb">
-  Direct Carrier Billing
+  Direct carrier billing
   </h2>
 
 
 </div>
 
 <p>
-  Users pay by charging their monthly carrier bills . The benefit of Direct
-  Carrier Billing is that it opens up markets where credit cards are less
-  common, as purchases are charged to your customers’ monthly mobile phone
+  Users pay by charging their monthly carrier bills. The benefit of direct
+  carrier billing is that it opens up markets where credit cards are less
+  common, as purchases are charged to your customers' monthly mobile phone
   bills. This option is available to users in key markets
   around the world. Many more will get the option in the months ahead.
 </p>
 
 <div class="headerLine">
   <h2 id="credit">
-  Credit Cards
+  Credit cards
   </h2>
 
 </div>
 
 <p>
-  Users can pay using any credit card that they’ve registered in Google Play.
-  Credit Cards added to Google Play are stored in the user’s Google wallet and
-  available for in-app purchases and instant buys too. To make it easy for
-  users to get started, registration is offered as a part of the initial device
-  setup process.
+  Users can pay using any credit card that they've registered in Google Play.
+  The credit cards that a user adds to Google Play are stored in the user's Google wallet.
+  They are available for in-app purchases and instant buys. It's easy for
+  users to get started, as the initial device setup process allows users to register a credit
+  card that they can use in Google Play.
 </p>
 
 <div class="headerLine">
@@ -62,16 +69,40 @@
 <p>
   Gift cards enable users to add value to their Google Play balance by entering
   a unique code printed on a card purchased online or from major retailers.
-  More information gift cards can be found <a href=
+  More information on gift cards can be found <a href=
   "http://play.google.com/intl/en-US_us/about/giftcards/" target=
   "_android">here</a>.
 </p>
 
 <p style="clear:both">
 </p>
+
+<div class="headerLine">
+  <h2 id="paypal">
+  PayPal
+  </h2>
+
+
+</div>
+
+<div class="figure">
+  <img src="{@docRoot}images/paypal-logo.png">
+</div>
+
+<p>
+  Users with PayPal accounts can buy apps and digital content on Google Play using any
+  of their available payment methods. They sign into their PayPal account and
+  complete the purchase. The popularity of PayPal for payments on the web gives
+  you more customers.
+</p>
+
+<p style="clear:both">
+</p>
+
+
 <div class="headerLine">
   <h2 id="balance">
-  Google Play Balance
+  Google Play balance
   </h2>
 
 
@@ -95,14 +126,13 @@
   The payment methods available to users may vary based on location, carrier
   network, and other factors.
 </p>
- 
+
 <p style="clear:both">
 </p>
-<div class="headerLine"><h2 id="related-resources">Related Resources</h2></div>
+<div class="headerLine"><h2 id="related-resources">Related resources</h2></div>
 
 <div class="resource-widget resource-flow-layout col-13"
   data-query="collection:distribute/monetize/paymentmethods"
   data-sortOrder="-timestamp"
   data-cardSizes="9x3"
   data-maxResults="8"></div>
-
diff --git a/docs/html/distribute/users/promote-with-ads.jd b/docs/html/distribute/users/promote-with-ads.jd
index 2db4ca3..d99f449 100644
--- a/docs/html/distribute/users/promote-with-ads.jd
+++ b/docs/html/distribute/users/promote-with-ads.jd
@@ -6,20 +6,27 @@
 
 <p>Users have a huge amount of choice when it comes to which apps they install and
 use, so it’s important to actively find new ways to promote your app and drive
-ongoing engagement. AdWords is a powerful and effective way to do both.</p>
+ongoing engagement. AdWords campaigns, which you create in the
+<a href="http://play.google.com/apps/publish">Google Play Developer Console</a>,
+are a powerful and effective way to do both.</p>
 
 
-<h2 id=drive_installs>Drive installs</h2>
+<h2 id="drive_installs">Drive installs with universal app campaigns</h2>
 
-<p><a href="http://adwords.google.com">AdWords</a> promotes your app to interested
-users where they spend time on phones and
-tablets – with app install ads on Google Search, YouTube, Gmail, and within
-apps and across the web on  the Google Display Network. AdWords is a powerful
-way to scale app promotion across Google networks and find customers that are
-most likely to install your app. </p>
+<p><a href="http://adwords.google.com">AdWords</a> is a powerful way to scale
+app promotion across Google networks and find customers who are most likely to
+install your app. AdWords promotes your app to interested users where they spend
+time on phones and tablets – with app install ads on Google Play, Google Search,
+YouTube, Gmail, and within apps and across the web.</p>
 
-<p><a href="https://support.google.com/adwords/answer/6032059">Get started with AdWords
-app install ads</a>.</p>
+<p>By creating a <em>universal app camapign</em>, you can reach all of these
+networks. This type of campaign allocates ads, bids, and budgets automatically,
+making it easier to improve install volume for your app.</p>
+
+<p>To learn more about creating universal ad campaigns, read the article about
+<a class="external-link" href="https://support.google.com/googleplay/android-developer/answer/6262700">creating
+an AdWords campaign for your app</a> in the Google Play Developer Console Help
+Center.</p>
 
 <div class="wrap">
   <div class="cols" style="margin-top:1em;">
@@ -27,18 +34,16 @@
       <h3>
         From Google Play
       </h3>
-      <img src="/images/distribute/promote_ads_play.png">
+      <img src="{@docRoot}images/distribute/promote_ads_play.png">
       <p class="figure-caption">
-        Promote your app on Google Play when users are searching and browsing
-        for apps.
+        Reach users as they search for apps and games on Google Play.
       </p>
     </div>
-
     <div class="col-4of12">
       <h3>
-        From search
+        From Google Search
       </h3>
-      <img src="/images/distribute/promote_ads_search.png">
+      <img src="{@docRoot}images/distribute/promote_ads_search.png">
       <p class="figure-caption">
         Connect with users as they search for content and services provided by
         your app.
@@ -49,47 +54,32 @@
       <h3>
         From YouTube
       </h3>
-      <img src="/images/distribute/promote_ads_youtube.png">
+      <img src="{@docRoot}images/distribute/promote_ads_youtube.png">
       <p class="figure-caption">
         Promote your app when users are watching related videos.
       </p>
     </div>
-  </div>
-</div>
 
-<div class="wrap">
-  <div class="cols" style="margin-top:1em;">
     <div class="col-4of12">
       <h3>
         From apps
       </h3>
-      <img src="/images/distribute/promote_ads_apps.png">
+      <img src="{@docRoot}images/distribute/promote_ads_apps.png">
       <p class="figure-caption">
         Reach users while they’re engaged with apps and games across the AdMob
         network.
       </p>
     </div>
-
     <div class="col-4of12">
       <h3>
         From the web
       </h3>
-      <img src="/images/distribute/promote_ads_web.png">
+      <img src="{@docRoot}images/distribute/promote_ads_web.png">
       <p class="figure-caption">
         Reach users while they’re engaged with websites across the Google
         Display Network.
       </p>
     </div>
-
-    <div class="col-4of12">
-      <h3>
-        From Gmail
-      </h3>
-      <img src="/images/distribute/promote_ads_gmail.png">
-      <p class="figure-caption">
-        Promote your app while users communicate and get things done in Gmail.
-      </p>
-    </div>
   </div>
 </div>
 
@@ -130,77 +120,7 @@
   </li>
 </ul>
 
-<h2 id="engage_with_users">
-  Engage with users
-</h2>
-
-<p>
-  Getting a user to install an app is one thing, but you'll also want them to
-  open it regularly. AdWords offers app re-engagement tools to help your app
-  stay in mind with users who’ve already installed it on their phone. AdWords
-  can remind them of key features and encourage them to try your app again, or
-  help them complete an activity they didn't know your app could handle.
-</p>
-
-<div class="wrap">
-  <div class="cols" style="margin-top:1em;">
-    <div class="col-4of12">
-      <h3>
-        From search
-      </h3>
-      <img src="/images/distribute/promote_ads.png">
-      <p class="figure-caption">
-        Add deep links to your app, then bring users straight to relevant app
-        content when they’re searching.
-      </p>
-    </div>
-
-    <div class="col-4of12">
-      <h3>
-        From apps
-      </h3>
-      <img src="/images/distribute/promote_ads_inapp.png">
-      <p class="figure-caption">
-        Use remarketing and deep links to bring users to just the right place
-        in your app to re-engage and convert, from other apps and games they
-        love.
-      </p>
-    </div>
-  </div>
-</div>
-
-<h3>
-  Tips
-</h3>
-
-<ul>
-  <li>Track what users do in your app after they’ve clicked an ad, by
-  installing the AdWords <a href=
-  "https://developers.google.com/app-conversion-tracking/">conversion tracking
-  SDK</a>.
-  </li>
-
-  <li>Advertise a compelling reason for users to re-engage with your app (such
-  as a reminder or a special offer).
-  </li>
-
-  <li>
-    <a href="https://developers.google.com/app-indexing/webmasters/app">Add
-    deep links</a> to your app that’ll take users directly to the parts of your
-    app that will be most relevant and interesting to them, where they can
-    easily take action.
-  </li>
-
-  <li>Re-engage your app users across the display network with remarketing
-  lists and search with keywords.
-  </li>
-
-  <li>Use remarketing lists to target high value users so that you can drive
-  more conversions in your app.
-  </li>
-</ul>
-
-<h2 id="related-resources">Related Resources</h2>
+<h2 id="related-resources">Related resources</h2>
 
 <div class="resource-widget resource-flow-layout col-13"
   data-query="collection:distribute/users/promotewithads"
diff --git a/docs/html/guide/topics/security/permissions.jd b/docs/html/guide/topics/security/permissions.jd
index e7bf760..39a1f814 100644
--- a/docs/html/guide/topics/security/permissions.jd
+++ b/docs/html/guide/topics/security/permissions.jd
@@ -675,7 +675,7 @@
 <a name="manifest"></a>
 <h3>Enforcing Permissions in AndroidManifest.xml</h3>
 
-<p>TYou can apply high-level permissions restricting access to entire components
+<p>You can apply high-level permissions restricting access to entire components
 of the system or application through your
 <code>AndroidManifest.xml</code>. To do this, include an {@link
 android.R.attr#permission android:permission} attribute on the desired
diff --git a/docs/html/guide/topics/ui/accessibility/apps.jd b/docs/html/guide/topics/ui/accessibility/apps.jd
index 90781f7..eb639e3 100644
--- a/docs/html/guide/topics/ui/accessibility/apps.jd
+++ b/docs/html/guide/topics/ui/accessibility/apps.jd
@@ -454,18 +454,20 @@
 
 <pre>
 &#64;Override
-public void dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
-    super.dispatchPopulateAccessibilityEvent(event);
+public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
     // Call the super implementation to populate its text to the event, which
     // calls onPopulateAccessibilityEvent() on API Level 14 and up.
-
+    boolean completed = super.dispatchPopulateAccessibilityEvent(event);
+    
     // In case this is running on a API revision earlier that 14, check
     // the text content of the event and add an appropriate text
     // description for this custom view:
     CharSequence text = getText();
     if (!TextUtils.isEmpty(text)) {
         event.getText().add(text);
+        return true;
     }
+    return completed;
 }
 </pre>
 
diff --git a/docs/html/images/cards/card-drive-conversions_16-9_2x.png b/docs/html/images/cards/card-drive-conversions_16-9_2x.png
new file mode 100644
index 0000000..3448012
--- /dev/null
+++ b/docs/html/images/cards/card-drive-conversions_16-9_2x.png
Binary files differ
diff --git a/docs/html/images/distribute/nearby_beacons.png b/docs/html/images/distribute/nearby_beacons.png
new file mode 100644
index 0000000..aba2f39
--- /dev/null
+++ b/docs/html/images/distribute/nearby_beacons.png
Binary files differ
diff --git a/docs/html/images/distribute/nearby_connections.png b/docs/html/images/distribute/nearby_connections.png
new file mode 100644
index 0000000..52e6daa
--- /dev/null
+++ b/docs/html/images/distribute/nearby_connections.png
Binary files differ
diff --git a/docs/html/images/distribute/nearby_messaging.png b/docs/html/images/distribute/nearby_messaging.png
new file mode 100644
index 0000000..6ae2d00
--- /dev/null
+++ b/docs/html/images/distribute/nearby_messaging.png
Binary files differ
diff --git a/docs/html/images/distribute/promote_ads_apps.png b/docs/html/images/distribute/promote_ads_apps.png
index 2f57865..1c25be3 100644
--- a/docs/html/images/distribute/promote_ads_apps.png
+++ b/docs/html/images/distribute/promote_ads_apps.png
Binary files differ
diff --git a/docs/html/images/distribute/promote_ads_gmail.png b/docs/html/images/distribute/promote_ads_gmail.png
index 1d21b4a..c1013fc 100644
--- a/docs/html/images/distribute/promote_ads_gmail.png
+++ b/docs/html/images/distribute/promote_ads_gmail.png
Binary files differ
diff --git a/docs/html/images/distribute/promote_ads_play.png b/docs/html/images/distribute/promote_ads_play.png
index 1cf51b2..ae0f84b 100644
--- a/docs/html/images/distribute/promote_ads_play.png
+++ b/docs/html/images/distribute/promote_ads_play.png
Binary files differ
diff --git a/docs/html/images/distribute/promote_ads_search.png b/docs/html/images/distribute/promote_ads_search.png
index 27c0b38..adcede1 100644
--- a/docs/html/images/distribute/promote_ads_search.png
+++ b/docs/html/images/distribute/promote_ads_search.png
Binary files differ
diff --git a/docs/html/images/distribute/promote_ads_web.png b/docs/html/images/distribute/promote_ads_web.png
index 588a3d4..8fefed16 100644
--- a/docs/html/images/distribute/promote_ads_web.png
+++ b/docs/html/images/distribute/promote_ads_web.png
Binary files differ
diff --git a/docs/html/images/distribute/promote_ads_youtube.png b/docs/html/images/distribute/promote_ads_youtube.png
index e88a796..ad44e51 100644
--- a/docs/html/images/distribute/promote_ads_youtube.png
+++ b/docs/html/images/distribute/promote_ads_youtube.png
Binary files differ
diff --git a/docs/html/images/paypal-logo.png b/docs/html/images/paypal-logo.png
new file mode 100644
index 0000000..3e08b95
--- /dev/null
+++ b/docs/html/images/paypal-logo.png
Binary files differ
diff --git a/docs/html/images/training/performance/animation-frames.png b/docs/html/images/training/performance/animation-frames.png
new file mode 100644
index 0000000..846c9fe4
--- /dev/null
+++ b/docs/html/images/training/performance/animation-frames.png
Binary files differ
diff --git a/docs/html/images/training/performance/animation-frames_2x.png b/docs/html/images/training/performance/animation-frames_2x.png
new file mode 100644
index 0000000..0aba2a5
--- /dev/null
+++ b/docs/html/images/training/performance/animation-frames_2x.png
Binary files differ
diff --git a/docs/html/images/training/performance/apk-structure.png b/docs/html/images/training/performance/apk-structure.png
new file mode 100644
index 0000000..75a180c
--- /dev/null
+++ b/docs/html/images/training/performance/apk-structure.png
Binary files differ
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index aa0620a..03efa86 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -419,7 +419,8 @@
       "distribute/engage/easy-signin.html",
       "distribute/analyze/build-better-apps.html",
       "distribute/engage/gcm.html",
-      "distribute/engage/beta.html"
+      "distribute/engage/beta.html",
+      "distribute/engage/nearby.html"
     ]
   },
   "distribute/monetize": {
@@ -430,6 +431,7 @@
       "distribute/monetize/ads.html",
       "distribute/monetize/ecommerce.html",
       "distribute/monetize/payments.html",
+      "distribute/monetize/conversions.html",
       "distribute/analyze/understand-user-value.html",
     ]
   },
@@ -761,6 +763,14 @@
       "https://support.google.com/adwords/answer/6167162"
     ]
   },
+  "distribute/users/nearby": {
+    "title": "",
+    "resources": [
+      "https://developers.google.com/nearby/",
+      "https://www.youtube.com/watch?v=hultDpBS22s",
+      "https://developers.google.com/beacons"
+    ]
+  },
   "distribute/users/buildbuzz": {
     "title": "",
     "resources": [
@@ -1556,6 +1566,15 @@
       "https://support.google.com/googleplay/answer/2651410"
     ]
   },
+  "distribute/monetize/conversions": {
+    "title": "",
+    "resources": [
+      "https://support.google.com/adwords/answer/2471188",
+      "https://developers.google.com/app-conversion-tracking/",
+      "https://support.google.com/analytics/answer/2611404",
+      "https://support.google.com/adwords/answer/1704341"
+    ]
+  },
   "autolanding": {
     "title": "",
     "resources": [
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index e5347d9..44ccafa 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -1942,7 +1942,7 @@
     "url": "https://support.google.com/googleplay/answer/2651410",
     "timestamp": null,
     "image": "images/play_dev.jpg",
-    "title": "Google Play Accepted Payment Methods",
+    "title": "Google Play accepted payment methods",
     "summary": "Support details on the payment methods supported in Google Play.",
     "keywords": ["gift card"],
     "type": "distribute",
@@ -1951,6 +1951,59 @@
   {
     "lang": "en",
     "group": "",
+    "tags": [],
+    "url": "https://support.google.com/adwords/answer/2471188",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "AdWords Conversion Optimizer",
+    "summary": "Learn how Conversion Optimizer works to find the users who are most likely to convert and to serve them your conversion ads.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://developers.google.com/app-conversion-tracking/",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Track conversions with the AdWords SDK or server API",
+    "summary": "Use the lightweight AdWords app SDK or server-to-server API to track remarketing conversions.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://support.google.com/analytics/answer/2611404",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Create Remarketing Audiences in Google Analytics",
+    "summary": "Learn how to use preconfigured audiences created by the Analytics team or create your own to use in your conversion campaigns.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://support.google.com/adwords/answer/1704341",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Link your Google Analytics and AdWords accounts",
+    "summary": "Gain greater insight into how AdWords is driving app engagement and conversions, and use this insight to improve your ads and app.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+
+  {
+    "lang": "en",
+    "group": "",
     "tags": ["plus", "social"],
     "url": "https://plus.google.com/+AndroidDevelopers/",
     "timestamp": null,
@@ -2719,7 +2772,6 @@
     "type": "material design",
     "titleFriendly": ""
   },
-
   {
     "lang": "en",
     "group": "",
@@ -2737,6 +2789,45 @@
     "lang": "en",
     "group": "",
     "tags": [],
+    "url": "https://developers.google.com/nearby/",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Create features based on proximity",
+    "summary": "Build simple interactions between nearby devices and people.",
+    "keywords": ["nearby", "engage"],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://www.youtube.com/watch?v=hultDpBS22s",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Use Nearby Messages to collaborate",
+    "summary": "Nearby Messages is perfect for setting up ad-hoc groups, collaborative sessions, or sharing resources with people in a co-located space.",
+    "keywords": ["nearby", "engage"],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://developers.google.com/beacons",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Mark up the world using beacons",
+    "summary": "Give your users better location and proximity experiences by providing a strong context signal for their devices in the form of Bluetooth low energy (BLE) beacons with Eddystone.",
+    "keywords": ["nearby", "engage"],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
     "url": "https://support.google.com/adwords/answer/6167164",
     "timestamp": null,
     "image": "distribute/images/advertising.jpg",
diff --git a/docs/html/jd_extras_en.js b/docs/html/jd_extras_en.js
index 5e271b9..434f211 100644
--- a/docs/html/jd_extras_en.js
+++ b/docs/html/jd_extras_en.js
@@ -1943,13 +1943,65 @@
     "url": "https://support.google.com/googleplay/answer/2651410",
     "timestamp": null,
     "image": "images/cards/google-play_2x.png",
-    "title": "Google Play Accepted Payment Methods",
+    "title": "Google Play accepted payment methods",
     "summary": "Support details on the payment methods supported in Google Play.",
     "keywords": ["gift card"],
     "type": "distribute",
     "category": "google play"
   },
   {
+   "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://support.google.com/adwords/answer/2471188",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "AdWords Conversion Optimizer",
+    "summary": "Learn how Conversion Optimizer works to find the users who are most likely to convert and to serve them your conversion ads.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://developers.google.com/app-conversion-tracking/",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Track conversions with the AdWords SDK or server API",
+    "summary": "Use the lightweight AdWords app SDK or server-to-server API to track remarketing conversions.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://support.google.com/analytics/answer/2611404",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Create Remarketing Audiences in Google Analytics",
+    "summary": "Learn how to use preconfigured audiences created by the Analytics team or create your own to use in your conversion campaigns.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://support.google.com/adwords/answer/1704341",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Link your Google Analytics and AdWords accounts",
+    "summary": "Gain greater insight into how AdWords is driving app engagement and conversions, and use this insight to improve your ads and app.",
+    "keywords": [],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
     "lang": "en",
     "group": "",
     "tags": ["plus", "social"],
@@ -2699,6 +2751,45 @@
     "lang": "en",
     "group": "",
     "tags": [],
+    "url": "https://developers.google.com/nearby/",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Create features based on proximity",
+    "summary": "Build simple interactions between nearby devices and people.",
+    "keywords": ["nearby", "engage"],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://www.youtube.com/watch?v=hultDpBS22s",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Use Nearby Messages to collaborate",
+    "summary": "Nearby Messages is perfect for setting up ad-hoc groups, collaborative sessions, or sharing resources with people in a co-located space.",
+    "keywords": ["nearby", "engage"],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
+    "url": "https://developers.google.com/beacons",
+    "timestamp": null,
+    "image": "images/play_dev.jpg",
+    "title": "Mark up the world using beacons",
+    "summary": "Give your users better location and proximity experiences by providing a strong context signal for their devices in the form of Bluetooth low energy (BLE) beacons with Eddystone.",
+    "keywords": ["nearby", "engage"],
+    "type": "distribute",
+    "titleFriendly": ""
+  },
+  {
+    "lang": "en",
+    "group": "",
+    "tags": [],
     "url": "https://support.google.com/adwords/answer/6167164",
     "timestamp": null,
     "image": "distribute/images/advertising.jpg",
@@ -3613,6 +3704,59 @@
     "lang":"en",
     "type":"Video"
   },
+
+  {
+    "title":"Android Performance Testing Codelab",
+    "titleFriendly":"",
+    "summary":"This codelab shows how to create a stable and reusable testing harness to run performance tests on a very simple existing app.",
+    "url":"https://codelabs.developers.google.com/codelabs/android-perf-testing/index.html",
+    "group":"",
+    "keywords": ["testing"],
+    "tags": [
+    ],
+    "image":"images/testing/testing-icon.png",
+    "type":"google"
+  },
+
+  {
+    "title":"Introduction to Doze",
+    "category":"android developers",
+    "summary":"A new way for the device to preserve battery by entering into an idle state.",
+    "url":"https://www.youtube.com/watch?v=N72ksDKrX6c",
+    "group":"",
+    "keywords": ["android, performance","battery"],
+    "tags": ["video, performance"],
+    "image":"https://i1.ytimg.com/vi/N72ksDKrX6c/maxresdefault.jpg",
+    "lang":"en",
+    "type":"develop"
+  },
+
+  {
+    "title":"Performance Profiling Tools",
+    "category":"training",
+    "summary":"Take a look under the hood to identify performance bottlenecks.",
+    "url":"https://developer.android.com/tools/performance/index.html",
+    "group":"",
+    "keywords": ["android, performance","profiling"],
+    "tags": ["android, performance"],
+    "image": null,
+    "lang":"en",
+    "type":"develop"
+  },
+
+  {
+    "title":"Managing Your App's Memory",
+    "category":"training",
+    "summary":"Learn how you can proactively reduce memory usage while developing for Android.",
+    "url":"https://developer.android.com/training/articles/memory.html",
+    "group":"",
+    "keywords": ["android, performance","profiling"],
+    "tags": ["android, performance"],
+    "image": null,
+    "lang":"en",
+    "type":"develop"
+  },
+
   {
     "url":"https://www.youtube.com/watch?v=QDM52bblwlg",
     "image": "images/distribute/hero-family-discovery.jpg",
@@ -4107,7 +4251,8 @@
       "distribute/engage/easy-signin.html",
       "distribute/analyze/build-better-apps.html",
       "distribute/engage/gcm.html",
-      "distribute/engage/beta.html"
+      "distribute/engage/beta.html",
+      "distribute/engage/nearby.html"
     ]
   },
   "distribute/monetize": {
@@ -4118,6 +4263,7 @@
       "distribute/monetize/ads.html",
       "distribute/monetize/ecommerce.html",
       "distribute/monetize/payments.html",
+      "distribute/monetize/conversions.html",
       "distribute/analyze/understand-user-value.html",
     ]
   },
@@ -4427,6 +4573,14 @@
       "https://support.google.com/adwords/answer/6167162"
     ]
   },
+  "distribute/users/nearby": {
+    "title": "",
+    "resources": [
+      "https://developers.google.com/nearby/",
+      "https://www.youtube.com/watch?v=hultDpBS22s",
+      "https://developers.google.com/beacons"
+    ]
+  },
   "distribute/users/buildbuzz": {
     "title": "",
     "resources": [
@@ -5064,6 +5218,15 @@
       "https://support.google.com/googleplay/answer/2651410"
     ]
   },
+  "distribute/monetize/conversions": {
+     "title": "",
+     "resources": [
+       "https://support.google.com/adwords/answer/2471188",
+       "https://developers.google.com/app-conversion-tracking/",
+       "https://support.google.com/analytics/answer/2611404",
+       "https://support.google.com/adwords/answer/1704341"
+     ]
+   },
   "topic/libraries": {
     "title": "",
     "resources": [
@@ -5379,10 +5542,29 @@
       "preview/support.html"
     ]
   },
+
+  "preview/landing/videos/first": {
+    "title": "",
+    "resources": [
+    "https://www.youtube.com/watch?v=CsulIu3UaUM"
+    ]
+  },
+
+  "develop/performance/landing": {
+    "title": "",
+    "resources": [
+      "https://android-developers.blogspot.com/2010/07/multithreading-for-performance.html",
+      "https://www.udacity.com/course/ud825",
+      "https://www.youtube.com/watch?v=N72ksDKrX6c",
+      "tools/performance/index.html",
+      "https://codelabs.developers.google.com/codelabs/android-perf-testing/index.html",
+      "training/articles/memory.html",
+    ]
+  },
+
   "preview/landing/more": {
     "title": "",
     "resources": [
-      "https://www.youtube.com/watch?v=CsulIu3UaUM",
       "preview/features/multi-window.html",
       "preview/features/notification-updates.html",
       "preview/features/background-optimization.html",
diff --git a/docs/html/ndk/downloads/_book.yaml b/docs/html/ndk/downloads/_book.yaml
deleted file mode 100644
index a5e92ce..0000000
--- a/docs/html/ndk/downloads/_book.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-toc:
-- title: Downloads
-  path: /ndk/downloads/index.html
-
-- title: Revision History
-  path: /ndk/downloads/revision_history.html
diff --git a/docs/html/ndk/downloads/downloads_toc.cs b/docs/html/ndk/downloads/downloads_toc.cs
deleted file mode 100644
index dbe8aec..0000000
--- a/docs/html/ndk/downloads/downloads_toc.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-<?cs # Table of contents for Dev Guide.
-
-       For each document available in translation, add an localized title to this TOC.
-       Do not add localized title for docs not available in translation.
-       Below are template spans for adding localized doc titles. Please ensure that
-       localized titles are added in the language order specified below.
-?>
-
-<ul id="nav">
-   <li class="nav-section">
-      <div class="nav-section-header empty"><a href="/ndk/downloads/index.html"><span class="en">
-      Downloads</span></a></div>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header empty"><a href="/ndk/downloads/revision_history.html">
-      <span class="en">Revision History</span></a></div>
-   </li>
-</ul>
-
-
-<script type="text/javascript">
-<!--
-    buildToggleLists();
-    changeNavLang(getLangPref());
-//-->
-</script>
-
diff --git a/docs/html/ndk/downloads/index.jd b/docs/html/ndk/downloads/index.jd
deleted file mode 100644
index 28860b2..0000000
--- a/docs/html/ndk/downloads/index.jd
+++ /dev/null
@@ -1,530 +0,0 @@
-ndk=true
-page.template=sdk
-page.title=NDK Downloads
-
-@jd:body
-
-
-<!-- start studio download modal -->
-<div data-modal="ndk_tos" class="dac-modal" id="ndk_tos">
-  <div class="dac-modal-container">
-    <div class="dac-modal-window">
-      <header class="dac-modal-header">
-        <div class="dac-modal-header-actions">
-          <button class="dac-modal-header-close" data-modal-toggle></button>
-        </div>
-        <section class="dac-swap-section dac-active dac-down">
-          <h2 class="norule dac-modal-header-title" id="tos-header">Download the Android NDK</h2>
-        </section>
-      </header>
-      <section class="dac-swap-section dac-active dac-left">
-          <section class="dac-modal-content">
-            <fieldset class="dac-form-fieldset">
-              <div class="cols">
-                <div class="col-2of2 tos-leftCol">
-                  <p class="sdk-terms-intro">Before installing the Android
-                  NDK,
-                  you must agree to the following terms
-                  and conditions.</p>
-                </div>
-<div class="sdk-terms" style="width:auto" onfocus="this.blur()">
-<h2 class="norule">Terms and Conditions</h2>
-This is the Android Software Development Kit License Agreement
-
-<h3>1. Introduction</h3>
-1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and
-specifically including the Android system files, packaged APIs, and Google APIs add-ons) is
-licensed to you subject to the terms of the License Agreement. The License Agreement forms a
-legally binding contract between you and Google in relation to your use of the SDK.
-
-1.2 "Android" means the Android software stack for devices, as made available under the Android
-Open Source Project, which is located at the following URL: http://source.android.com/, as updated
-from time to time.
-
-1.3 A "compatible implementation" means any Android device that (i) complies with the Android
-Compatibility Definition document, which can be found at the Android compatibility website
-(http://source.android.com/compatibility) and which may be updated from time to time; and (ii)
-successfully passes the Android Compatibility Test Suite (CTS).
-
-1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600
-Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-
-<h3>2. Accepting this License Agreement</h3>
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK
-if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred
-from receiving the SDK under the laws of the United States or other countries, including the
-country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other
-entity, you represent and warrant that you have full legal authority to bind your employer or such
-entity to the License Agreement. If you do not have the requisite authority, you may not accept the
-License Agreement or use the SDK on behalf of your employer or other entity.
-
-
-<h3>3. SDK License from Google</h3>
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide,
-royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to
-develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK to develop applications for other platforms (including non-compatible
-implementations of Android) or to develop another SDK. You are of course free to develop
-applications for other platforms, including non-compatible implementations of Android, provided
-that this SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the
-SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property
-Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law,
-and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement.
-Except to the extent required by applicable third party licenses, you may not: (a) copy (except for
-backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create
-derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile
-handset or any other hardware device except a personal computer, combine any part of the SDK with
-other software, or distribute any software or device incorporating a part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source
-software license are governed solely by the terms of that open source software license and not the
-License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior
-notice to you and that future versions of the SDK may be incompatible with applications developed
-on previous versions of the SDK. You agree that Google may stop (permanently or temporarily)
-providing the SDK (or any features within the SDK) to you or to users generally at Google's sole
-discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names,
-trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including
-copyright and trademark notices) that may be affixed to or contained within the SDK.
-
-
-<h3>4. Use of the SDK by You</h3>
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under
-the License Agreement in or to any software applications that you develop using the SDK, including
-any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the
-License Agreement and (b) any applicable law, regulation or generally accepted practices or
-guidelines in the relevant jurisdictions (including any laws regarding the export of data or
-software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the SDK to develop applications for general public users, you will
-protect the privacy and legal rights of those users. If the users provide you with user names,
-passwords, or other login information or personal information, you must make the users aware that
-the information will be available to your application, and you must provide legally adequate
-privacy notice and protection for those users. If your application stores personal or sensitive
-information provided by users, it must do so securely. If the user provides your application with
-Google Account information, your application may only use that information to access the user's
-Google Account when, and for the limited purposes for which, the user has given you permission to
-do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, including the development or
-distribution of an application, that interferes with, disrupts, damages, or accesses in an
-unauthorized manner the servers, networks, or other properties or services of any third party
-including, but not limited to, Google or any mobile communications carrier.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or
-to any third party for) any data, content, or resources that you create, transmit or display
-through Android and/or applications for Android, and for the consequences of your actions
-(including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or
-to any third party for) any breach of your obligations under the License Agreement, any applicable
-third party contract or Terms of Service, or any applicable law or regulation, and for the
-consequences (including any loss or damage which Google or any third party may suffer) of any such
-breach.
-
-
-<h3>5. Your Developer Credentials</h3>
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer
-credentials that may be issued to you by Google or which you may choose yourself and that you will
-be solely responsible for all applications that are developed under your developer credentials.
-
-
-<h3>6. Privacy and Information</h3>
-6.1 In order to continually innovate and improve the SDK, Google may collect certain usage
-statistics from the software including but not limited to a unique identifier, associated IP
-address, version number of the software, and information on which tools and/or services in the SDK
-are being used and how they are being used. Before any of this information is collected, the SDK
-will notify you and seek your consent. If you withhold consent, the information will not be
-collected.
-
-6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in
-accordance with Google's Privacy Policy.
-
-
-<h3>7. Third Party Applications</h3>
-7.1 If you use the SDK to run applications developed by a third party or that access data, content
-or resources provided by a third party, you agree that Google is not responsible for those
-applications, data, content, or resources. You understand that all data, content or resources which
-you may access through such third party applications are the sole responsibility of the person from
-which they originated and that Google is not liable for any loss or damage that you may experience
-as a result of the use or access of any of those third party applications, data, content, or
-resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third
-party application may be protected by intellectual property rights which are owned by the providers
-(or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell,
-distribute or create derivative works based on these data, content, or resources (either in whole
-or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may
-be subject to separate terms between you and the relevant third party. In that case, the License
-Agreement does not affect your legal relationship with these third parties.
-
-
-<h3>8. Using Android APIs</h3>
-8.1 Google Data APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be
-protected by intellectual property rights which are owned by Google or those parties that provide
-the data (or by other persons or companies on their behalf). Your use of any such API may be
-subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or
-create derivative works based on this data (either in whole or in part) unless allowed by the
-relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you
-shall retrieve data only with the user's explicit consent and only when, and for the limited
-purposes for which, the user has given you permission to do so.
-
-
-<h3>9. Terminating this License Agreement</h3>
-9.1 The License Agreement will continue to apply until terminated by either you or Google as set
-out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK
-and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated
-its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country
-in which you are resident or from which you use the service, or the provision of the SDK or certain
-SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and
-liabilities that you and Google have benefited from, been subject to (or which have accrued over
-time whilst the License Agreement has been in force) or which are expressed to continue
-indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall
-continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-<h3>10. DISCLAIMER OF WARRANTIES</h3>
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE
-SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE
-SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR
-COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-
-<h3>11. LIMITATION OF LIABILITY</h3>
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS
-LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY
-LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN
-AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-
-<h3>12. Indemnification</h3>
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless
-Google, its affiliates and their respective directors, officers, employees and agents from and
-against any and all claims, actions, suits or proceedings, as well as any and all losses,
-liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or
-accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes
-any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of
-any person or defames any person or violates their rights of publicity or privacy, and (c) any
-non-compliance by you with the License Agreement.
-
-
-<h3>13. Changes to the License Agreement</h3>
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK.
-When these changes are made, Google will make a new version of the License Agreement available on
-the website where the SDK is made available.
-
-
-<h3>14. General Legal Terms</h3>
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs
-your use of the SDK (excluding any services which Google may provide to you under a separate
-written agreement), and completely replaces any prior agreements between you and Google in relation
-to the SDK.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is
-contained in the License Agreement (or which Google has the benefit of under any applicable law),
-this will not be taken to be a formal waiver of Google's rights and that those rights or remedies
-will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any
-provision of the License Agreement is invalid, then that provision will be removed from the License
-Agreement without affecting the rest of the License Agreement. The remaining provisions of the
-License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the
-parent shall be third party beneficiaries to the License Agreement and that such other companies
-shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that
-confers a benefit on (or rights in favor of) them. Other than this, no other person or company
-shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST
-COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE
-LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you
-or Google without the prior written approval of the other party. Neither you nor Google shall be
-permitted to delegate their responsibilities or obligations under the License Agreement without the
-prior written approval of the other party.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be
-governed by the laws of the State of California without regard to its conflict of laws provisions.
-You and Google agree to submit to the exclusive jurisdiction of the courts located within the
-county of Santa Clara, California to resolve any legal matter arising from the License Agreement.
-Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies
-(or an equivalent type of urgent legal relief) in any jurisdiction.
-
-<em>November 20, 2015</em>
-</div>
-
-
-
-<div id="sdk-terms-form">
-<p>
-<input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
-<label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
-</p>
-<p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
-</div>
-
-                </div>
-              </div>
-            </fieldset>
-          </section>
-        </form>
-      </section>
-    </div>
-  </div>
-</div>
-<!-- end ndk_tos modal -->
-
-
-  <p>Select, from the table above, the NDK package for your development platform. For information
-  about the changes in the newest version of the NDK, see <a href="#rel">Release Notes</a>. For
-  information about earlier revisions, see <a href="{@docRoot}ndk/downloads/revision_history.html">
-  NDK Revision History.</a></p>
-
-
-<script>
-$('#Downloads').after($('#download-table'));
-</script>
-
-<h2 id="rel">Release Notes</h2>
-
-<p>
-  Android NDK, Revision 12 <em>(June 2016)</em>
-</p>
-
-<dl>
-<dt>
-  Announcements
-</dt>
-
-<ul>
-  <li>The <code>ndk-build</code> command will default to using
-  Clang in an upcoming release. GCC will be removed in a later release.
-  </li>
-  <li>The <code>make-standalone-toolchain.sh</code> script will be removed
-  in an upcoming release. If you use this script, please plan to migrate to the
-  <code>make_standalone_toolchain.py</code> as soon as possible.
-  </li>
-</ul>
-
-<dt>
-  NDK
-</dt>
-
-<ul>
-  <li>Removed support for the armeabi-v7a-hard ABI. See the explanation in the
-  <a href=
-  "https://android.googlesource.com/platform/ndk/+/ndk-r12-release/docs/HardFloatAbi.md">
-    documentation</a>.
-  </li>
-
-  <li>Removed all sysroots for platform levels prior to Android 2.3 (API level 9).
-    We dropped support for them in NDK r11, but neglected to actually remove them.
-  </li>
-
-  <li>Updated exception handling when using c++_shared on ARM32 so that it
-    mostly works (see <a href="#known-issues">Known Issues</a>). The unwinder
-    is now linked into each linked object rather than into libc++ itself.
-  </li>
-
-  <li>Pruned the default compiler flags (<a href=
-  "https://github.com/android-ndk/ndk/issues/27">NDK Issue 27</a>). You can see
-  details of this update in <a href=
-  "https://android-review.googlesource.com/#/c/207721/5">Change 207721</a>.
-  </li>
-
-  <li>Added a Python implementation of standalone toolchains in <code>
-  build/tools/make_standalone_toolchain.py</code>. On Windows, you no longer
-  need Cygwin to use this feature. Note that the bash flavor will be removed
-  in an upcoming release, so please test the new one now.
-  </li>
-
-  <li>Configured Clang debug builds to have the <code>-fno-limit-debug-info</code>
-  option is enabled by default. This change enables better debugging with LLDB.
-  </li>
-
-  <li>Enabled the <code>--build-id</code> as a default option. This option
-  causes an identifier to be shown in native crash reports so you can easily
-  identify which version of your code was running.
-  </li>
-
-  <li>Fixed issue with <code>NDK_USE_CYGPATH</code> so that it no longer causes
-  problems with libgcc
-  (<a href="http://b.android.com/195486">Issue 195486</a>).
-  </li>
-
-  <li>Enabled the following options as default:
-  <code>-Wl,--warn-shared-textrel</code> and <code>-Wl,--fatal-warnings</code>.
-  If you have shared text relocations, your app does not load on Android 6.0
-  (API level 23) and higher. Note that this configuration has never been
-  allowed for 64-bit apps.
-  </li>
-
-  <li>Fixed a few issues so that precompiled headers work better
-    (<a href="https://github.com/android-ndk/ndk/issues/14">NDK Issue 14</a>,
-     <a href="https://github.com/android-ndk/ndk/issues/16">NDK Issue 16</a>).
-  </li>
-
-  <li>Removed unreachable ARM (non-thumb) STL libraries.
-  </li>
-
-  <li>Added Vulkan support to android-24.
-  </li>
-
-  <li>Added Choreographer API to android-24.
-  </li>
-
-  <li>Added libcamera2 APIs for devices that support the
-  <code>INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED</code> feature level or higher.
-  For more information, see the
-  <a href="{@docRoot}reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">
-    <code>CameraCharacteristics</code></a> reference.
-  </li>
-
-</ul>
-
-<dt>
-  Clang
-</dt>
-
-<ul>
-  <li>Clang has been updated to 3.8svn (r256229, build 2812033). Note that
-    Clang packaged in the Windows 64-bit NDK is actually 32-bit.
-  </li>
-
-  <li>Fixed <code>__thread</code> so that it works for real this time.
-  </li>
-</ul>
-
-<dt>
-  GCC
-</dt>
-
-<ul>
-  <li>Synchronized the compiler with the ChromeOS GCC @ google/gcc-4_9 r227810.
-  </li>
-
-  <li>Backported coverage sanitizer patch from ToT (r231296).
-  </li>
-
-  <li>Fixed <code>libatomic</code> to not use ifuncs (<a href=
-  "https://github.com/android-ndk/ndk/issues/31">NDK Issue 31</a>).
-  </li>
-</ul>
-
-<dt>
-  Binutils
-</dt>
-
-<ul>
-  <li>Silenced the "Erratum 843419 found and fixed" info messages.
-  </li>
-
-  <li>Introduced option <code>--long-plt</code> to fix an internal linker error
-  when linking huge arm32 binaries.
-  </li>
-
-  <li>Fixed wrong run time stubs for <code>AArch64</code>. This problem was
-  causing jump addresses to be calculated incorrectly for very large
-  dynamic shared objects (DSOs).
-  </li>
-
-  <li>Introduced default option <code>--no-apply-dynamic</code> to work around
-  a dynamic linker bug for earlier Android releases.
-  </li>
-
-  <li>Fixed a known issue with NDK r11 where <code>dynamic_cast</code> was not
-  working with Clang, x86, stlport_static and optimization.
-  </li>
-</ul>
-
-<dt>
-  GDB
-</dt>
-
-<ul>
-  <li>Updated to GDB version 7.11. For more information about this release, see
-  <a href="https://www.gnu.org/software/gdb/news/">GDB News</a>.
-  </li>
-
-  <li>Fixed a number of bugs in the <code>ndk-gdb.py</code> script.
-  </li>
-</ul>
-
-<dt id="known-issues">
-  Known Issues
-</dt>
-
-<ul>
-  <li>The x86 <a href="http://source.android.com/devices/tech/debug/asan.html">Address
-  Sanitizer</a> (ASAN) currently does not work. For more information, see
-  <a href="https://android-review.googlesource.com/#/c/186276/">Issue 186276</a>.
-  </li>
-
-  <li>Exception unwinding with <code>c++_shared</code> does not work for ARM on
-  Android 2.3 (API level 9) or Android 4.0 (API level 14).
-  </li>
-
-  <li>Bionic headers and libraries for Android 6.0 (API level 23) and higher
-  are not yet exposed despite the presence of android-24. Those platforms still
-  have the Android 5.0 (API level 21) headers and libraries, which is consistent
-  with NDK r11.
-  </li>
-
-  <li>The RenderScript tools are not present, which is consistent with
-  NDK r11.
-  (<a href="https://github.com/android-ndk/ndk/issues/7">NDK Issue 7</a>)
-  </li>
-
-  <li>In <code>NdkCameraMetadataTags.h</code> header file, the camera metadata
-  tag enum value <code>ACAMERA_STATISTICS_LENS_SHADING_CORRECTION_MAP</code>
-  was listed by accident and will be removed in next release. Use
-  the <code>ACAMERA_STATISTICS_LENS_SHADING_MAP</code> value instead.
-  </li>
-
-</ul>
-
-</dl>
diff --git a/docs/html/ndk/downloads/revision_history.jd b/docs/html/ndk/downloads/revision_history.jd
deleted file mode 100644
index 211b64e..0000000
--- a/docs/html/ndk/downloads/revision_history.jd
+++ /dev/null
@@ -1,3766 +0,0 @@
-page.title=NDK Revision History
-@jd:body
-
-<p>This page provides information on previous releases of the NDK, enumerating the changes that
-took place in each new version.</p>
-
-
-<div class="toggle-content closed">
-<a name="11b"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 11c</a> <em>(March 2016)</em>
- </p>
- <div class="toggle-content-toggleme">
-
-<dl>
-  <dd>
-    <ul>
-      <li>Changes
-        <ul>
-          <li>Applied additional fixes to the {@code ndk-gdb.py} script.
-          </li>
-          <li>Added an optional package name argument to the {@code ndk-gdb}
-            command {@code --attach} option.
-            (<a href="https://github.com/android-ndk/ndk/issues/13">Issue 13</a>)
-          </li>
-          <li>Fixed invalid toolchain paths for 32-bit Windows platform.
-            (<a href="https://github.com/android-ndk/ndk/issues/45">Issue 45</a>)
-          </li>
-          <li>Fixed the relative path for the {@code ndk-which} command.
-            (<a href="https://github.com/android-ndk/ndk/issues/29">Issue 29</a>)
-          </li>
-          <li>Fixed use of cygpath for the libgcc compiler.
-            (Android <a href="http://b.android.com/195486">Issue 195486</a>)
-          </li>
-        </ul>
-      </li>
-    </ul>
-  </dd>
-</dl>
-
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="11b"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 11b</a> <em>(March 2016)</em>
- </p>
- <div class="toggle-content-toggleme">
-
-    <dl>
-      <dt>NDK</dt>
-      <dd>
-      <ul>
-      <li>Important announcements
-      <ul>
-         <li>We’ve moved our bug tracker to <a href="https://github.com/android-ndk/ndk/issues">
-         GitHub.</a></li>
-     </ul>
-     </li>
-
-     <li>Changes
-        <ul>
-         <li>{@code ndk-gdb.py} is fixed. It had
-               <a href="https://github.com/android-ndk/ndk/issues/3">regressed entirely</a>
-               in r11.</li>
-               <li>{@code ndk-gdb} for Mac <a href="https://github.com/android-ndk/ndk/issues/2">
-               is fixed</a>.</li>
-               <li>Added more top-level shortcuts for command line tools:
-                  <ul>
-                     <li>{@code ndk-depends}.</li>
-                     <li>{@code ndk-gdb}.</li>
-                     <li>{@code ndk-stack}.</li>
-                     <li>{@code ndk-which}. This command had been entirely absent from previous
-                     releases.</li>
-                  </ul>
-               </li>
-               <li>Fixed standalone toolchains for libc++, which had been missing
-               {@code __cxxabi_config.h}.</li>
-               <li>Fixed help documentation for {@code --toolchain} in
-               {@code make-standalone-toolchain.sh}.</li>
-         </li>
-       </ul>
-      </dd>
-
-      <dt>Clang</dt>
-      <dd>
-      <ul>
-      <li>Errata</li>
-          <ul>
-             <li>Contrary to what we reported in the r11 Release Notes, {@code __thread}
-             does not work. This is because the version of Clang we ship is missing a bug fix for
-             emulated TLS support.</li>
-          </ul>
-      </ul>
-      </dd>
-   </dl>
-
-
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="11"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 11</a> <em>(March 2016)</em>
- </p>
- <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Clang</dt>
-      <dd>
-      <ul>
-      <li>Important announcements
-      <ul>
-         <li>We strongly recommend switching to Clang.
-            <ul>
-                 <li>If you experience problems with Clang, file bugs
-         <a href="https://github.com/android-ndk/ndk/issues">here</a> for issues
-         specific to Clang in the NDK. For more general Clang issues,
-         file bugs by following the instructions on
-         <a href="http://llvm.org/docs/HowToSubmitABug.html">this page</a>.</li>
-            </ul>
-         </li>
-         <li>Clang has been updated to 3.8svn (r243773, build 2481030).
-            <ul>
-               <li>This version is a nearly pure upstream Clang.</li>
-               <li>The Windows 64-bit downloadable NDK package contains a 32-bit
-               version of Clang.</li>
-            </ul>
-         </li>
-     </ul>
-     </li>
-
-     <li>Additions
-        <ul>
-         <li>Clang now provides support for emulated TLS.
-            <ul>
-               <li>The compiler now supports {@code __thread} by emulating
-               ELF TLS with pthread thread-specific data.</li>
-               <li>C++11 {@code thread_local} works in some cases, but not
-               for data with non-trivial destructors, because those cases
-               require support from libc. This limitation does not
-               apply when running on Android 6.0 (API level 23) or newer.</li>
-               <li>Emulated TLS does not yet work with Aarch64 when
-               TLS variables are accessed from a shared library.</li>
-            </ul>
-         </li>
-       </ul>
-      </dd>
-   </dl>
-
-    <dl>
-      <dt>GCC</dt>
-      <dd>
-      <ul>
-      <li>Important announcements</li>
-          <ul>
-             <li>GCC in the NDK is now deprecated in favor of Clang.
-            <ul>
-               <li>The NDK will neither be upgrading to 5.x, nor accept
-               non-critical backports.</li>
-               <li>Maintenance for miscompiles and internal compiler errors
-               in 4.9 will be handled on a case by case basis.</li>
-            </ul>
-            </li>
-          </ul>
-      <li>Removals
-         <ul>
-         <li>Removed GCC 4.8. All targets now use GCC 4.9.</li>
-         </ul>
-       </li>
-      <li>Other changes
-         <ul>
-         <li>Synchronized google/gcc-4_9 to r224707. Previously, it had been
-         synchronized with r214835.</li>
-         </ul>
-       </li>
-       </ul>
-      </dd>
-   </dl>
-    <dl>
-      <dt>NDK</dt>
-      <dd>
-      <ul>
-      <li>Important announcements
-         <ul>
-            <li>The samples are no longer included in the NDK package.
-            They are instead available on
-            <a href="https://github.com/googlesamples/android-ndk">GitHub.</a>
-            </li>
-            <li>The documentation is no longer included in the NDK package.
-            Instead, it is on the <a href="{@docRoot}ndk/index.html">Android
-            developer website.</a></li>
-         </ul>
-      </li>
-
-      <li>Additions
-          <ul>
-         <li>Added a native tracing API to {@code android-23}.</li>
-         <li>Added a native multinetwork API to {@code android-23}.</li>
-         <li>Enabled libc, m, and dl to provide versioned symbols, starting
-         from API level 21.</li>
-         <li>Added Vulkan headers and library to API level N.</li>
-          </ul>
-       </li>
-
-      <li>Removals
-          <ul>
-         <li>Removed support for {@code _WCHAR_IS_8BIT}.</li>
-         <li>Removed sed.</li>
-         <li>Removed mclinker.</li>
-         <li>Removed Perl.</li>
-         <li>Removed from all versions of NDK libc, m, and dl all symbols which
-         the platform versions of those libs do not support.</li>
-         <li>Partially removed support for mips64r2. The rest will be removed
-         in the future.</li>
-          </ul>
-       </li>
-
-      <li>Other changes
-          <ul>
-            <li>Changed ARM standalone toolchains to default to arm7.
-               <ul>
-                  <li>You can restore the old behavior by passing specifying the
-                  {@code -target} option as {@code armv5te-linux-androideabi}.
-                  </li>
-               </ul>
-            </li>
-         <li>Changed the build system to use {@code -isystem} for platform
-         includes.
-            <ul>
-               <li>Warnings that bionic causes no longer break app builds.</li>
-            </ul>
-         </li>
-         <li>Fixed a segfault that occurred when a binary threw exceptions
-         via gabi++. (Issue <a href="http://b.android.com/179410">179410</a>)
-         </li>
-         <li>Changed libc++’s inline namespace to {@code std::__ndk1}
-         to prevent ODR issues with platform libc++.</li>
-
-         <li>All libc++ libraries are now built with libc++abi.
-         <li>Bumped default {@code APP_PLATFORM} to Gingerbread.
-            <ul>
-               <li>Expect support for Froyo and older to be dropped in a
-               future release.</ul>
-            </ul>
-         <li>Updated gabi++ {@code _Unwind_Exception} struct for 64 bits.
-         <li>Added the following capabilities to cpufeatures:
-            <ul>
-            <li>Detect SSE4.1 and SSE4.2.</li>
-            <li>Detect cpu features on x86_64.</li>
-            </ul>
-        </li>
-         <li>Updated libc++abi to upstream
-         <a href="http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150302/124603.html">
-         r231075</a>.
-         <li>Updated {@code byteswap.h}, {@code endian.h}, {@code sys/procfs.h},
-         {@code sys/ucontext.h}, {@code sys/user.h}, and {@code uchar.h} from
-         ToT Bionic.
-         <li>Synchronized {@code sys/cdefs.h} across all API levels.
-
-         <li>Fixed {@code fegetenv and fesetenv} for arm.
-         <li>Fix end pointer size/alignment of {@code crtend_*} for mips64
-         and x86_64.
-          </ul>
-       </li>
-      </ul>
-      </ul>
-      </dd>
-   <dl>
-    <dl>
-      <dt>Binutils</dt>
-      <dd>
-      <ul>
-      <li>Additions
-         <ul>
-         <li>Added a new option: {@code --pic-veneer}.</li>
-         </ul>
-       </li>
-
-      <li>Removals
-         <ul>
-         <li>The 32-bit Windows package no longer contains ld.gold.
-         You can instead get ld.gold from the 64-bit Windows package.</li>
-         </ul>
-       </li>
-
-      <li>Changes
-          <ul>
-             <li>Unified binutils source between Android and ChromiumOS.
-             For more information on this change, see the comments
-             <a href="https://android-review.googlesource.com/#/c/182865/">
-             here.</a></li>
-             <li>Improved reliability of Gold for aarch64. Use
-             {@code -fuse-ld=gold} at link time to use gold instead of bfd.
-             The default will likely switch in the next release.</li>
-             <li>Improved linking time for huge binaries for Gold ARM back end
-             (up to 50% linking time reduction for debuggable Chrome Browser).
-             </li>
-          </ul>
-     </li>
-       </ul>
-      </dd>
-         <dl>
-    <dl>
-      <dt>GDB</dt>
-      <dd>
-      <ul>
-
-      <li>Removals
-         <ul>
-         <li>Removed ndk-gdb in favor of ndk-gdb.py.</li>
-         </ul>
-       </li>
-
-      <li>Changes
-          <ul>
-              <li>Updated gdb to version 7.10.</li>
-              <li>Improved performance.</li>
-              <li>Improved error messages.</li>
-              <li>Fixed relative project paths.</li>
-              <li>Stopped Ctrl-C from killing the backgrounded gdbserver.</li>
-              <li>Improved Windows support.</li>
-          </ul>
-     </li>
-       </ul>
-      </dd>
-
-               <dl>
-    <dl>
-      <dt>YASM</dt>
-      <dd>
-      <ul>
-
-      <li>Changes
-          <ul>
-              <li>Updated YASM to version 1.3.0.</li>
-          </ul>
-     </li>
-       </ul>
-      </dd>
-
-        <dl>
-    <dl>
-      <dt>Known issues</dt>
-      <dd>
-      <ul>
-      <li>x86 ASAN does not currently work. For more information, see the
-      discussion <a href="https://android-review.googlesource.com/#/c/186276/">
-      here.</a></li>
-      <li>The combination of Clang, x86, stlport_static, and optimization
-      levels higher than {@code -O0} causes test failures with
-      {@code dynamic_cast}. For more information, see the comments
-      <a href="https://android-review.googlesource.com/#/c/185920">here</a>.
-      </li>
-      <li>Exception handling often fails with c++_shared on ARM32. The root
-      cause is incompatibility between the LLVM unwinder that libc++abi uses
-      for ARM32 and libgcc. This behavior is not a regression from r10e.</li>
-     </ul>
-     </dd>
-   </dl>
-
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="10e"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 10e</a> <em>(May 2015)</em>
- </p>
- <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-      <ul>
-        <li>Integrated the workaround for Cortex-A53 Erratum 843419 into the
-        {@code aarch64-linux-android-4.9} linker. For more information on this workaround, see
-        <a href="https://sourceware.org/ml/binutils/2015-03/msg00446.html">Workaround for cortex-a53
-        erratum 843419.</a></li>
-
-         <li>Added Clang 3.6; {@code NDK_TOOLCHAIN_VERSION=clang} now picks that version
-         of Clang by default.</li>
-
-         <li>Removed Clang 3.4.</li>
-
-         <li>Removed GCC 4.6.</li>
-
-         <li>Implemented multithreading support in {@code ld.gold} for all architectures. It can
-         now link with or without support for multithreading; the default is to do it without.
-            <ul>
-            <li>To compile with multithreading, use the {@code --threads} option.</li>
-            <li>To compile without multithreading, use the {@code --no-threads} option.</li>
-            </ul>
-            </li>
-
-         <li>Upgraded GDB/gdbserver to 7.7 for all architectures.</li>
-
-         <li>Removed the NDK package for 32-bit Darwin.</li>
-      </ul>
-      </dd>
-   <dl>
-
-
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-        <li>Fixed a crash that occurred when there were OpenMP loops outside of the main thread.</li>
-
-        <li>Fixed a GCC 4.9 internal compiler error (<i>ICE</i>) that occured when the user declared
-        {@code #pragma GCC optimize ("O0")}, but had a different level of optimization specified
-        on the command line. The {@code pragma} takes precedence.</li>
-
-        <li>Fixed an error that used to produce a crash with the following error message:
-<pre>
-in add_stores, at var-tracking.c:6000
-</pre>
-        </li>
-
-        <li>Implemented a workaround for a Clang 3.5 issue in which LLVM auto-vectorization
-        generates {@code llvm.cttz.v2i64()}, an instruction with no counterpart in the ARM
-        instruction set.</li>
-     </ul>
-     </dd>
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-        <li>Made the following header and library fixes:</li>
-           <ul>
-           <li>Fixed {@code PROPERTY_*} in {@code media/NdkMediaDrm.h}.</li>
-           <li>Fixed {@code sys/ucontext.h} for {@code mips64}.</li>
-           <li>Dropped the Clang version check for {@code __builtin_isnan} and
-           {@code __builtin_isinf}.</li>
-           <li>Added {@code android-21/arch-mips/usr/include/asm/reg.h}
-           and {@code android-21/arch-mips64/usr/include/asm/reg.h}.</li>
-           </ul>
-           </li>
-
-        <li>Fixed a spurious array-bounds warning that GCC 4.9 produced for x86, and reenabled the
-        array bounds warning that GCC 4.9 had produced for ARM. The warning for ARM had
-        previously been unconditionally disabled.</li>
-
-        <li>Fixed Clang 3.5 for {@code mips} and {@code mips64} to create a writable
-            {@code .gcc_except_table} section, thus matching GCC behavior. This change allows you
-            to avoid the following linker warning:
-
-<pre>
-.../ld: warning: creating a DT_TEXTREL in a shared object
-</pre>
-            </li>
-
-        <li>Backported a fix for {@code compiler-rt} issues that were causing crashes when Clang
-        compiled for {@code mips64}. For more information, see LLVM Issue
-        <a href="http://llvm.org/bugs/show_bug.cgi?id=20098">20098</a>.</li>
-
-        <li>Fixed Clang 3.5 crashes that occurred on non-ASCII comments. (Issue
-        <a href="https://code.google.com/p/android/issues/detail?id=81440">81440</a>)</li>
-
-        <li>Fixed {@code stlport collate::compare} to return {@code -1} and {@code 1}. Previously,
-        it had returned arbitrary signed numbers.</li>
-
-        <li>Fixed {@code ndk-gdb} for 64-bit ABIs. (Issue
-        <a href="https://code.google.com/p/android/issues/detail?id=118300">118300</a>)</li>
-
-        <li>Fixed the crash that the HelloComputeNDK sample for RenderScript was producing on
-        Android 4.4 (Android API level 19). For more information, see
-        <a href="http://stackoverflow.com/questions/28057049/targeting-pre-lollipop-devices-using-renderscript-from-ndk-c">this page</a>.</li>
-
-        <li>Fixed {@code libc++ __wrap_iter} for GCC. For more information, see LLVM Issue
-        <a href="http://llvm.org/bugs/show_bug.cgi?id=22355">22355</a>.</li>
-
-        <li>Fixed {@code .asm} support for ABI {@code x86_64}.</li>
-
-        <li>Implemented a workaround for the GCC 4.8 {@code stlport} issue. (Issue
-        <a href="https://android-review.googlesource.com/#/c/127773">127773</a>)</li>
-
-        <li>Removed the trailing directory separator {@code \\} from the project path in Windows.
-        (Issue <a href="https://code.google.com/p/android/issues/detail?id=160584">160584</a>)
-        </li>
-
-        <li>Fixed a {@code no rule to make target} error that occurred when compiling a single
-        {@code .c} file by executing the {@code ndk-build.cmd} command from {@code gradle}. (Issue
-        <a href="https://code.google.com/p/android/issues/detail?id=66937">66937</a>)</li>
-
-        <li>Added the {@code libatomic.a} and {@code libgomp.a} libraries that had been missing from
-        the following host toolchains:
-        <ul>
-           <li>{@code aarch64-linux-android-4.9}</li>
-           <li>{@code mips64el-linux-android-4.9}</li>
-           <li>{@code mipsel-linux-android-4.9}</li>
-           <li>{@code x86_64-4.9}</li>
-        </ul>
-     </ul>
-     </dd>
-
-     <dt>Other changes:</dt>
-     <dd>
-       <ul>
-       <li>Added {@code ld.gold} for {@code aarch64}. The default linker remains {@code ld.bfd}.
-       To explicitly enable {@code ld.gold}, add {@code -fuse-ld=gold} to the
-       {@code LOCAL_LDFLAGS} or {@code APP_LDFLAGS} variable.</li>
-
-       <li>Built the MIPS and MIPS64 toolchains with {@code binutils-2.25}, which provides improved
-       R6 support.</li>
-
-       <li>Made {@code -fstandalone-debug} (full debug info) a default option for Clang.</li>
-
-       <li>Replaced {@code -fstack-protector} with {@code -fstack-protector-strong} for
-       the ARM, AArch64, X86, and X86_64 toolchains for GCC 4.9, Clang 3.5, and
-       Clang 3.6.</li>
-
-       <li>Added the {@code --package} command-line switch to {@code ndk-gdb} to allow the build
-       system to override the package name. (Issue
-       <a href="https://code.google.com/p/android/issues/detail?id=56189">56189</a>)</li>
-
-       <li> Deprecated {@code -mno-ldc1-stc1} for MIPS.  This option may not work with the new
-       {@code -fpxx} and {@code -mno-odd-spreg} options, or with the FPXX ABI.</li>
-
-       <li>Added MIPS MSA and R6 detection to {@code cpu-features}.</li>
-
-     </ul>
-     </dd>
-   </dl>
-
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="10d"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 10d</a> <em>(December 2014)</em>
- </p>
- <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-      <ul>
-        <li>Made GCC 4.8 the default for all 32-bit ABIs.  Deprecated GCC 4.6, and
-            will remove it next release. To restore previous behavior, either add
-            <code>NDK_TOOLCHAIN_VERSION=4.6</code> to ndk-build, or
-            add <code>--toolchain=arm-linux-androideabi-4.6</code> when executing
-            <code>make-standalone-toolchain.sh</code> on the command line. GCC 4.9 remains the
-            default for 64-bit ABIs.</li>
-
-         <li>Stopped all x86[_64] toolchains from adding <code>-mstackrealign</code> by default. The
-             NDK toolchain assumes a 16-byte stack alignment. The tools and options used by default
-             enforce this rule. A user writing assembly code must make sure to preserve stack
-             alignment, and ensure that other compilers also comply with this rule.
-             (GCC bug <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496">38496</a>)</li>
-
-         <li>Added Address Sanitizer functionality to Clang 3.5 support to the ARM and x86 ABIs.
-             For more information on this change, see the
-             <a href="https://code.google.com/p/address-sanitizer/wiki/Android">Address
-             Sanitizer</a> project.</li>
-
-         <li>Introduced the requirement, starting from API level 21, to use <code>-fPIE -pie
-             </code> when building. In API levels 16 and higher, ndk-build uses <code>PIE</code>
-             when building. This change has a number of implications, which are discussed in
-             <a href="https://code.google.com/p/android-developer-preview/issues/detail?id=888">
-             Developer Preview Issue 888</a>.
-             These implications do not apply to shared libraries.</li>
-      </ul>
-      </dd>
-   <dl>
-
-
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-        <li>Made more fixes related to
-            <a href="https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00906.html">
-            A53 Errata #835769</a> in the aarch64-linux-android-4.9 linker. As part of this, GCC
-            passes a new option, <code>--fix-cortex-a53-835769</code>, when
-            <code>-mfix-cortex-a53-835769</code> (enabled by default) is specified.
-            For more information, see this
-            <a href="https://sourceware.org/ml/binutils/2014-10/msg00198.html">binutils message</a>
-            and this
-            <a href="https://sourceware.org/ml/binutils/2014-11/msg00287.html">binutils message</a>.
-            </li>
-
-        <li>Documented a fix to a libc++ <code>sscanf/vsscanf</code> hang that occurred in API level
-            21. The fix itself had been implemented in r10c.
-            (Issue <a href="http://b.android.com/77988">77988</a>)</li>
-
-        <li>Fixed an AutoFDO (<code>-fauto-profile</code>) crash that occurred with GCC 4.9 when
-            <code>-Os</code> was specified. (Issue <a href="http://b.android.com/77571">77571</a>)</li>
-     </ul>
-     </dd>
-
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-        <li>Made the following header and library fixes:</li>
-           <ul>
-        <li>Added <code>posix_memalign</code> to API level 16. Also, added a prototype in
-            <code>stdlib.h</code> to API levels 16 to 19.
-            (Issue <a href="http://b.android.com/77861">77861</a>)</li>
-        <li>Fixed <code>stdatomic.h</code> so that it includes <code>&lt;atomic&gt;</code> only for
-            C++11.</li>
-        <li>Modified the following headers for standalone use: <code>sys/user.h</code>, and
-            <code>gl2ext.h</code>, <code>dlext.h</code>, <code>fts.h</code>, <code>sgidefs.h</code>
-            for API level 21.</li>
-        <li>Modified <code>sys/user.h</code> to rename <code>mxcsr_mask</code> as <code>mxcr_mask</code>,
-            and to change the data type for <code>u_ar0</code></li> from <code>unsigned long</code>
-            to </code>struct user_regs_struct*</code>.
-        <li>Changed <code>sysconf()</code> return value type from <code>int</code> to
-            <code>long</code>.</li>
-           </ul>
-
-        <li>Fixed ndk-build's handling of <code>thumb</code> for <code>LOCAL_ARM_MODE</code>: In
-            r10d, ndk-build adds <code>LOCAL_LDFLAGS+=-mthumb</code> by default, unless one of the
-            following conditions applies:</li>
-          <ul>
-            <li>You have set <code>LOCAL_ARM_MODE</code> equal to <code>arm</code>.</li>
-            <li>You are doing a debug build (with settings such as <code>APP_OPTIM=debug</code> and
-            <code>AndroidManifest.xml</code> containing <code>android:debuggable="true"</code>),
-            where ARM mode is the default in order to retain compatibility with earlier toolchains.
-            (Issue <a href="http://b.android.com/74040">74040</a>)</li>
-          </ul>
-
-        <li>Fixed <code>LOCAL_SRC_FILES</code> in ndk-build to use Windows absolute paths.
-            (Issue <a href="http://b.android.com/74333">74333</a>)</li>
-
-        <li>Removed bash-specific code from ndk-gdb. (Issue <a href="http://b.android.com/73338">73338</a>)</li>
-
-        <li>Removed bash-specific code from <code>make-standalone-toolchain.sh</code>.
-            (Issue <a href="http://b.android.com/74145">74145)</a></li>
-
-        <li>Revised documentation concerning a fix for <code>System.loadLibrary()</code> transitive
-            dependencies. (Issue <a href="http://b.android.com/41790">41790</a>)</li>
-
-        <li>Fixed a problem that was preventing 64-bit packages from extracting on Ubuntu 14.04 and
-            OS X 10.10 (Yosemite). (Issue <a href="http://b.android.com/78148">78148</a>)</li>
-
-        <li>Fixed an issue with <code>LOCAL_PCH</code> to improve Clang support. (Issue
-            <a href="http://b.android.com/77575">77575</a>)</li>
-
-        <li>Clarified "requires executable stack" warning from ld.gold. (Issue
-            <a href="http://b.android.com/79115">79115</a>)</li>
-     </ul>
-     </dd>
-
-   </dl>
- </div>
-</div>
-
-
-
-
-
-
-
-<div class="toggle-content closed">
-<a name="10c"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 10c</a> <em>(October 2014)</em>
- </p>
- <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-      <ul>
- <li>Made the following changes to download structure:</li>
-       <ul>
-       <li>Each package now contains both the 32- and the 64-bit headers, libraries, and tools for
-       its respective platform.</li>
-       <li>STL libraries with debugging info no longer need be downloaded separately.</li>
-       </ul>
-  <li>Changed everything previously called <code>Android-L</code> to the official release
-  designation: <code>android-21</code>.</li>
-  <li>Updated GCC 4.9 by rebasing to the <code>google</code> branch
-  of the GCC repository. Major differences from the upstream version of GCC 4.9 include:</li>
-
-  <ul>
-  <li>The <code>-O2</code> option now turns on vectorization, without loop peeling but with more
-  aggressive unrolling.</li>
-  <li>Enhancements to FDO and <a href="https://gcc.gnu.org/wiki/LightweightIpo#LIPO_-_Profile_Feedback_Based_Lightweight_IPO">
-  LIPO</a></li>
-  <p>For more detailed information, see <em>Important bug fixes</em> below.</p>
-  </ul>
-
-  <li>Added Clang 3.5 support to all hosts: <code>NDK_TOOLCHAIN_VERSION=clang</code>
-  now picks Clang 3.5. Note that:</li>
-  <ul>
-
-  <li>ARM and x86 default to using the integrated assembler. If this causes issues, use
-  <code>-fno-integrated-as</code> as a workaround.</code>
-  <li>Clang 3.5 issues more warnings for unused flags, such as the <code>-finline-functions</code>
-  option that GCC supports.</li>
-  <p>When migrating from projects using GCC, you can use
-  <code>-Wno-invalid-command-line-argument</code> and <code>-Wno-unused-command-line-argument</code>
-  to ignore the unused flags until you're able decide on what to do with them longer-term.</p>
-
-     </ul>
-  <li>Made it possible to enter ART debugging mode, when debugging on an Android 5.0 device using
-  ART as its virtual machine, by specifying the <code>art-on</code> option. For more information,
-  see <code>prebuilt/common/gdb/common.setup</code> in the directory containing the NDK.</li>
-  <li>Removed support for Clang 3.3.</li>
-  <li>Deprecated GCC 4.6, and may remove it from future releases.</li>
-  <li>Updated mclinker to 2.8 with Identical Code Folding ("ICF") support. Specify ICF using the
-  <code>--icf</code> option.</li>
-  <li>Broadened <code>arm_neon.h</code> support in x86 and x86_64, attaining coverage of ~93% of
-  NEON intrinsics. For more information about NEON support:
-     <ul>
-     <li>Navigate to the NDK Programmer's Guide (<code>docs/Programmers_Guide/html/</code>), and see
-     Architectures and CPUs > Neon.</li>
-     <li>Examine the updated <code>hello-neon</code> sample in <code>samples/</code>.
-     <li>See Intel's guide to <a href="https://software.intel.com/en-us/blogs/2012/12/12/from-arm-neon-to-intel-mmxsse-automatic-porting-solution-tips-and-tricks"> porting from ARM NEON to Intel SSE.</a></li>
-     </ul>
-  <li>Documented support for <code>_FORTIFY_SOURCE</code> in <code>headers/libs/android-21</code>,
-  which appeared in r10 (when <code>android-21</code> was still called <code>Android-L</code>),
-  but had no documentation.</li>
-      </ul>
-      </dd>
-   <dl>
-
-
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Fixed an internal compiler error with GCC4.9/aarch64 that was causing the following
-       error message (Issue <a href="http://b.android.com/77564">77564</a>):</li>
-<pre>
-internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1539
-</pre>
-       <li>Fixed incorrect code generation from GCC4.9/arm. (Issue
-       <a href="http://b.android.com/77567">77567<a>)</li>
-       <li>Fixed an internal compiler error with GCC4.9/mips involving inline-assembly. (Issue
-       <a href="http://b.android.com/77568">77568</a>)</li>
-       <li>Fixed incorrect code that GCC4.9/arm was generating for <code>x = (cond) ? y : x</code>.
-       (Issue <a href="http://b.android.com/77569">77569</a>)</li>
-       <li>Fixed GCC4.9/aarch64 and Clang3.5/aarch64 to work around the
-       <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141006/116322.html">
-       Cortex-A53 erratum (835769)</a>  by default.  Disable the workaround by specifying
-       <code>-mno-fix-cortex-a53-835769</code>.</li>
-     </ul>
-     </dd>
-
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-     <li>Made the following header and library fixes to <code>android-21</code>:
-        <ul>
-
-        <li>Added more TV keycodes: <code>android/keycodes.h</code></li>
-        <li>Added more constants and six new sensor functions to <code>android/sensor.h</code>:
-        <code>ASensorManager_getDefaultSensorEx</code>, <code>ASensor_getFifoMaxEventCount</code>,
-        <code>ASensor_getFifoReservedEventCount</code>, <code>ASensor_getStringType</code>,
-        <code>ASensor_getReportingMode</code>, and <code>ASensor_isWakeUpSensor</code>.</li>
-        <li>Fixed <code>stdatomic.h</code> to improve compatibility with GCC 4.6, and provide support
-        for the <code>&lt;atomic&gt;</code> header.</li>
-        <li>Added <code>sys/ucontext.h</code> and <code>sys/user.h</code> to all API levels. The
-        <code>signal.h</code> header now includes <code>&lt;sys/ucontext.h&gt;</code>.  You may
-        remove any existing definition of <code>struct ucontext</code>.</li>
-        <li>Added <code>posix_memalign</code> to API levels 17, 18, and 19.</li>
-        <li>Added the following functions to all architectures:
-        <code>android_set_abort_message</code>, <code>posix_fadvise</code>,
-        <code>posix_fadvise64</code>, <code>pthread_gettid_np</code>.</li>
-        <li>Added the required permissions to the <code>native-media/AndroidManifest.xml</code>
-        sample.
-        (Issue <a href="https://android-review.googlesource.com/#/c/106640/">106640</a>)</li>
-        <li>Added <code>clock_nanosleep</code> and <code>clock_settime</code> to API level 21. (Issue
-        <a href="http://b.android.com/77372">77372</a>)
-        <li>Removed the following symbols from all architectures:
-        <code>get_malloc_leak_info</code>, <code>free_malloc_leak_info</code>,
-        <code>__srget</code>, <code>__swbuf</code>, <code>__srefill</code>, <code>__swsetup</code>,
-        <code>__sdidinit</code>, <code>__sflags</code>, <code>__sfp</code>,
-        <code>__sinit</code>, <code>__smakebuf</code>, <code>__sflush</code>, <code>__sread</code>,
-        <code>__swrite</code>, <code>__sseek</code>, <code>__sclose</code>,
-        <code>_fwalk</code>, <code>__sglue</code>, <code>__get_thread</code>, <code>__wait4</code>,
-        <code>__futex_wake</code>, <code>__open</code>, <code>__get_tls</code>,
-        <code>__getdents64</code>, and <code>dlmalloc</code>.</li>
-        <li>Removed the following functions from the 64-bit architectures: <code>basename_r</code>,
-        <code>dirname_r</code>, <code>__isthreaded</code>, <code>_flush_cache</code> (mips64).</li>
-        <li>Removed the following function from the 32-bit architectures:
-        <code>__signalfd4</code>.</li>
-        <li>Changed the type of the third argument from <code>size_t</code> to <code>int</code> in
-        the following functions: <code>strtoll_l</code>, <code>strtoull_l</code>,
-        <code>wcstoll_l</code>, and <code>wcstoull_l</code>.</li>
-        <li>Restored the following functions to the 64-bit architecture: <code>arc4random</code>,
-        <code>arc4random_buf</code>, and <code>arc4random_uniform</code>.</li>
-        <li>Moved <code>cxa_*</code> and the <code>new</code> and <code>delete</code> operators back
-        to <code>libstdc++.so</code>. This change restores r9d behavior; previous versions of r10
-        contained dummy files.</li>
-
-        </ul>
-     <li>Restored MXU support in GCC 4.8 and 4.9 for mips. This support had been absent from
-     r10 and r10b because those versions of GCC had been compiled with binutils-2.24, which did
-     not support MXU. It now does.</li>
-     <li>Fixed <code>--toolchain=</code> in <code>make-standalone-toolchain.sh</code> so that it
-     now properly supports use of a suffix specifying a version of Clang.</li>
-     <li>Fixed the libc++/armeabi <code>strtod()</code> functions.</li>
-     <li>Made fixes to NDK documentation in <code>docs/</code>.</li>
-     </ul>
-     </dd>
-
-     <dt>Other changes:</dt>
-     <dd>
-       <ul>
-       <li>Enhanced <code>cpu-features</code> to detect ARMv8 support for the following
-       instruction sets: AES, CRC32, SHA2, SHA1, and 64-bit PMULL/PMULL2. (Issue
-       <a href="https://android-review.googlesource.com/#/c/106360/">106360</a>)</li>
-
-       <li>Modified ndk-build to use <code>*-gcc-ar</code>, which is available in GCC 4.8, GCC 4.9, and
-       Clang. Clang specifies it, instead of <code>*-ar</code>. This setting brings improved LTO
-       support.</li>
-
-       <li>Removed the <code>include-fixed/linux/a.out.h</code> and
-       <code>include-fixed/linux/compiler.h</code> headers from the GCC compiler.
-       (Issue <a href ="http://b.android.com/73728">73728</a>)</li>
-
-       <li>Fixed an issue related to <code>-flto</code> with GCC 4.8 on Mac OS X. The error message
-       read:</li>
-
-       <pre>
-.../ld: error: .../libexec/gcc/arm-linux-androideabi/4.9/liblto_plugin.so
-Symbol not found: _environ
-</pre>
-
-       <li>Fixed a typo in <code>build-binary.mk.</code> (Issue
-       <a href="http://b.android.com/76992">76992</a>)</li>
-     </ul>
-     </dd>
-
-   <dt>Important known issues:</dt>
-     <dd>
-     <ul>
-     <li>Specifying -Os (<code>-fauto-profile</code>) in GCC4.9 may cause crashing.
-     (Issue <a href="http://b.android.com/77571">77571</a>)</li>
-     </ul>
-     </dd>
-
-   </dl>
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="10b"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 10b</a> <em>(September 2014)</em>
- </p>
- <div class="toggle-content-toggleme">
-   <dl>
-
-        <dt>Important notes:</dt>
-     <dd>
-     <ul>
-      <li>Because of the 512MB size restriction on downloadable packages, the following 32-bit items are not in the 32-bit NDK download packages. Instead, they reside in the 64-bit ones:</li>
-      <ul>
-      <li>Android-L headers</li>
-      <li>GCC 4.9</li>
-      </ul>
-     <li>Currently, the only Renderscript support provided by the NDK is for 32-bit Renderscript with Android 4.4 (API level 19). You cannot build HelloComputeNDK (the only Renderscript sample) with any other combination of Renderscript (32- or 64-bit) and Android version.</li>
-     <li>To compile native-codec, you must use a 64-bit NDK package, which is where all the Android-L headers are located. </li>
-     </ul>
-     </dd>
-
-
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-     <li>Fixed gdb 7.6 in GCC 4.8/4.9. (Issues <a href="http://b.android.com/74112">74112</a> and <a href="http://b.android.com/74371">74371</a>.)</li>
-     <li>Fixed GCC 4.8/4.9 for x86, so that they no longer enable <code>-msse4.2</code> and <code>-mpopcnt</code> by default. (Issue <a href="http://b.android.com/73843">73843</a>.)</li>
-     </ul>
-     </dd>
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-     <li>Removed <code>stdio.h</code> from the <code>include-fixed/</code> directories of all versions of GCC. (Issue <a href="http://b.android.com/73728">73728</a>.)</li>
-     <li>Removed duplicate header files from the Windows packages in the <code>platforms/android-L/arch-*/usr/include/linux/netfilter*/</code> directories. (Issue <a href="https://code.google.com/p/android/issues/detail?id=73704">73704</a>.)</li>
-     <li>Fixed a problem that prevented Clang from building HelloComputeNDK.</li>
-     <li>Fixed atexit. (Issue <a href="http://b.android.com/66595">66595</a>.)</li>
-     <li>Made various fixes to the docs in <code>docs/</code> and <code>sources/third_party/googletest/README.NDK</code>. (Issue <a href="http://b.android.com/74069">74069</a>.)</li>
-     <li>Made the following fixes to the Android-L headers:</li>
-     <ol>
-     <li>Added the following functions to <code>ctype.h</code> and <code>wchar.h</code>: <code>dn_expand()</code>, <code>grantpt()</code>, <code> inet_nsap_addr()</code>, <code>inet_nsap_ntoa()</code>, <code>insque()</code>, <code>nsdispatch()</code>, <code>posix_openpt()</code>, <code>__pthread_cleanup_pop()</code>, <code>__pthread_cleanup_push()</code>, <code>remque()</code>, <code>setfsgid()</code>, <code>setfsuid()</code>, <code>splice()</code>, <code>tee()</code>, <code>twalk()</code> (Issue <a href = "http://b.android.com/73719">73719</a>), and 42 <code>*_l()</code> functions.</li>
-
-    <li>Renamed <code>cmsg_nxthdr</code> to <code>__cmsg_nxthdr</code>.</li>
-
-    <li>Removed <code>__libc_malloc_dispatch</code>.</li>
-
-    <li>Changed the <code>ptrace()</code> prototype to <code>long ptrace(int, ...);</code>.</li>
-
-    <li>Removed <code>sha1.h</code>.</li>
-
-    <li>Extended <code>android_dlextinfo</code> in <code>android/dlext.h</code>.</li>
-
-    <li>Annotated <code>__NDK_FPABI__</code> for functions receiving or returning float- or double-type values in <code>stdlib.h</code>, <code>time.h</code>, <code>wchar.h</code>, and <code>complex.h</code>.</li>
-    </ol>
-     </ul>
-     </dd>
-
-     <dt>Other changes:</dt>
-     <dd>
-     <ul>
-        <li>Updated <code>mipsel-linux-android-4.9</code> and <code>mips64el-linux-android-4.9</code>, implementing a new multilib directory layout, and providing support for gdb-7.7</li>
-        <li>Enhanced <code>cpu-features</code> to detect more arm64 features.  (Change list <a href="https://android-review.googlesource.com/#/c/100339">100339</a>.)</li>
-     </dd>
-     </ul>
-
-   </dl>
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="10"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 10</a> <em>(July 2014)</em>
- </p>
- <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-      <ul>
-        <li>Added 3 new ABIs, all 64-bit: arm64-v8a, x86_64, mips64.</li> Note that:
-        <ul>
-           <li>GCC 4.9 is the default compiler for 64-bit ABIs. Clang is currently version 3.4.
-<code>NDK_TOOLCHAIN_VERSION=clang</code>
-      may not work for arm64-v8a and mips64.</li>
-           <li>Android-L is the first level with 64-bit support.  Note that this API
-level is a temporary one, and only for L-preview. An actual API level number will replace it at
-L-release.</li>
-           <li>This release includes now includes <code>all32</code> and <code>all64</code>
-settings for <code>APP_ABI</code>.
-              <ul>
-              <li><code>APP_ABI=all32</code> is equivalent to
-<code>APP_ABI=armeabi,armeabi-v7a,x86,mips</code>.</li>
-              <li><code>APP_ABI=all64</code> is equivalent to
-<code>APP_ABI=arm64-v8a,x86_64,mips64</code>.</li>
-              <li><code>APP_ABI=all</code> selects all ABIs.</li>
-              </ul>
-           <li>The new GNU libstdc++ in Android-L contains all <code>&lt;tr1/cmath&gt;</code>
-Before defining your own math function, check <code>_GLIBCXX_USE_C99_MATH_TR1</code> to see a
-function with that name already exists, in order to avoid "multiple definition" errors from the
-linker.</li>
-           <li>The cpu-features library has been updated for the ARMv8 kernel.  The existing
-cpu-features library may fail to detect the presence of NEON on the ARMv8 platform. Recompile your
-code with the new version.</li>
-        </ul>
-        <li>Added a new <code>platforms/android-L/</code> API directory. It includes:</li>
-        <ul>
-           <li>Updated Bionic headers, which had not changed from Android API levels 3
-(Cupcake) to 19 (KitKat). This new version, for level L, is to be synchronized with AOSP.</li>
-           <li>New media APIs and a native-codec sample.</li>
-           <li>An updated <code>Android.h</code> header for SLES/OpenSLES, enabling support for
-single-precision, floating-point audio format in AudioPlayer.</li>
-           <li>GLES 3.1 and AEP extensions to <code>libGLESv3.so.</code></li>
-           <li>GLES2 and GLES3 headers updated to the latest official Khronos versions.</li>
-        </ul>
-        <li>Added GCC 4.9 compilers to the 32-/64-bit ABIs.  GCC 4.9 is the default (only) compiler
-for 64-bit ABIs, as previously mentioned.  For 32-bit ABIs, you must explcitly enable GCC 4.9, as
-GCC 4.6 is still the default.</li>
-        <ul>
-           <li>For ndk-build, enable 32-bit, GCC 4.9 building either by adding
-<code>NDK_TOOLCHAIN_VERSION=4.9</code> to <code>Application.mk</code>, or exporting it as an
-environment variable from the command line.</li>
-           <li>For a standalone toolchain, use the <code>--toolchain=</code> option in the
-<code>make-standalone-toolchain.sh</code> script. For example: <code>--toolchain=arm-linux-androideabi-4.9.</code></li>
-        </ul>
-        <li>Upgraded GDB to version 7.6 in GCC 4.8/4.9 and x86*. Since GDB is still at version GDB-7.3.x in
-GCC 4.6 (the default for ARM and MIPS), you must set
-<code>NDK_TOOLCHAIN_VERSION=4.8</code> or <code>4.9</code> to enable ndk-gdb to select GDB 7.6.</li>
-        <li>Added the <code>-mssse3</code> build option to provide SSSE3 support, and made it the default for ABI x86
-(upgrading from SSE3). The image released by Google does not contain SSSE3 instructions.</li>
-        <li>Updated GCC 4.8 to 4.8.3.</li>
-        <li>Improved ARM libc++ EH support by switching from gabi++ to libc++abi. For details, see the "C++ Support" section of the documentation.
-  Note that:</li>
-        <ul>
-           <li>All tests except for locale now pass for Clang 3.4 and GCC 4.8. For more
-information, see the "C++ Support" section of the documentation.</li>
-           <li>The libc++ libraries for X86 and MIPS libc++ still use gabi++.</li>
-           <li>GCC 4.7 and later can now use &lt;atomic&gt;.</li>
-           <li>You must add <code>-fno-strict-aliasing</code> if you use <code> &lt;list&gt;</code>, because <code>__list_imp::_end</code>_ breaks
-      TBAA rules.  (Issue <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61571">61571</a>.)</li>
-           <li>As of GCC 4.6, LIBCXX_FORCE_REBUILD:=true no longer rebuilds libc++. Rebuilding it
-requires the use of a different compiler. Note that Clang 3.3 is untested.</li>
-        </ul>
-        <li>mclinker is now version 2.7, and has aarch64 Linux support.</li>
-        <li>Added precompiled header support for headers specified by <code>LOCAL_PCH</code>.  (Issue <a href="http://b.android.com/25412">25412</a>).</li>
-      </dd>
-   <dl>
-
-
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Fixed libc++ so that it now compiles <code>std::feof</code>, etc. (Issue <a
-href="http://b.android.com/66668">66668</a>).</li>
-       <li>Fixed a Clang 3.3/3.4 atomic library call that caused crashes in some of the libc++
-tests for ABI armeabi.</li>
-       <li>Fixed Clang 3.4 crashes that were occurring on reading precompiled headers. (Issue <a
-href="http://b.android.com/66657">66657</a>).</li>
-       <li>Fixed the Clang 3.3/3.4 <code>-O3</code> assert on:</li>
-       <code>llvm-3.2/llvm/include/llvm/MDBuilder.h:64: llvm::MDNode*
-llvm::MDBuilder::createBranchWeights(llvm::ArrayRef<unsigned int>): Assertion Weights.size() >= 2
-&& "Need at least two branch weights!"</code> (Issue <a href="http://b.android.com/57381">57381</a>).
-       <li>Fixed the following Clang 3.3/3.4 crash:</li>
-       <code>Assertion failed: (!Fn && "cast failed but able to resolve overload expression!!"), function CheckCXXCStyleCast, file
-Volumes/data/ndk-toolchain/src/llvm-3.3/llvm/tools/clang/lib/Sema/SemaCast.cpp, line 2018</code>.
-(Issue <a href="http://b.android.com/66950">66950</a>).
-     </ul>
-     </dd>
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Fixed headers:</li>
-       <ul>
-          <li>Fixed 32-bit <code>ssize_t</code> to be <code>int</code> instead of <code>long
-int</code>.</li>
-          <li>Fixed <code>WCHAR_MIN</code> and <code>WCHAR_MAX</code> so that they they take
-appropriate signs according to the architecture they're running on:</li>
-          <ul>
-             <li>X86/MIPS: signed.
-             <li>ARM: unsigned.
-             <li>To force X86/MIPS to default to unsigned, use
-<code>-D__WCHAR_UNSIGNED__</code>.</li>
-             <li>To force <code>wchar_t</code> to be 16 bits, use <code>-fshort-wchar</code>.</li>
-          </ul>
-          <li>Removed non-existent symbols from 32-bit <code>libc.so</code>, and added <code>pread64</code>,
-<code>pwrite64</code>, <code>ftruncate64</code> for
-Android API level 12 and higher. (Issue <a href="http://b.android.com/69319">69319</a>). For more
-information, see the commit message accompanying AOSP change list
-     <a href="https://android-review.googlesource.com/#/c/94137">94137</a>.</li>
-       </ul>
-       <li>Fixed GCC warning about redefinition of <code>putchar</code>. Warning message reads:</li>
-       <code>include/stdio.h:236:5: warning: conflicts with previous declaration here
-[-Wattributes] int  putchar(int);</code> (Change list <a
-href="https://android-review.googlesource.com/#/c/91185">91185</a>).
-       <li>Fixed <code>make-standalone-toolchain.sh --stl=libc++</code> so that it:</li>
-       <ul>
-          <li>Copies <code>cxxabi.h</code>. (Issue <a
-href="http://b.android.com/68001">68001</a>).</li>
-          <li>Runs in directories other than the NDK install directory. (Issues <a
-href="http://b.android.com/67690">67690</a> and <a href="http://b.android.com/68647">68647</a>).</li>
-       </ul>
-       <li>Fixed GCC/Windows to quote arguments only when necessary for spawning processes in
-external programs. This change decreases the likelihood of exceeding the 32K length limit.</li>
-       <li>Fixed an issue that made it impossible to adjust the <code>APP_PLATFORM</code>
-environment variable.</li>
-       <li>Fixed the implementation of <code>IsSystemLibrary()</code> in crazy_linker so that it
-uses <code>strrchr()</code>
-  instead of <code>strchr()</code> to find the library path's true basename.</li>
-       <li>Fixed native-audio's inability to build in debug mode.</li>
-       <li>Fixed gdb's inability to print extreme floating-point numbers. (Issue <a
-href="http://b.android.com/69203">69203</a>).</li>
-       <li>Fixed Clang 3.4 inability to compile with <code>-Wl,-shared</code> (as opposed to
-<code>-shared</code>, which
-  had no compilation issues).  The problem was that Clang added <code>-pie</code> for Android
-targets if neither <code>-shared</code> nor <code>-static</code> existed. This behavior, which was
-incorrect, caused the linker to complain that <code>-shared</code> and <code>-pie</code> could not
-co-exist.</li>
-
-     </ul>
-     </dd>
-
-
-     <dt>Other changes:</dt>
-     <dd>
-     <ul>
-        <li>Added <code>arm_neon.h</code> to the x86 toolchain so that it now emulates ~47% of
-Neon. There is currently no support for 64-bit types. For more information, see the section on ARM
-Neon intrinsics support in the x86 documentation.</li>
-        <li>Ported ARM/GOT_PREL optimization (present in GCC 4.6 built from the GCC google branch) to
-ARM GCC 4.8/4.9.  This optimization sometimes reduces instruction count when accessing global
-variables.  As an example, see the build.sh script in
-<code>$NDK/tests/build/b14811006-GOT_PREL-optimization/</code>.</li>
-        <li>Added ARM version for STL gabi++, stlport, and libc++. They now have both it and Thumb
-mode.</li>
-        <li>It is now possible to call the make-standalone-toolchain.sh script with
-<code>--toolchain=x86_64-linux-android-4.9</code>, which is equivalent to
-<code>--toolchain=x86_64-4.9</code>.</li>
-     </dd>
-     </ul>
-   </dl>
- </div>
-</div>
-
-
-<div class="toggle-content closed">
-<a name="9d"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 9d</a> <em>(March 2014)</em>
- </p>
- <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-      <ul>
-        <li>Added support for the Clang 3.4 compiler. The
-<code>NDK_TOOLCHAIN_VERSION=clang</code> option now picks Clang 3.4. GCC 4.6 is
-still the default compiler.</li>
-        <li>Added <code>APP_ABI=armeabi-v7a-hard</code>, with
-additional multilib option <code>-mfloat-abi=hard</code>. These options are for
-use with ARM GCC 4.6/4.8 and Clang 3.3/3.4 (which use 4.8's assembler, linker,
-and libs). When using these options, note the following changes:</li>
-        <ul>
-           <li> When executing the <code>ndk-build</code> script, add the
-following options for armeabi-v7a target:
-<pre>TARGET_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
-TARGET_LDFLAGS += -Wl,--no-warn-mismatch -lm_hard</pre>
-The built library is copied to <code>libs/armeabi-v7a</code>. For make to
-behave as expected, you cannot specify both <code>armeabi-v7a</code> and
-<code>armeabi-v7a-hard</code> as make targets (i.e., on the APP_ABI= line).
-Doing so causes one of them to be ignored. Note that <code>APP_ABI=all</code>
-is still equivalent to
-<code>armeabi armeabi-v7a x86 mips</code>.</li>
-           <li>The <code>make-standalone-toolchain.sh</code> script copies
-additional libaries under <code>/hard</code> directories.
-      Add the above <code>CFLAGS</code> and <code>LFLAGS</code> to your
-makefile to enable GCC or Clang to link with
-      libraries in <code>/hard</code>.</li>
-        </ul>
-        <li>Added the yasm assembler, as well as <code>LOCAL_ASMFLAGS</code>
-and <code>EXPORT_ASMFLAGS</code> flags for x86
-targets. The <code>ndk-build</code> script uses
-<code>prebuilts/*/bin/yasm*</code> to build <code>LOCAL_SRC_FILES</code> that
-have the <code>.asm</code> extension.</li>
-        <li>Updated MClinker to 2.6.0, which adds <code>-gc-sections</code>
-support.</li>
-        <li>Added experimental libc++ support (upstream r201101).  Use this new
-feature by following these steps:
-        <ul>
-           <li>Add <code>APP_STL := c++_static</code> or <code>APP_STL :=
-c++_shared</code> in <code>Application.mk</code>.
-      You may rebuild from source via <code>LIBCXX_FORCE_REBUILD :=
-true</code></li>
-           <li>Execute <code>make-standalone-toolchain.sh --stl=libc++</code>
-to create a standalone toolchain with libc++ headers/lib.</li>
-        </ul>
-        For more information, see
-<code>CPLUSPLUS-SUPPORT.html</code>.
-(Issue <a href="http://b.android.com/36496">36496</a>)</li>
-      </ul>
-      </dd>
-   <dl>
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Fixed an uncaught throw from an unexpected
-exception handler for GCC 4.6/4.8 ARM EABI. (GCC Issue <a
-href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59392">59392</a>)</li>
-       <li>Fixed GCC 4.8 so that it now correctly resolves partial
-specialization of a template with
-  a dependent, non-type template argument. (GCC Issue <a
-href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59052">59052</a>)</li>
-       <li>Added more modules to prebuilt python (Issue <a
-href="http://b.android.com/59902">59902</a>):
-               <ul>
-                 <li>Mac OS X: <code>zlib</code>, <code>bz2</code>,
-<code>_curses</code>, <code>_curses_panel</code>, <code>_hashlib</code>,
-<code>_ssl</code></li>
-                 <li>Linux: <code>zlib</code>, <code>nis</code>,
-<code>crypt</code>, <code>_curses</code>, and <code>_curses_panel</code></li>
-               </ul>
-       <li>Fixed the x86 and MIPS gdbserver
-<code>event_getmsg_helper</code>.</li>
-       <li>Fixed numerous issues in the RenderScript NDK toolchain, including
-issues with compatibility across older devices and C++ reflection.</li>
-<br>
-     </ul>
-     </dd>
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Header fixes:
-         <ul>
-           <li>Fixed a missing <code>#include &lt;sys/types.h&gt;</code> in
-<code>android/asset_manager.h</code> for Android API level 13 and higher.
-     (Issue <a href="http://b.android.com/64988">64988</a>)</li>
-           <li>Fixed a missing <code>#include <stdint.h></code> in
-<code>android/rect_manager.h</code> for Android API level 14 and higher.</li>
-           <li>Added <code>JNICALL</code> to <code>JNI_OnLoad</code> and
-<code>JNI_OnUnload</code> in <code>jni.h</code>. Note that <code>JNICALL</code>
- is defined as <code>__NDK_FPABI__</code> For more information, see
-<code>sys/cdefs.h</code>.</li>
-           <li>Updated the following headers so that they can be included
-without the need to
-manually include their dependencies (Issue <a
-href="http://b.android.com/64679">64679</a>):</li>
-<pre>
-android/tts.h
-EGL/eglext.h
-fts.h
-GLES/glext.h
-GLES2/gl2ext.h
-OMXAL/OpenMAXSL_Android.h
-SLES/OpenSLES_Android.h
-sys/prctl.h
-sys/utime.h
-</pre>
-           <li>Added <code>sys/cachectl.h</code> for all architectures. MIPS
-developers can now include this header instead of writing <code>#ifdef
-__mips__</code>.</li>
-           <li></code>Fixed <code>platforms/android-18/include/android/input.h
-</code> by adding <code>__NDK_FPABI__</code> to functions taking or returning
-float or double values.</li>
-           <li>Fixed MIPS <code>struct stat</code>, which was incorrectly set
-to its 64-bit counterpart for Android API level 12 and later. This wrong
-setting was a
-regression introduced in release r9c.</li>
-           <li>Defined <code>__PTHREAD_MUTEX_INIT_VALUE</code>,
-<code>__PTHREAD_RECURSIVE_MUTEX_INIT_VALUE</code>,
-     and <code>__PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE</code> for Android API
-level 9 and lower.</li>
-           <li>Added <code>scalbln</code>, <code>scalblnf</code>, and
-<code>scalblnl</code> to x86 <code>libm.so</code> for APIs 18 and later.</li>
-           <li>Fixed a typo in
-<code>sources/android/support/include/iconv.h</code>.
-     (Issue <a href="http://b.android.com/63806">63806</a>)</li>
-
-         </ul>
-       </li>
-       <li>Fixed gabi++ <code>std::unexpected()</code> to call
-<code>std::terminate()</code> so that
-  a user-defined <code>std::terminate()</code> handler has a chance to run.
-</li>
-       <li>Fixed gabi++ to catch <code>std::nullptr</code>.</li>
-       <li>Fixed samples Teapot and MoreTeapots:
-         <ul>
-      <li>Solved a problem with Tegra 2 and 3 chips by changing specular
-variables to use medium precision. Values for specular power can now be less
-than 1.0. </li>
-      <li>Changed the samples so that pressing the volume button restores
-immersive mode and invalidates
-<code>SYSTEM_UI_FLAG_IMMERSIVE_STICKY</code>. Screen rotation does not
-trigger <code>onSystemUiVisibilityChange</code>, and so does not restore
-immersive mode.</li>
-         </ul>
-        </li>
-        <li>Fixed the <code>ndk-build</code> script to add
-<code>-rpath-link=$SYSROOT/usr/lib</code> and
-<code>-rpath-link=$TARGET_OUT</code> in order to use <code>ld.bfd</code> to
-link executables. (Issue  <a href="http://b.android.com/64266">64266</a>)</li>
-        <li>Removed <code>-Bsymbolic</code> from all STL builds.</li>
-        <li>Fixed <code>ndk-gdb-py.cmd</code> by setting <code>SHELL</code> as
-an environment variable
-instead of passing it to
-  <code>python.exe</code>, which ignores the setting.
-  (Issue <a href="http://b.android.com/63054">63054</a>)</li>
-        <li>Fixed the <code>make-standalone-toolchain.sh</code> script so that
-the <code>--stl=stlport</code> option copies the gabi++ headers instead of
-symlinking them; the <code>cmd.exe</code> and MinGW shells do not understand
-symlinks created by cygwin.</li>
-     </ul>
-     </dd>
-
-     <dt>Other changes:</dt>
-     <dd>
-     <ul>
-        <li>Applied execution permissions to all <code>*cmd</code> scripts
-previously intended for use only in the <code>cmd.exe</code> shell, in case
-developers prefer to use <code>ndk-build.cmd</code> in cygwin instead of the
-recommended <code>ndk-build</code> script.</li>
-        <li>Improved the speed of the <code>make-standalone-toolchain.sh</code>
-script by moving instead of copying if the specified destination directory does
-not exist.</li>
-     </dd>
-     </ul>
-   </dl>
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="9c"></a>
- <p>
-   <a href="#" onclick="return toggleContent(this)"> <img
-     src="/assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-   >Android NDK, Revision 9c</a> <em>(December 2013)</em>
- </p>
- <div class="toggle-content-toggleme">
-<p>This is a bug-fix-only release.</p>
-   <dl>
-     <dt>Important bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Fixed a problem with GCC 4.8 ARM, in which the stack pointer is
-restored too early. This problem prevented the frame pointer from reliably
-accessing a variable in the stack frame. (GCC Issue <a
-href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854">58854</a>)</li>
-<li>Fixed a problem with GCC 4.8 libstdc++, in which a bug in
-std::nth_element was causing generation of code that produced a random
-segfault. (Issue <a
-href="https://code.google.com/p/android/issues/detail?id=62910">62910</a>)</li>
-           <li>Fixed GCC 4.8 ICE in cc1/cc1plus with
-<code>-fuse-ld=mcld</code>, so that the following error no longer occurs:
-<pre>cc1: internal compiler error: in common_handle_option, at
-opts.c:1774</pre></li>
-           <li>Fixed <code>-mhard-float</code> support for
-<code>__builtin</code> math functions. For ongoing information on fixes for
-<code>-mhard-float</code> with STL, please follow Issue <a
-href="http://b.android.com/61784">61784</a>.</li>
-     </ul>
-     </dd>
-
-     <dt>Other bug fixes:</dt>
-     <dd>
-     <ul>
-       <li>Header fixes:
-         <ul>
-           <li>Changed prototype of <code>poll</code> to <code>poll(struct
-pollfd *, nfds_t, int);</code> in <code>poll.h</code>.</li>
-           <li>Added <code>utimensat</code> to <code>libc.so</code> for Android
-API levels 12 and 19. These libraries are now included for all Android API
-levels 12 through 19.</li>
-<li>Introduced <code>futimens</code> into <code>libc.so</code>, for Android API
-level 19.</li>
-<li>Added missing <code>clock_settime()</code> and
-<code>clock_nanosleep()</code> to <code>time.h</code> for Android API level 8
-and higher.</li>
-<li>Added <code>CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE,
-CLOCK_MONOTONIC_COARSE, CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM,</code> and
-<code>CLOCK_BOOTTIME_ALARM</code> in <code>time.h.</code></li>
-<li>Removed obsolete <code>CLOCK_REALTIME_HR</code> and
-<code>CLOCK_MONOTONIC_HR.</code></li>
-         </ul>
-       </li>
-       <li>In samples Teapot, MoreTeapots, and
-<code>source/android/ndk_helper</code>:
-         <ul>
-<li>Changed them so that they now use a hard-float abi for armeabi-v7a.</li>
-<li>Updated them to use immersive mode on Android API level 19 and
-higher.</li>
-<li>Fixed a problem with <code>Check_ReleaseStringUTFChars</code> in
-<code>/system/lib/libdvm.so</code> that was causing crashes on x86 devices.</li>
-         </ul>
-        </li>
-<li>Fixed <code>ndk-build</code> fails that happen in cygwin when the NDK
-package is
-referenced via symlink.</li>
-<li>Fixed <code>ndk-build.cmd</code> fails that happen in windows
-<code>cmd.exe</code> when
-<code>LOCAL_SRC_FILES</code> contains absolute paths. (Issue <a
-href="https://android-review.googlesource.com/#/c/69992">69992</a>)</li>
-<li>Fixed the <code>ndk-stack</code> script to proceed even when it can't parse
-a frame due to inability to find a routine, filename, or line number. In any of
-these cases, it prints <code>??</code>.</li>
-<li>Fixed the <code>ndk-stack</code> stack for windows-x64_64 targets so that
-it no longer erroneously matches a frame line with a line in the
-<code>stack:</code> section that doesn't contain <code>pc</code>,
-<code>eip</code>, or <code>ip</code>. For example:
-<pre>I/DEBUG   ( 1151):     #00  5f09db68  401f01c4
-/system/lib/libc.so</pre></li>
-<li>Fixed gabi++ so that it:
-     <ul>
-         <li>Does not use malloc() to allocate C++ thread-local
-  objects.</li>
-         <li>Avoids deadlocks in gabi++ in cases where libc.debug.malloc is
-non-zero in userdebug/eng Android platform builds.</li>
-     </ul>
-     </ul>
-     </dd>
-
-     <dt>Other changes:</dt>
-     <dd>
-     <ul>
-       <li>Added <code>LOCAL_EXPORT_LDFLAGS</code>.</li>
-<li>Introduced the <code>NDK_PROJECT_PATH=null</code> setting for use in an
-integrated build system where options are explicitly passed to
-<code>ndk-build</code>. With this setting, <code>ndk-build</code> makes no
-attempt to look for <code>NDK_PROJECT_PATH.</code> This setting also prevents
-variables from deriving default settings from NDK_PROJECT_PATH. As a result,
-the following variables must now be explicitly specified (with their default
-values if such exist): <code>NDK_OUT, NDK_LIBS_OUT, APP_BUILD_SCRIPT,
-NDK_DEBUG</code> (optional, default to 0), and other <code>APP_*</code>'s
-contained in <code>Application.mk</code>.</li>
-<li><code>APP_ABI</code> can now be enumerated in a comma-delimited list. For
-example:
-<pre>APP_ABI := "armeabi,armeabi-v7a"</pre></li>
-<li>Provided the ability to rebuild all of STL with debugging info in an
-optional, separate package called
-<code>android-ndk-r9c-cxx-stl-libs-with-debugging-info.zip</code>, using the
-<code>-g</code> option. This option
-helps the <code>ndk-stack</code> script provide better a stack dump across STL.
-This change should not affect the code/size of the final, stripped file.</li>
-<li>Enhanced <code>hello-jni</code> samples to report <code>APP_ABI</code> at
-compilation.</li>
-<li>Used the <code>ar</code> tool in Deterministic mode (option
-<code>-D</code>) to build static libraries.  (Issue <a
-href="http://b.android.com/60705">60705</a>)</li>
-     </ul>
-     </dd>
-
-   </dl>
- </div>
-</div>
-
-<div class="toggle-content closed">
-<a name="9b"></a>
-  <p>
-    <a href="#" onclick="return toggleContent(this)"> <img
-      src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-    >Android NDK, Revision 9b</a> <em>(October 2013)</em>
-  </p>
-  <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-      <ul>
-        <li>Updated {@code include/android/*h} and {@code math.h} for all Android API levels up to
-          18, including the addition of levels 13, 15, 16 and 17.
-          For information on added APIs, see commit messages for Changes
-          <a href="https://android-review.googlesource.com/68012">68012</a> and
-          <a href="https://android-review.googlesource.com/68014">68014</a>.
-          (Issues <a href="http://b.android.com/47150">47150</a>,
-           <a href="http://b.android.com/58528">58528</a>, and
-           <a href="http://b.android.com/38423">38423</a>)</li>
-        <li>Added support for Android API level 19, including Renderscript binding.</li>
-        <li>Added support for <code>-mhard-float</code> in the existing armeabi-v7a ABI. For more
-          information and current restrictions on Clang, see
-          {@code tests/device/hard-float/jni/Android.mk}.</li>
-        <li>Migrated from GNU Compiler Collection (GCC) 4.8 to 4.8.2, and added diagnostic color
-          support. To enable diagnostic colors, set <code>-fdiagnostics-color=auto</code>,
-          <code>-fdiagnostics-color=always,</code> or export {@code GCC_COLORS} as shown below:
-<pre>
-GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
-</pre>
-          For more information, see
-          <a href="http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html">GCC
-          Language Independent Options</a>.
-        </li>
-        <li>Added two new samples to demonstrate OpenGL ES 3.0 features: Teapot and MoreTeapots.
-          These samples run on devices with Android 4.1 (API level 16) and higher.</li>
-        <li>Deprecated GCC 4.7 and Clang 3.2 support, which will be removed in the next
-          release.</li>
-      </ul>
-      </dd>
-
-      <dt>Important bug fixes:</dt>
-      <dd>
-      <ul>
-        <li>Fixed problem with ARM GCC 4.6 {@code thumb2} failing to generate 16-bit relative jump
-          tables. (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48328">GCC Issue</a>)</li>
-        <li>Fixed GCC 4.8 internal compiler error (ICE) on
-          {@code g++.dg/cpp0x/lambda/lambda-defarg3.C}.
-          (<a href="https://android-review.googlesource.com/62770">Change 62770</a>,
-          <a href="http://gcc.gnu.org/ml/gcc/2013-07/msg00424.html">GCC Issue</a>)</li>
-        <li>Fixed a problem with Windows 32-bit {@code *-gdb.exe} executables failing to launch.
-          (<a href="http://b.android.com/58975">Issue 58975</a>)</li>
-        <li>Fixed GCC 4.8 ICE when building bullet library. The error message is as follows:
-          <pre>internal compiler error: verify_flow_info failed</pre>
-          (<a href="http://b.android.com/58916">Issue 58916</a>,
-           <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165">GCC Issue</a>)</li>
-        <li>Modified GDB/ARM build to skip {@code ARM.exidx} data for unwinding in prologue code and
-          added a command ({@code set arm exidx-unwinding}) to control exidx-based stack unwinding.
-          (<a href="http://b.android.com/55826">Issue 55826</a>)</li>
-        <li>Fixed Clang 3.3 MIPS compiler problem where HI and LO registers are incorrectly
-          reused.</li>
-        <li>Fixed issue with MIPS 4.7 ICE in {@code dbx_reg_number}. The error message is as
-follows:
-<pre>
-external/icu4c/i18n/decimfmt.cpp:1322:1:
-internal compiler error: in dbx_reg_number, at dwarf2out.c:10185
-</pre>
-          (<a href="http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00830.html">GCC Patch</a>)
-
-        </li>
-
-      </ul>
-      </dd>
-
-      <dt>Other bug fixes:</dt>
-      <dd>
-      <ul>
-        <li>Header fixes
-          <ul>
-            <li>Fixed the ARM {@code WCHAR_MIN} and {@code WCHAR_MAX} to be unsigned according to
-              spec (the X86/MIPS versions are signed). Define {@code _WCHAR_IS_ALWAYS_SIGNED} to
-              restore old behavior. (<a href="http://b.android.com/57749">Issue 57749</a>)</li>
-            <li>Fixed {@code include/netinet/tcp.h} to contain {@code TCP_INFO} state enum.
-              (<a href="http://b.android.com/38881">Issue 38881</a>)</li>
-            <li>Fixed the {@code cdefs_elh.h} macro {@code _C_LABEL_STRING} to stop generating
-               warnings in the GCC 4.8 toolchain when using c++11 mode.
-              (<a href="http://b.android.com/58135">Issue 58135</a>,
-               <a href="http://b.android.com/58652">Issue 58652</a>)</li>
-            <li>Removed non-existent functions {@code imaxabs} and {@code imaxdiv} from header
-              {@code inttypes.h}.</li>
-            <li>Fixed issue with {@code pthread_exit()} return values and {@code pthread_self()}.
-                 (<a href="http://b.android.com/60686">Issue 60686</a>)</li>
-            <li>Added missing {@code mkdtemp()} function, which already exists in {@code bionic}
-              header {@code stdlib.h}.</li>
-          </ul>
-        </li>
-        <li>Fixed problem building {@code samples/gles3jni} with Clang on Android API level 11.</li>
-        <li>Fixed MCLinker to allow multiple occurrences of the following options:
-          {@code -gc-sections} and {@code --eh-frame-hdr}.</li>
-        <li>Fixed MCLinker to accept the {@code --no-warn-mismatch} option.</li>
-        <li>Modified {@code cpu-features} option to not assume all VFPv4 devices support IDIV.
-          Now this option only adds IDIV to white-listed devices, including Nexus 4.
-          (<a href="http://b.android.com/57637">Issue 57637</a>)</li>
-        <li>Fixed problem with {@code android_native_app_glue.c} erroneously logging errors on event
-          predispatch operations.</li>
-        <li>Fixed all operations on {@code gabi++} terminate and unexpected_handler to be
-          thread-safe.</li>
-        <li>Fixed several issues with Clang <code>-integrated-as</code> option so it can pass
-          tests for {@code ssax-instructions} and {@code fenv}.</li>
-        <li>Fixed GCC 4.6/4.7/4.8 compiler to pass the linker option {@code --eh-frame-hdr} even
-          for static executables. For more information, see the
-          <a href="http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00969.html">GCC patch</a>.</li>
-        <li>Fixed extra apostrophe in <code>CPU-ARCH-ABIS.html</code>. For more information, see
-          <code>NDK-DEPENDS.html</code>. (<a href="http://b.android.com/60142">Issue 60142</a>)</li>
-        <li>Fixed extra quotes in ndk-build output on Windows.
-          (<a href="http://b.android.com/60649">Issue 60649</a>)</li>
-        <li>Fixed Clang 3.3 to compile ARM's built-in, atomic operations such as
-          {@code __atomic_fetch_add}, {@code __atomic_fetch_sub}, and {@code __atomic_fetch_or}.
-          </li>
-        <li>Fixed Clang 3.3 ICE with customized {@code vfprintf}.
-          (<a href="http://llvm.org/bugs/show_bug.cgi?id=16344">Clang issue</a>)
-        </li>
-      </ul>
-      </dd>
-
-      <dt>Other changes:</dt>
-      <dd>
-      <ul>
-        <li>Enabled OpenMP for all GCC builds. To use this feature, add the following flags to your
-          build settings:
-<pre>
-LOCAL_CFLAGS += -fopenmp
-LOCAL_LDFLAGS += -fopenmp
-</pre>
-          For code examples, see {@code tests/device/test-openmp}</li>
-        <li>Reduced the size of {@code ld.mcld} significantly (1.5MB vs. {@code ld.bfd} 3.5MB and
-          {@code ld.gold} 7.5MB), resulting in a speed improvement of approximately 20%.</li>
-        <li>Added <code>LOCAL_CONLYFLAGS</code> and <code>APP_CONLYFLAGS</code> to specify
-          options applicable to C only but not C++. The existing <code>LOCAL_CFLAGS</code>
-          and <code>APP_CFLAGS</code> are also used for C++ compilation (to save trouble of
-          specifying most options twice), so options such as <code>-std=gnu99</code> may fail in
-          g++ builds with a warning and clang++ builds with an error.</li>
-        <li>Added {@code gabi++} array helper functions.</li>
-        <li>Modified GCC builds so that all {@code libgcc.a} files are built with
-          <code>-funwind-tables</code> to allow the stack to be unwound past previously blocked
-          points, such as <code>__aeabi_idiv0</code>.</li>
-        <li>Added Ingenic MXU support in MIPS GCC4.6/4.7/4.8 with new <code>-mmxu</code>
-option.</li>
-        <li>Extended MIPS GCC4.6/4.7/4.8 <code>-mldc1-sdc1</code> to control ldxc1/sdxc1 too</li>
-        <li>Added crazy linker. For more information, see
-          {@code sources/android/crazy_linker/README.TXT}.</li>
-        <li>Fixed {@code bitmap-plasma} to draw to full screen rather than a 200x200 pixel
-area.</li>
-        <li>Reduced linux and darwin toolchain sizes by 25% by creating symlinks to identical files.
-          </li>
-      </ul>
-      </dd>
-
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-<a name="9"></a>
-  <p>
-    <a href="#" onclick="return toggleContent(this)"> <img
-      src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img" alt=""
-    >Android NDK, Revision 9</a> <em>(July 2013)</em>
-  </p>
-  <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-        <ul>
-          <li>Added support for Android 4.3 (API level 18). For more information, see
-            {@code STABLE-APIS.html} and new code examples in {@code samples/gles3jni/README}.
-          <li>Added headers and libraries for OpenGL ES 3.0, which is supported by Android 4.3
-            (API level 18) and higher.</li>
-          <li>Added GNU Compiler Collection (GCC) 4.8 compiler to the NDK. Since GCC 4.6 is still
-            the default, you must explicitly enable this option:
-            <ul>
-              <li>For {@code ndk-build} builds, export {@code NDK_TOOLCHAIN_VERSION=4.8} or
-                add it in {@code Application.mk}.</li>
-              <li>For standalone builds, use the {@code --toolchain=} option in
-                {@code make-standalone-toolchain.sh}, for example:<br>
-                {@code --toolchain=arm-linux-androideabi-4.8}</li>
-            </ul>
-            <p class="note"><strong>Note:</strong>
-            The {@code -Wunused-local-typedefs} option is enabled by {@code -Wall}. Be
-            sure to add {@code __attribute__((unused))} if you use compile-time asserts like
-            {@code sources/cxx-stl/stlport/stlport/stl/config/features.h}, line #311. For more
-            information, see
-            <a href="https://android-review.googlesource.com/#/c/55460">Change 55460</a></p>
-            <p class="note"><strong>Note:</strong>
-            In the GCC 4.7 release and later, ARM compilers generate unaligned access code by
-            default for ARMv6 and higher build targets. You may need to add the
-            {@code -mno-unaligned-access} build option when building for kernels that do not support
-            this feature.</p>
-          </li>
-          <li>Added Clang 3.3 support. The {@code NDK_TOOLCHAIN_VERSION=clang} build option
-            now picks Clang 3.3 by default.
-            <p class="note"><strong>Note:</strong>
-             Both GCC 4.4.3 and Clang 3.1 are deprecated, and will be removed from the next NDK
-             release.</p></li>
-          <li>Updated GNU Project Debugger (GDB) to support python 2.7.5.</li>
-          <li>Added MCLinker to support Windows hosts. Since {@code ld.gold}
-            is the default where available, you must add {@code -fuse-ld=mcld} in
-            {@code LOCAL_LDFLAGS} or {@code APP_LDFLAGS} to enable MCLinker.</li>
-          <li>Added {@code ndk-depends} tool which prints ELF library dependencies.
-            For more information, see {@code NDK-DEPENDS.html}.
-            (<a href="http://b.android.com/53486">Issue 53486</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Important bug fixes:</dt>
-      <dd>
-        <ul>
-          <li>Fixed potential event handling issue in {@code android_native_app_glue}.
-            (<a href="http://b.android.com/41755">Issue 41755</a>)</li>
-          <li>Fixed ARM/GCC-4.7 build to generate sufficient alignment for NEON load and store
-            instructions VST and VLD.
-            (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271">GCC Issue 57271</a>)</li>
-          <li>Fixed a GCC 4.4.3/4.6/4.7 internal compiler error (ICE) for a constant negative index
-            value on a string literal.
-            (<a href="http://b.android.com/54623">Issue 54623</a>)</li>
-          <li>Fixed GCC 4.7 segmentation fault for constant initialization with an object address.
-            (<a href="http://b.android.com/56508">Issue 56508</a>)</li>
-          <li>Fixed GCC 4.6 ARM segmentation fault for <code>-O</code> values when using Boost
-            1.52.0. (<a href="http://b.android.com/42891">Issue 42891</a>)
-          <li>Fixed {@code libc.so} and {@code libc.a} to support the {@code wait4()} function.
-            (<a href="http://b.android.com/19854">Issue 19854</a>)</li>
-          <li>Updated the x86 libc.so and libc.a files to include the {@code clone()}
-            function.</li>
-          <li>Fixed {@code LOCAL_SHORT_COMMANDS} bug where the {@code linker.list} file is
-            empty or not used.</li>
-          <li>Fixed GCC MIPS build on Mac OS to use CFI directives, without which
-            {@code ld.mcld --eh-frame-hdr} fails frequently.</li>
-          <li>Fixed Clang 3.2 X86/MIPS internal compiler error in {@code llvm/lib/VMCore/Value.cpp}.
-            (<a href="https://android-review.googlesource.com/#/c/59021">Change 59021</a>)</li>
-          <li>Fixed GCC 4.7 64-bit Windows assembler crash. (Error: {@code out of memory allocating
-            4294967280 bytes}).</li>
-          <li>Updated {@code ndk-gdb} script so that the {@code --start} or {@code --launch} actions
-            now wait for the GNU Debug Server, so that it can more reliably hit breakpoints set
-            early in the execution path (such as breakpoints in JNI code).
-            (<a href="http://b.android.com/41278">Issue 41278</a>)
-            <p class="note"><strong>Note:</strong>
-              This feature requires jdb and produces warning about pending breakpoints.
-              Specify the {@code --nowait} option to restore previous behavior.
-            </p>
-          </li>
-          <li>Fixed GDB crash when library list is empty.</li>
-          <li>Fixed GDB crash when using a {@code stepi} command past a {@code bx pc} or
-            {@code blx pc} Thumb instruction.
-            (<a href="http://b.android.com/56962">Issue 56962</a>,
-             <a href="http://b.android.com/36149">Issue 36149</a>)</li>
-          <li>Fixed MIPS {@code gdbserver} to look for {@code DT_MIPS_RLD_MAP} instead of
-            {@code DT_DEBUG}. (<a href="http://b.android.com/56586">Issue 56586</a>)</li>
-          <li>Fixed a circular dependency in the ndk-build script, for example: If A-&gt;B and
-            B-&gt;B, then B was dropped from build.
-            (<a href="http://b.android.com/56690">Issue 56690</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Other bug fixes:</dt>
-      <dd>
-        <ul>
-          <li>Fixed the {@code ndk-build} script to enable you to specify a version of Clang as a
-            command line option (e.g., {@code NDK_TOOLCHAIN_VERSION=clang3.2}). Previously, only
-            specifying the version as an environment variable worked.</li>
-          <li>Fixed gabi++ size of {@code _Unwind_Exception} to be 24 for MIPS build targets when
-            using the Clang compiler.
-            (<a href="https://android-review.googlesource.com/#/c/54141">Change 54141</a>)</li>
-          <li>Fixed the {@code ndk-build} script to ensure that built libraries are actually
-            removed from projects that include prebuilt static libraries when using the
-            {@code ndk-build clean} command.
-            (<a href="https://android-review.googlesource.com/#/c/54461">Change 54461</a>,
-             <a href="https://android-review.googlesource.com/#/c/54480">Change 54480</a>)</li>
-          <li>Modified the {@code NDK_ANALYZE=1} option to be less verbose.</li>
-          <li>Fixed {@code gnu-libstdc++/Android.mk} to include a {@code backward/} path for builds
-            that use backward compability.
-            (<a href="http://b.android.com/53404">Issue 53404</a>)</li>
-          <li>Fixed a problem where {@code stlport new} sometimes returned random values.</li>
-          <li>Fixed {@code ndk-gdb} to match the order of {@code CPU_ABIS}, not {@code APP_ABIS}.
-            (<a href="http://b.android.com/54033">Issue 54033</a>)</li>
-          <li>Fixed a problem where the NDK 64-bit build on MacOSX choses the wrong path for
-            compiler.
-            (<a href="http://b.android.com/53769">Issue 53769</a>)</li>
-          <li>Fixed build scripts to detect 64-bit Windows Vista.
-            (<a href="http://b.android.com/54485">Issue 54485</a>)</li>
-          <li>Fixed x86 {@code ntonl/swap32} error: {@code invalid 'asm': operand number
-            out of range}.
-            (<a href="http://b.android.com/54465">Issue 54465</a>,
-             <a href="https://android-review.googlesource.com/#/c/57242">Change 57242</a>)</li>
-          <li>Fixed {@code ld.gold} to merge string literals.</li>
-          <li>Fixed {@code ld.gold} to handle large symbol alignment.</li>
-          <li>Updated {@code ld.gold} to enable the {@code --sort-section=name} option.</li>
-          <li>Fixed GCC 4.4.3/4.6/4.7 to suppress the {@code -export-dynamic} option for
-            statically linked programs. GCC no longer adds an {@code .interp} section for statically
-            linked programs.</li>
-          <li>Fixed GCC 4.4.3 {@code stlport} compilation error about inconsistent {@code typedef}
-            of {@code _Unwind_Control_Block}.
-            (<a href="http://b.android.com/54426">Issue 54426</a>)</li>
-          <li>Fixed {@code awk} scripts to handle {@code AndroidManifest.xml} files created on
-            Windows which may contain trailing {@code \r} characters and cause build errors.
-            (<a href="http://b.android.com/42548">Issue 42548</a>)</li>
-          <li>Fixed {@code make-standalone-toolchain.sh} to probe the {@code prebuilts/}
-            directory to detect if the host is 32 bit or 64 bit.</li>
-          <li>Fixed the Clang 3.2 {@code -integrated-as} option.</li>
-          <li>Fixed the Clang 3.2 ARM EHABI compact model {@code pr1} and {@code pr2} handler data.
-            </li>
-          <li>Added Clang {@code -mllvm -arm-enable-ehabi} option to fix the following Clang error:
-            <pre>clang: for the -arm-enable-ehabi option: may only occur zero or one times!</pre>
-            </li>
-          <li>Fixed build failure when there is no {@code uses-sdk} element in application
-            manifest. (<a href="http://b.android.com/57015">Issue 57015</a>)</li>
-        </ul>
-
-      </dd>
-      <dt>Other changes:</dt>
-      <dd>
-        <ul>
-          <li>Header Fixes
-            <ul>
-              <li>Modified headers to make {@code __set_errno} an inlined function, since
-                {@code __set_errno} in {@code errno.h} is deprecated, and {@code libc.so} no longer
-                exports it.</li>
-              <li>Modified {@code elf.h} to include {@code stdint.h}.
-                (<a href="http://b.android.com/55443">Issue 55443</a>)</li>
-              <li>Fixed {@code sys/un.h} to be included independently of other headers.
-                (<a href="http://b.android.com/53646">Issue 53646</a>)</li>
-              <li>Fixed all of the {@code MotionEvent_getHistorical} API family to take the
-                {@code const AInputEvent* motion_event}.
-                (<a href="http://b.android.com/55873">Issue 55873</a>)</li>
-              <li>Fixed {@code malloc_usable_size} to take {@code const void*}.
-                (<a href="http://b.android.com/55725">Issue 55725</a>)</li>
-              <li>Fixed stdint.h to be more compatible with C99.
-                (<a href="https://android-review.googlesource.com/#/c/46821">Change 46821</a>)</li>
-              <li>Modified {@code wchar.h} to not redefine {@code WCHAR_MAX} and
-                {@code WCHAR_MIN}</li>
-              <li>Fixed {@code <inttypes.h>} declaration for pointer-related {@code PRI} and
-                {@code SCN} macros. (<a href="http://b.android.com/57218">Issue 57218</a>)</li>
-              <li>Changed the {@code sys/cdefs.h} header so that {@code __WCHAR_TYPE__} is 32-bit
-                for API levels less than 9, which means that {@code wchat_t} is 32-bit for all
-                API levels. To restore the previous behavior, define the {@code _WCHAR_IS_8BIT}
-                boolean variable. (<a href="http://b.android.com/57267">Issue 57267</a>)</li>
-            </ul>
-          </li>
-          <li>Added more formatting in NDK {@code docs/} and miscellaneous documentation fixes.
-            </li>
-          <li>Added support for a thin archive technique when building static libraries.
-            (<a href="http://b.android.com/40303">Issue 40303</a>)</li>
-          <li>Updated script {@code make-standalone-toolchain.sh} to support the {@code stlport}
-            library in addition to {@code gnustl}, when you specify the option
-            {@code --stl=stlport}. For more information, see {@code STANDALONE-TOOLCHAIN.html}.</li>
-          <li>Updated the {@code make-standalone-toolchain.sh} script so that the
-            {@code --llvm-version=} option creates the {@code $TOOLCHAIN_PREFIX-clang} and
-            {@code $TOOLCHAIN_PREFIX-clang++} scripts in addition to {@code clang} and
-            {@code clang++}, to avoid using the host's clang and clang++ definitions by accident.
-            </li>
-          <li>Added two flags to re-enable two optimizations in upstream Clang but disabled in
-              NDK for better compatibility with code compiled by GCC:
-            <ul>
-              <li>Added a {@code -fcxx-missing-return-semantics} flag to re-enable <em>missing
-return
-                semantics</em> in Clang 3.2+. Normally, all paths should terminate with a return
-                statement for a value-returning function. If this is not the case, clang inserts
-                an undefined instruction (or trap in debug mode) at the path without a return
-                statement. If you are sure your code is correct, use this flag to allow the
-                optimizer to take advantage of the undefined behavior. If you are not sure, do not
-                use this flag. The caller may still receive a random incorrect value, but the
-                optimizer will not exploit it and make your code harder to debug.</li>
-              <li>Added a {@code -fglobal-ctor-const-promotion} flag to re-enable
-                promoting global variables with static constructor to be constants. With this flag,
-                the global variable optimization pass of LLVM tries to evaluate the global
-                variables with static constructors and promote them to global constants. Although
-                this optimization is correct, it may cause some incompatability with code compiled
-                by GCC. For example, code may do {@code const_cast} to cast the constant to mutable
-                and modify it. In GCC, the variable is in read-write and the code is run by
-                accident. In Clang, the const variable is in read-only memory and may cause your
-                application to crash.</li>
-            </ul>
-          </li>
-          <li>Added {@code -mldc1-sdc1} to the MIPS GCC and Clang compilers. By default, compilers
-            align 8-byte objects properly and emit the {@code ldc1} and {@code sdc1} instructions
-            to move them around. If your app uses a custom allocator that does not always align
-            with a new object's 8-byte boundary in the same way as the default allocator, your app
-            may crash due to {@code ldc1} and {@code sdc1} operations on unaligned memory. In this
-            case, use the {@code -mno-ldc1-sdc1} flag to workaround the problem.</li>
-          <li>Downgraded the event severity from warning to info if {@code APP_PLATFORM_LEVEL} is
-            larger than {@code APP_MIN_PLATFORM_LEVEL}. The {@code APP_PLATFORM_LEVEL} may be lower
-            than {@code APP_PLATFORM} in {@code jni/Application.mk} because the NDK does not have
-            headers for all levels. In this case, the actual level is shifted downwards. The
-            {@code APP_MIN_PLATFORM_LEVEL} is specified by the {@code android:minSdkVersion} in
-            your application's manifest.
-            (<a href="http://b.android.com/39752">Issue 39752</a>)</li>
-          <li>Added the {@code android_getCpuIdArm()} and {@code android_setCpuArm()} methods to
-            {@code cpu-features.c}. This addition enables easier retrieval of the ARM CPUID
-            information. (<a href="http://b.android.com/53689">Issue 53689</a>)</li>
-          <li>Modified {@code ndk-build} to use GCC 4.7's {@code as/ld} for Clang compiling.
-            <p class="note"><strong>Note:</strong>
-              In GCC 4.7, {@code monotonic_clock} and {@code is_monotonic} have been renamed to
-              {@code steady_clock} and {@code is_steady}, respectively.</p></li>
-          <li>Added the following new warnings to the {@code ndk-build} script:
-            <ul>
-              <li>Added warnings if {@code LOCAL_LDLIBS/LDFLAGS} are used in static library
-                modules.</li>
-              <li>Added a warning if a configuration has no module to build.</li>
-              <li>Added a warning for non-system libraries being used in
-                {@code LOCAL_LDLIBS/LDFLAGS} of a shared library or executable modules.</li>
-            </ul>
-          </li>
-          <li>Updated build scripts, so that if {@code APP_MODULES} is not defined and only static
-            libraries are listed in {@code Android.mk}, the script force-builds all of them.
-            (<a href="http://b.android.com/53502">Issue 53502</a>)</li>
-          <li>Updated {@code ndk-build} to support absolute paths in {@code LOCAL_SRC_FILES}.</li>
-          <li>Removed the {@code *-gdbtui} executables, which are duplicates of the {@code *-gdb}
-            executables with the {@code -tui} option enabled.</li>
-          <li>Updated the build scripts to warn you when the Edison Design Group (EDG) compiler
-            front-end turns {@code _STLP_HAS_INCLUDE_NEXT} back on.
-            (<a href="http://b.android.com/53646">Issue 53646</a>)</li>
-          <li>Added the environment variable {@code NDK_LIBS_OUT} to allow overriding of the
-            path for {@code libraries/gdbserver} from the default {@code $PROJECT/libs}.
-            For more information, see {@code OVERVIEW.html}.</li>
-          <li>Changed ndk-build script defaults to compile code with format string protection
-            {@code -Wformat -Werror=format-security}. You may set
-            {@code LOCAL_DISABLE_FORMAT_STRING_CHECKS=true} to disable it.
-            For more information, see {@code ANDROID-MK.html}</li>
-          <li>Added STL pretty-print support in {@code ndk-gdb-py}. For more information, see
-            {@code NDK-GDB.html}.</li>
-          <li>Added tests based on the googletest frameworks.</li>
-          <li>Added a notification to the toolchain build script that warns you if the current shell
-            is not {@code bash}.</li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-<a name="lower"></a>
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 8e</a> <em>(March 2013)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-        <ul>
-          <li>Added 64-bit host toolchain set (package name suffix {@code *-x86_64.*}). For more
-            information, see {@code CHANGES.HTML} and {@code NDK-BUILD.html}.</li>
-          <li>Added Clang 3.2 compiler. GCC 4.6 is still the default. For information on using the
-            Clang compiler, see {@code CHANGES.HTML}.</li>
-          <li>Added static code analyzer for Linux/MacOSX hosts. For information on using the
-            analyzer, see {@code CHANGES.HTML}.</li>
-          <li>Added MCLinker for Linux/MacOSX hosts as an experimental feature. The {@code ld.gold}
-            linker is the default where available, so you must explicitly enable it. For more
-            information, see {@code CHANGES.HTML}.</li>
-          <li>Updated ndk-build to use topological sort for module dependencies, which means the
-            build automatically sorts out the order of libraries specified in
-            {@code LOCAL_STATIC_LIBRARIES}, {@code LOCAL_WHOLE_STATIC_LIBRARIES} and
-            {@code LOCAL_SHARED_LIBRARIES}. For more information, see {@code CHANGES.HTML}.
-            (<a href="http://b.android.com/39378">Issue 39378</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Important bug fixes:</dt>
-      <dd>
-        <ul>
-          <li>Fixed build script to build all toolchains in {@code -O2}. Toolchains in previous
-            releases were incorrectly built without optimization.</li>
-          <li>Fixed build script which unconditionally builds Clang/llvm for MacOSX in 64-bit.</li>
-          <li>Fixed GCC 4.6/4.7 internal compiler error:
-            {@code gen_thumb_movhi_clobber at config/arm/arm.md:5832}.
-            (<a href="http://b.android.com/52732">Issue 52732</a>)</li>
-          <li>Fixed build problem where GCC/ARM 4.6/4.7 fails to link code using 64-bit atomic
-            built-in functions.
-            (<a href="http://b.android.com/41297">Issue 41297</a>)</li>
-          <li>Fixed GCC 4.7 linker DIV usage mismatch errors.
-          (<a href="http://sourceware.org/ml/binutils/2012-12/msg00202.html">Sourceware Issue</a>)
-          <li>Fixed GCC 4.7 internal compiler error {@code build_data_member_initialization, at
-            cp/semantics.c:5790}.</li>
-          <li>Fixed GCC 4.7 internal compiler error {@code redirect_eh_edge_1, at tree-eh.c:2214}.
-            (<a href="http://b.android.com/52909">Issue 52909</a>)</li>
-          <li>Fixed a GCC 4.7 segfault.
-            (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245">GCC Issue</a>)</li>
-          <li>Fixed {@code <chrono>} clock resolution and enabled {@code steady_clock}.
-            (<a href="http://b.android.com/39680">Issue 39680</a>)</li>
-          <li>Fixed toolchain to enable {@code _GLIBCXX_HAS_GTHREADS} for GCC 4.7 libstdc++.
-            (<a href="http://b.android.com/41770">Issue 41770</a>,
-             <a href="http://b.android.com/41859">Issue 41859</a>)</li>
-          <li>Fixed problem with the X86 MXX/SSE code failing to link due to missing
-            {@code posix_memalign}.
-            (<a href="https://android-review.googlesource.com/#/c/51872">Change 51872</a>)</li>
-          <li>Fixed GCC4.7/X86 segmentation fault in {@code i386.c}, function
-            {@code distance_non_agu_define_in_bb()}.
-            (<a href="https://android-review.googlesource.com/#/c/50383">Change 50383</a>)</li>
-          <li>Fixed GCC4.7/X86 to restore earlier {@code cmov} behavior.
-            (<a href="http://gcc.gnu.org/viewcvs?view=revision&revision=193554">GCC Issue</a>)</li>
-          <li>Fixed handling NULL return value of {@code setlocale()} in libstdc++/GCC4.7.
-            (<a href="http://b.android.com/46718">Issue 46718</a>)
-          <li>Fixed {@code ld.gold} runtime undefined reference to {@code __exidx_start} and
-            {@code __exidx_start_end}.
-            (<a href="https://android-review.googlesource.com/#/c/52134">Change 52134</a>)</li>
-          <li>Fixed Clang 3.1 internal compiler error when using Eigen library.
-            (<a href="http://b.android.com/41246">Issue 41246</a>)</li>
-          <li>Fixed Clang 3.1 internal compiler error including {@code <chrono>} in C++11
-mode.
-            (<a href="http://b.android.com/39600">Issue 39600</a>)</li>
-          <li>Fixed Clang 3.1 internal compiler error when generating object code for a method
-            call to a uniform initialized {@code rvalue}.
-            (<a href="http://b.android.com/41387">Issue 41387</a>)</li>
-          <li>Fixed Clang 3.1/X86 stack realignment.
-            (<a href="https://android-review.googlesource.com/#/c/52154">Change 52154</a>)</li>
-          <li>Fixed problem with GNU Debugger (GDB) SIGILL when debugging on Android 4.1.2.
-            (<a href="http://b.android.com/40941">Issue 40941</a>)</li>
-          <li>Fixed problem where GDB cannot set {@code source:line} breakpoints when symbols
-contain
-            long, indirect file paths.
-            (<a href="http://b.android.com/42448">Issue 42448</a>)</li>
-          <li>Fixed GDB {@code read_program_header} for MIPS PIE executables.
-            (<a href="https://android-review.googlesource.com/#/c/49592">Change 49592</a>)</li>
-          <li>Fixed {@code STLport} segmentation fault in {@code uncaught_exception()}.
-            (<a href="https://android-review.googlesource.com/#/c/50236">Change 50236</a>)</li>
-          <li>Fixed {@code STLport} bus error in exception handling due to unaligned access of
-            {@code DW_EH_PE_udata2}, {@code DW_EH_PE_udata4}, and {@code DW_EH_PE_udata8}.</li>
-          <li>Fixed Gabi++ infinite recursion problem with {@code nothrow new[]} operator.
-            (<a href="http://b.android.com/52833">Issue 52833</a>)</li>
-          <li>Fixed Gabi++ wrong offset to exception handler pointer.
-            (<a href="https://android-review.googlesource.com/#/c/53446">Change 53446</a>)</li>
-          <li>Removed Gabi++ redundant free on exception object
-            (<a href="https://android-review.googlesource.com/#/c/53447">Change 53447</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Other bug fixes:</dt>
-      <dd>
-        <ul>
-          <li>Fixed NDK headers:
-            <ul>
-              <li>Removed redundant definitions of {@code size_t}, {@code ssize_t}, and
-                {@code ptrdiff_t}.</li>
-              <li>Fixed MIPS and ARM {@code fenv.h} header.</li>
-              <li>Fixed {@code stddef.h} to not redefine {@code offsetof} since it already exists
-                in the toolchain.</li>
-              <li>Fixed {@code elf.h} to contain {@code Elf32_auxv_t} and {@code Elf64_auxv_t}.
-                (<a href="http://b.android.com/38441">Issue 38441</a>)
-                </li>
-              <li>Fixed the {@code #ifdef} C++ definitions in the
-                {@code OpenSLES_AndroidConfiguration.h} header file.
-                (<a href="http://b.android.com/53163">Issue 53163</a>)
-                </li>
-            </ul>
-          </li>
-          <li>Fixed {@code STLport} to abort after out of memory error instead of silently exiting.
-            </li>
-          <li>Fixed system and Gabi++ headers to be able to compile with API level 8 and lower.</li>
-          <li>Fixed {@code cpufeatures} to not parse {@code /proc/self/auxv}.
-            (<a href="http://b.android.com/43055">Issue 43055</a>)</li>
-          <li>Fixed {@code ld.gold} to not depend on host libstdc++ and on Windows platforms,
-            to not depend on the {@code libgcc_sjlj_1.dll} library.</li>
-          <li>Fixed Clang 3.1 which emits inconsistent register list in {@code .vsave} and fails
-            assembler.
-            (<a href="https://android-review.googlesource.com/#/c/49930">Change 49930</a>)</li>
-          <li>Fixed Clang 3.1 to be able to compile libgabi++ and pass the {@code test-stlport}
-            tests for MIPS build targets.
-            (<a href="https://android-review.googlesource.com/#/c/51961">Change 51961</a>)</li>
-          <li>Fixed Clang 3.1 to only enable exception by default for C++, not for C.</li>
-          <li>Fixed several issues in Clang 3.1 to pass most GNU exception tests.</li>
-          <li>Fixed scripts {@code clang} and {@code clang++} in standalone NDK compiler to detect
-            {@code -cc1} and to not specify {@code -target} when found.</li>
-          <li>Fixed {@code ndk-build} to observe {@code NDK_APP_OUT} set in {@code Application.mk}.
-            </li>
-          <li>Fixed X86 {@code libc.so} and {@code lib.a} which were missing the {@code sigsetjmp}
-            and {@code siglongjmp} functions already declared in {@code setjmp.h}.
-            (<a href="http://b.android.com/19851">Issue 19851</a>)</li>
-          <li>Patched GCC 4.4.3/4.6/4.7 libstdc++ to work with Clang in C++ 11.
-            (<a href="http://clang.llvm.org/cxx_status.html">Clang Issue</a>)</li>
-          <li>Fixed cygwin path in argument passed to {@code HOST_AWK}.</li>
-          <li>Fixed {@code ndk-build} script warning in windows when running from project's JNI
-            directory.
-            (<a href="http://b.android.com/40192">Issue 40192</a>)</li>
-          <li>Fixed problem where the {@code ndk-build} script does not build if makefile has
-            trailing whitespace in the {@code LOCAL_PATH} definition.
-            (<a href="http://b.android.com/42841">Issue 42841</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Other changes:</dt>
-      <dd>
-        <ul>
-          <li>Enabled threading support in GCC/MIPS toolchain.</li>
-          <li>Updated GCC exception handling helpers {@code __cxa_begin_cleanup} and
-            {@code __cxa_type_match} to have <em>default</em> visibility from the previous
-            <em>hidden</em> visibility in GNU libstdc++. For more information, see
-            {@code CHANGES.HTML}.</li>
-          <li>Updated build scripts so that Gabi++ and STLport static libraries are now built with
-            hidden visibility except for exception handling helpers.</li>
-          <li>Updated build so that {@code STLport} is built for ARM in Thumb mode.</li>
-          <li>Added support for {@code std::set_new_handler} in Gabi++.
-            (<a href="http://b.android.com/52805">Issue 52805</a>)</li>
-          <li>Enabled {@code FUTEX} system call in GNU libstdc++.</li>
-          <li>Updated {@code ndk-build} so that it  no longer copies prebuilt static library to
-            a project's {@code obj/local/<abi>/} directory.
-            (<a href="http://b.android.com/40302">Issue 40302</a>)</li>
-          <li>Removed {@code __ARM_ARCH_5*__} from ARM {@code toolchains/*/setup.mk} script.
-            (<a href="http://b.android.com/21132">Issue 21132</a>)</li>
-          <li>Built additional GNU libstdc++ libraries in thumb for ARM.</li>
-          <li>Enabled MIPS floating-point {@code madd/msub/nmadd/nmsub/recip/rsqrt}
-            instructions with 32-bit FPU.</li>
-          <li>Enabled graphite loop optimizer in GCC 4.6 and 4.7 to allow more optimizations:
-            {@code -fgraphite}, {@code -fgraphite-identity}, {@code -floop-block}, {@code
--floop-flatten},
-            {@code -floop-interchange}, {@code -floop-strip-mine}, {@code -floop-parallelize-all},
-            and {@code -ftree-loop-linear}.
-            (<a href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html">info</a>)</li>
-          <li>Enabled {@code polly} for Clang 3.1 on Linux and Max OS X 32-bit hosts which analyzes
-            and optimizes memory access. (<a href="http://polly.llvm.org">info</a>)</li>
-          <li>Enabled {@code -flto} in GCC 4.7, 4.6, Clang 3.2 and Clang 3.1 on linux (Clang LTO
-            via LLVMgold.so). MIPS compiler targets are not supported because {@code ld.gold}
-            is not available.</li>
-          <li>Enabled {@code --plugin} and {@code --plugin-opt} for {@code ld.gold} in GCC 4.6/4.7.
-            </li>
-          <li>Enabled {@code --text-reorder} for {@code ld.gold} in GCC 4.7.</li>
-          <li>Configured GNU libstdc++ with {@code _GLIBCXX_USE_C99_MATH} which undefines the
-            {@code isinf} script in the bionic header. For more information, see
-            {@code CHANGES.html}.</li>
-          <li>Added {@code APP_LDFLAGS} to the build scripts. For more information, see
-            {@code ANDROID-MK.html}.</li>
-          <li>Updated build scripts to allow {@code NDK_LOG=0} to disable the {@code NDK_LOG}.</li>
-          <li>Updated build scripts to allow {@code NDK_HOST_32BIT=0} to disable the host developer
-            environment 32-bit toolchain.</li>
-          <li>Changed the default GCC/X86 flags {@code -march=} and {@code -mtune=} from
-            {@code pentiumpro} and {@code generic} to {@code i686} and {@code atom}.</li>
-          <li>Enhanced toolchain build scripts:
-            <ul>
-              <li>Fixed a race condition in {@code build-gcc.sh} for the {@code mingw} build type
-                which was preventing a significant amount of parallel build processing.</li>
-              <li>Updated {@code build-gabi++.sh} and {@code build-stlport.sh} so they can now run
-                from the NDK package.
-                (<a href="http://b.android.com/52835">Issue 52835</a>)
-                </li>
-              <li>Fixed {@code run-tests.sh} in the {@code MSys} utilities collection.</li>
-              <li>Improved 64-bit host toolchain and Canadian Cross build support.</li>
-              <li>Updated {@code build-mingw64-toolchain.sh} script to more recent version.</li>
-              <li>Added option to build {@code libgnustl_static.a} and {@code stlport_static.a}
-                without hidden visibility.</li>
-            </ul>
-          </li>
-        </ul>
-
-      </dd>
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 8d</a> <em>(December 2012)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-      <dd>
-        <ul>
-          <li>Added the GNU Compiler Collection (GCC) 4.7 compiler to the NDK. The GCC 4.6 compiler
-            is still the default, so you must to explicitly enable the new version as follows:
-            <ul>
-              <li>For {@code ndk-build}, export the {@code NDK_TOOLCHAIN_VERSION=4.7} variable
-                <em>or</em> add it to {@code Application.mk}.</li>
-              <li>For standalone builds, add the {@code --toolchain=} option to
-                {@code make-standalone-toolchain.sh}, for example:
-                <pre>--toolchain=arm-linux-androideabi-4.7</pre></li>
-            </ul>
-            <p class="note">
-              <strong>Note:</strong> This feature is experimental. Please try it and
-              <a href="http://code.google.com/p/android/issues/list">report any issues</a>.</p>
-          </li>
-          <li>Added {@code stlport} exception support via gabi++.  Note that the new gabi++
-            depends on {@code dlopen} and related code, meaning that:
-            <ul>
-              <li>You can no longer build a <em>static</em> executable using the {@code -static}
-                option or include {@code libstlport_static.a} using
-                {@code APP_STL := stlport_static}. (You can still use the {@code -static} option
-                with a standalone toolchain.) Compiling a <em>dynamic</em> executable using
-                {@code include $(BUILD_EXECUTABLE)} continues to work because the compiler
-                automatically adds the {@code -ldl} option.</li>
-              <li>If your project links using {@code -nostdlib} and {-Wl,--no-undefined}, you
-                must manually include the {@code -ldl} option.</li>
-            </ul>
-              For more information, see {@code CPLUSPLUS-SUPPORT.html}.
-
-              <p class="note">
-                <strong>Note:</strong> This feature is experimental and works better with the GCC
-                4.6/4.7 compilers than with GCC 4.4.3 or Clang 3.1. Please try it and
-                <a href="http://code.google.com/p/android/issues/list">report any issues</a>.</p>
-          </li>
-          <li>Added a {@code -mstack-protector-guard=} option for x86 to choose between a
-            <em>global</em> default path which is compatible with older Android C library (bionic)
-            and a new <em>tls</em> path (%gs:20) for {@code -fstack-protector},
-            {@code -fstack-protector-all} and {@code -fstack-protector-strong} using the GCC 4.6
-            and higher compilers.
-
-            <p class="note">
-              <strong>Note:</strong> The {@code -mstack-protector-guard} setting itself does not
-              enable any {@code -fstack-protector*} options.</p>
-          </li>
-          <li>Added {@code android_setCpu()} function to
-            {@code sources/android/cpufeatures/cpu-features.c} for use when auto-detection via
-            {@code /proc} is not possible in Android 4.1 and higher.
-            (<a href="http://code.google.com/p/chromium/issues/detail?id=164154">Chromium Issue
-            164154</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Important bug fixes:</dt>
-      <dd>
-        <ul>
-          <li>Fixed unnecessary rebuild of object files when using the {@code ndk-build} script.
-            (<a href="http://b.android.com/39810">Issue 39810</a>)</li>
-          <li>Fixed a linker failure with the NDK 8c release for Mac OS X 10.6.x that produced the
-            following error:
-            <pre>
-dyld: lazy symbol binding failed: Symbol not found: _memmem
-Referenced from: ...../arm-linux-androideabi/bin/ld
-Expected in: /usr/lib/libSystem.B.dylib</pre>
-            This problem was caused by building on Mac OS X 10.7, which produced binaries that were
-            not compatible with Mac OS 10.6.x and the NDK.
-          </li>
-          <li>Removed the {@code -x c++} options from the Clang++ standalone build script.
-          (<a href="http://b.android.com/39089">Issue 39089</a>)</li>
-          <li>Fixed issues using the {@code NDK_TOOLCHAIN_VERSION=clang3.1} option in Cygwin.
-           (<a href="http://b.android.com/39585">Issue 39585</a>)</li>
-          <li>Fixed the {@code make-standalone-toolchain.sh} script to allow generation of a
-            standalone toolchain using the Cygwin or MinGW environments. The resulting toolchain
-            can be used in Cygwin, MingGW or CMD.exe environments.
-            (<a href="http://b.android.com/39915">Issue 39915</a>,
-            <a href="http://b.android.com/39585">Issue 39585</a>)</li>
-          <li>Added missing {@code SL_IID_ANDROIDBUFFERQUEUESOURCE} option in android-14 builds for
-            ARM and X86.
-            (<a href="http://b.android.com/40625">Issue 40625</a>)</li>
-          <li>Fixed x86 CPU detection for the {@code ANDROID_CPU_X86_FEATURE_MOVBE} feature.
-            (<a href="http://b.android.com/39317">Issue 39317</a>)</li>
-          <li>Fixed an issue preventing the Standard Template Library (STL) from using C++
-            sources that do not have a {@code .cpp} file extension.</li>
-          <li>Fixed GCC 4.6 ARM internal compiler error <em>at reload1.c:1061</em>.
-            (<a href="http://b.android.com/20862">Issue 20862</a>)</li>
-          <li>Fixed GCC 4.4.3 ARM internal compiler error <em>at emit-rtl.c:1954</em>.
-            (<a href="http://b.android.com/22336">Issue 22336</a>)</li>
-          <li>Fixed GCC 4.4.3 ARM internal compiler error <em>at postreload.c:396</em>.
-            (<a href="http://b.android.com/22345">Issue 22345</a>)</li>
-          <li>Fixed problem with GCC 4.6/4.7 skipping lambda functions.
-            (<a href="http://b.android.com/35933">Issue 35933</a>)</li>
-        </ul>
-      </dd>
-
-      <dt>Other bug fixes:</dt>
-      <dd>
-        <ul>
-          <li>NDK header file fixes:
-            <ul>
-              <li>Fixed {@code __WINT_TYPE__} and {@code wint_t} to be the same type.</li>
-              <li>Corrected typo in {@code android/bitmap.h}.
-                (<a href="http://b.android.com/15134">Issue 15134</a>)
-              </li>
-              <li>Corrected typo in {@code errno.h}.</li>
-              <li>Added check for the presence of {@code __STDC_VERSION__} in {@code sys/cdefs.h}.
-                (<a href="http://b.android.com/14627">Issue 14627</a>)
-              </li>
-              <li>Reorganized headers in {@code byteswap.h} and {@code dirent.h}.</li>
-              <li>Fixed {@code limits.h} to include {@code page.h} which provides {@code PAGE_SIZE}
-                settings.
-                (<a href="http://b.android.com/39983">Issue 39983</a>)
-              </li>
-              <li>Fixed return type of {@code glGetAttribLocation()} and
-                {@code glGetUniformLocation()} from {@code int} to {@code GLint}.</li>
-              <li>Fixed {@code __BYTE_ORDER} constant for x86 builds.
-                (<a href="http://b.android.com/39824">Issue 39824</a>)
-              </li>
-            </ul>
-          </li>
-          <li>Fixed {@code ndk-build} script to not overwrite {@code -Os} with {@code -O2} for ARM
-            builds.</li>
-          <li>Fixed build scripts to allow overwriting of {@code HOST_AWK}, {@code HOST_SED}, and
-            {@code HOST_MAKE} settings.</li>
-          <li>Fixed issue for {@code ld.gold} on {@code fsck_msdos} builds linking objects built by
-            the Intel C/C++ compiler (ICC).</li>
-          <li>Fixed ARM EHABI support in Clang to conform to specifications.</li>
-          <li>Fixed GNU Debugger (GDB) to shorten the time spent on walking the target's link map
-            during {@code solib} events.
-            (<a href="http://b.android.com/38402">Issue 38402</a>)</li>
-          <li>Fixed missing {@code libgcc.a} file when linking shared libraries.</li>
-        </ul>
-      </dd>
-
-      <dt>Other changes:</dt>
-      <dd>
-        <ul>
-          <li>Backported 64-bit built-in atomic functions for ARM to GCC 4.6.</li>
-          <li>Added documentation for audio output latency, along with other documentation and
-            fixes.</li>
-          <li>Fixed debug builds with Clang so that non-void functions now raise a {@code SIGILL}
-            signal for paths without a return statement.</li>
-          <li>Updated {@code make-standalone-toolchain.sh} to accept the suffix {@code -clang3.1}
-            which is equivalent to adding {@code --llvm-version=3.1} to the GCC 4.6 toolchain.</li>
-          <li>Updated GCC and Clang bug report URL to:
-            <a
-href="http://source.android.com/source/report-bugs.html">http://source.android.com/source/report-bug
-s.html</a></li>
-          <li>Added ARM ELF support to {@code llvm-objdump}.</li>
-          <li>Suppressed <em>treating c input as c++</em> warning for Clang builds.</li>
-          <li>Updated build so that only the 32-bit version of {@code libiberty.a} is built and
-            placed in {@code lib32/}.</li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 8c</a> <em>(November 2012)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <dl>
-      <dt>Important changes:</dt>
-
-      <dd>
-        <ul>
-          <li>Added the Clang 3.1 compiler to the NDK. The GNU Compiler Collection (GCC) 4.6 is
-          still the default, so you must explicitly enable the Clang compiler option as follows:
-            <ul>
-              <li>For {@code ndk-build}, export {@code NDK_TOOLCHAIN_VERSION=clang3.1} <em>or</em>
-                add this environment variable setting to {@code Application.mk}.</li>
-              <li>For standalone builds, add {@code --llvm-version=3.1} to
-                {@code make-standalone-toolchain.sh} and replace {@code CC} and {@code CXX} in your
-                makefile with {@code <tool-path>/bin/clang} and
-                {@code <tool-path>/bin/clang++}. See {@code STANDALONE-TOOLCHAIN.html} for
-                details.</li>
-            </ul>
-            <p class="note"><strong>Note:</strong> This feature is experimental. Please try it and
-            <a href="http://code.google.com/p/android/issues/list">report any issues</a>.</p></li>
-          <li>Added Gold linker {@code ld.gold} for the Windows toolchain. Gold linker is also the
-            default for ARM and X86 on all hosts. You may override it to use the {@code ld.bfd}
-            linker by adding {@code LOCAL_LDFLAGS += -fuse-ld=bfd} to {@code Android.mk}, or by
-passing
-            {@code -fuse-ld=bfd} to the g++/clang++ command line that does the linking.</li>
-          <li>Added checks for spaces in the NDK path to the {@code ndk-build[.cmd]} and
-            {@code ndk-gdb} scripts, to prevent build errors that are difficult to diagnose.</li>
-          <li>Made the following changes to API level handling:
-            <ul>
-              <li>Modified build logic so that projects that specify {@code android-10} through
-                {@code android-13} in {@code APP_PLATFORM}, {@code project.properties} or
-                {@code default.properties} link against {@code android-9} instead of
-                {@code android-14}.
-              <li>Updated build so that executables using android-16 (Jelly Bean) or higher are
-                compiled with the {@code -fPIE} option for position-independent executables (PIE).
-                A new {@code APP_PIE} option allows you to control this behavior. See {@code
-                APPLICATION-MK.html} for details.
-                <p class="note">
-                  <strong>Note:</strong> All API levels above 14 still link against {@code
-                  platforms/android-14} and no new {@code platforms/android-N} have been added.
-                </p></li>
-              <li>Modified {@code ndk-build} to provide warnings if the adjusted API level is larger
-              than {@code android:minSdkVersion} in the project's {@code AndroidManifest.xml}.</li>
-            </ul>
-          </li>
-          <li>Updated the {@code cpu-features} helper library to include more ARM-specific features.
-          See {@code sources/android/cpufeatures/cpu-features.h} for details.</li>
-          <li>Modified the long double on the X86 platform to be 8 bytes. This data type is now the
-          same size as a double, but is still treated as a distinct type.</li>
-          <li>Updated build for {@code APP_ABI=armeabi-v7a}:
-            <ul>
-              <li>Modified this build type to pass the {@code -march=armv7-a} parameter
-              to the linker. This change ensures that v7-specific libraries and {@code crt*.o} are
-              linked correctly.</li>
-              <li>Added {@code -mfpu=vfpv3-d16} to {@code ndk-build} instead of the
-              {@code -mfpu=vfp} option used in previous releases.</li>
-            </ul>
-          </li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Important bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed an issue where running {@code make-standalone-toolchain.sh} with root privileges
-            resulted in the stand alone tool chain being inaccessible to some users.
-            (<a href="http://b.android.com/35279">Issue 35279</a>)
-            <ul>
-              <li>All files and executables in the NDK release package are set to have read and
-                execute permissions for all.</li>
-              <li>The ownership/group of {@code libstdc++.a} is now preserved when copied.</li>
-            </ul>
-          </li>
-          <li>Removed redundant {@code \r} from Windows prebuilt {@code echo.exe}. The redundant
-          {@code \r} caused {@code gdb.setup} to fail in the GNU Debugger (GDB) because it
-          incorrectly became part of the path.
-          (<a href="http://b.android.com/36054">Issue 36054</a>)</li>
-          <li>Fixed Windows parallel builds that sometimes failed due to timing issues in the
-          {@code host-mkdir} implementation.
-          (<a href="http://b.android.com/25875">Issue 25875</a>)</li>
-          <li>Fixed GCC 4.4.3 GNU {@code libstdc++} to <em>not</em> merge {@code typeinfo} names by
-          default. For more details, see
-          {@code toolchain repo gcc/gcc-4.4.3/libstdc++-v3/libsupc++/typeinfo}.
-          (<a href="http://b.android.com/22165">Issue 22165</a>)</li>
-          <li>Fixed problem on {@code null} context in GCC 4.6
-          {@code cp/mangle.c::write_unscoped_name}, where GCC may crash when the context is
-          {@code null} and dereferenced in {@code TREE_CODE}.</li>
-          <li>Fixed GCC 4.4.3 crashes on ARM NEON-specific type definitions for floats.
-          (<a href="http://b.android.com/34613">Issue 34613</a>)</li>
-          <li>Fixed the {@code STLport} internal {@code _IteWrapper::operator*()} implementation
-          where a stale stack location holding the dereferenced value was returned and caused
-          runtime crashes.
-          (<a href="http://b.android.com/38630">Issue 38630</a>)</li>
-
-          <li>ARM-specific fixes:
-            <ul>
-              <li>Fixed ARM GCC 4.4.3/4.6 {@code g++} to not warn that the <em>mangling of
-              &lt;va_list&gt; was changed in GCC 4.4</em>. The workaround using the
-              {@code -Wno-psabi} switch to avoid this warning is no longer required.</li>
-              <li>Fixed an issue when a project with {@code .arm} or {@code .neon} suffixes in
-              {@code LOCAL_SRC_FILES} also used {@code APP_STL}. With {@code APP_STL}, the
-              {@code ndk-build} script searches for C++ files in {@code LOCAL_SRC_FILES} before
-              adding STL {@code header/lib} paths to compilation. Modified {@code ndk-build} to
-              filter out {@code .arm} and {@code .neon} suffixes before the search, otherwise items
-              in {@code LOCAL_SRC_FILES} like {@code myfile.cpp.arm.neon} won't be compiled as C++
-              code.</li>
-              <li>Fixed {@code binutils-2.21/ld.bfd} to be capable of linking object from older
-              binutils without {@code tag_FP_arch}, which was producing <em>assertion fail</em>
-              error messages in GNU Binutils.
-              (<a href="http://b.android.com/35209">Issue 35209</a>)
-              </li>
-              <li>Removed <em>Unknown EABI object attribute 44</em> warning when
-              {@code binutils-2.19/ld} links prebuilt object by newer {@code binutils-2.21}</li>
-              <li>Fixed an issue in GNU {@code stdc++} compilation with both {@code -mthumb} and
-              {@code -march=armv7-a}, by modifying {@code make-standalone-toolchain.sh} to populate
-              {@code headers/libs} in sub-directory {@code armv7-a/thumb}.
-              (<a href="http://b.android.com/35616">Issue 35616</a>)
-              </li>
-              <li>Fixed <em>unresolvable R_ARM_THM_CALL relocation</em> error.
-              (<a href="http://b.android.com/35342">Issue 35342</a>)
-              </li>
-              <li>Fixed internal compiler error at {@code reload1.c:3633}, caused by the ARM
-              back-end expecting the wrong operand type when sign-extend from {@code char}.
-              (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50099">GCC Issue 50099</a>)</li>
-              <li>Fixed internal compiler error with negative shift amount.
-              (<a href="http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00594.html">GCC Issue</a>)</li>
-            </ul>
-          </li>
-
-          <li>Fixed {@code -fstack-protector} for X86, which is also the default for the
-          {@code ndk-build} x86 ABI target.</li>
-
-          <li>MIPS-specific fixes:
-            <ul>
-              <li>Fixed {@code STLport} endian-ness by setting {@code _STLP_LITTLE_ENDIAN} to 1 when
-              compiling MIPS {@code libstlport_*}.</li>
-              <li>Fixed GCC {@code __builtin_unreachable} issue when compiling LLVM.
-              (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369">GCC Issue 54369</a>)</li>
-              <li>Backported fix for {@code cc1} compile process consuming 100% CPU.
-              (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380">GCC Issue 50380</a>)</li>
-            </ul>
-          </li>
-
-          <li>GNU Debugger-specific fixes:
-            <ul>
-              <li>Disabled Python support in gdb-7.x at build, otherwise the gdb-7.x configure
-              function may pick up whatever Python version is available on the host and build
-              {@code gdb} with a hard-wired dependency on a specific version of Python.
-              (<a href="http://b.android.com/36120">Issue 36120</a>)
-              </li>
-              <li>Fixed {@code ndk-gdb} when {@code APP_ABI} contains {@code all} and matchs none
-              of the known architectures.
-              (<a href="http://b.android.com/35392">Issue 35392</a>)
-              </li>
-              <li>Fixed Windows pathname support, by keeping the {@code :} character if it looks
-              like it could be part of a Windows path starting with a drive letter.
-              (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12843">GDB Issue 12843</a>)
-              </li>
-              <li>Fixed adding of hardware breakpoint support for ARM in {@code gdbserver}.
-              (<a href="http://sourceware.org/ml/gdb-patches/2011-09/msg00200.html">GDB Issue</a>)
-              </li>
-              <li>Added fix to only read the current {@code solibs} when the linker is consistent.
-              This change speeds up {@code solib} event handling.
-              (<a href="http://b.android.com/37677">Issue 37677</a>)
-              </li>
-              <li>Added fix to make repeated attempts to find {@code solib} breakpoints. GDB now
-              retries {@code enable_break()} during every call to {@code svr4_current_sos()} until
-              it succeeds.
-              (<a href="https://android-review.googlesource.com/#/c/43563">Change 43563</a>)</li>
-              <li>Fixed an issue where {@code gdb} would not stop on breakpoints placed in
-              {@code dlopen-ed} libraries.
-              (<a href="http://b.android.com/34856">Issue 34856</a>)
-              </li>
-              <li>Fixed {@code SIGILL} in dynamic linker when calling {@code dlopen()}, on system
-              where {@code /system/bin/linker} is stripped of symbols and
-              {@code rtld_db_dlactivity()} is implemented as {@code Thumb}, due to not preserving
-              {@code LSB} of {@code sym_addr}.
-              (<a href="http://b.android.com/37147">Issue 37147</a>)
-              </li>
-            </ul>
-          </li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Other bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed NDK headers:
-            <ul>
-              <li>Fixed {@code arch-mips/include/asm/*} code that was incorrectly removed from
-              original kernel. (<a href="https://android-review.googlesource.com/#/c/43335">Change
-              43335</a>)</li>
-              <li>Replaced struct member data {@code __unused} with {@code __linux_unused} in
-              {@code linux/sysctl.h} and {@code linux/icmp.h} to avoid conflict with
-              {@code #define __unused} in {@code sys/cdefs.h}.</li>
-              <li>Fixed {@code fenv.h} for enclosed C functions with {@code __BEGIN_DECLS} and
-              {@code __END_DECLS}.</li>
-              <li>Removed unimplemented functions in {@code malloc.h}.</li>
-              <li>Fixed {@code stdint.h} defintion of {@code uint64_t} for ANSI compilers.
-              (<a href="http://b.android.com/1952">Issue 1952</a>)</li>
-              <li>Fixed preprocessor macros in {@code <arch>/include/machine/*}.</li>
-              <li>Replaced {@code link.h} for MIPS with new version supporting all platforms.</li>
-              <li>Removed {@code linux-unistd.h}</li>
-              <li>Move GLibc-specific macros {@code LONG_LONG_MIN}, {@code LONG_LONG_MAX} and
-              {@code ULONG_LONG_MAX} from {@code <pthread.h>} to {@code
-<limits.h>}.</li>
-            </ul>
-          </li>
-          <li>Fixed a buffer overflow in {@code ndk-stack-parser}.</li>
-          <li>Fixed {@code _STLP_USE_EXCEPTIONS}, when not defined, to omit all declarations
-          and uses of {@code __Named_exception}. Compiling and use of {@code __Named_exception}
-          settings only occurs when {@code STLport} is allowed to use exceptions.</li>
-          <li>Fixed building of Linux-only NDK packages without also building Windows code. Use the
-          following settings to perform this type of build:
-          <pre>./build/tools/make-release.sh --force --systems=linux-x86</pre></li>
-          <li>Fixed {@code libc.so} so it does not export {@code atexit()} and {@code __do_handler}.
-          These symbols are exported for ARM builds by the system version of the C library to
-          support legacy native libraries. NDK-generated should never reference them directly.
-          Instead, each shared library or executable should embed its own version of these symbols,
-          provided by {@code crtbegin_*.o}.
-          <p>If your project is linked with the {@code -nostdlib -Wl,--no-undefined} options, you
-          must provide your own {@code __dso_handle} because {@code crtbegin_so.o} is not linked in
-          this case. The content of {@code __dso_handle} does not matter, as shown in the following
-          example code:</p>
-<pre>
-extern "C" {
-  extern void *__dso_handle __attribute__((__visibility__ ("hidden")));
-  void *__dso_handle;
-}
-</pre>
-          </li>
-          <li>Fixed symbol decoder for ARM used in {@code objdump} for {@code plt} entries to
-          generate a more readable form {@code function@plt}.</li>
-          <li>Removed the following symbols, introduced in GCC 4.6 {@code libgcc.a}, from
-          the X86 platform {@code libc.so} library: {@code __aeabi_idiv0}, {@code __aeabi_ldiv0},
-          {@code __aeabi_unwind_cpp_pr1}, and {@code __aeabi_unwind_cpp_pr2}.</li>
-          <li>Removed unused {@code .ctors}, {@code .dtors}, and {@code .eh_frame} in MIPS
-          {@code crt*_so.S}.</li>
-          <li>Updated {@code ndk-gdb} so that it only takes the last line of output for
-          {@code ndk-build} {@code DUMP_XXXX}. This change ensures that if {@code Application.mk} or
-          {@code Android.mk} print something with {@code $(info ...)} syntax, it does not get
-          injected into the result of {@code DUMP_XXXX}.
-          (<a href="https://groups.google.com/d/msg/android-ndk/-/ew0lTWGr1UEJ">More info</a>)</li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Other changes:</dt>
-
-      <dd>
-        <ul>
-          <li>Removed {@code arch-x86} and {@code arch-mips} headers from
-          {@code platforms/android-[3,4,5,8]}. Those headers were incomplete, since both X86 and
-          MIPS ABIs are only supported at API 9 or higher.</li>
-          <li>Simplified c++ include path in standalone packages, as shown below.
-          (<a href="http://b.android.com/35279">Issue 35279</a>)
-<pre>
-&lt;path&gt;/arm-linux-androideabi/include/c++/4.6.x-google
-  to:
-&lt;path&gt;/include/c++/4.6/
-</pre></li>
-          <li>Fixed {@code ndk-build} to recognize more C++ file extensions by default:
-          {@code .cc .cp .cxx .cpp .CPP .c++ .C}. You may still use {@code LOCAL_CPP_EXTENSION} to
-          overwrite these extension settings.</li>
-          <li>Fixed an issue in {@code samples/san-angeles} that caused a black screen or freeze
-          frame on re-launch.</li>
-          <li>Replaced deprecated APIs in NDK samples.
-          (<a href="http://b.android.com/20017">Issue 20017</a>)
-            <ul>
-              <li>{@code hello-gl2} from android-5 to android-7</li>
-              <li>{@code native-activity} from android-9 to android-10</li>
-              <li>{@code native-audio} from android-9 to android-10</li>
-              <li>{@code native-plasma} from android-9 to android-10</li>
-            </ul>
-          </li>
-          <li>Added new branding for Android executables with a simpler scheme in section
-          {@code .note.android.ident} (defined in {@code crtbegin_static/dynamic.o}) so that
-          debugging tools can act accordingly. The structure member and values are defined as
-          follows:
-<pre>
-static const struct {
-  int32_t namesz;  /* = 8,  sizeof ("Android") */
-  int32_t descsz;  /* = 1 * sizeof(int32_t) */
-  int32_t type;    /* = 1, ABI_NOTETYPE */
-  char name[sizeof "Android"];  /* = "Android" */
-  int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */
-}
-</pre>
-            <p>The previous branding options in section {@code .note.ABI-tag} are deprecated.</p>
-          </li>
-          <li>Added a new script {@code run-tests-all.sh} which calls {@code run-tests.sh} and
-          {@code standalone/run.sh} with various conditions. The script {@code run-tests.sh} runs
-          without the {@code --abi} option, and is enhanced to compile most of the tests for all
-          supported ABIs and run on all attached devices</li>
-        </ul>
-      </dd>
-    </dl>
-
-  </div>
-</div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 8b</a> <em>(July 2012)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <p>The main features of this release are a new GNU Compiler Collection (GCC) 4.6 toolchain and
-GNU Debugger (GDB) 7.3.x which adds debugging support for the Android 4.1 (API Level 16) system
-image.</p>
-
-    <dl>
-      <dt>Important bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed {@code LOCAL_SHORT_COMMANDS} issues on Mac OS, Windows Cygwin environments for
-static libraries. List file generation is faster, and it is not regenerated to avoid repeated
-project rebuilds.</li>
-          <li>Fixed several issues in {@code ndk-gdb}:
-            <ul>
-              <li>Updated tool to pass flags {@code -e}, {@code -d} and {@code -s} to adb more
-consistently.</li>
-              <li>Updated tool to accept device serial names containing spaces.</li>
-              <li>Updated tool to retrieve {@code /system/bin/link} information, so {@code gdb} on
-the host can set a breakpoint in {@code __dl_rtld_db_dlactivity} and be aware of linker activity
-(e.g., rescan {@code solib} symbols when {@code dlopen()} is called).</li>
-            </ul>
-          </li>
-          <li>Fixed {@code ndk-build clean} on Windows, which was failing to remove
-{@code ./libs/*/lib*.so}.</li>
-          <li>Fixed {@code ndk-build.cmd} to return a non-zero {@code ERRORLEVEL} when {@code make}
-fails.</li>
-          <li>Fixed {@code libc.so} to stop incorrectly exporting the {@code __exidx_start} and
-{@code __exidx_end} symbols.</li>
-          <li>Fixed {@code SEGV} when unwinding the stack past {@code __libc_init} for ARM and
-MIPS.</li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Important changes:</dt>
-
-      <dd>
-        <ul>
-          <li>Added GCC 4.6 toolchain ({@code binutils} 2.21 with {@code gold} and GDB 7.3.x) to
-co-exist with the original GCC 4.4.3 toolchain ({@code binutils} 2.19 and GDB 6.6).
-            <ul>
-              <li>GCC 4.6 is now the default toolchain. You may set {@code
-NDK_TOOLCHAIN_VERSION=4.4.3} in {@code Application.mk} to select the original one.</li>
-              <li>Support for the {@code gold} linker is only available for ARM and x86
-architectures on Linux and Mac OS hosts. This support is disabled by default. Add {@code
-LOCAL_LDLIBS += -fuse-ld=gold} in {@code Android.mk} to enable it.</li>
-              <li>Programs compiled with {@code -fPIE} require the new {@code GDB} for debugging,
-including binaries in Android 4.1 (API Level 16) system images.</li>
-              <li>The {@code binutils} 2.21 {@code ld} tool contains back-ported fixes from
-version 2.22:
-                <ul>
-                  <li>Fixed {@code ld --gc-sections}, which incorrectly retains zombie references to
-external libraries. (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=13177">more
-info</a>).</li>
-                  <li>Fixed ARM {@code strip} command to preserve the original {@code p_align} and
-{@code p_flags} in {@code GNU_RELRO} section if they are valid. Without this fix, programs
-built with {@code -fPIE} could not be debugged. (<a
-href="http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.552&r2=1.553">mor
-e info</a>)</li>
-                </ul>
-              </li>
-              <li>Disabled {@code sincos()} optimization for compatibility with older
-                platforms.</li>
-            </ul>
-          </li>
-
-          <li>Updated build options to enable the Never eXecute (NX) bit and {@code relro}/{@code
-bind_now} protections by default:
-            <ul>
-              <li>Added {@code --noexecstack} to assembler and {@code -z noexecstack} to linker
-that provides NX protection against buffer overflow attacks by enabling NX bit on stack and
-heap.</li>
-              <li>Added {@code -z relro} and  {@code -z now} to linker for hardening of internal
-data sections after linking to guard against security vulnerabilities caused by memory corruption.
-(more info: <a href="http://www.akkadia.org/drepper/nonselsec.pdf">1</a>,
-<a href="http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html">2</a>)</li>
-
-              <li>These features can be disabled using the following options:
-                <ol>
-                  <li>Disable NX protection by setting the {@code --execstack} option for the
-assembler and {@code -z execstack} for the linker.</li>
-                  <li>Disable hardening of internal data by setting the {@code -z norelro} and
-{@code -z lazy} options for the linker.</li>
-                  <li>Disable these protections in the NDK {@code jni/Android.mk} by setting the
-following options:
-<pre>
-LOCAL_DISABLE_NO_EXECUTE=true  # disable "--noexecstack" and "-z noexecstack"
-DISABLE_RELRO=true             # disable "-z relro" and "-z now"
-</pre>
-                  </li>
-                </ol>
-                <p>See {@code docs/ANDROID-MK.html} for more details.</p>
-              </li>
-            </ul>
-          </li>
-
-          <li>Added branding for Android executables with the {@code .note.ABI-tag} section (in
-{@code crtbegin_static/dynamic.o}) so that debugging tools can act accordingly. The structure
-member and values are defined as follows:
-<pre>
-static const struct {
-  int32_t namesz;  /* = 4,  sizeof ("GNU") */
-  int32_t descsz;  /* = 6 * sizeof(int32_t) */
-  int32_t type;    /* = 1 */
-  char  name[sizeof "GNU"];  /* = "GNU" */
-  int32_t os;      /* = 0 */
-  int32_t major;   /* = 2 */
-  int32_t minor;   /* = 6 */
-  int32_t teeny;   /* = 15 */
-  int32_t os_variant;  /* = 1 */
-  int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */
-}</pre>
-          </li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Other bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed {@code mips-linux-gnu} relocation truncated to fit {@code R_MIPS_TLS_LDM} issue.
-            (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12637">more info</a>)</li>
-          <li>Fixed {@code ld} tool segfaults when using {@code --gc-sections}.
-            (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12845">more info</a>)
-          </li>
-          <li>Fixed MIPS {@code GOT_PAGE} counting issue.
-            (<a href="http://sourceware.org/ml/binutils/2011-05/msg00198.html">more info</a>)</li>
-          <li>Fixed follow warning symbol link for {@code mips_elf_count_got_symbols}.</li>
-          <li>Fixed follow warning symbol link for {@code mips_elf_allocate_lazy_stub}.</li>
-          <li>Moved MIPS {@code .dynamic} to the data segment, so that it is writable.</li>
-          <li>Replaced hard-coded values for symbols with correct segment sizes for MIPS.</li>
-          <li>Removed the {@code -mno-shared} option from the defaults in the MIPS toolchain.
-The default for Android toolchain is {@code -fPIC} (or {@code -fpic} if supported). If you do not
-explicitly specify {@code -mshared}, {@code -fpic}, {@code -fPIC}, {@code -fpie}, or {@code -fPIE},
-the MIPS compiler adds {@code -mno-shared} that turns off PIC. Fixed compiler not to add
-{@code -mno-shared} in this case.</li>
-          <li>Fixed wrong package names in samples {@code hello-jni} and {@code two-libs} so that
-the {@code tests} project underneath it can compile.</li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Other Changes:</dt>
-
-      <dd>
-        <ul>
-          <li>Changed locations of binaries:
-            <ul>
-              <li>Moved {@code gdbserver} from
-{@code toolchain/<arch-os-ver>/prebuilt/gdbserver} to
-{@code prebuilt/android-<arch>/gdbserver/gdbserver}.</li>
-              <li>Renamed x86 toolchain prefix from {@code i686-android-linux-} to
-{@code i686-linux-android-}.</li>
-              <li>Moved {@code sources/cxx-stl/gnu-libstdc++/include} and {@code lib} to
-{@code sources/cxx-stl/gnu-libstdc++/4.6} when compiled with GCC 4.6, or
-{@code sources/cxx-stl/gnu-libstdc++/4.4.3} when compiled with GCC 4.4.3.</li>
-              <li>Moved {@code libbfd.a} and {@code libintl.a} from {@code lib/} to {@code
-lib32/}.</li>
-            </ul>
-          </li>
-
-          <li>Added and improved various scripts in the rebuild and test NDK toolchain:
-            <ul>
-              <li>Added {@code build-mingw64-toolchain.sh} to generate a new Linux-hosted toolchain
-that generates Win32 and Win64 executables.</li>
-              <li>Improved speed of {@code download-toolchain-sources.sh} by using the {@code
-clone} command and only using {@code checkout} for the directories that are needed to build the NDK
-toolchain binaries.</li>
-              <li>Added {@code build-host-gcc.sh} and {@code build-host-gdb.sh} scripts.</li>
-              <li>Added {@code tests/check-release.sh} to check the content of a given NDK
-installation directory, or an existing NDK package.</li>
-              <li>Rewrote the {@code tests/standalone/run.sh} standalone tests .</li>
-            </ul>
-          </li>
-          <li>Removed {@code if_dl.h} header from all platforms and architectures. The {@code
-AF_LINK} and {@code sockaddr_dl} elements it describes are specific to BSD (i.e., they don't exist
-in Linux).</li>
-        </ul>
-      </dd>
-    </dl>
-
-  </div>
-</div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 8</a> <em>(May 2012)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <p>This release of the NDK includes support for MIPS ABI and a few additional fixes.</p>
-
-    <dl>
-      <dt>New features:</dt>
-
-      <dd>
-        <ul>
-          <li>Added support for the MIPS ABI, which allows you to generate machine code that runs on
-            compatible MIPS-based Android devices. Major features for MIPS include MIPS-specific
-            toolchains, system headers, libraries and debugging support. For more details regarding
-            MIPS support, see {@code docs/CPU-MIPS.html} in the NDK package.
-
-              <p>By default, code is generated for ARM-based devices. You can add {@code mips} to
-              your {@code APP_ABI} definition in your {@code Application.mk} file to build
-              for MIPS platforms. For example, the following line instructs {@code ndk-build}
-              to build your code for three distinct ABIs:</p>
-
-              <pre>APP_ABI := armeabi armeabi-v7a <strong>mips</strong></pre>
-
-              <p>Unless you rely on architecture-specific assembly sources, such as ARM assembly
-              code, you should not need to touch your {@code Android.mk} files to build MIPS
-              machine code.</p>
-          </li>
-
-          <li>You can build a standalone MIPS toolchain using the {@code --arch=mips}
-          option when calling <code>make-standalone-toolchain.sh</code>. See
-          {@code docs/STANDALONE-TOOLCHAIN.html} for more details.
-          </li>
-        </ul>
-
-        <p class="note"><strong>Note:</strong> To ensure that your applications are available
-to users only if their devices are capable of running them, Google Play filters applications based
-on the instruction set information included in your application ? no action is needed on your part
-to enable the filtering. Additionally, the Android system itself also checks your application at
-install time and allows the installation to continue only if the application provides a library that
-is compiled for the device's CPU architecture.</p>
-      </dd>
-
-      <dt>Important bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed a typo in GAbi++ implementation where the result of {@code
-          dynamic_cast<D>(b)} of base class object {@code b} to derived class {@code D} is
-          incorrectly adjusted in the opposite direction from the base class.
-          (<a href="http://b.android.com/28721">Issue 28721</a>)
-          </li>
-          <li>Fixed an issue in which {@code make-standalone-toolchain.sh} fails to copy
-          {@code libsupc++.*}.</li>
-        </ul>
-      </dd>
-
-      <dt>Other bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed {@code ndk-build.cmd} to ensure that {@code ndk-build.cmd} works correctly even
-          if the user has redefined the {@code SHELL} environment variable, which may be changed
-          when installing a variety of development tools in Windows environments.
-          </li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 7c</a> <em>(April 2012)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <p>This release of the NDK includes an important fix for Tegra2-based devices, and a few
-additional fixes and improvements:</p>
-
-    <dl>
-      <dt>Important bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed GNU STL armeabi-v7a binaries to not crash on non-NEON
-  devices. The files provided with NDK r7b were not configured properly,
-  resulting in crashes on Tegra2-based devices and others when trying to use
-  certain floating-point functions (e.g., {@code cosf}, {@code sinf}, {@code expf}).</li>
-        </ul>
-      </dd>
-
-      <dt>Important changes:</dt>
-
-      <dd>
-        <ul>
-          <li>Added support for custom output directories through the {@code NDK_OUT}
-  environment variable. When defined, this variable is used to store all
-  intermediate generated files, instead of {@code $PROJECT_PATH/obj}. The variable is
-  also recognized by {@code ndk-gdb}. </li>
-          <li>Added support for building modules with hundreds or even thousands of source
-  files by defining {@code LOCAL_SHORT_COMMANDS} to {@code true} in your {@code Android.mk}.
-            <p>This change forces the NDK build system to put most linker or archiver options
-  into list files, as a work-around for command-line length limitations.
-  See {@code docs/ANDROID-MK.html} for details.</p>
-          </li>
-        </ul>
-      </dd>
-
-      <dt>Other bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Fixed {@code android_getCpuCount()} implementation in the {@code cpufeatures}
-helper library. On certain devices, where cores are enabled dynamically by the system, the previous
-implementation would report the total number of <em>active</em> cores the first time the function
-was called, rather than the total number of <em>physically available</em> cores.</li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 7b</a> <em>(February 2012)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <p>This release of the NDK includes fixes for native Windows builds, Cygwin and many other
-      improvements:</p>
-
-    <dl>
-      <dt>Important bug fixes:</dt>
-
-      <dd>
-        <ul>
-          <li>Updated {@code sys/atomics.h} to avoid correctness issues
-            on some multi-core ARM-based devices. Rebuild your unmodified sources with this
-            version of the NDK and this problem should be completely eliminated.
-            For more details, read {@code docs/ANDROID-ATOMICS.html}.</li>
-          <li>Reverted to {@code binutils} 2.19 to fix debugging issues that
-            appeared in NDK r7 (which switched to {@code binutils} 2.20.1).</li>
-          <li>Fixed {@code ndk-build} on 32-bit Linux. A packaging error put a 64-bit version
-            of the {@code awk} executable under {@code prebuilt/linux-x86/bin} in NDK r7.</li>
-          <li>Fixed native Windows build ({@code ndk-build.cmd}). Other build modes were not
-            affected. The fixes include:
-            <ul>
-              <li>Removed an infinite loop / stack overflow bug that happened when trying
-                to call {@code ndk-build.cmd} from a directory that was <em>not</em> the top of
-                your project path (e.g., in any sub-directory of it).</li>
-              <li>Fixed a problem where the auto-generated dependency files were ignored. This
-                meant that updating a header didn't trigger recompilation of sources that included
-                it.</li>
-              <li>Fixed a problem where special characters in files or paths, other than spaces and
-                quotes, were not correctly handled.</li>
-            </ul>
-          </li>
-          <li>Fixed the standalone toolchain to generate proper binaries when using
-            {@code -lstdc++} (i.e., linking against the GNU {@code libstdc++} C++ runtime). You
-            should use {@code -lgnustl_shared} if you want to link against the shared library
-            version or {@code -lstdc++} for the static version.
-
-            <p>See {@code docs/STANDALONE-TOOLCHAIN.html} for more details about this fix.</p>
-          </li>
-          <li>Fixed {@code gnustl_shared} on Cygwin. The linker complained that it couldn't find
-            {@code libsupc++.a} even though the file was at the right location.</li>
-          <li>Fixed Cygwin C++ link when not using any specific C++ runtime through
-            {@code APP_STL}.</li>
-        </ul>
-      </dd>
-    </dl>
-
-    <dl>
-      <dt>Other changes:</dt>
-
-      <dd>
-        <ul>
-          <li>When your application uses the GNU {@code libstdc++} runtime, the compiler will
-            no longer forcibly enable exceptions and RTTI. This change results in smaller code.
-            <p>If you need these features, you must do one of the following:</p>
-            <ul>
-              <li>Enable exceptions and/or RTTI explicitly in your modules or
-                {@code Application.mk}. (recommended)</li>
-              <li>Define {@code APP_GNUSTL_FORCE_CPP_FEATURES} to {@code 'exceptions'},
-                {@code 'rtti'} or both in your {@code Application.mk}. See
-                {@code docs/APPLICATION-MK.html} for more details.</li>
-            </ul>
-          </li>
-          <li>{@code ndk-gdb} now works properly when your application has private services
-            running in independent processes. It debugs the main application process, instead of the
-            first process listed by {@code ps}, which is usually a service process.</li>
-          <li>Fixed a rare bug where NDK r7 would fail to honor the {@code LOCAL_ARM_MODE} value
-            and always compile certain source files (but not all) to 32-bit instructions.</li>
-          <li>{@code STLport}: Refresh the sources to match the Android platform version. This
-            update fixes a few minor bugs:
-            <ul>
-               <li>Fixed instantiation of an incomplete type</li>
-               <li>Fixed minor "==" versus "=" typo</li>
-               <li>Used {@code memmove} instead of {@code memcpy} in {@code string::assign}</li>
-               <li>Added better handling of {@code IsNANorINF}, {@code IsINF}, {@code IsNegNAN},
-                 etc.</li>
-             </ul>
-             <p>For complete details, see the commit log.</p>
-          </li>
-          <li>{@code STLport}: Removed 5 unnecessary static initializers from the library.</li>
-          <li>The GNU libstdc++ libraries for armeabi-v7a were mistakenly compiled for
-            armeabi instead. This change had no impact on correctness, but using the right
-            ABI should provide slightly better performance.</li>
-          <li>The {@code cpu-features} helper library was updated to report three optional
-            x86 CPU features ({@code SSSE3}, {@code MOVBE} and {@code POPCNT}). See
-            {@code docs/CPU-FEATURES.html} for more details.</li>
-          <li>{@code docs/NDK-BUILD.html} was updated to mention {@code NDK_APPLICATION_MK} instead
-            of {@code NDK_APP_APPLICATION_MK} to select a custom {@code Application.mk} file.</li>
-          <li>Cygwin: {@code ndk-build} no longer creates an empty "NUL" file in the current
-            directory when invoked.</li>
-          <li>Cygwin: Added better automatic dependency detection. In the previous version, it
-            didn't work properly in the following cases:
-            <ul>
-              <li>When the Cygwin drive prefix was not {@code /cygdrive}.</li>
-              <li>When using drive-less mounts, for example, when Cygwin would translate
-                {@code /home} to {@code \\server\subdir} instead of {@code C:\Some\Dir}.</li>
-            </ul>
-          </li>
-          <li>Cygwin: {@code ndk-build} does not try to use the native Windows tools under
-            {@code $NDK/prebuilt/windows/bin} with certain versions of Cygwin and/or GNU Make.</li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 7</a> <em>(November 2011)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <p>This release of the NDK includes new features to support the Android 4.0 platform as well
-    as many other additions and improvements:</p>
-
-    <dl>
-      <dt>New features</dt>
-
-      <dd>
-        <ul>
-          <li>Added official NDK APIs for Android 4.0 (API level 14), which adds the following
-          native features to the platform:
-
-            <ul>
-              <li>Added native multimedia API based on the Khronos Group OpenMAX AL? 1.0.1
-              standard. The new <code>&lt;OMXAL/OpenMAXAL.h&gt;</code> and
-              <code>&lt;OMXAL/OpenMAXAL_Android.h&gt;</code> headers allow applications targeting
-              API level 14 to perform multimedia output directly from native code by using a new
-              Android-specific buffer queue interface. For more details, see
-              <code>docs/openmaxal/index.html</code> and <a href=
-              "http://www.khronos.org/openmax/">http://www.khronos.org/openmax/</a>.</li>
-
-              <li>Updated the native audio API based on the Khronos Group OpenSL ES 1.0.1?
-              standard. With API Level 14, you can now decode compressed audio (e.g. MP3, AAC,
-              Vorbis) to PCM. For more details, see <code>docs/opensles/index.html</code> and
-              <a href=
-              "http://www.khronos.org/opensles">http://www.khronos.org/opensles/</a>.</li>
-            </ul>
-          </li>
-
-          <li>Added CCache support. To speed up large rebuilds, define the
-          <code>NDK_CCACHE</code> environment variable to <code>ccache</code> (or the path to
-          your <code>ccache</code> binary). When declared, the NDK build system automatically
-          uses CCache when compiling any source file. For example:
-            <pre>
-export NDK_CCACHE=ccache
-</pre>
-          <p class="note"><strong>Note:</strong> CCache is not included in the NDK release
-          so you must have it installed prior to using it. For more information about CCache, see
-          <a href="http://ccache.samba.org">http://ccache.samba.org</a>.</p>
-          </li>
-
-          <li>Added support for setting <code>APP_ABI</code> to <code>all</code> to indicate that
-          you want to build your NDK modules for all the ABIs supported by your given NDK
-          release. This means that either one of the following two lines in your
-          <code>Application.mk</code> are equivalent with this release:
-            <pre>
-APP_ABI := all
-APP_ABI := armeabi armeabi-v7a x86
-</pre>
-
-            <p>This also works if you define <code>APP_ABI</code> when calling
-            <code>ndk-build</code> from the command-line, which is a quick way to check that your
-            project builds for all supported ABIs without changing the project's
-            <code>Application.mk file</code>. For example:</p>
-            <pre>
-ndk-build APP_ABI=all
-</pre>
-          </li>
-
-          <li>Added a <code>LOCAL_CPP_FEATURES</code> variable in <code>Android.mk</code> that
-          allows you to declare which C++ features (RTTI or Exceptions) your module uses. This
-          ensures that the final linking works correctly if you have prebuilt modules that depend
-          on these features. See <code>docs/ANDROID-MK.html</code> and
-          <code>docs/CPLUSPLUS-SUPPORT.html</code> for more details.</li>
-
-          <li>Shortened paths to source and object files that are used in build commands. When
-          invoking <code>$NDK/ndk-build</code> from your project path, the paths to the source,
-          object, and binary files that are passed to the build commands are significantly
-          shorter now, because they are passed relative to the current directory. This is useful
-          when building projects with a lot of source files, to avoid limits on the maximum
-          command line length supported by your host operating system. The behavior is unchanged
-          if you invoke <code>ndk-build</code> from a sub-directory of your project tree, or if
-          you define <code>NDK_PROJECT_PATH</code> to point to a specific directory.</li>
-        </ul>
-      </dd>
-
-      <dt>Experimental features</dt>
-
-      <dd>
-        You can now build your NDK source files on Windows <em>without</em> Cygwin by calling the
-        <code>ndk-build.cmd</code> script from the command line from your project path. The
-        script takes exactly the same arguments as the original <code>ndk-build</code> script.
-        The Windows NDK package comes with its own prebuilt binaries for GNU Make, Awk and other
-        tools required by the build. You should not need to install anything else to get a
-        working build system.
-
-        <p class="caution"><strong>Important:</strong> <code>ndk-gdb</code> does not work on
-        Windows, so you still need Cygwin to debug.</p>
-
-        <p>This feature is still experimental, so feel free to try it and report issues on the
-        <a href="http://b.android.com">public bug database</a> or <a href=
-        "http://groups.google.com/group/android-ndk">public forum</a>. All samples and unit tests
-        shipped with the NDK succesfully compile with this feature.</p>
-      </dd>
-
-      <dt>Important bug fixes</dt>
-
-      <dd>
-        <ul>
-          <li>Imported shared libraries are now installed by default to the target installation
-          location (<code>libs/&lt;abi&gt;</code>) if <code>APP_MODULES</code> is not defined in
-          your <code>Application.mk</code>. For example, if a top-level module <code>foo</code>
-          imports a module <code>bar</code>, then both <code>libfoo.so</code> and
-          <code>libbar.so</code> are copied to the install location. Previously, only
-          <code>libfoo.so</code> was copied, unless you listed <code>bar</code> in your
-          <code>APP_MODULES</code> too. If you define <code>APP_MODULES</code> explicitly, the
-          behavior is unchanged.</li>
-
-          <li><code>ndk-gdb</code> now works correctly for activities with multiple categories in
-          their MAIN intent filters.</li>
-
-          <li>Static library imports are now properly transitive. For example, if a top-level
-          module <code>foo</code> imports static library <code>bar</code> that imports static
-          library <code>zoo</code>, the <code>libfoo.so</code> will now be linked against both
-          <code>libbar.a</code> and <code>libzoo.a</code>.</li>
-        </ul>
-      </dd>
-
-      <dt>Other changes</dt>
-
-      <dd>
-        <ul>
-          <li><code>docs/NATIVE-ACTIVITY.HTML</code>: Fixed typo. The minimum API level should be
-          9, not 8 for native activities.</li>
-
-          <li><code>docs/STABLE-APIS.html</code>: Added missing documentation listing EGL as a
-          supported stable API, starting from API level 9.</li>
-
-          <li><code>download-toolchain-sources.sh</code>: Updated to download the toolchain
-          sources from <a href="http://android.googlesource.com">android.googlesource.com</a>,
-          which is the new location for the AOSP servers.</li>
-
-          <li>Added a new C++ support runtime named <code>gabi++</code>. More details about it
-          are available in the updated <code>docs/CPLUSPLUS-SUPPORT.html</code>.</li>
-
-          <li>Added a new C++ support runtime named <code>gnustl_shared</code> that corresponds
-          to the shared library version of GNU libstdc++ v3 (GPLv3 license). See more info at
-          <code>docs/CPLUSPLUS-SUPPORT.html</code></li>
-
-          <li>Added support for RTTI in the STLport C++ runtimes (no support for
-          exceptions).</li>
-
-          <li>Added support for multiple file extensions in <code>LOCAL_CPP_EXTENSION</code>. For
-          example, to compile both <code>foo.cpp</code> and <code>bar.cxx</code> as C++ sources,
-          declare the following:
-            <pre>
-LOCAL_CPP_EXTENSION := .cpp .cxx
-</pre>
-          </li>
-
-          <li>Removed many unwanted exported symbols from the link-time shared system libraries
-          provided by the NDK. This ensures that code generated with the standalone toolchain
-          doesn't risk to accidentally depend on a non-stable ABI symbol (e.g. any libgcc.a
-          symbol that changes each time the toolchain used to build the platform is changed)</li>
-
-          <li>Refreshed the EGL and OpenGLES Khronos headers to support more extensions. Note
-          that this does <em>not</em> change the NDK ABIs for the corresponding libraries,
-          because each extension must be probed at runtime by the client application.
-
-            <p>The extensions that are available depend on your actual device and GPU drivers,
-            not the platform version the device runs on. The header changes simply add new
-            constants and types to make it easier to use the extensions when they have been
-            probed with <code>eglGetProcAddress()</code> or <code>glGetProcAddress()</code>. The
-            following list describes the newly supported extensions:</p>
-
-            <dl>
-              <dt>GLES 1.x</dt>
-
-              <dd>
-                <ul>
-                  <li><code>GL_OES_vertex_array_object</code></li>
-
-                  <li><code>GL_OES_EGL_image_external</code></li>
-
-                  <li><code>GL_APPLE_texture_2D_limited_npot</code></li>
-
-                  <li><code>GL_EXT_blend_minmax</code></li>
-
-                  <li><code>GL_EXT_discard_framebuffer</code></li>
-
-                  <li><code>GL_EXT_multi_draw_arrays</code></li>
-
-                  <li><code>GL_EXT_read_format_bgra</code></li>
-
-                  <li><code>GL_EXT_texture_filter_anisotropic</code></li>
-
-                  <li><code>GL_EXT_texture_format_BGRA8888</code></li>
-
-                  <li><code>GL_EXT_texture_lod_bias</code></li>
-
-                  <li><code>GL_IMG_read_format</code></li>
-
-                  <li><code>GL_IMG_texture_compression_pvrtc</code></li>
-
-                  <li><code>GL_IMG_texture_env_enhanced_fixed_function</code></li>
-
-                  <li><code>GL_IMG_user_clip_plane</code></li>
-
-                  <li><code>GL_IMG_multisampled_render_to_texture</code></li>
-
-                  <li><code>GL_NV_fence</code></li>
-
-                  <li><code>GL_QCOM_driver_control</code></li>
-
-                  <li><code>GL_QCOM_extended_get</code></li>
-
-                  <li><code>GL_QCOM_extended_get2</code></li>
-
-                  <li><code>GL_QCOM_perfmon_global_mode</code></li>
-
-                  <li><code>GL_QCOM_writeonly_rendering</code></li>
-
-                  <li><code>GL_QCOM_tiled_rendering</code></li>
-                </ul>
-              </dd>
-
-              <dt>GLES 2.0</dt>
-
-              <dd>
-                <ul>
-                  <li><code>GL_OES_element_index_uint</code></li>
-
-                  <li><code>GL_OES_get_program_binary</code></li>
-
-                  <li><code>GL_OES_mapbuffer</code></li>
-
-                  <li><code>GL_OES_packed_depth_stencil</code></li>
-
-                  <li><code>GL_OES_texture_3D</code></li>
-
-                  <li><code>GL_OES_texture_float</code></li>
-
-                  <li><code>GL_OES_texture_float_linear</code></li>
-
-                  <li><code>GL_OES_texture_half_float_linear</code></li>
-
-                  <li><code>GL_OES_texture_npot</code></li>
-
-                  <li><code>GL_OES_vertex_array_object</code></li>
-
-                  <li><code>GL_OES_EGL_image_external</code></li>
-
-                  <li><code>GL_AMD_program_binary_Z400</code></li>
-
-                  <li><code>GL_EXT_blend_minmax</code></li>
-
-                  <li><code>GL_EXT_discard_framebuffer</code></li>
-
-                  <li><code>GL_EXT_multi_draw_arrays</code></li>
-
-                  <li><code>GL_EXT_read_format_bgra</code></li>
-
-                  <li><code>GL_EXT_texture_format_BGRA8888</code></li>
-
-                  <li><code>GL_EXT_texture_compression_dxt1</code></li>
-
-                  <li><code>GL_IMG_program_binary</code></li>
-
-                  <li><code>GL_IMG_read_format</code></li>
-
-                  <li><code>GL_IMG_shader_binary</code></li>
-
-                  <li><code>GL_IMG_texture_compression_pvrtc</code></li>
-
-                  <li><code>GL_IMG_multisampled_render_to_texture</code></li>
-
-                  <li><code>GL_NV_coverage_sample</code></li>
-
-                  <li><code>GL_NV_depth_nonlinear</code></li>
-
-                  <li><code>GL_QCOM_extended_get</code></li>
-
-                  <li><code>GL_QCOM_extended_get2</code></li>
-
-                  <li><code>GL_QCOM_writeonly_rendering</code></li>
-
-                  <li><code>GL_QCOM_tiled_rendering</code></li>
-                </ul>
-              </dd>
-
-              <dt>EGL</dt>
-
-              <dd>
-                <ul>
-                  <li><code>EGL_ANDROID_recordable</code></li>
-
-                  <li><code>EGL_NV_system_time</code></li>
-                </ul>
-              </dd>
-            </dl>
-          </li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 6b</a> <em>(August 2011)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <p>This release of the NDK does not include any new features compared to r6. The r6b release
-      addresses the following issues in the r6 release:</p>
-      <dl>
-        <dt>Important bug fixes</dt>
-        <dd>
-          <ul>
-            <li>Fixed the build when <code>APP_ABI="armeabi x86"</code> is used for
-            multi-architecture builds.</li>
-            <li>Fixed the location of prebuilt STLport binaries in the NDK release package.
-            A bug in the packaging script placed them in the wrong location.</li>
-            <li>Fixed <code>atexit()</code> usage in shared libraries with the x86standalone
-            toolchain.</li>
-            <li>Fixed <code>make-standalone-toolchain.sh --arch=x86</code>. It used to fail
-            to copy the proper GNU libstdc++ binaries to the right location.</li>
-            <li>Fixed the standalone toolchain linker warnings about missing the definition and
-            size for the <code>__dso_handle</code> symbol (ARM only).</li>
-            <li>Fixed the inclusion order of <code>$(SYSROOT)/usr/include</code> for x86 builds.
-            See the <a href="http://b.android.com/18540">bug</a> for
-            more information.</li>
-            <li>Fixed the definitions of <code>ptrdiff_t</code> and <code>size_t</code> in
-            x86-specific systems when they are used with the x86 standalone toolchain.</li>
-          </ul>
-        </dd>
-      </dl>
-  </div>
-</div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 6</a> <em>(July 2011)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <p>This release of the NDK includes support for the x86 ABI and other minor changes.
-      For detailed information describing the changes in this release, read the
-      <code>CHANGES.HTML</code> document included in the NDK package.
-      </p>
-      <dl>
-        <dt>General notes:</dt>
-        <dd>
-          <ul>
-            <li>Adds support for the x86 ABI, which allows you to generate machine code
-            that runs on compatible x86-based Android devices. Major features for x86
-            include x86-specific toolchains, system headers, libraries and
-            debugging support. For all of the details regarding x86 support,
-            see <code>docs/CPU-X86.html</code> in the NDK package.
-
-              <p>By default, code is generated for ARM-based devices, but you can add x86 to your
-              <code>APP_ABI</code> definition in your <code>Application.mk</code> file to build
-              for x86 platforms. For example, the following line instructs <code>ndk-build</code>
-              to build your code for three distinct ABIs:</p>
-
-              <pre>APP_ABI := armeabi armeabi-v7a x86</pre>
-
-              <p>Unless you rely on ARM-based assembly sources, you shouldn't need to touch
-              your <code>Android.mk</code> files to build x86 machine code.</p>
-
-            </li>
-
-            <li>You can build a standalone x86 toolchain using the
-<code>--toolchain=x86-4.4.3</code>
-            option when calling <code>make-standalone-toolchain.sh</code>. See
-            <code>docs/STANDALONE-TOOLCHAIN.html</code> for more details.
-            </li>
-            <li>The new <code>ndk-stack</code> tool lets you translate stack traces in
-            <code>logcat</code> that are generated by native code. The tool translates
-            instruction addresses into a readable format that contains things such
-            as the function, source file, and line number corresponding to each stack frame.
-            For more information and a usage example, see <code>docs/NDK-STACK.html</code>.
-            </li>
-          </ul>
-        </dd>
-        <dt>Other changes:</dt>
-        <dd><code>arm-eabi-4.4.0</code>, which had been deprecated since NDK r5, has been
-        removed from the NDK distribution.</dd>
-
-      </dl>
-    </div>
-  </div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 5c</a> <em>(June 2011)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-    <p>This release of the NDK does not include any new features compared to r5b. The r5c release
-    addresses the following problems in the r5b release:</p>
-    <dl>
-      <dt>Important bug fixes:</dt>
-      <dd>
-        <ul>
-          <li><code>ndk-build</code>: Fixed a rare bug that appeared when trying to perform parallel
-          builds of debuggable projects.</li>
-
-          <li>Fixed a typo that prevented <code>LOCAL_WHOLE_STATIC_LIBRARIES</code> to work
-          correctly with the new toolchain and added documentation for this in
-          <code>docs/ANDROID-MK.html</code>.</li>
-
-          <li>Fixed a bug where code linked against <code>gnustl_static</code> crashed when run on
-          platform releases older than API level 8 (Android 2.2).</li>
-
-          <li><code>ndk-gdb</code>: Fixed a bug that caused a segmentation fault when debugging
-Android 3.0
-          or newer devices.</li>
-
-          <li><code>&lt;android/input.h&gt;</code>: Two functions that were introduced in API level
-          9 (Android 2.3) were incorrect and are fixed. While this breaks the source API, the
-          binary interface to the system is unchanged. The incorrect functions were missing a
-          <code>history_index</code> parameter, and the correct definitions are shown below:
-<pre>
-float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event,
-                                           size_t pointer_index,
-                                           size_t history_index);
-
-float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event,
-                                           size_t pointer_index,
-                                           size_t history_index);
-</pre>
-          </li>
-
-          <li>Updated the C library ARM binary for API level 9 (Android 2.3) to correctly expose at
-          link time new functions that were added in that API level (for example,
-          <code>pthread_rwlock_init</code>).</li>
-
-        </ul>
-      </dd>
-
-      <dt>Minor improvements and fixes:</dt>
-      <dd>
-        <ul>
-          <li>Object files are now always linked in the order they appear in
-          <code>LOCAL_SRC_FILES</code>. This was not the case previously because the files were
-          grouped by source extensions instead.</li>
-
-          <li>When <code>import-module</code> fails, it now prints the list of directories that
-          were searched. This is useful to check that the <code>NDK_MODULE_PATH</code> definition
-          used by the build system is correct.</li>
-
-          <li>When <code>import-module</code> succeeds, it now prints the directory where the
-          module was found to the log (visible with <code>NDK_LOG=1</code>).</li>
-
-          <li>Increased the build speed of debuggable applications when there is a very large number
-          of include directories in the project.</li>
-
-          <li><code>ndk-gdb</code>: Better detection of <code>adb shell</code> failures and improved
-          error messages.</li>
-
-          <li><code>&lt;pthread.h&gt;</code>: Fixed the definition of
-          <code>PTHREAD_RWLOCK_INITIALIZER</code> for API level 9 (Android 2.3) and higher.</li>
-
-          <li>Fixed an issue where a module could import itself, resulting in an infinite loop in
-          GNU Make.</li>
-
-          <li>Fixed a bug that caused the build to fail if <code>LOCAL_ARM_NEON</code> was set to
-          true (typo in <code>build/core/build-binary.mk</code>).</li>
-
-          <li>Fixed a bug that prevented the compilation of <code>.s</code> assembly files
-          (<code>.S</code> files were okay).</li>
-        </ul>
-      </dd>
-    </dl>
-  </div>
-</div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 5b</a> <em>(January 2011)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <p>This release of the NDK does not include any new features compared to r5. The r5b release
-addresses the
-      following problems in the r5 release:
-      </p>
-      <ul>
-    <li>The r5 binaries required glibc 2.11, but the r5b binaries are generated with a special
-    toolchain that targets glibc 2.7 or higher instead. The Linux toolchain binaries now run on
-Ubuntu 8.04 or higher. </li>
-    <li>Fixes a compiler bug in the arm-linux-androideabi-4.4.3 toolchain.
-    The previous binary generated invalid thumb instruction sequences when
-    dealing with signed chars.</li>
-    <li>Adds missing documentation for the
-    "gnustl_static" value for APP_STL, that allows you to link against
-    a static library version of GNU libstdc++. </li> the
-    <li>Fixed the following <code>ndk-build</code> issues:
-      <ul>
-        <li>A bug that created inconsistent dependency files when a
-        compilation error occured on Windows. This prevented a proper build after
-        the error was fixed in the source code.</li>
-        <li>A Cygwin-specific bug where using very short paths for
-        the Android NDK installation or the project path led to the
-        generation of invalid dependency files. This made incremental builds
-        impossible.</li>
-        <li>A typo that prevented the cpufeatures library from working correctly
-        with the new NDK toolchain.</li>
-        <li>Builds in Cygwin are faster by avoiding calls to <code>cygpath -m</code>
-        from GNU Make for every source or object file, which caused problems
-        with very large source trees. In case this doesn't work properly, define
-<code>NDK_USE_CYGPATH=1</code> in your
-        environment to use <code>cygpath -m</code> again.</li>
-        <li>The Cygwin installation now notifies the user of invalid installation paths that
-contain spaces. Previously, an invalid path
-        would output an error that complained about an incorrect version of GNU Make, even if the
-right one was installed.
-      </ul>
-    </li>
-  <li>Fixed a typo that prevented the <code>NDK_MODULE_PATH</code> environment variable from
-working properly when
-  it contained multiple directories separated with a colon. </li>
-  <li>The <code>prebuilt-common.sh</code> script contains fixes to check the compiler for 64-bit
-  generated machine code, instead of relying on the host tag, which
-  allows the 32-bit toolchain to rebuild properly on Snow Leopard. The toolchain rebuild scripts
-now also support
-  using a 32-bit host toolchain.</li>
-  <li>A missing declaration for <code>INET_ADDRSTRLEN</code> was added to
-<code>&lt;netinet/in.h&gt;</code>.</li>
-  <li>Missing declarations for <code>IN6_IS_ADDR_MC_NODELOCAL</code> and
-<code>IN6_IS_ADDR_MC_GLOBAL</code> were added to <code>&lt;netinet/in6.h&gt;</code>.</li>
-  <li>'asm' was replaced with '__asm__' in <code>&lt;asm/byteorder.h&gt;</code> to allow
-compilation with <code>-std=c99</code>.</li>
-  </ul>
-  </div>
-  </div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 5</a> <em>(December 2010)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <p>This release of the NDK includes many new APIs, most of which are introduced to
-         support the development of games and similar applications that make extensive use
-         of native code. Using the APIs, developers have direct native access to events, audio,
-         graphics and window management, assets, and storage. Developers can also implement the
-         Android application lifecycle in native code with help from the new
-         {@link android.app.NativeActivity} class. For detailed information describing the changes
-in this
-         release, read the <code>CHANGES.HTML</code> document included in the downloaded NDK
-package.
-      </p>
-      <dl>
-        <dt>General notes:</dt>
-        <dd>
-          <ul>
-            <li>Adds support for native activities, which allows you to implement the
-            Android application lifecycle in native code.</li>
-
-            <li>Adds native support for the following:
-
-              <ul>
-
-                <li>Input subsystem (such as the keyboard and touch screen)</li>
-
-                <li>Access to sensor data (accelerometer, compass, gyroscope, etc).</li>
-
-                <li>Event loop APIs to wait for things such as input and sensor events.</li>
-
-                <li>Window and surface subsystem</li>
-
-                <li>Audio APIs based on the OpenSL ES standard that support playback and recording
-                as well as control over platform audio effects</li>
-
-                <li>Access to assets packaged in an <code>.apk</code> file.</li>
-
-              </ul>
-            </li>
-
-            <li>Includes a new toolchain (based on GCC 4.4.3), which generates better code, and can
-also now
-            be used as a standalone cross-compiler, for people who want to build their stuff with
-            <code>./configure &amp;&amp; make</code>. See
-            docs/STANDALONE-TOOLCHAIN.html for the details. The binaries for GCC 4.4.0 are still
-provided,
-            but the 4.2.1 binaries were removed.</li>
-
-            <li>Adds support for prebuilt static and shared libraries (docs/PREBUILTS.html) and
-module
-            exports and imports to make sharing and reuse of third-party modules much easier
-            (docs/IMPORT-MODULE.html explains why).</li>
-
-            <li>Provides a default C++ STL implementation (based on STLport) as a helper module. It
-can be used either
-            as a static or shared library (details and usage examples are in
-sources/android/stlport/README). Prebuilt
-            binaries for STLport (static or shared) and GNU libstdc++ (static only) are also
-provided if you choose to
-            compile against those libraries instead of the default C++ STL implementation.
-            C++ Exceptions and RTTI are not supported in the default STL implementation. For more
-information, see
-            docs/CPLUSPLUS-SUPPORT.HTML.</li>
-
-            <li>Includes improvements to the <code>cpufeatures</code> helper library that improves
-reporting
-            of the CPU type (some devices previously reported ARMv7 CPU when the device really was
-an ARMv6). We
-            recommend developers that use this library to rebuild their applications then
-            upload to Google Play to benefit from the improvements.</li>
-
-            <li>Adds an EGL library that lets you create and manage OpenGL ES textures and
-              services.</li>
-
-            <li>Adds new sample applications, <code>native-plasma</code> and
-<code>native-activity</code>,
-            to demonstrate how to write a native activity.</li>
-
-            <li>Includes many bugfixes and other small improvements; see docs/CHANGES.html for a
-more
-              detailed list of changes.</li>
-          </ul>
-        </dd>
-      </dl>
-    </div>
-  </div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 4b</a> <em>(June 2010)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <dl>
-        <dt>NDK r4b notes:</dt>
-
-        <dd>
-          <p>Includes fixes for several issues in the NDK build and debugging scripts &mdash; if
-          you are using NDK r4, we recommend downloading the NDK r4b build. For detailed
-          information describing the changes in this release, read the CHANGES.TXT document
-          included in the downloaded NDK package.</p>
-        </dd>
-      </dl>
-
-      <dl>
-        <dt>General notes:</dt>
-
-        <dd>
-          <ul>
-            <li>Provides a simplified build system through the new <code>ndk-build</code> build
-            command.</li>
-
-            <li>Adds support for easy native debugging of generated machine code on production
-            devices through the new <code>ndk-gdb</code> command.</li>
-
-            <li>Adds a new Android-specific ABI for ARM-based CPU architectures,
-            <code>armeabi-v7a</code>. The new ABI extends the existing <code>armeabi</code> ABI to
-            include these CPU instruction set extensions:
-
-              <ul>
-                <li>Thumb-2 instructions</li>
-
-                <li>VFP hardware FPU instructions (VFPv3-D16)</li>
-
-                <li>Optional support for ARM Advanced SIMD (NEON) GCC intrinsics and VFPv3-D32.
-                Supported by devices such as Verizon Droid by Motorola, Google Nexus One, and
-                others.</li>
-              </ul>
-            </li>
-
-            <li>Adds a new <code>cpufeatures</code> static library (with sources) that lets your
-            app detect the host device's CPU features at runtime. Specifically, applications can
-            check for ARMv7-A support, as well as VFPv3-D32 and NEON support, then provide separate
-            code paths as needed.</li>
-
-            <li>Adds a sample application, <code>hello-neon</code>, that illustrates how to use the
-            <code>cpufeatures</code> library to check CPU features and then provide an optimized
-            code path using NEON instrinsics, if supported by the CPU.</li>
-
-            <li>Lets you generate machine code for either or both of the instruction sets supported
-            by the NDK. For example, you can build for both ARMv5 and ARMv7-A architectures at the
-            same time and have everything stored to your application's final
-            <code>.apk</code>.</li>
-
-            <li>To ensure that your applications are available to users only if their devices are
-            capable of running them, Google Play now filters applications based on the
-            instruction set information included in your application &mdash; no action is needed on
-            your part to enable the filtering. Additionally, the Android system itself also checks
-            your application at install time and allows the installation to continue only if the
-            application provides a library that is compiled for the device's CPU architecture.</li>
-
-            <li>Adds support for Android 2.2, including a new stable API for accessing the pixel
-            buffers of {@link android.graphics.Bitmap} objects from native code.</li>
-          </ul>
-        </dd>
-      </dl>
-    </div>
-  </div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 3</a> <em>(March 2010)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <dl>
-        <dt>General notes:</dt>
-
-        <dd>
-          <ul>
-            <li>Adds OpenGL ES 2.0 native library support.</li>
-
-            <li>Adds a sample application,<code>hello-gl2</code>, that illustrates the use of
-            OpenGL ES 2.0 vertex and fragment shaders.</li>
-
-            <li>The toolchain binaries have been refreshed for this release with GCC 4.4.0, which
-            should generate slightly more compact and efficient machine code than the previous one
-            (4.2.1). The NDK also still provides the 4.2.1 binaries, which you can optionally use
-            to build your machine code.</li>
-          </ul>
-        </dd>
-      </dl>
-    </div>
-  </div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 2</a> <em>(September 2009)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <p>Originally released as "Android 1.6 NDK, Release 1".</p>
-
-      <dl>
-        <dt>General notes:</dt>
-
-        <dd>
-          <ul>
-            <li>Adds OpenGL ES 1.1 native library support.</li>
-
-            <li>Adds a sample application, <code>san-angeles</code>, that renders 3D graphics
-            through the native OpenGL ES APIs, while managing activity lifecycle with a {@link
-            android.opengl.GLSurfaceView} object.</li>
-          </ul>
-        </dd>
-      </dl>
-    </div>
-  </div>
-
-<div class="toggle-content closed">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
-      alt="">Android NDK, Revision 1</a> <em>(June 2009)</em>
-  </p>
-
-  <div class="toggle-content-toggleme">
-      <p>Originally released as "Android 1.5 NDK, Release 1".</p>
-
-      <dl>
-        <dt>General notes:</dt>
-
-        <dd>
-          <ul>
-            <li>Includes compiler support (GCC) for ARMv5TE instructions, including Thumb-1
-            instructions.</li>
-
-            <li>Includes system headers for stable native APIs, documentation, and sample
-            applications.</li>
-          </ul>
-        </dd>
-      </dl>
-    </div>
-  </div>
-
-
-
-
-
-<!-- ####################### END OF RELEASE NOTES ####################### -->
diff --git a/docs/html/ndk/guides/_book.yaml b/docs/html/ndk/guides/_book.yaml
deleted file mode 100644
index c015d7a..0000000
--- a/docs/html/ndk/guides/_book.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
-toc:
-- title: Getting Started
-  path: /ndk/guides/index.html
-  section:
-  - title: Setup
-    path: /ndk/guides/setup.html
-  - title: Concepts
-    path: /ndk/guides/concepts.html
-
-- title: Building
-  path: /ndk/guides/build.html
-  section:
-  - title: Android.mk
-    path: /ndk/guides/android_mk.html
-  - title: Application.mk
-    path: /ndk/guides/application_mk.html
-  - title: ndk-build
-    path: /ndk/guides/ndk-build.html
-  - title: Standalone Toolchain
-    path: /ndk/guides/standalone_toolchain.html
-
-- title: Architectures and CPUs
-  path: /ndk/guides/arch.html
-  section:
-  - title: ABI Management
-    path: /ndk/guides/abis.html
-  - title: NEON
-    path: /ndk/guides/cpu-arm-neon.html
-  - title: x86
-    path: /ndk/guides/x86.html
-  - title: x86-64
-    path: /ndk/guides/x86-64.html
-  - title: MIPS
-    path: /ndk/guides/mips.html
-  - title: The cpufeatures Library
-    path: /ndk/guides/cpu-features.html
-
-- title: Debugging
-  path: /ndk/guides/debug.html
-  section:
-  - title: ndk-gdb
-    path: /ndk/guides/ndk-gdb.html
-  - title: ndk-stack
-    path: /ndk/guides/ndk-stack.html
-
-- title: Libraries
-  path: /ndk/guides/libs.html
-  section:
-  - title: Prebuilt Libraries
-    path: /ndk/guides/prebuilts.html
-  - title: C++ Support
-    path: /ndk/guides/cpp-support.html
-  - title: Stable APIs
-    path: /ndk/guides/stable_apis.html
-
-- title: Audio
-  path: /ndk/guides/audio/index.html
-  section:
-  - title: Basics
-    path: /ndk/guides/audio/basics.html
-  - title: OpenSL ES for Android
-    path: /ndk/guides/audio/opensl-for-android.html
-  - title: Audio Input Latency
-    path: /ndk/guides/audio/input-latency.html
-  - title: Audio Output Latency
-    path: /ndk/guides/audio/output-latency.html
-  - title: Floating-Point Audio
-    path: /ndk/guides/audio/floating-point.html
-  - title: Sample Rates
-    path: /ndk/guides/audio/sample-rates.html
-  - title: OpenSL ES Programming Notes
-    path: /ndk/guides/audio/opensl-prog-notes.html
-
-- title: Vulkan
-  path: /ndk/guides/graphics/index.html
-  section:
-  - title: Getting Started
-    path: /ndk/guides/graphics/getting-started.html
-  - title: Design Guidelines
-    path: /ndk/guides/graphics/design-notes.html
-  - title: Shader Compilers
-    path: /ndk/guides/graphics/shader-compilers.html
-  - title: Validation Layers
-    path: /ndk/guides/graphics/validation-layer.html
diff --git a/docs/html/ndk/guides/abis.jd b/docs/html/ndk/guides/abis.jd
deleted file mode 100644
index 306cfdb..0000000
--- a/docs/html/ndk/guides/abis.jd
+++ /dev/null
@@ -1,469 +0,0 @@
-page.title=ABI Management
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#sa">Supported ABIs</a></li>
-        <li><a href="#gc">Generating Code for a Specific ABI</a></li>
-        <li><a href="#am">ABI Management on the Android Platform</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>Different Android handsets use different CPUs, which in turn support different instruction sets.
-Each combination of CPU and instruction sets has its own Application Binary Interface, or
-<i>ABI</i>. The ABI defines, with great precision, how an application's machine code is supposed to
-interact with the system at runtime. You must specify an ABI for each CPU architecture you want
-your app to work with.</p>
-
-<p>A typical ABI includes the following information:</p>
-
-<ul>
-<li>The CPU instruction set(s) that the machine code should use.</li>
-<li>The endianness of memory stores and loads at runtime.</li>
-<li>The format of executable binaries, such as programs and shared libraries, and
-the types of content they support.</li>
-<li>Various conventions for passing data between your code and the system.
-These conventions include alignment constraints, as well as how the system uses the stack and
-registers when it calls functions.</li>
-<li>The list of function symbols available to your machine code at runtime,
-generally from very specific sets of libraries.</li>
-</ul>
-
-<p>This page enumerates the ABIs that the NDK supports, and provides information about how each ABI
-works.</p>
-
-<h2 id="sa">Supported ABIs</h2>
-
-<p>Each ABI supports one or more instruction sets. Table 1 provides an at-a-glance overview of
-the instruction sets each ABI supports.</p>
-
-<p class="table-caption" id="abi-table">
-  <strong>Table 1.</strong> ABIs and supported instruction sets.</p>
-
-<table>
-<tr>
-<th>ABI</th>
-<th>Supported Instruction Set(s)</th>
-<th>Notes</th>
-</tr>
-
-<tr>
-<td><a href="#armeabi">{@code armeabi}</a> </td>
-<td><li>ARMV5TE and later</li>
-<li>Thumb-1</li></td>
-<td>No hard float.</td>
-</tr>
-
-<tr>
-<td><a href="#v7a">{@code armeabi-v7a}</a></td>
-<td>
-<li>armeabi</li>
-<li>Thumb-2</li>
-<li>VFPv3-D16</li>
-<li>Other, optional</li></td>
-<td>Incompatible with ARMv5, v6 devices.</td>
-</tr>
-
-<tr>
-<td><a href="#arm64-v8a">{@code arm64-v8a}</a></td>
-<td><li>AArch-64</li></td>
-</tr>
-
-<tr>
-<td>
-<a href="#x86">{@code x86}</a></td>
-<td><li>x86 (IA-32)</li>
-<li>MMX</li>
-<li>SSE/2/3</li>
-<li>SSSE3</li></td>
-<td>No support for MOVBE or SSE4.</td>
-</tr>
-
-<tr>
-<td><a href="#86-64">{@code x86_64}</a> </td>
-<td>
-<li>x86-64</li>
-<li>MMX</li>
-<li>SSE/2/3</li>
-<li>SSSE3</li>
-<li>SSE4.1, 4.2</li>
-<li>POPCNT</li></td>
-</tr>
-
-<tr>
-<td><a href="#mips">{@code mips}</a></td>
-<td><li>MIPS32r1 and later</li></td>
-<td>Uses hard-float, and assumes a CPU:FPU clock ratio of 2:1 for maximum
-compatibility. Provides neither micromips nor MIPS16.</td>
-</tr>
-
-<tr>
-<td><a href="#mips64">{@code mips64}</a></td>
-<td><li>MIPS64r6</li></td><td>
-</td>
-</tr>
-</table>
-
-<p>More detailed information about each ABI appears below.</p>
-
-<h3 id="armeabi">armeabi</h3>
-<p>This ABI is for ARM-based CPUs that support at least
-the ARMv5TE instruction set. Please refer to the following documentation for
-more details:</p>
-
-<ul>
-<li><a href="https://www.scss.tcd.ie/~waldroj/3d1/arm_arm.pdf">ARM Architecture
-Reference Manual</a></li>
-<li><a
-href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf">
-Procedure Call Standard for the ARM Architecture</a></li>
-<li><a
-href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf">
-ARM ELF File Format</a></li>
-<li><a
-href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html">Application Binary Interface (ABI) for the ARM Architecture</a></li>
-<li><a
-href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0037c/IHI0037C_bpabi.pdf">
-Base Platform ABI for the ARM Architecture</a></li>
-<li><a
-href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0039c/IHI0039C_clibabi.pdf">
-C Library ABI for the ARM Architecture</a></li>
-<li><a
-href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0041d/index.html">
-C++ ABI for the ARM Architecture</a></li>
-<li><a
-href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043d/IHI0043D_rtabi.pdf">
-Run-time ABI for the ARM Architecture</a></li>
-<li><a href="http://www.sco.com/developers/gabi/2001-04-24/contents.html">ELF
-System V Application Binary Interface</a></li>
-<li><a href="http://mentorembedded.github.com/cxx-abi/abi.html">Generic/Itanium C++
-ABI</a></li>
-</ul>
-
-<p>The AAPCS standard defines EABI as a family of similar
-but distinct ABIs. Also, Android follows the little-endian
-<a href="http://sourcery.mentor.com/sgpp/lite/arm/portal/kbattach142/arm_gnu_linux_ abi.pdf">
-ARM GNU/Linux ABI</a>.</p>
-
-<p>This ABI does not support hardware-assisted floating point
-computations. Instead, all floating-point operations use software helper
-functions from the compiler's {@code libgcc.a} static library.</p>
-
-<p>The armeabi ABI supports ARM’s
-<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0210c/CACBCAAE.html">
-Thumb (a.k.a. Thumb-1) instruction set</a>. The NDK generates Thumb
-code by default unless you specify different behavior using the
-<code>LOCAL_ARM_MODE</code> variable in your
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
-file.</p>
-
-<h3 id="v7a">armeabi-v7a</h3>
-<p>This ABI extends armeabi to include several
-<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0406c/index.html">
-CPU instruction set extensions</a>. The instruction extensions that this Android-specific
-ABI supports are:</p>
-
-<ul>
-<li>The Thumb-2 instruction set extension, which provides performance comparable to 32-bit ARM
-instructions with similar compactness to Thumb-1.</li>
-<li>The VFP hardware-FPU instructions. More specifically, VFPv3-D16, which
-includes 16 dedicated 64-bit floating point registers, in addition to another
-16 32-bit registers from the ARM core.</li>
-</ul>
-
-<p>Other extensions that the v7-a ARM spec describes, including
-<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html">
-Advanced SIMD</a> (a.k.a. NEON), VFPv3-D32, and ThumbEE, are optional
-to this ABI. Since their presence is not guaranteed, the system should check at runtime
-whether the extensions are available. If they are not, you must use alternative code paths. This
-check is similar to the one that the system typically performs to check or use
-<a href="http://en.wikipedia.org/wiki/MMX_%28instruction_set%29">MMX</a>,
-<a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a>, and other specialized
-instruction sets on x86 CPUs.</p>
-
-<p>For information about how to perform these runtime checks, refer to
-<a href="{@docRoot}ndk/guides/cpu-features.html">The {@code cpufeatures} Library</a>.
-Also, for information about the NDK's support for building
-machine code for NEON, see
-<a href="{@docRoot}ndk/guides/cpu-arm-neon.html">NEON Support</a>.</p>
-
-<p>The {@code armeabi-v7a} ABI uses the {@code -mfloat-abi=softfp} switch to
-enforce the rule that the compiler must pass all double values in core register pairs during
-function calls, instead of dedicated floating-point ones. The system can perform all internal
-computations using the FP registers. Doing so speeds up the computations greatly.</p>
-
-<h3 id="arm64-v8a">arm64-v8a</h3>
-<p>This ABI is for ARMv8-based CPUs that support AArch64. It also includes the NEON and
-VFPv4 instruction sets.</p>
-
-<p>For more information, see the
-<a href="http://www.arm.com/files/downloads/ARMv8_Architecture.pdf">ARMv8
-Technology Preview</a>, and contact ARM for further details.</p>
-
-<h3 id="x86">x86</h3>
-<p>This ABI is for CPUs supporting the instruction set commonly
-referred to as "x86" or "IA-32". Characteristics of this ABI include:</p>
-
-<ul>
-<li>Instructions normally generated by GCC with compiler flags such as the following:
-
-<pre class="no-pretty-print">
--march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32
-</pre>
-
-<p>These flags target the the Pentium Pro instruction set, along with the
-the <a href="http://en.wikipedia.org/wiki/MMX_%28instruction_set%29">MMX</a>,
-<a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>,
-<a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a>,
-<a href="http://en.wikipedia.org/wiki/SSE3">SSE3</a>, and
-<a href="http://en.wikipedia.org/wiki/SSSE3">SSSE3</a> instruction set extensions.
-The generated code is an optimization balanced across the top Intel 32-bit
-CPUs.</p>
-<p> For more information on compiler flags, particularly related to performance optimization,
-refer to <a href="http://software.intel.com/blogs/2012/09/26/gcc-x86-performance-hints">GCC
-x86 performance hints</a>.</p>
-</li>
-<li>Use of the standard Linux x86 32-bit calling convention, as opposed to the one for SVR. For
-more information, see section 6, "Register Usage", of
-<a href="http://www.agner.org/optimize/calling_conventions.pdf">Calling conventions for different
-C++ compilers and operating systems</a>.</li>
-</ul>
-
-<p>The ABI does not include any other optional IA-32 instruction set
-extensions, such as:</p>
-<ul>
-<li>MOVBE</li>
-<li>Any variant of SSE4.</li>
-</ul>
-<p>You can still use these extensions, as long as you use runtime feature-probing to
-enable them, and provide fallbacks for devices that do not support them.</p>
-<p>The NDK toolchain assumes 16-byte stack alignment before a function call. The default tools and
-options enforce this rule. If you are writing assembly code, you must make sure to maintain stack
-alignment, and ensure that other compilers also obey this rule.</p>
-
-<p>Refer to the following documents for more details:</p>
-<ul>
-<li>
-<a href="https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html">
-GCC online documentation: Intel 386 and AMD x86-64 Options</a></li>
-<li><a href="http://www.agner.org/optimize/calling_conventions.pdf">Calling
-conventions for different C++ compilers and operating systems</a></li>
-<li><a
-href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf"
->Intel IA-32 Intel Architecture Software Developer's Manual, Volume 2:
-Instruction Set Reference</a></li>
-<li><a
-href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf">Intel
-IA-32 Intel Architecture Software Developer's Manual, Volume 3: System
-Programming Guide</a></li>
-<li><a href="http://www.sco.com/developers/devspecs/abi386-4.pdf">System V Application Binary
-Interface: Intel386 Processor Architecture Supplement</a></li>
-</ul>
-
-<h3 id="86-64">x86_64</h3>
-<p>This ABI is for CPUs supporting the instruction set commonly referred to as
-"x86-64." It supports instructions that GCC typically generates with the following
-compiler flags:</p>
-<pre class="no-pretty-print">
--march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel
-</pre>
-
-<p>These flags target the x86-64 instruction set, according to the GCC
-documentation. along with the
-<a href="http://en.wikipedia.org/wiki/MMX_%28instruction_set%29">MMX</a>,
-<a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a>,
-<a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a>,
-<a href="http://en.wikipedia.org/wiki/SSE3">SSE3</a>,
-<a href="http://en.wikipedia.org/wiki/SSSE3">SSSE3</a>,
-<a href="http://en.wikipedia.org/wiki/SSE4#SSE4.1">SSE4.1</a>,
-<a href="http://en.wikipedia.org/wiki/SSE4#SSE4.2">SSE4.2</a>, and
-<a href="https://software.intel.com/en-us/node/512035">POPCNT</a>
-instruction-set extensions. The generated code is an optimization balanced
-across the top Intel 64-bit CPUs.</p>
-
-<p> For more information on compiler flags, particularly related to performance optimization,
-refer to <a href="http://software.intel.com/blogs/2012/09/26/gcc-x86-performance-hints">GCC
-x86 Performance</a>.</p>
-
-<p>This ABI does not include any other optional x86-64 instruction set
-extensions, such as:</p>
-
-<ul>
-<li>MOVBE</li>
-<li>SHA</li>
-<li>AVX</li>
-<li>AVX2</li>
-</ul>
-
-<p>You can still use these extensions, as long as you use runtime feature probing to
-enable them, and provide fallbacks for devices that do not support them.</p>
-<p>Refer to the following documents for more details:</p>
-
-<ul>
-<li><a href="http://www.agner.org/optimize/calling_conventions.pdf">Calling conventions for
-different C++ compilers and operating systems</a></li>
-<li>
-<a href="http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html?iid=tech_vt_tech+64-32_manuals">
-Intel64 and IA-32 Architectures Software Developer's Manual, Volume 2: Instruction Set
-Reference</a></li>
-<li>
-<a href="http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html?iid=tech_vt_tech+64-32_manuals">
-Intel64 and IA-32 Intel Architecture Software Developer's Manual Volume 3: System Programming</a>
-</li>
-</ul>
-
-<h3 id="mips">mips</h3>
-<p>This ABI is for MIPS-based CPUs that support at least the MIPS32r1 instruction set. It includes
-the following features:</p>
-
-<ul>
-<li>MIPS32 revision 1 ISA</li>
-<li>Little-endian</li>
-<li>O32</li>
-<li>Hard-float</li>
-<li>No DSP application-specific extensions</li>
-</ul>
-
-<p>For more information, please refer to the following documentation:</p>
-
-<ul>
-<li>Architecture for Programmers ("MIPSARCH")</li>
-<li><a href="https://refspecs.linuxbase.org/elf/gabi4+/contents.html">ELF
-System V Application Binary Interface</a></li>
-<li><a href="http://sourcery.mentor.com/public/cxx-abi/abi.html">Itanium/Generic C++
-ABI</a></li>
-</ul>
-
-<p>For more specific details, see
-<a href="http://www.imgtec.com/mips/architectures/mips32/">MIPS32 Architecture</a>.
-Answers to common questions are in the
-<a href="https://sourcery.mentor.com/sgpp/lite/mips/portal/target_arch?@action=faq&amp;target_arch=MIPS">MIPS FAQ</a>.
-</p>
-</li>
-</ul>
-
-<h3 id="mips64">mips64</h3>
-<p>This ABI is for MIPS64 R6. For more information, see
-<a href="http://www.imgtec.com/mips/architectures/mips64/">MIPS64 Architecture</a>.</p>
-
-<h2 id="gc">Generating Code for a Specific ABI</h2>
-<p>By default, the NDK generates machine code for the armeabi ABI. You can
-generate ARMv7-a-compatible machine code, instead, by adding the following line
-to your <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file.</p>
-<pre class="no-pretty-print">
-APP_ABI := armeabi-v7a
-</pre>
-
-<p>To build machine code for two or more distinct ABIs, using spaces as delimiters. For
-example:</p>
-
-<pre class="no-pretty-print">
-APP_ABI := armeabi armeabi-v7a
-</pre>
-
-<p>This setting tells the NDK to build two versions of your machine code: one
-for each ABI listed on this line. For more information on the values you can specify for the
-{@code APP_ABI} variable, see <a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.
-</p>
-
-<p>When you build multiple machine-code versions, the build system copies the libraries to your
-application project path, and ultimately packages them into your APK, so creating
-a <a href="http://en.wikipedia.org/wiki/Fat_binary"><i>fat binary</i></a>. A fat binary
-is larger than one containing only the machine code for a single system; the tradeoff is
-gaining wider compatibility, but at the expense of a larger APK.</p>
-
-<p>At installation time, the package manager unpacks only the most appropriate
-machine code for the target device. For details, see <a href="#aen">Automatic
-extraction of native code at install time</a>.</p>
-
-
-<h2 id="am">ABI Management on the Android Platform</h2>
-<p>This section provides details about how the Android platform manages native
-code in APKs.</p>
-
-<h3>Native code in app packages</h3>
-<p>Both the Play Store and Package Manager expect to find NDK-generated
-libraries on filepaths inside the APK matching the following pattern:</p>
-
-<pre class="no-pretty-print">
-/lib/&lt;abi&gt;/lib&lt;name&gt;.so
-</pre>
-
-<p>Here, {@code <abi>} is one of the ABI names listed under <a href="#sa">Supported ABIs</a>,
-and {@code <name>} is the name of the library as you defined it for the {@code LOCAL_MODULE}
-variable in the <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file. Since
-APK files are just zip files, it is trivial to open them and confirm that the shared native
-libraries are where they belong.</p>
-
-<p>If the system does not find the native shared libraries where it expects them, it cannot use
-them. In such a case, the app itself has to copy the libraries over, and then
-perform <code>dlopen()</code>.</p>
-
-<p>In a fat binary, each library resides under a directory whose name matches a corresponding ABI.
-For example, a fat binary may contain:</p>
-
-<pre class="no-pretty-print">
-/lib/armeabi/libfoo.so
-/lib/armeabi-v7a/libfoo.so
-/lib/arm64-v8a/libfoo.so
-/lib/x86/libfoo.so
-/lib/x86_64/libfoo.so
-/lib/mips/libfoo.so
-/lib/mips64/libfoo.so
-</pre>
-
-<p class="note"><strong>Note:</strong> ARMv7-based Android devices running 4.0.3 or earlier
-install native libraries from the {@code armeabi} directory instead of the {@code armeabi-v7a}
-directory if both directories exist. This is because {@code /lib/armeabi/} comes after
-{@code /lib/armeabi-v7a/} in the APK. This issue is fixed from 4.0.4.</p>
-
-<h3>Android Platform ABI support</h3>
-<p>The Android system knows at runtime which ABI(s) it supports, because build-specific system
-properties indicate:</p>
-
-<ul>
-<li>The primary ABI for the device, corresponding to the machine code used in
-the system image itself.</li>
-<li>An optional, secondary ABI, corresponding to another ABI that the system image also supports.
-</li>
-</ul>
-
-<p>This mechanism ensures that the system extracts the best machine code from
-the package at installation time.</p>
-
-<p>For best performance, you should compile directly for the primary ABI. For example, a
-typical ARMv5TE-based device would only define the primary ABI: {@code armeabi}. By contrast, a
-typical, ARMv7-based device would define the primary ABI as {@code armeabi-v7a} and the secondary
-one as {@code armeabi}, since it can run application native binaries generated for each of them.</p>
-
-<p>Many x86-based devices can also run {@code armeabi-v7a} and {@code armeabi} NDK binaries. For
-such devices, the primary ABI would be {@code x86}, and the second one, {@code armeabi-v7a}.</p>
-
-<p>A typical MIPS-based device only defines a primary abi: {@code mips}.</p>
-
-<h3 id="aen">Automatic extraction of native code at install time</h3>
-
-<p>When installing an application, the package manager service scans the APK, and looks for any
-shared libraries of the form:</p>
-
-<pre class="no-pretty-print">
-lib/&lt;primary-abi&gt;/lib&lt;name&gt;.so
-</pre>
-
-<p>If none is found, and you have defined a secondary ABI, the service scans for shared libraries of
-the form:</p>
-
-<pre class="no-pretty-print">
-lib/&lt;secondary-abi&gt;/lib&lt;name&gt;.so
-</pre>
-
-<p>When it finds the libraries that it's looking for, the package manager
-copies them to <code>/lib/lib&lt;name&gt;.so</code>, under the application's
-{@code data} directory ({@code data/data/<package_name>/lib/}).</p>
-
-<p>If there is no shared-object file at all, the application builds and installs, but crashes at
-runtime.</p>
diff --git a/docs/html/ndk/guides/android_mk.jd b/docs/html/ndk/guides/android_mk.jd
deleted file mode 100644
index 1416d13..0000000
--- a/docs/html/ndk/guides/android_mk.jd
+++ /dev/null
@@ -1,875 +0,0 @@
-page.title=Android.mk
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#over">Overview</a></li>
-        <li><a href="#basics">Basics</a></li>
-        <li><a href="#var">Variables and Macros</a></li>
-        <li><a href="#mdv">Module-Description Variables</a></li>
-      </ol>
-    </div>
-  </div>
-
-
-<p>This page describes the syntax of the {@code Android.mk} build file,
-which glues your C and C++ source files to the Android NDK.</p>
-
-<h2 id="over">Overview</h2>
-<p>The {@code Android.mk} file resides in a subdirectory of your project's {@code jni/} directory,
-and describes your sources and shared libraries to the build system. It is really a tiny GNU
-makefile fragment that the build system parses once or more. The {@code Android.mk} file is useful
-for defining project-wide settings that <a href="{@docRoot}ndk/guides/application_mk.html">{@code
-Application.mk}</a>, the build system, and your
-environment variables leave undefined. It can also override project-wide settings for specific
-<i>modules</i>.</p>
-
-<p>The syntax of the {@code Android.mk} allows you to group your sources into
-<em>modules</em>. A module is either a static library, a shared library, or a standalone
-executable. You can define one or more modules in each {@code Android.mk} file, and
-you can use the same source file in multiple modules. The build system only places shared libraries
-into your application package. In addition, static libraries can generate shared libraries.</p>
-
-<p>In addition to packaging libraries, the build system handles a variety of other details for you.
-For example, you don't need to list header files or explicit dependencies between generated files in
-your {@code Android.mk} file. The NDK build system computes these relationships automatically for
-you. As a result, you should be able to benefit from new toolchain/platform support in future NDK
-releases without having to touch your {@code Android.mk} file.</p>
-
-<p>The syntax of this file is very close to that used in the {@code Android.mk} files distributed with
-the full <a href="https://source.android.com">Android Open Source Project</a>. While the
-build system implementation that uses them is different, their similarity is an
-intentional design decision aimed at making it easier for application
-developers to reuse source code for external libraries.</p>
-
-<h2 id="basics">Basics</h2>
-<p>Before exploring the syntax in detail, it is useful to start by understanding the basics
-of what a {@code Android.mk} file contains. This section uses the {@code Android.mk} file in the
-Hello-JNI sample toward that end, explaining the role that each line in the file plays.</p>
-
-
-<p>An {@code Android.mk} file must begin by defining the {@code LOCAL_PATH} variable:
-
-<pre class="no-pretty-print">
-LOCAL_PATH := $(call my-dir)
-</pre>
-
-<p>This variable indicates the location of the source files in the development tree. Here, the macro
-function {@code my-dir}, provided by the build system, returns the path of the current directory
-(the directory containing the {@code Android.mk} file itself).</p>
-
-<p>The next line declares the {@code CLEAR_VARS} variable, whose value the build system provides.
-
-<pre class="no-pretty-print">
-include $(CLEAR_VARS)
-</pre>
-
-<p>The {@code CLEAR_VARS} variable points to a special GNU Makefile that clears many
-{@code LOCAL_XXX} variables for you, such as {@code LOCAL_MODULE}, {@code LOCAL_SRC_FILES}, and
-{@code LOCAL_STATIC_LIBRARIES}. Note that it does not clear {@code LOCAL_PATH}. This variable must
-retain its value because the system parses all build control files in a single GNU Make execution
-context where all variables are global. You must (re-)declare this variable before describing each
-module.</p>
-
-<p>Next, the {@code LOCAL_MODULE} variable stores the name of the module that you wish to build.
-Use this variable once per module in your application.</p>
-
-<pre class="no-pretty-print">
-LOCAL_MODULE := hello-jni
-</pre>
-
-<p>Each module name must be unique and not contain any spaces. The build system, when it
-generates the final shared-library file, automatically adds the proper prefix and suffix to
-the name that you assign to {@code LOCAL_MODULE}. For example, the example that appears above
-results in generation of a library called {@code libhello-jni.so}.</p>
-
-<p class="note"><strong>Note:</strong> If your module's name already starts with {@code lib}, the
-build system does not prepend an additional {@code lib} prefix; it takes the module name as-is, and
-adds the {@code .so} extension. So a source file originally called, for example, {@code libfoo.c}
-still produces a shared-object file called {@code libfoo.so}. This behavior is to support libraries
-that the Android platform sources generate from {@code Android.mk} files; the names of all such
-libraries start with {@code lib}.</p>
-
-<p>The next line enumerates the source files, with spaces delimiting multiple files:</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES := hello-jni.c
-</pre>
-
-<p>The {@code LOCAL_SRC_FILES} variable must contain a list of C and/or C++ source files to build
-into a module.</p>
-
-<p>The last line helps the system tie everything together:</p>
-
-<pre class="no-pretty-print">
-include $(BUILD_SHARED_LIBRARY)
-</pre>
-
-<p>The {@code BUILD_SHARED_LIBRARY} variable points to a GNU Makefile script that collects all the
-information you defined in {@code LOCAL_XXX} variables since the most recent {@code include}. This
-script determines what to build, and how to do it.</p>
-
-<p>There are more complex examples in the samples directories, with commented
-{@code Android.mk} files that you can look at. In addition,
-<a href="{@docRoot}ndk/samples/sample_na.html">Sample: native-activity</a> provides
-a detailed explanation of that sample's {@code Android.mk} file. Finally, <a href="#var">
-Variables and Macros</a> provides further information on the variables from this section.
-
-
-<h2 id="var">Variables and Macros</h2>
-<p>The build system provides many possible variables for use in the the {@code Android.mk} file.
-Many of these variables come with preassigned values. Others, you assign.</p>
-
-<p>In addition to these variables, you can also define your own arbitrary ones. If you do so, keep
-in mind that the NDK build system reserves the following variable names:</p>
-<ul>
-<li>Names that begin with {@code LOCAL_}, such as {@code LOCAL_MODULE}.</li>
-<li>Names that begin with {@code PRIVATE_}, {@code NDK_}, or {@code APP}. The build system uses
-these internally.</li>
-<li>Lower-case names, such as {@code my-dir}. The build system uses these internally, as well.</li>
-</ul>
-<p>If you need to define your own convenience variables in an {@code Android.mk} file, we
-recommend prepending {@code MY_} to their names.
-
-
-<h3 id="npv">NDK-defined variables</h3>
-<p>This section discusses the GNU Make variables that the build system defines before parsing your
-{@code Android.mk} file. Under certain circumstances, the NDK might parse your {@code Android.mk}
-file several times, using a different definition for some of these variables each time.</p>
-
-<h4>CLEAR_VARS</h4>
-<p>This variable points to a build script that undefines nearly all {@code LOCAL_XXX} variables
-listed in the "Developer-defined variables" section below. Use this variable to include
-this script before describing a new module. The syntax for using it is:</p>
-
-<pre class="no-pretty-print">
-include $(CLEAR_VARS)
-</pre>
-
-<h4>BUILD_SHARED_LIBRARY</h4>
-<p>This variable points to a build script that collects all the information about the module
-you provided in your {@code LOCAL_XXX} variables, and determines how to build a target shared
-library from the sources you listed. Note that using this script requires that you have already
-assigned values to {@code LOCAL_MODULE} and {@code LOCAL_SRC_FILES}, at a minimum (for more
-information about these variables, see <a href = "#mdv">Module-Description Variables</a>).</p>
-
-<p>The syntax for using this variable is:</p>
-
-<pre class="no-pretty-print">
-include $(BUILD_SHARED_LIBRARY)
-</pre>
-
-<p>A shared-library variable causes the build system to generate a library file with a {@code .so}
-extension.</p>
-
-<h4>BUILD_STATIC_LIBRARY</h4>
-<p>A variant of {@code BUILD_SHARED_LIBRARY} that is used to build a static library. The build
-system does not copy static libraries into your project/packages, but it can use them to build
-shared libraries (see {@code LOCAL_STATIC_LIBRARIES} and {@code LOCAL_WHOLE_STATIC_LIBRARIES},
-below). The syntax for using this variable is:</p>
-
-<pre class="no-pretty-print">
-include $(BUILD_STATIC_LIBRARY)
-</pre>
-
-<p>A static-library variable causes the build system to generate a library with a {@code .a}
-extension.</p>
-
-<h4>PREBUILT_SHARED_LIBRARY</h4>
-<p>Points to a build script used to specify a prebuilt shared library. Unlike in the case of
-{@code BUILD_SHARED_LIBRARY} and {@code BUILD_STATIC_LIBRARY}, here the value of
-{@code LOCAL_SRC_FILES} cannot be a source file. Instead, it must be a single path to a prebuilt
-shared library, such as {@code foo/libfoo.so}. The syntax for using this variable is:</p>
-
-<pre class="no-pretty-print">
-include $(PREBUILT_SHARED_LIBRARY)
-</pre>
-
-<p>You can also reference a prebuilt library in another module by using the
-{@code LOCAL_PREBUILTS} variable. For more information about using prebuilts, see
-<a href="{@docRoot}ndk/guides/prebuilts.html">Using Prebuilt Libraries</a>.</p>
-
-
-<h4>PREBUILT_STATIC_LIBRARY</h4>
-<p>The same as {@code PREBUILT_SHARED_LIBRARY}, but for a prebuilt static library. For more
-information about using prebuilts, see <a href="{@docRoot}ndk/guides/prebuilts.html">Using Prebuilt
-Libraries</a>.</p>
-
-<h4>TARGET_ARCH</h4>
-<p>The name of the target CPU architecture as the Android Open Source Project specifies it.
-For any ARM-compatible build, use {@code arm}, independent of the CPU architecture revision or
-ABI (see TARGET_ARCH_ABI, below).</p>
-
-<p>The value of this variable is taken from the APP_ABI variable that you define in the
-{@code Android.mk} file, which the system reads ahead of parsing the {@code Android.mk} file.</p>
-
-<h4>TARGET_PLATFORM</h4>
-<p>The Android API level number for the build system to target.
-For example, the Android 5.1 system images correspond to Android API level 22: {@code android-22}.
-For a complete list of platform names and corresponding Android system
-images, see <a href="{@docRoot}ndk/guides/stable_apis.html">Android NDK Native APIs</a>.
-The following example shows the syntax for using this variable:</p>
-
-<pre class="no-pretty-print">
-TARGET_PLATFORM := android-22
-</pre>
-
-<h4 id="taa">TARGET_ARCH_ABI</h4>
-<p>This variable stores the name of the CPU and architecture to target when the build system
-parses this {@code Android.mk} file. You can specify one or more of the following values, using
-a space as a delimiter between multiple targets. Table 1 shows the ABI setting to use for each
-supported CPU and architecture.
-
-<p class="table-caption" id="table1">
-  <strong>Table 1.</strong> ABI settings for different CPUs and architectures.</p>
-<table>
-  <tr>
-    <th scope="col">CPU and architecture</th>
-    <th scope="col">Setting</th>
-  </tr>
-  <tr>
-    <td>ARMv5TE</td>
-    <td>{@code armeabi}</td>
-  </tr>
-  <tr>
-    <td>ARMv7</td>
-    <td>{@code armeabi-v7a}</td>
-  </tr>
-  <tr>
-    <td>ARMv8 AArch64</td>
-    <td>{@code arm64-v8a}</td>
-  </tr>
-  <tr>
-    <td>i686</td>
-    <td>{@code x86}</td>
-  </tr>
-  <tr>
-    <td>x86-64</td>
-    <td>{@code x86_64}</td>
-  </tr>
-  <tr>
-    <td>mips32 (r1)</td>
-    <td>{@code mips}</td>
-  </tr>
-  <tr>
-    <td>mips64 (r6)</td>
-    <td>{@code mips64}</td>
-  </tr>
-  <tr>
-    <td>All</td>
-    <td>{@code all}</td>
-  </tr>
-</table>
-
-<p>The following example shows how to set ARMv8 AArch64 as the target CPU-and-ABI combination:</p>
-
-<pre class="no-pretty-print">
-TARGET_ARCH_ABI := arm64-v8a
-</pre>
-
-<p class="note"><strong>Note: </strong> Up to Android NDK 1.6_r1, this variable is defined as
-{@code arm}.</p>
-
-<p>For more details about architecture ABIs and associated compatibility
-issues, refer to
-<a href="{@docRoot}ndk/guides/abis.html">ABI Management</a>.</p>
-
-<p>New target ABIs in the future will have different values.</p>
-
-<h4>TARGET_ABI</h4>
-<p>A concatenation of target Android API level and ABI, it is especially useful when you want to test against
-a specific target system image for a real device. For example, to specify a 64-bit ARM device
-running on Android API level 22:</p>
-
-<pre class="no-pretty-print">
-TARGET_ABI := android-22-arm64-v8a
-</pre>
-
-<p class="note"><strong>Note:</strong> Up to Android NDK 1.6_r1, the default value was
-{@code android-3-arm}.</p>
-
-<h2 id="mdv">Module-Description Variables</h2>
-<p>The variables in this section describe your module to the build system. Each module description
-should follow this basic flow:
-<ul>
-<ol type = "1">
-<li>Initialize or undefine the variables associated with the module, using the {@code CLEAR_VARS}
-  variable.</li>
-<li>Assign values to the variables used to describe the module.
-<li>Set the NDK build system to use the appropriate build script for the module, using the
-  {@code BUILD_XXX} variable.</li>
-</ol>
-</ul>
-
-<h4>LOCAL_PATH</h4>
-<p>This variable is used to give the path of the current file. You must define
-it at the start of your {@code Android.mk} file. The following example shows how to do so:</p>
-
-<pre class="no-pretty-print">
-LOCAL_PATH := $(call my-dir)
-</pre>
-
-<p>The script to which {@code CLEAR_VARS} points does not clear this variable. Therefore, you only need
-to define it a single time, even if your {@code Android.mk} file describes multiple modules.</p>
-
-<h4>LOCAL_MODULE</h4>
-<p>This variable stores the name of your module. It must be unique among all module names,
-and must not contain any spaces. You must define it before including any scripts (other than
-the one for {@code CLEAR_VARS}). You need not add either the {@code lib} prefix
-or the {@code .so} or {@code .a} file extension; the build system makes these modifications
-automatically. Throughout your {@code Android.mk} and
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> files, refer to
-your module by its unmodified name. For example, the following line results in the generation of a
-shared library module called {@code libfoo.so}:</p>
-
-<pre class="no-pretty-print">
-LOCAL_MODULE := "foo"
-</pre>
-
-<p>If you want the generated module to have a name other than {@code lib} + the value of
-{@code LOCAL_MODULE}, you can use the {@code LOCAL_MODULE_FILENAME} variable to give the
-generated module a name of your own choosing, instead.</p>
-
-<h4>LOCAL_MODULE_FILENAME</h4>
-<p>This optional variable allows you to override the names that the build system
-uses by default for files that it generates. For example, if the name of your {@code LOCAL_MODULE}
-is {@code foo}, you can force the system to call the file it generates {@code libnewfoo}. The
-following example shows how to accomplish this:</p>
-
-<pre class="no-pretty-print">
-LOCAL_MODULE := foo
-LOCAL_MODULE_FILENAME := libnewfoo
-</pre>
-
-<p>For a shared library module, this example would generate a file called {@code libnewfoo.so}.</p>
-
-<p class="note"><strong>Note:</strong> You cannot override filepath or file extension.</p>
-
-<h4>LOCAL_SRC_FILES</h4>
-<p>This variable contains the list of source files that the build system uses to generate the
-module. Only list the files that the build system actually passes to the compiler, since the build
-system automatically computes any associated depencies.</p>
-<p>Note that you can use both relative (to {@code LOCAL_PATH}) and absolute file paths.
-
-<p>We recommend avoiding absolute file paths; relative paths make your {@code Android.mk} file more
-portable.</p>
-
-<p class="note"><strong>Note: </strong> Always use Unix-style forward slashes (/) in build files.
-The build system does not handle Windows-style backslashes (\) properly.</p>
-
-<h4>LOCAL_CPP_EXTENSION</h4>
-<p>You can use this optional variable to indicate a file extension other than {@code .cpp} for your
-C++ source files. For example, the following line changes the extension to {@code .cxx}.
-(The setting must include the dot.)
-
-<pre class="no-pretty-print">
-LOCAL_CPP_EXTENSION := .cxx
-</pre>
-
-<p>From NDK r7, you can use this variable to specify multiple extensions. For instance:</p>
-
-<pre class="no-pretty-print">
-LOCAL_CPP_EXTENSION := .cxx .cpp .cc
-</pre>
-
-<h4>LOCAL_CPP_FEATURES</h4>
-
-<p>You can use this optional variable to indicate that your code relies on specific C++ features.
-It enables the right compiler and linker flags during the build process. For prebuilt binaries,
-this variable also declares which features the binary depends on, thus helping ensure the final
-linking works correctly. We recommend that you use this variable instead of enabling
-{@code -frtti} and {@code -fexceptions} directly in your {@code LOCAL_CPPFLAGS} definition.</p>
-
-<p>Using this variable allows the build system to use the appropriate flags for each module. Using
-{@code LOCAL_CPPFLAGS} causes the compiler to use all specified flags for all modules, regardless
-of actual need.</p>
-
-For example, to indicate that your code uses RTTI (RunTime Type Information), write: </p>
-
-<pre class="no-pretty-print">
-LOCAL_CPP_FEATURES := rtti
-</pre>
-
-<p>To indicate that your code uses C++ exceptions, write:</p>
-
-<pre class="no-pretty-print">
-LOCAL_CPP_FEATURES := exceptions
-</pre>
-
-<p>You can also specify multiple values for this variable. For example:</p>
-
-<pre class="no-pretty-print">
-LOCAL_CPP_FEATURES := rtti features
-</pre>
-
-The order in which you describe the values does not matter.
-
-
-<h4>LOCAL_C_INCLUDES</h4>
-<p>You can use this optional variable to specify a list of paths, relative to the
-NDK {@code root} directory, to add to the include search path when compiling all sources
-(C, C++ and Assembly). For example: </p>
-
-<pre class="no-pretty-print">
-LOCAL_C_INCLUDES := sources/foo
-</pre>
-
-<p>Or even: </p>
-
-<pre class="no-pretty-print">
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/<subdirectory>/foo
-</pre>
-
-<p>Define this variable before setting any corresponding inclusion flags via {@code LOCAL_CFLAGS}
-or {@code LOCAL_CPPFLAGS}.</p>
-
-<p>The build system also uses {@code LOCAL_C_INCLUDES} paths automatically when launching native
-debugging with ndk-gdb.</p>
-
-
-<h4>LOCAL_CFLAGS</h4>
-
-<p>This optional variable sets compiler flags for the build system to pass when building C
-<em>and</em> C++ source files. The ability to do so can be useful for specifying additional macro
-definitions or compile options.</p>
-
-<p>Try not to change the optimization/debugging level in your {@code Android.mk} file.
-The build system can handle this setting automatically for you, using the relevant information
-in the <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file. Doing it
-this way allows the build system to generate useful data files used during debugging.</p>
-
-<p class="note"><strong>Note: </strong>In android-ndk-1.5_r1, the corresponding flags only applied
-to C source files, not C++ ones. They now match the full Android build system behavior.
-(You can now use {@code LOCAL_CPPFLAGS} to specify flags for C++ sources only.)</p>
-
-<p>It is possible to specify additional include paths by writing:
-
-<pre class="no-pretty-print">
-LOCAL_CFLAGS += -I&lt;path&gt;,
-</pre>
-
-It is better, however, to use {@code LOCAL_C_INCLUDES} for this purpose, since
-doing so also makes it possible to use the paths available for native debugging with ndk-gdb.</p>
-
-
-<h4>LOCAL_CPPFLAGS</h4>
-<p>An optional set of compiler flags that will be passed when building C++
-source files <em>only</em>. They will appear after the LOCAL_CFLAGS on the
-compiler's command-line.</p>
-
-
-<p class="note"><strong>Note: </strong>In android-ndk-1.5_r1, the corresponding flags applied to
-both C and C++ sources. This has been corrected to match the full Android build system.
-To specify flags for both C and C++ sources, use {@code LOCAL_CFLAGS}.</p>
-
-
-<h4>LOCAL_STATIC_LIBRARIES</h4>
-
-<p>This variable stores the list of static libraries modules on which the current module depends.</p>
-
-<p>If the current module is a shared library or an executable, this variable will force
-these libraries to be linked into the resulting binary.</p>
-
-<p>If the current module is a static library, this variable simply indicates that other
-modules depending on the current one will also depend on the listed
-libraries.</p>
-
-<h4>LOCAL_SHARED_LIBRARIES</h4>
-
-<p>This variable is the list of shared libraries <em>modules</em> on which this module depends at
-runtime. This information is necessary at link time, and to embed the corresponding information
-in the generated file.</p>
-
-<h4>LOCAL_WHOLE_STATIC_LIBRARIES</h4>
-<p>This variable is a variant of {@code LOCAL_STATIC_LIBRARIES}, and expresses that the linker
-should treat the associated library modules as <em>whole archives</em>. For more information
-on whole archives, see the GNU linker's
-<a href="http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html">documentation</a> for the
-{@code --whole-archive} flag.</p>
-
-<p>This variable is useful when there are circular dependencies among
-several static libraries. When you use this variable to build a shared library, it will force
-the build system to add all object files from your static libraries to the final binary. The same
-is not true, however, when generating executables.</p>
-
-
-<h4>LOCAL_LDLIBS</h4>
-
-<p>This variable contains the list of additional linker flags for use in building your shared
-library or executable. It enables you to use the {@code -l} prefix to pass the name of specific
-system libraries. For example, the following example tells the linker to generate a module that
-links to {@code /system/lib/libz.so} at load time: </p>
-
-<pre class="no-pretty-print">
-LOCAL_LDLIBS := -lz
-</pre>
-
-<p>For the list of exposed system libraries against which you can link in this NDK release, see
-<a href="stable_apis.html">Android NDK Native APIs</a>.</p>
-
-<p class="note"><strong>Note: </strong> If you define this variable for a static library,
-the build system ignores it, and {@code ndk-build} prints a warning.</p>
-
-<h4>LOCAL_LDFLAGS</h4>
-
-<p>The list of other linker flags for the build system to use when building your shared library
-or executable. For example, the following example uses the {@code ld.bfd} linker on ARM/X86 GCC
-4.6+, on which {@code ld.gold} is the default </p>
-
-<pre class="no-pretty-print">
-LOCAL_LDFLAGS += -fuse-ld=bfd
-</pre>
-
-<p class="note"><strong>Note: </strong>If you define this variable for a static library, the build
-system ignores it, and ndk-build prints a warning.</p>
-
-<h4>LOCAL_ALLOW_UNDEFINED_SYMBOLS</h4>
-
-<p>By default, when the build system encounters an undefined reference encountered while trying to
-build a shared, it will throw an <em>undefined symbol</em> error. This error can help you catch
-catch bugs in your source code.</p>
-
-<p>To disable this check, set this variable to {@code true}. Note that this setting may cause the
-shared library to load at runtime.</p>
-
-<p class="note"><strong>Note: </strong> If you define this variable for a static library,
-the build system ignores it, and ndk-build prints a warning.</p>
-
-<h4>LOCAL_ARM_MODE</h4
->
-<p>By default, the build system generates ARM target binaries in <em>thumb</em> mode, where each
-instruction is 16 bits wide and linked with the STL libraries in the {@code thumb/} directory.
-Defining this variable as {@code arm} forces the build system to generate the module's object
-files in 32-bit {@code arm} mode. The following example shows how to do this:</p>
-
-<pre class="no-pretty-print">
-LOCAL_ARM_MODE := arm
-</pre>
-
-<p>You can also instruct the build system to only build specific sources in {@code arm} mode by
-appending {@code .arm} suffix to the the source filenames. For example, the following example
-tells the build system to always compile {@code bar.c} in ARM mode, but to build
-{@code foo.c} according to the value of {@code LOCAL_ARM_MODE}.</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES := foo.c bar.c.arm
-</pre>
-
-<p></p>
-
-<p class="note"><strong>Note: </strong> You can also force the build system to generate ARM binaries
-by setting {@code APP_OPTIM} in your
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file to {@code debug}.
-Specifying {@code debug} forces an ARM build because the toolchain debugger does not handle Thumb
-code properly.</p>
-
-
-<h4>LOCAL_ARM_NEON</h4>
-<p>This variable only matters when you are targeting the {@code armeabi-v7a} ABI. It allows the
-use of ARM Advanced SIMD (NEON) GCC intrinsics in your C and C++ sources, as well as NEON
-instructions in Assembly files.</p>
-
-<p>Note that not all ARMv7-based CPUs support the NEON instruction set extensions. For this reason,
-you must perform runtime detection to be able to safely use this code at runtime. For more
-information, see <a href="{@docRoot}ndk/guides/cpu-arm-neon.html">NEON Support</a> and <a
-href="{@docRoot}ndk/guides/cpu-features.html">The {@code cpufeatures} Library</a>.</p>
-
-<p>Alternatively, you can use the {@code .neon} suffix to specify that the build system only
-compile specific source files with NEON support. In the following example, the build system compiles
-{@code foo.c} with thumb and neon support, {@code bar.c} with thumb support, and
-{@code zoo.c} with support for ARM and NEON:</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES = foo.c.neon bar.c zoo.c.arm.neon
-</pre>
-
-
-<p>If you use both suffixes, {@code .arm} must precede {@code .neon}.</p>
-
-<h4>LOCAL_DISABLE_NO_EXECUTE</h4>
-
-<p>Android NDK r4 added support for the "NX bit" security feature. It is
-enabled by default, but you can disable it by setting this variable to {@code true}. We do not
-recommend doing so without a compelling reason.</p>
-
-<p>This feature does not modify the ABI, and is only enabled on kernels
-targeting ARMv6+ CPU devices. Machine code with this feature enabled
-will run unmodified on devices running earlier CPU architectures.</p>
-<p>For more information, see <a href="http://en.wikipedia.org/wiki/NX_bit">Wikipedia: NX bit</a>
-and <a href="http://www.gentoo.org/proj/en/hardened/gnu-stack.xml">The GNU stack kickstart</a>.
-
-<h4>LOCAL_DISABLE_RELRO</h4>
-
-<p>By default, the NDK compiles code with read-only relocations and GOT
-protection. This variable instructs the runtime linker to mark certain regions of memory
-as read-only after relocation, making certain security exploits (such as GOT overwrites)
-more difficult. Note that these protections are only effective on Android API level 16 and higher.
-On lower API levels, the code will still run, but without memory protections.</p>
-
-<p>This variable is turned on by default, but you can disable it by setting its value to
-{@code true}. We do not recommend doing so without a compelling reason.</p>
-
-<p>For more information, see
-<a href="http://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/">RELRO:
-RELocation Read-Only</a> and <a href="http://www.akkadia.org/drepper/nonselsec.pdf">Security
-enhancements in RedHat Enterprise Linux (section 6)</a>.</p>
-
-<h4>LOCAL_DISABLE_FORMAT_STRING_CHECKS</h4>
-
-<p>By default, the build system compiles code with format string protection. Doing so forces a
-compiler error if a non-constant format string is used in a {@code printf}-style function.</p>
-<p>This protection is on by default, but you can disable it by setting the value of
-this variable to {@code true}. We do not recommend doing so without a compelling reason.</p>
-
-
-<h4>LOCAL_EXPORT_CFLAGS</h4>
-
-<p>This variable records a set of C/C++ compiler flags to add to the {@code LOCAL_CFLAGS} definition
-of any other module that uses this one via the {@code LOCAL_STATIC_LIBRARIES} or
-{@code LOCAL_SHARED_LIBRARIES} variables.</p>
-
-<p>For example, consider the following pair of modules: {@code foo} and {@code bar}, which depends
-on {@code foo}:</p>
-
-<pre class="no-pretty-print">
-include $(CLEAR_VARS)
-LOCAL_MODULE := foo
-LOCAL_SRC_FILES := foo/foo.c
-LOCAL_EXPORT_CFLAGS := -DFOO=1
-include $(BUILD_STATIC_LIBRARY)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := bar
-LOCAL_SRC_FILES := bar.c
-LOCAL_CFLAGS := -DBAR=2
-LOCAL_STATIC_LIBRARIES := foo
-include $(BUILD_SHARED_LIBRARY)
-</pre>
-
-<p>Here, the build system passes the flags {@code -DFOO=1} and {@code -DBAR=2} to the compiler when
-building {@code bar.c}. It also prepends exported flags to your your module's {@code LOCAL_CFLAGS}
-so you can easily override them.</p>
-
-In addition, the relationship among modules is transitive: If {@code zoo} depends on
-{@code bar}, which in turn depends on {@code foo}, then {@code zoo} also inherits all flags
-exported from {@code foo}.</p>
-
-<p>Finally, the build system does not use exported flags when building locally (i.e., building the
-module whose flags it is exporting). Thus, in the example above, it does not pass {@code -DFOO=1}
-to the compiler when building {@code foo/foo.c}. To build locally, use {@code LOCAL_CFLAGS}
-instead.</p>
-
-<h4>LOCAL_EXPORT_CPPFLAGS</h4>
-<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, but for C++ flags only.</p>
-
-<h4>LOCAL_EXPORT_C_INCLUDES</h4>
-<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, but for C include paths. It is useful
-in cases where, for example, {@code bar.c} needs to include headers from module {@code foo}.</p>
-
-<h4>LOCAL_EXPORT_LDFLAGS</h4>
-<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, but for linker flags.</p>
-
-<h4>LOCAL_EXPORT_LDLIBS</h4>
-<p>This variable is the same as {@code LOCAL_EXPORT_CFLAGS}, telling the build system to pass names
-of specific system libraries to the compiler. Prepend {@code -l} to the name of each library you
-specify.</p>
-
-<p>Note that the build system appends imported linker flags to the value of your module's
-{@code LOCAL_LDLIBS} variable. It does this due to the way Unix linkers work.</p>
-
-<p>This variable is typically useful when module {@code foo} is a static library
-and has code that depends on a system library. You can then use {@code LOCAL_EXPORT_LDLIBS} to
-to export the dependency. For example: </p>
-
-<pre class="no-pretty-print">
-include $(CLEAR_VARS)
-LOCAL_MODULE := foo
-LOCAL_SRC_FILES := foo/foo.c
-LOCAL_EXPORT_LDLIBS := -llog
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := bar
-LOCAL_SRC_FILES := bar.c
-LOCAL_STATIC_LIBRARIES := foo
-include $(BUILD_SHARED_LIBRARY)
-</pre>
-
-<p>In this example, the build system puts {@code -llog} at the end of the linker command when it
-builds {@code libbar.so}. Doing so tells the linker that, because {@code libbar.so} depends
-on {@code foo}, it also depends on the system logging library.</p>
-
-<h4>LOCAL_SHORT_COMMANDS</h4>
-<p>Set this variable to {@code true} when your module has a very high
-number of sources and/or dependent static or shared libraries. Doing so forces the
-build system to use {@code @} syntax for archives containing intermediate object files
-or linking libraries.</p>
-
-<p>This feature can be useful on Windows, where the command line accepts a maximum of only
-of 8191 characters, which can be too small for complex projects. It also impacts the compilation of
-individual source files, placing nearly all compiler flags inside list files, too.</p>
-
-<p>Note that any value other than {@code true} will revert to the
-default behaviour. You can also define {@code APP_SHORT_COMMANDS} in your
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file to force this
-behavior for all modules in your project.</p>
-
-<p>We do not recommend enabling this feature by default, since it makes the build slower.</p>
-
-
-<h4>LOCAL_THIN_ARCHIVE</h4>
-
-<p>Set this variable to {@code true} when building static libraries.
-Doing so will generate a <strong>thin archive</strong>, a library file that does not contain
-object files, but instead just file paths to the actual objects that it would normally
-contain.</p>
-<p>This is useful to reduce the size of your build output. The drawback is that
-such libraries <em>cannot</em> be moved to a different location (all paths
-inside them are relative).</p>
-<p>Valid values are {@code true}, {@code false} or empty. A
-default value can be set in your <a href="{@docRoot}ndk/guides/application_mk.html">
-{@code Application.mk}</a> file through the {@code APP_THIN_ARCHIVE}
-
-variable.</p>
-<p class="note"><strong>Note:</strong> This is ignored for non-static library modules, or prebuilt
-static library ones.</p>
-
-<h4>LOCAL_FILTER_ASM</h4>
-<p>Define this variable as a shell command that the build system will use to filter the
-assembly files extracted or generated from the files you specified for {@code LOCAL_SRC_FILES}.</p>
-<p>Defining this variable causes the following things to occur:</p>
-
-<ul>
-<ol type = "1">
-<li>The build system generates a temporary assembly file from any C or C++ source file, instead of compiling them into an object file.</li>
-<li>The build system executes the shell command in {@code LOCAL_FILTER_ASM}
-on any temporary assembly file and on any assembly file
-listed in {@code LOCAL_SRC_FILES}, thus generating another temporary assembly
-file.</li>
-<li>The build system compiles these filtered assembly files into an object file.</li>
-</ol>
-</ul>
-<p>For example:</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES  := foo.c bar.S
-LOCAL_FILTER_ASM :=
-
-foo.c --1--&gt; $OBJS_DIR/foo.S.original --2--&gt; $OBJS_DIR/foo.S --3--&gt; $OBJS_DIR/foo.o
-bar.S                                 --2--&gt; $OBJS_DIR/bar.S --3--&gt; $OBJS_DIR/bar.o
-</pre>
-
-<p>"1" corresponds to the compiler, "2" to the filter, and "3" to the assembler. The filter must
-be a standalone shell command that takes the name of the input file as its first argument, and the
-name of the output file as the second one. For example:</p>
-
-<pre class="no-pretty-print">
-myasmfilter $OBJS_DIR/foo.S.original $OBJS_DIR/foo.S
-myasmfilter bar.S $OBJS_DIR/bar.S
-</pre>
-
-<h3 id="npfm">NDK-provided function macros</h2>
-<p>This section explains GNU Make function macros that the NDK provides. Use
-{@code $(call <function>)} to evaluate them; they return textual information.</p>
-
-<h4>my-dir</h4>
-
-<p>This macro returns the path of the last included makefile, which typically is the
-current {@code Android.mk}'s directory. {@code my-dir} is useful for defining
-{@code LOCAL_PATH} at the start of your {@code Android.mk} file. For example:</p>
-
-<pre class="no-pretty-print">
-LOCAL_PATH := $(call my-dir)
-</pre>
-
-<p>Due to the way GNU Make works, what this macro really returns is the
-path of the last makefile that the build system included when parsing the build scripts. For this
-reason, you should not call {@code my-dir} after including another file.</p>
-
-<p>For example, consider the following example: </p>
-
-<pre class="no-pretty-print">
-LOCAL_PATH := $(call my-dir)
-
-# ... declare one module
-
-include $(LOCAL_PATH)/foo/`Android.mk`
-
-LOCAL_PATH := $(call my-dir)
-
-# ... declare another module
-</pre>
-
-<p>The problem here is that the second call to {@code my-dir} defines
-{@code LOCAL_PATH} as {@code $PATH/foo} instead of {@code $PATH}, because that was where its
-most recent include pointed.</p>
-
-<p>You can avoid this problem by putting additional includes after everything
-else in the {@code Android.mk} file. For example:</p>
-
-<pre class="no-pretty-print">
-LOCAL_PATH := $(call my-dir)
-
-# ... declare one module
-
-LOCAL_PATH := $(call my-dir)
-
-# ... declare another module
-
-# extra includes at the end of the Android.mk file
-include $(LOCAL_PATH)/foo/Android.mk
-
-</pre>
-
-<p>If it is not feasible to structure the file in this way, save the value of the first
-{@code my-dir} call into another variable. For example: </p>
-
-<pre class="no-pretty-print">
-MY_LOCAL_PATH := $(call my-dir)
-
-LOCAL_PATH := $(MY_LOCAL_PATH)
-
-# ... declare one module
-
-include $(LOCAL_PATH)/foo/`Android.mk`
-
-LOCAL_PATH := $(MY_LOCAL_PATH)
-
-# ... declare another module
-</pre>
-
-<h4>all-subdir-makefiles</h4>
-
-<p>Returns the list of {@code Android.mk} files located in all subdirectories of
-the current {@code my-dir} path.
-
-<p>You can use this function to provide deep-nested source directory hierarchies to the build
-system. By default, the NDK only looks for files in the directory containing the
-{@code Android.mk} file.</p>
-
-<h4>this-makefile</h4>
-<p>Returns the path of the current makefile (from which the build system called the function).</p>
-
-<h4>parent-makefile</h4>
-<p>Returns the path of the parent makefile in the inclusion tree (the path of the makefile that
-included the current one).</p>
-
-<h4>grand-parent-makefile</h4>
-<p>Returns the path of the grandparent makefile in the inclusion tree (the path of the makefile that
-included the current one).</p>
-
-<h4>import-module</h4>
-<p>A function that allows you to find and include a module's {@code Android.mk} file by the name of
-the module. A typical example is as follows: </p>
-
-<pre class="no-pretty-print">
-$(call import-module,&lt;name&gt;)
-</pre>
-
-<p>In this example, the build system looks for the module tagged {@code <name>} in the list of
-directories referenced that your {@code NDK_MODULE_PATH} environment variable references, and
-includes its {@code Android.mk} file automatically for you.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/application_mk.jd b/docs/html/ndk/guides/application_mk.jd
deleted file mode 100644
index e669f3f..0000000
--- a/docs/html/ndk/guides/application_mk.jd
+++ /dev/null
@@ -1,219 +0,0 @@
-page.title=Application.mk
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#over">Overview</a></li>
-        <li><a href="#var">Variables</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>This document explains the {@code Application.mk} build file, which describes the
-native <em>modules</em> that your app requires. A module can be a static library, a shared library,
-or an executable.</p>
-
-<p>We recommend that you read the <a href="{@docRoot}ndk/guides/concepts.html">Concepts</a> and
-<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a> pages before this one. Doing so will
-help maximize your understanding of the material on this page. </p>
-
-<h2 id="over">Overview</h2>
-The {@code Application.mk} file is really a tiny GNU Makefile fragment that defines several
-variables for compilation. It usually resides under {@code $PROJECT/jni/}, where {@code $PROJECT}
-points to your application's project directory. Another alternative is to place it under a
-sub-directory of the top-level {@code $NDK/apps/} directory. For example:</p>
-
-<pre>
-$NDK/apps/&lt;myapp&gt;/Application.mk
-</pre>
-
-<p>Here, {@code <myapp>} is a short name used to describe your app to the NDK build system. It
-doesn't actually go into your generated shared libraries or your final packages.</p>
-
-<h2 id="var">Variables</h2>
-<h4>APP_PROJECT_PATH</h4>
-<p>This variable stores the absolute path to your app's project-root directory. The build system
-uses this information to place stripped-down versions of the generated JNI shared libraries
-into a specific location known to the APK-generating tools.</p>
-
-<p>If you place your {@code Application.mk} file under {@code $NDK/apps/<myapp>/}, you must
-define this variable. If you place it under {@code $PROJECT/jni/}, it is optional.
-
-<h4>APP_OPTIM</h4>
-<p>Define this optional variable as either {@code release} or {@code debug}. You use it to
-alter the optimization level when building your application's modules.</p>
-
-<p>Release mode is the default, and generates highly optimized binaries. Debug mode generates
-unoptimized binaries that are much easier to debug.</p>
-
-<p>Note that you can debug either release or debug binaries. Release binaries, however, provide less
-information during debugging. For example, the build system optimizes out some variables,
-preventing you from inspecting them. Also, code re-ordering can make it more difficult to step
-through the code; stack traces may not be reliable.</p>
-
-<p>Declaring {@code android:debuggable} in your application manifest's {@code <application>}
-tag will cause this variable to default to {@code debug} instead of {@code release}. Override this
-default value by setting {@code APP_OPTIM} to {@code release}.</p>
-
-
-<h4>APP_CFLAGS</h4>
-<p>This variable stores a set of C compiler flags that the build system passes to the compiler
-when compiling any C or C++ source code for any of the modules. You can use this variable to change
-the build of a given module according to the application that needs it, instead of having to modify
-the {@code Android.mk} file itself. </p>
-
-
-<p>All paths in these flags should be relative to the top-level NDK directory. For example, if you
-have the following setup:</p>
-
-<pre>
-sources/foo/Android.mk
-sources/bar/Android.mk
-</pre>
-
-<p>To specify in {@code foo/Android.mk} that you want to add the path to the {@code bar} sources
-during compilation, you should use:
-
-<pre>
-APP_CFLAGS += -Isources/bar
-</pre>
-
-<p>Or, alternatively:</p>
-
-<pre>
-APP_CFLAGS += -I$(LOCAL_PATH)/../bar
-</pre>
-
-<p>{@code -I../bar} will not work since it is equivalent to
-{@code -I$NDK_ROOT/../bar}.</p>
-
-<p class="note"><strong>Note: </strong>This variable only works on C, not C++, sources in
-android-ndk-1.5_r1. In all versions after that one, {@code APP_CFLAGS} matches the full Android
-build system.</p>
-
-<h4>APP_CPPFLAGS</h4>
-<p>This variable contains a set of C++ compiler flags that the build system passes to the compiler
-when building only C++ sources.</p>
-
-<p class="note"><strong>Note: </strong> In android-ndk-1.5_r1, this variable works on both C and
-C++ sources. In all subsequent versions of the NDK, {@code APP_CPPFLAGS} now matches the full
-Android build system. For flags that apply to both C and C++ sources, use {@code APP_CFLAGS}.</p>
-
-<h4>APP_LDFLAGS</h4>
-<p>A set of linker flags that the build system passes when linking the application. This variable
-is only relevant when the build system is building shared libraries and executables. When the
-build system builds static libraries, it ignores these flags.</p>
-
-<h4>APP_BUILD_SCRIPT</h4>
-<p>By default, the NDK build system looks under {@code jni/} for a file named
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>.</p>
-
-<p>If you want to override this behavior, you can define {@code APP_BUILD_SCRIPT} to point to an
-alternate build script. The build system always interprets a non-absolute path as relative to the
-NDK's top-level directory.</p>
-
-<h4>APP_ABI</h4>
-<p>By default, the NDK build system generates machine code for the
-<a href="{@docRoot}ndk/guides/abis.html">{@code armeabi}</a> ABI. This machine code
-corresponds to an ARMv5TE-based CPU with software floating point operations. You can use
-{@code APP_ABI} to select a different ABI. Table 1 shows the {@code APP_ABI}
-settings for different instruction sets.</p>
-
-<p class="table-caption" id="table1">
-  <strong>Table 1.</strong> {@code APP_ABI} settings for different instruction sets.</p>
-<table>
-  <tr>
-    <th scope="col">Instruction set</th>
-    <th scope="col">Value</th>
-  </tr>
-  <tr>
-    <td>Hardware FPU instructions on ARMv7 based devices</td>
-    <td>{@code APP_ABI := armeabi-v7a}</td>
-  </tr>
-  <tr>
-    <td>ARMv8 AArch64</td>
-    <td>{@code APP_ABI := arm64-v8a}</td>
-  </tr>
-    <tr>
-    <td>IA-32</td>
-    <td>{@code APP_ABI := x86}</td>
-  </tr>
-    <tr>
-    <td>Intel64</td>
-    <td>{@code APP_ABI := x86_64}</td>
-  </tr>
-    <tr>
-    <td>MIPS32</td>
-    <td>{@code APP_ABI := mips}</td>
-  </tr>
-    <tr>
-    <td>MIPS64 (r6)</td>
-    <td>{@code APP_ABI := mips64}</td>
-  </tr>
-    <tr>
-    <td>All supported instruction sets</td>
-    <td>{@code APP_ABI := all}</td>
-  </tr>
-</table>
-
-<p class="note"><strong>Note:</strong> {@code all} is available starting from NDKr7.</p>
-
-<p>You can also specify multiple values by placing them on the same line, delimited by spaces.
-For example:</p>
-
-<pre>
-APP_ABI := armeabi armeabi-v7a x86 mips
-</pre>
-
-<p>For the list of all supported ABIs and details about their usage and limitations, refer to
-<a href="{@docRoot}ndk/guides/abis.html">ABI Management</a>.</p>
-
-<h4>APP_PLATFORM</h4>
-<p>This variable contains the name of the target Android platform. For example, {@code android-3}
-specifies the Android 1.5 system images. For a complete list of platform names and corresponding
-Android system images, see <a href="{@docRoot}ndk/guides/stable_apis.html">Android NDK Native APIs
-</a>.</p>
-
-<h4>APP_STL</h4>
-<p>By default, the NDK build system provides C++ headers for the minimal C++ runtime library
-({@code system/lib/libstdc++.so}) provided by the Android system. In addition, it comes with
-alternative C++ implementations that you can use or link to in your own applications.
-Use {@code APP_STL} to select one of them. For information about the supported runtimes, and the
-features they offer, see <a href="{@docRoot}ndk/guides/cpp-support.html#runtimes">NDK Runtimes and
-Features</a>.
-
-<h4>APP_SHORT_COMMANDS</h4>
-<p>The equivalent of {@code LOCAL_SHORT_COMMANDS} in {@code Application.mk} for your whole project.
-For more information, see the documentation for this variable on
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>.</p>
-
-<h4>NDK_TOOLCHAIN_VERSION</h4>
-<p>Define this variable as either {@code 4.9} or {@code 4.8} to select a version of the GCC
-compiler. Version 4.9 is the default for 64-bit ABIs, and 4.8 is the default for 32-bit ABIs.
-To select a version of Clang, define this variable as {@code clang3.4}, {@code clang3.5}, or
-{@code clang}. Specifying {@code clang} chooses the most recent version of Clang.</p>
-
-<h4>APP_PIE</h4>
-<p>Starting from Android 4.1 (API level 16), Android's dynamic linker supports position-independent
-executables (PIE). From Android 5.0 (API level 21), executables require PIE.
-
-To use PIE to build your executables, set the {@code -fPIE} flag. This flag makes it harder to
-exploit memory corruption bugs by randomizing code location. By default, {@code ndk-build}
-automatically sets this value to {@code true} if your project targets {@code android-16} or higher.
-You may set it manually to either {@code true} or {@code false}.</p>
-
-<p>This flag applies only to executables. It has no effect when building shared or static
-libraries.</p>
-
-<p class="note"><strong>Note: </strong> PIE executables cannot run on Android releases prior to 4.1.
-<p>This restriction only applies to executables. It has no effect when building shared or static
-libraries.</p>
-
-<h4>APP_THIN_ARCHIVE</h4>
-<p>Sets the default value of {@code LOCAL_THIN_ARCHIVE} in the {@code Android.mk} file for all
-static library modules in this project. For more information, see the documentation for
-{@code LOCAL_THIN_ARCHIVE} on <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}.</a>
-</p>
diff --git a/docs/html/ndk/guides/arch.jd b/docs/html/ndk/guides/arch.jd
deleted file mode 100644
index 3dafe8f..0000000
--- a/docs/html/ndk/guides/arch.jd
+++ /dev/null
@@ -1,19 +0,0 @@
-page.title=CPUs and Architectures
-@jd:body
-
-<p>When you're working with native code, hardware matters. The NDK lets you ensure you're compiling
-for the right architectures and CPUs by giving you a variety of ABIs from which
-to choose.</p>
-
-<p>This section begins by explaining how to target specific
-<a href="{@docRoot}ndk/guides/abis.html">architectures and CPUs</a>. It then
-provides information you need to know when targeting the
-<a href="{@docRoot}ndk/guides/abis.html">ARM</a>
-family of CPUs and architectures. Next, it provides information about  the other CPUs and
-architectures that it supports: <a href="{@docRoot}ndk/guides/cpu-arm-neon.html">NEON</a>, x86
-(<a href="{@docRoot}ndk/guides/x86.html">32-bit</a> and
-<a href="{@docRoot}ndk/guides/x86-64.html">64-bit</a>), and
-<a href="{@docRoot}ndk/guides/mips.html">MIPS</a>. Finally, it explains how to use the
-<a href="{@docRoot}ndk/guides/cpu-features.html">{@code cpufeatures}</a>
-library, which your app can use to query a given CPU and architecture about the optional
-features they support.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/audio/basics.jd b/docs/html/ndk/guides/audio/basics.jd
deleted file mode 100644
index bdb85fb..0000000
--- a/docs/html/ndk/guides/audio/basics.jd
+++ /dev/null
@@ -1,169 +0,0 @@
-page.title=High-Performance Audio Basics
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#overview">Building Great Audio Apps</a></li>
-        <li><a href="#adding">Adding OpenSL ES to Your App</a></li>
-        <li><a href="#building">Building and Debugging</a></li>
-        <li><a href="#power">Audio Power Consumption</a></li>
-        <li><a href="#samples">Samples</a></li>
-      </ol>
-    </div>
-  </div>
-
-<a href="https://www.youtube.com/watch?v=d3kfEeMZ65c" class="notice-developers-video">
-<div>
-    <h3>Video</h3>
-    <p>Google I/O 2013 - High Performance Audio</p>
-</div>
-</a>
-
-<p>
-The Khronos Group's OpenSL ES™ standard exposes audio features
-similar to those in the {@link android.media.MediaPlayer} and {@link android.media.MediaRecorder}
-APIs in the Android Java framework. OpenSL ES provides a C language interface as well as
-C++ bindings, allowing you to call it from code written in either language.
-</p>
-
-<p>
-This page describes the typical use cases for these high-performance audio APIs, how to add them
-into your app's source code, and how to incorporate them into the build process.
-</p>
-
-<h2 id="overview">Building Great Audio Apps</h2>
-
-<p>
-The OpenSL ES APIs are available to help you develop and improve your app's audio performance.
- Some typical use cases include the following:</p>
-
-<ul>
-  <li>Digital Audio Workstations (DAWs).</li>
-  <li>Synthesizers.</li>
-  <li>Drum machines.</li>
-  <li>Music learning apps.</li>
-  <li>Karaoke apps.</li>
-  <li>DJ mixing.</li>
-  <li>Audio effects.</li>
-  <li>Video/audio conferencing.</li>
-</ul>
-
-<h2 id="adding">Adding OpenSL ES to your App</h2>
-
-<p>
-You can call OpenSL ES from both C and C++ code. To add the core OpenSL ES
-feature set to your app, include the {@code OpenSLES.h} header file:
-
-</p>
-<pre>
-#include &lt;SLES/OpenSLES.h&gt;
-</pre>
-
-<p>
-To add the OpenSL ES <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html#ae">
-Android extensions</a> as well, include the {@code OpenSLES_Android.h} header file:
-</p>
-<pre>
-#include &lt;SLES/OpenSLES_Android.h&gt;
-</pre>
-
-<p>
-When you include the {@code OpenSLES_Android.h} header file, the following headers are included
-automatically:
-</p>
-<pre>
-#include &lt;SLES/OpenSLES_AndroidConfiguration.h&gt;
-#include &lt;SLES/OpenSLES_AndroidMetadata.h&gt;
-</pre>
-
-<p class="note"><strong>Note: </strong>
-These headers are not required, but are shown as an aid in learning the API.
-</p>
-
-<h2 id="building">Building and Debugging</h2>
-
-<p>
-You can incorporate OpenSL ES into your build by specifying it in the
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file that serves as one of the
-NDK build system's makefiles. Add the following line to
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>:
-</p>
-
-<pre>
-LOCAL_LDLIBS += -lOpenSLES
-</pre>
-
-<p>
-For robust debugging, we recommend that you examine the {@code SLresult} value that most of
-the OpenSL ES APIs return. You can use
-<a class="external-link" href="http://en.wikipedia.org/wiki/Assertion_(computing)">asserts</a>
-or more advanced error-handling logic for debugging; neither offers
-an inherent advantage for working with OpenSL ES, although one or the other might be more suitable
-for a given use case.
-</p>
-
-<p>
-We use asserts in our <a class="external-link" href="https://github.com/googlesamples/android-ndk">
-examples</a>, because they help catch unrealistic conditions that would indicate a coding error. We
-have used explicit error handling for other conditions more likely to occur in production.
-</p>
-
-<p>
-Many API errors result in a log entry, in addition to a non-zero result code. Such log entries
-can provide additional detail that proves especially useful for relatively complex APIs such as
-<a class="external-link" href="https://www.khronos.org/registry/sles/specs/OpenSL_ES_Specification_1.1.pdf">
-{@code Engine::CreateAudioPlayer}</a>.
-</p>
-
-<p>
-You can view the log either from the command line or from Android Studio. To examine the log from
-the command line, type the following:
-</p>
-
-<pre class="no-pretty-print">
-$ adb logcat
-</pre>
-
-<p>
-To examine the log from Android Studio, either click the <strong>Logcat</strong> tab in the
-<a href="{@docRoot}tools/debugging/debugging-studio.html#runDebug">Debug</a>
-window, or click the <strong>Devices | logcat</strong> tab in the
-<a href="{@docRoot}tools/debugging/debugging-studio.html#systemLogView">Android DDMS</a>
-window.
-</p>
-<h2 id="power">Audio Power Consumption</h2>
-<p>Constantly outputting audio incurs significant power consumption. Ensure that you stop the
- output in the
- <a href="{@docRoot}reference/android/app/Activity.html#onPause()">onPause()</a> method.
- Also consider pausing the silent output after some period of user inactivity.
-</p>
-<h2 id="samples">Samples</h2>
-
-<p>
-Supported and tested example code that you can use as a model for your own code resides both locally
-and on
-<a class="external-link" href="https://github.com/googlesamples/android-audio-high-performance/">
-GitHub</a>. The local examples are located in
-{@code platforms/android-9/samples/native-audio/}, under your NDK root installation directory.
-On GitHub, they are available from the
-<a class="external-link" href="https://github.com/googlesamples/android-ndk">{@code android-ndk}</a>
-repository, in the
-<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/audio-echo">
-{@code audio-echo}</a> and
-<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/native-audio">
-{@code native-audio}</a> directories.
-</p>
-<p>The Android NDK implementation of OpenSL ES differs
-from the reference specification for OpenSL ES 1.0.1 in a number of respects.
-These differences are an important reason as to why sample code that
-you copy directly from the OpenSL ES reference specification may not work in your
-Android app.
-</p>
-<p>
-For more information on differences between the reference specification and the
-Android implementation, see
-<a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">
-OpenSL ES for Android</a>.
diff --git a/docs/html/ndk/guides/audio/floating-point.jd b/docs/html/ndk/guides/audio/floating-point.jd
deleted file mode 100644
index 76efce3f..0000000
--- a/docs/html/ndk/guides/audio/floating-point.jd
+++ /dev/null
@@ -1,101 +0,0 @@
-page.title=Floating-Point Audio
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#best">Best Practices for Floating-Point Audio</a></li>
-        <li><a href="#support">Floating-Point Audio in Android SDK</a></li>
-        <li><a href="#more">For More Information</a></li>
-      </ol>
-    </div>
-  </div>
-
-<a href="https://www.youtube.com/watch?v=sIcieUqMml8" class="notice-developers-video">
-<div>
-    <h3>Video</h3>
-    <p>Will it Float? The Glory and Shame of Floating-Point Audio</p>
-</div>
-</a>
-
-<p>Using floating-point numbers to represent audio data can significantly enhance audio
- quality in high-performance audio applications. Floating point offers the following
- advantages:</p>
-
-<ul>
-<li>Wider dynamic range.</li>
-<li>Consistent accuracy across the dynamic range.</li>
-<li>More headroom to avoid clipping during intermediate calculations and transients.</li>
-</ul>
-
-<p>While floating-point can enhance audio quality, it does present certain disadvantages:</p>
-
-<ul>
-<li>Floating-point numbers use more memory.</li>
-<li>Floating-point operations employ unexpected properties, for example, addition is
- not associative.</li>
-<li>Floating-point calculations can sometimes lose arithmetic precision due to rounding or
- numerically unstable algorithms.</li>
-<li>Using floating-point effectively requires greater understanding to achieve accurate
- and reproducible results.</li>
-</ul>
-
-<p>
-  Formerly, floating-point was notorious for being unavailable or slow. This is
-  still true for low-end and embedded processors. But processors on modern
-  mobile devices now have hardware floating-point with performance that is
-  similar (or in some cases even faster) than integer. Modern CPUs also support
-  <a href="http://en.wikipedia.org/wiki/SIMD" class="external-link">SIMD</a>
-  (Single instruction, multiple data), which can improve performance further.
-</p>
-
-<h2 id="best">Best Practices for Floating-Point Audio</h2>
-<p>The following best practices help you avoid problems with floating-point calculations:</p>
-<ul>
-<li>Use double precision floating-point for infrequent calculations,
-such as computing filter coefficients.</li>
-<li>Pay attention to the order of operations.</li>
-<li>Declare explicit variables for intermediate values.</li>
-<li>Use parentheses liberally.</li>
-<li>If you get a NaN or infinity result, use binary search to discover
-where it was introduced.</li>
-</ul>
-
-<h2 id="support">Floating-Point Audio in Android SDK</h2>
-
-<p>For floating-point audio, the audio format encoding
- <code>AudioFormat.ENCODING_PCM_FLOAT</code> is used similarly to
- <code>ENCODING_PCM_16_BIT</code> or <code>ENCODING_PCM_8_BIT</code> for specifying
- AudioTrack data
-formats. The corresponding overloaded method <code>AudioTrack.write()</code>
- takes in a float array to deliver data.</p>
-
-<pre>
-   public int write(float[] audioData,
-        int offsetInFloats,
-        int sizeInFloats,
-        int writeMode)
-</pre>
-
-<h2 id="more">For More Information</h2>
-
-<p>The following Wikipedia pages are helpful in understanding floating-point audio:</p>
-
-<ul>
-<li><a href="http://en.wikipedia.org/wiki/Audio_bit_depth" class="external-link" >Audio bit depth</a></li>
-<li><a href="http://en.wikipedia.org/wiki/Floating_point" class="external-link" >Floating point</a></li>
-<li><a href="http://en.wikipedia.org/wiki/IEEE_floating_point" class="external-link" >IEEE 754 floating-point</a></li>
-<li><a href="http://en.wikipedia.org/wiki/Loss_of_significance" class="external-link" >Loss of significance</a>
- (catastrophic cancellation)</li>
-<li><a href="https://en.wikipedia.org/wiki/Numerical_stability" class="external-link" >Numerical stability</a></li>
-</ul>
-
-<p>The following article provides information on those aspects of floating-point that have a
- direct impact on designers of computer systems:</p>
-<ul>
-<li><a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html" class="external-link" >What every
- computer scientist should know about floating-point arithmetic</a>
-by David Goldberg, Xerox PARC (edited reprint).</li>
-</ul>
diff --git a/docs/html/ndk/guides/audio/index.jd b/docs/html/ndk/guides/audio/index.jd
deleted file mode 100644
index 12d9320..0000000
--- a/docs/html/ndk/guides/audio/index.jd
+++ /dev/null
@@ -1,27 +0,0 @@
-page.title=NDK High-Performance Audio
-@jd:body
-
-<p>The NDK package includes an Android-specific implementation of the
-<a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES™</a> API
-specification from the <a class="external-link" href="https://www.khronos.org">Khronos Group</a>.
-This library allows you to use C or C++ to implement high-performance, low-latency audio, whether
-you are writing a synthesizer, digital audio workstation, karaoke, game,
- or other real-time app.</p>
-
-<p>This section begins by providing some
-<a href="{@docRoot}ndk/guides/audio/basics.html">basic information</a> about the API, including
-typical use cases and how to incorporate it into your app. It then explains what you need to know
-about the <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">Android-specific
-implementation</a> of OpenSL ES, focusing on the differences between this implementation and the
-reference specification. Next, you'll learn how to minimze
- <a href="{@docRoot}ndk/guides/audio/input-latency.html">input latency</a>
- when using built-in or external microphones
-and some actions that you can take to minimize
- <a href="{@docRoot}ndk/guides/audio/output-latency.html">output latency</a>.
- It describes the reasons that you should use
- <a href="{@docRoot}ndk/guides/audio/floating-point.html">floating-point</a>
- numbers to represent your audio data, and it provides information that will help you choose the
-optimal <a href="{@docRoot}ndk/guides/audio/sample-rates.html">sample rate</a>. This section
- concludes with some supplemental <a href="{@docRoot}ndk/guides/audio/opensl-prog-notes.html">
- programming notes</a> to ensure proper implementation of OpenSL ES.
- </p>
diff --git a/docs/html/ndk/guides/audio/input-latency.jd b/docs/html/ndk/guides/audio/input-latency.jd
deleted file mode 100644
index f1103fc..0000000
--- a/docs/html/ndk/guides/audio/input-latency.jd
+++ /dev/null
@@ -1,95 +0,0 @@
-page.title=Audio Input Latency
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#check-list">Checklist</a></li>
-        <li><a href="#ways">Ways to Reduce Audio Input Latency</a></li>
-        <li><a href="#avoid">What to Avoid</a></li>
-      </ol>
-    </div>
-  </div>
-
-
-<p>This page provides guidelines to help you reduce audio input latency when recording with a
-built-in microphone or an external headset microphone.</p>
-
-<h2 id="check-list">Checklist</h2>
-
-<p>Here are a few important prerequisites:</p>
-
-<ul>
-  <li>You must use the Android-specific implementation of the
-  <a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES™</a> API.
-
-  <li>If you haven't already done so, download and install the
-  <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.</li>
-
-  <li>Many of the same requirements for low-latency audio output also apply to low-latency input,
-  so read the requirements for low-latency output in
-  <a href="{@docRoot}ndk/guides/audio/output-latency.html">Audio Output Latency</a>.</li>
-</ul>
-
-<h2 id="ways">Ways to Reduce Audio Input Latency</h2>
-
-<p>The following are some methods to help ensure low audio input latency:
-
-<ul>
-  <li>Suggest to your users, if your app relies on low-latency audio, that they use a headset
-(for example, by displaying a <em>Best with headphones</em> screen on first run). Note
-that just using the headset doesn’t guarantee the lowest possible latency. You may need to
-perform other steps to remove any unwanted signal processing from the audio path, such as by
-using the <a href="http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#VOICE_RECOGNITION">
-VOICE_RECOGNITION</a> preset when recording.</li>
-
-  <li>It's difficult to test audio input and output latency in isolation. The best solution to
-determine the lowest possible audio input latency is to measure round-trip audio and divide
-by two.</li>
- <li> Be prepared to handle nominal sample rates of 44,100 and 48,000 Hz as reported by
-<a href="{@docRoot}reference/android/media/AudioManager.html#getProperty(java.lang.String)">
-getProperty(String)</a> for
-<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_SAMPLE_RATE">
-PROPERTY_OUTPUT_SAMPLE_RATE</a>. Other sample rates are possible, but rare.</li>
-
-  <li>Be prepared to handle the buffer size reported by
-<a href="{@docRoot}reference/android/media/AudioManager.html#getProperty(java.lang.String)">
-getProperty(String)</a> for
-<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_FRAMES_PER_BUFFER">
-PROPERTY_OUTPUT_FRAMES_PER_BUFFER</a>. Typical buffer sizes include 96, 128, 160, 192, 240, 256,
-or 512 frames, but other values are possible.</li>
-</ul>
-
-<h2 id="avoid">What to Avoid</h2>
-
-<p>Be sure to take these things into account to help avoid latency issues:</p>
-
-<ul>
-  <li>Don’t assume that the speakers and microphones used in mobile devices generally have good
-acoustics. Due to their small size, the acoustics are generally poor so signal processing is
-added to improve the sound quality. This signal processing introduces latency.</li>
-
-  <li>Don't assume that your input and output callbacks are synchronized. For simultaneous input
-and output, separate buffer queue completion handlers are used for each side. There is no
-guarantee of the relative order of these callbacks or the synchronization of the audio clocks,
-even when both sides use the same sample rate. Your application should buffer the data with
-proper buffer synchronization.</li>
-
-  <li>Don't assume that the actual sample rate exactly matches the nominal sample rate. For
-example, if the nominal sample rate is 48,000 Hz, it is normal for the audio clock to advance
-at a slightly different rate than the operating system {@code CLOCK_MONOTONIC}. This is because
-the audio and system clocks may derive from different crystals.</li>
-
-  <li>Don't assume that the actual playback sample rate exactly matches the actual capture sample
-rate, especially if the endpoints are on separate paths. For example, if you are capturing from
-the on-device microphone at 48,000 Hz nominal sample rate, and playing on USB audio
-at 48,000 Hz nominal sample rate, the actual sample rates are likely to be slightly different
-from each other.</li>
-</ul>
-
-<p>A consequence of potentially independent audio clocks is the need for asynchronous sample rate
-conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
-conversion is to duplicate or drop samples as needed near a zero-crossing point. More
-sophisticated conversions are possible.</p>
diff --git a/docs/html/ndk/guides/audio/opensl-for-android.jd b/docs/html/ndk/guides/audio/opensl-for-android.jd
deleted file mode 100644
index fa5e260..0000000
--- a/docs/html/ndk/guides/audio/opensl-for-android.jd
+++ /dev/null
@@ -1,1211 +0,0 @@
-page.title=OpenSL ES for Android
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#getstarted">Getting Started</a></li>
-        <li><a href="#inherited">Features Inherited from the Reference Specification</a></li>
-        <li><a href="#planning">Planning for Future Versions of OpenSL ES</a></li>
-        <li><a href="#ae">Android Extensions</a></li>
-        <li><a href="#notes">Programming Notes</a></li>
-        <li><a href="#platform-issues">Platform Issues</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>
-This page provides details about how the
-<a href="{@docRoot}tools/sdk/ndk/index.html">NDK</a> implementation of OpenSL
-ES™ differs from the reference specification for OpenSL ES 1.0.1. When using sample code from the
-specification, you may need to modify it to work on Android.
-</p>
-
-<p>
-Unless otherwise noted, all features are available at Android 2.3 (API level 9) and higher.
- Some features are only available for Android 4.0 (API level 14); these are noted.
-</p>
-
-<p class="note"><strong>Note: </strong>
-The Android Compatibility Definition Document (CDD) enumerates the hardware and software
-requirements of a compatible Android device. See
-<a class="external-link" href="https://source.android.com/compatibility/">Android Compatibility</a>
-for more information on the overall compatibility program, and
-<a class="external-link" href="https://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf">
-CDD</a> for the actual CDD document.
-</p>
-
-<p>
-<a class="external-link" href="https://www.khronos.org/opensles/">OpenSL ES</a> provides a C
-language interface that is also accessible using C++. It exposes features similar to the audio
-portions of these Android Java APIs:
-</p>
-
-<ul>
-  <li><a href="{@docRoot}reference/android/media/MediaPlayer.html">
-  android.media.MediaPlayer</a></li>
-  <li><a href="{@docRoot}reference/android/media/MediaRecorder.html">
-  android.media.MediaRecorder</a></li>
-</ul>
-
-<p>
-As with all of the Android Native Development Kit (NDK), the primary purpose of OpenSL ES for
-Android is to facilitate the implementation of shared libraries to be called using the Java Native
-Interface (<a class="external-link" href="https://en.wikipedia.org/wiki/Java_Native_Interface">JNI
-</a>). NDK is not intended for writing pure C/C++ applications. However, OpenSL ES is a
-full-featured API, and we expect that you should be able to accomplish most of your audio needs
-using only this API, without up-calls to code running in the Android runtime.
-</p>
-
-<p class="note"><strong>Note: </strong>
-Though based on OpenSL ES, the Android native audio (high-performance audio) API  is not a
-conforming implementation of any OpenSL ES 1.0.1 profile (game, music, or phone). This is because
-Android does not implement all of the features required by any one of the profiles. Any known cases
-where Android behaves differently than the specification are described in the <a href="#ae">
-Android extensions</a> section below.
-</p>
-
-<h2 id="getstarted">Getting Started</h2>
-
-<p>
-This section provides the information needed to get started using the OpenSL ES APIs.
-</p>
-
-<h3>Example code</h3>
-
-<p>
-We recommend using supported and tested example code that is usable as a model for your own
-code, which is located in the NDK folder {@code platforms/android-9/samples/native-audio/}, as well
-as in the
-<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/audio-echo">audio-echo</a>
-and
-<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/native-audio">native-audio</a>
-folders of the
-<a class="external-link" href="https://github.com/googlesamples/android-ndk">android-ndk</a> GitHub
-repository.
-</p>
-
-<p class="caution"><strong>Caution: </strong>
-The OpenSL ES 1.0.1 specification contains example code in the appendices (see
-<a class="external-link" href="https://www.khronos.org/registry/sles/">Khronos OpenSL ES Registry</a>
-for more details). However, the examples in <em>Appendix B: Sample Code</em> and
-<em>Appendix C: Use Case Sample Code</em> use features that are not supported by Android. Some
-examples also contain typographical errors, or use APIs that are likely to change. Proceed with
-caution when referring to these; though the code may be helpful in understanding the full OpenSL ES
-standard, it should not be used as-is with Android.
-</p>
-
-<h3>Makefile</h3>
-
-<p>
-Modify your {@code Android.mk} file as follows:
-</p>
-<pre>
-LOCAL_LDLIBS += -lOpenSLES
-</pre>
-
-<h3>Audio content</h3>
-
-<p>
-The following are some of the many ways to package audio content for your application:
-</p>
-
-<ul>
-  <li><strong>Resources</strong>: By placing your audio files into the {@code res/raw/} folder,
-  they can be accessed easily by the associated APIs for
-  <a href="{@docRoot}reference/android/content/res/Resources.html">Resources</a>.
-  However, there is no direct native access to resources, so you must write Java
-  programming language code to copy them out before use.</li>
-  <li><strong>Assets</strong>: By placing your audio files into the {@code assets/} folder, they
-  are directly accessible by the Android native asset manager APIs. See the header files {@code
-  android/asset_manager.h} and {@code android/asset_manager_jni.h} for more information on these
-  APIs. The example code located in the NDK folder {@code platforms/android-9/samples/native-audio/}
-  uses these native asset manager APIs in conjunction with the Android file descriptor data
-  locator.</li>
-  <li><strong>Network</strong>: You can use the URI data locator to play audio content directly
-  from the network. However, be sure to read the <a href="#sandp">Security and permissions</a>
-  section below.</li>
-  <li><strong>Local file system</strong>: The URI data locator supports the {@code file:} scheme
-  for local files, provided the files are accessible by the application. Note that the Android
-  security framework restricts file access via the Linux user ID and group ID mechanisms.</li>
-  <li><strong>Recorded</strong>: Your application can record audio data from the microphone input,
-  store this content, and then play it back later. The example code uses this method for the <em>
-  Playback</em> clip.</li>
-  <li><strong>Compiled and linked inline</strong>: You can link your audio content directly into
-  the shared library, and then play it using an audio player with buffer queue data locator. This
-  is most suitable for short PCM format clips. The example code uses this technique for the <em>
-  Hello</em> and <em>Android</em> clips. The PCM data was converted to hex strings using a
-  {@code bin2c} tool (not supplied).</li>
-  <li><strong>Real-time synthesis</strong>: Your application can synthesize PCM data on the fly and
-  then play it using an audio player with buffer queue data locator. This is a relatively advanced
-  technique, and the details of audio synthesis are beyond the scope of this article.</li>
-</ul>
-
-<p class="note"><strong>Note: </strong>
-Finding or creating useful audio content for your application is beyond the scope of this article.
-You can use web search terms such as <em>interactive audio</em>, <em>game audio</em>, <em>sound
-design</em>, and <em>audio programming</em> to locate more information. 
-</p>
-<p class="caution"><strong>Caution:</strong> It is your responsibility
-to ensure that you are legally permitted to play or record content. There may be privacy
-considerations for recording content.
-</p>
-
-<h2 id="inherited">Features Inherited from the Reference Specification</h2>
-
-<p>
-The Android NDK implementation of OpenSL ES inherits much of the feature set from
-the reference specification, with certain limitations.
-</p>
-
-<h3>Global entry points</h3>
-
-<p>
-OpenSL ES for Android supports all of the global entry points in the Android specification.
-These entry points include:
-</p>
-
-<ul>
-<li>{@code slCreateEngine}
-</li>
-<li>{@code slQueryNumSupportedEngineInterfaces}</code>
-</li>
-<li>{@code slQuerySupportedEngineInterfaces}</code>
-</li>
-</ul>
-
-<h3>Objects and interfaces</h3>
-
-<p>
-Table 1 shows the objects and interfaces that the Android NDK implementation of
-OpenSL ES supports. If a <em>Yes</em> appears in the cell, then the feature is available in this
-implementation.
-</p>
-
-<p class="table-caption" id="Objects-and-interfaces">
-  <strong>Table 1.</strong> Android NDK support for objects and interfaces.</p>
-<table>
-  <tr>
-    <th scope="col">Feature</th>
-    <th scope="col">Audio player</th>
-    <th scope="col">Audio recorder</th>
-    <th scope="col">Engine</th>
-    <th scope="col">Output mix</th>
-  </tr>
-  <tr>
-    <td>Bass boost</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Buffer queue</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Dynamic interface management</td>
-    <td>Yes</td>
-    <td>Yes</td>
-    <td>Yes</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Effect send</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Engine</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Environmental reverb</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Equalizer</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Metadata extraction</td>
-    <td>Yes: Decode to PCM</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Mute solo</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Object</td>
-    <td>Yes</td>
-    <td>Yes</td>
-    <td>Yes</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Play</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Playback rate</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Prefetch status</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Preset reverb</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Record</td>
-    <td>No</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Seek</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Virtualizer</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Volume</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Buffer queue data locator</td>
-    <td>Yes: Source</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>I/O device data locator</td>
-    <td>No</td>
-    <td>Yes: Source</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Output mix locator</td>
-    <td>Yes: Sink</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>URI data locator</td>
-    <td>Yes: Source</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  </table>
-
-<p>
-The next section explains the limitations for some of these features.
-</p>
-
-<h3>Limitations</h3>
-
-<p>
-Certain limitations apply to the features in Table 1. These limitations
-represent differences from the reference specification. The rest of this section provides
-information about these differences.</p>
-
-<h4>Dynamic interface management</h4>
-
-<p>
-OpenSL ES for Android does not support {@code RemoveInterface} or
-{@code ResumeInterface}.
-</p>
-
-<h4>Effect combinations: environment reverb and preset reverb</h4>
-
-<p>
-You cannot have both environmental reverb and preset reverb on the same output mix.
-</p>
-<p>
-The platform might ignore effect requests if it estimates that the
-CPU load would be too high.
-</p>
-
-<h4>Effect send</h4>
-
-<p>
-<code>SetSendLevel()</code> supports a single send level per audio player.
-</p>
-
-<h4>Environmental reverb</h4>
-
-<p>
-Environmental reverb does not support the <code>reflectionsDelay</code>,
-<code>reflectionsLevel</code>, or <code>reverbDelay</code> fields of
-the <code>SLEnvironmentalReverbSettings</code> struct.
-</p>
-
-<h4>MIME data format</h4>
-
-<p>
-You can use the MIME data format only with the URI data locator, and only for an audio
-player. You cannot use this data format for an audio recorder.
-</p>
-<p>
-The Android implementation of OpenSL ES requires you to initialize <code>mimeType</code>
-to either <code>NULL</code> or a valid UTF-8 string. You must also initialize
-<code>containerType</code> to a valid value.
-In the absence of other considerations, such as portability to other
-implementations or content format that an app cannot identify by header,
-we recommend that you
-set <code>mimeType</code> to <code>NULL</code> and <code>containerType</code>
-to <code>SL_CONTAINERTYPE_UNSPECIFIED</code>.
-</p>
-<p>
-OpenSL ES for Android supports the following audio formats, so long as the
-Android platform supports them as well:</p>
-
-<ul>
-<li><a class="external-link" href="https://en.wikipedia.org/wiki/WAV">WAV</a> PCM.</li>
-<li>WAV alaw.</li>
-<li>WAV ulaw.</li>
-<li>MP3 Ogg Vorbis.</li>
-<li>AAC LC.</li>
-<li>HE-AACv1 (AAC+).</li>
-<li>HE-AACv2 (enhanced AAC+).</li>
-<li>AMR.</li>
-<li>FLAC.</li>
-</ul>
-
-<p class="note"><strong>Note: </strong>
-For a list of audio formats that Android supports, see
-<a href="{@docRoot}guide/appendix/media-formats.html">Supported Media Formats</a>.
-</p>
-
-<p>
-The following limitations apply to the handling of these and other formats in this
-implementation of OpenSL ES:
-</p>
-
-<ul>
-<li><a class="external-link" href="https://en.wikipedia.org/wiki/Advanced_Audio_Coding">AAC</a>
-formats must reside within an MP4 or ADTS container.</li>
-<li>OpenSL ES for Android does not support
-<a class="external-link" href="https://source.android.com/devices/audio/midi.html">MIDI</a>.</li>
-<li>WMA is not part of <a class="external-link" href="https://source.android.com/">AOSP</a>, and we
-have not verified its compatibility with OpenSL ES for Android.</li>
-<li>The Android NDK implementation of OpenSL ES does not support direct
-playback of DRM or encrypted content. To play back protected audio content, you must
-decrypt it in your application before playing, with your app enforcing any DRM
-restrictions.</li>
-</ul>
-
-<h4>Object-related methods</h4>
-
-<p>
-OpenSL ES for Android does not support the following methods for manipulating objects:
-</p>
-
-<ul>
-<li>{@code Resume()}</li>
-<li>{@code RegisterCallback()}</li>
-<li>{@code AbortAsyncOperation()}</li>
-<li>{@code SetPriority()}</li>
-<li>{@code GetPriority()}</li>
-<li>{@code SetLossOfControlInterfaces()}</li>
-</ul>
-
-<h4>PCM data format</h4>
-
-<p>
-PCM is the only data format you can use with buffer queues. Supported PCM
-playback configurations have the following characteristics:
-</p>
-
-<ul>
-<li>8-bit unsigned or 16-bit signed.</li>
-<li>Mono or stereo.</li>
-<li>Little-endian byte ordering.</li>
-<li>Sample rates of:
-  <ul>
-    <li>8,000 Hz.</li>
-    <li>11,025 Hz.</li>
-    <li>12,000 Hz.</li>
-    <li>16,000 Hz.</li>
-    <li>22,050 Hz.</li>
-    <li>24,000 Hz.</li>
-    <li>32,000 Hz.</li>
-    <li>44,100 Hz.</li>
-    <li>48,000 Hz.</li>
-  </ul></li>
-</ul>
-
-<p>
-The configurations that OpenSL ES for Android supports for recording are
-device-dependent; usually, 16,000 Hz mono/16-bit signed is available regardless of the device.
-</p>
-<p>
-The value of the <code>samplesPerSec</code> field is in units of milliHz, despite the misleading
-name. To avoid accidentally using the wrong value, we recommend that you initialize this field using
-one of the symbolic constants defined for this purpose, such as {@code SL_SAMPLINGRATE_44_1}.
-</p>
-<p>
-Android 5.0 (API level 21) and above support <a href="#fp">floating-point data</a>.
-</p>
-
-<h4>Playback rate</h4>
-
-<p>
-An OpenSL ES <i>playback rate</i> indicates the speed at which an
-object presents data, expressed in thousandths of normal speed, or <i>per mille</i>. For example,
-a playback rate of 1,000 per mille is 1,000/1,000, or normal speed.
-A <i>rate range</i> is a closed interval that expresses possible rate ranges.
-</p>
-
-<p>
-Support for playback-rate ranges and other capabilities may vary depending
-on the platform version and implementation. Your app can determine these capabilities at runtime by
-using <code>PlaybackRate::GetRateRange()</code> or
-<code>PlaybackRate::GetCapabilitiesOfRate()</code> to query the device.
-</p>
-
-<p>
-A device typically supports the same rate range for a data source in PCM format, and a unity rate
-range of 1000 per mille to 1000 per mille for other formats: that is, the unity rate range is
-effectively a single value.
-</p>
-
-<h4>Record</h4>
-
-<p>
-OpenSL ES for Android does not support the <code>SL_RECORDEVENT_HEADATLIMIT</code>
-or <code>SL_RECORDEVENT_HEADMOVING</code> events.
-</p>
-
-<h4>Seek</h4>
-
-<p>
-The <code>SetLoop()</code> method enables whole-file looping. To enable looping,
-set the <code>startPos</code> parameter to 0, and the value of the <code>endPos</code> parameter
-to <code>SL_TIME_UNKNOWN</code>.
-</p>
-
-<h4>Buffer queue data locator</h4>
-
-<p>
-An audio player or recorder with a data locator for a buffer queue supports PCM data format only.
-</p>
-
-<h4>I/O device data locator</h4>
-
-<p>
-OpenSL ES for Android only supports use of an I/O device data locator when you have
-specified the locator as the data source for <code>Engine::CreateAudioRecorder()</code>.
-Initialize the device data locator using the values contained in the following code snippet.
-</p>
-
-<pre>
-SLDataLocator_IODevice loc_dev =
-  {SL_DATALOCATOR_IODEVICE, SL_IODEVICE_AUDIOINPUT,
-  SL_DEFAULTDEVICEID_AUDIOINPUT, NULL};
-</pre>
-
-<h4>URI data locator</h4>
-
-<p>
-OpenSL ES for Android can only use the URI data locator with MIME data format,
-and only for an audio player. You cannot use this data format for an audio recorder. It supports
-{@code http:} and {@code file:} schemes. It does not support other schemes, such as {@code https:},
-{@code ftp:}, or
-{@code content:}.
-</p>
-
-<p>
-We have not verified support for {@code rtsp:} with audio on the Android platform.
-</p>
-
-<h4>Data structures</h4>
-
-<p>
-Android supports these OpenSL ES 1.0.1 data structures:
-</p>
-<ul>
-  <li>{@code SLDataFormat_MIME}</li>
-  <li>{@code SLDataFormat_PCM}</li>
-  <li>{@code SLDataLocator_BufferQueue}</li>
-  <li>{@code SLDataLocator_IODevice}</li>
-  <li>{@code SLDataLocator_OutputMix}</li>
-  <li>{@code SLDataLocator_URI}</li>
-  <li>{@code SLDataSink}</li>
-  <li>{@code SLDataSource}</li>
-  <li>{@code SLEngineOption}</li>
-  <li>{@code SLEnvironmentalReverbSettings}</li>
-  <li>{@code SLInterfaceID}</li>
-</ul>
-
-<h4>Platform configuration</h4>
-
-<p>
-OpenSL ES for Android is designed for multi-threaded applications and is thread-safe. It supports a
-single engine per application, and up to 32 objects per engine. Available device memory and CPU may
-further restrict the usable number of objects.
-</p>
-
-<p>
-These engine options are recognized, but ignored by {@code slCreateEngine}:
-</p>
-
-<ul>
-  <li>{@code SL_ENGINEOPTION_THREADSAFE}</li>
-  <li>{@code SL_ENGINEOPTION_LOSSOFCONTROL}</li>
-</ul>
-
-<p>
-OpenMAX AL and OpenSL ES may be used together in the same application. In this case, there is
-a single shared engine object internally, and the 32 object limit is shared between OpenMAX AL
-and OpenSL ES. The application should first create both engines, use both engines, and finally
-destroy both engines. The implementation maintains a reference count on the shared engine so that
-it is correctly destroyed during the second destroy operation.
-</p>
-
-<h2 id="planning">Planning for Future Versions of OpenSL ES</h2>
-
-<p>
-The Android high-performance audio APIs are based on
-<a class="external-link" href="https://www.khronos.org/registry/sles/">Khronos Group OpenSL ES
-1.0.1</a>. Khronos has released a revised version 1.1 of the standard. The
-revised version includes new features, clarifications, corrections of typographical errors, and
-some incompatibilities. Most of the expected incompatibilities are relatively minor or are in
-areas of OpenSL ES that are not supported by Android.
-</p>
-
-<p>
-An application
-developed with this version should work on future versions of the Android platform, provided
-that you follow the guidelines that are outlined in the <a href="#binary-compat">Planning for
-binary compatibility</a> section below.
-</p>
-
-<p class="note"><strong>Note: </strong>
-Future source compatibility is not a goal. That is, if you upgrade to a newer version of the NDK,
-you may need to modify your application source code to conform to the new API. We expect that most
-such changes will be minor; see details below.
-</p>
-
-<h3 id="binary-compat">Planning for binary compatibility</h3>
-
-<p>
-We recommend that your application follow these guidelines to improve future binary compatibility:
-</p>
-
-<ul>
-  <li>Use only the documented subset of Android-supported features from OpenSL ES 1.0.1.</li>
-  <li>Do not depend on a particular result code for an unsuccessful operation; be prepared to deal
-  with a different result code.</li>
-  <li>Application callback handlers generally run in a restricted context. They should be written
-  to perform their work quickly, and then return as soon as possible. Do not run complex operations
-  within a callback handler. For example, within a buffer queue completion callback, you can
-  enqueue another buffer, but do not create an audio player.</li>
-  <li>Callback handlers should be prepared to be called more or less frequently, to receive
-  additional event types, and should ignore event types that they do not recognize. Callbacks that
-  are configured with an event mask made of enabled event types should be prepared to be called
-  with multiple event type bits set simultaneously. Use "&" to test for each event bit rather than
-  a switch case.</li>
-  <li>Use prefetch status and callbacks as a general indication of progress, but do not depend on
-  specific hard-coded fill levels or callback sequences. The meaning of the prefetch status fill
-  level, and the behavior for errors that are detected during prefetch, may change.</li>
-</ul>
-
-<p class="note"><strong>Note: </strong>
-See the <a href="#bq-behavior">Buffer queue behavior</a> section below for more details.
-</p>
-
-<h3>Planning for source compatibility</h3>
-
-<p>
-As mentioned, source code incompatibilities are expected in the next version of OpenSL ES from
-Khronos Group. The likely areas of change include:
-</p>
-
-<ul>
-  <li>The buffer queue interface is expected to have significant changes, especially in the areas
-  of {@code BufferQueue::Enqueue}, the parameter list for {@code slBufferQueueCallback}, and the
-  name of field {@code SLBufferQueueState.playIndex}. We recommend that your application code use
-  Android simple buffer queues instead. In the example
-  code that is supplied with the NDK, we have used Android simple buffer queues for playback for
-  this reason. (We also use Android simple buffer queue for recording and decoding to PCM, but that
-  is because standard OpenSL ES 1.0.1 does not support record or decode to a buffer queue data
-  sink.)</li>
-  <li>There will be an addition of {@code const} to the input parameters passed by reference, and
-  to {@code SLchar *} struct fields used as input values. This should not require any changes to
-  your code.</li>
-  <li>There will be a substitution of unsigned types for some parameters that are currently signed.
-  You may need to change a parameter type from {@code SLint32} to {@code SLuint32} or similar, or
-  add a cast.</li>
-  <li>{@code Equalizer::GetPresetName} copies the string to application memory instead of returning
-  a pointer to implementation memory. This will be a significant change, so we recommend that you
-  either avoid calling this method, or isolate your use of it.</li>
-  <li>There will be additional fields in the struct types. For output parameters, these new fields
-  can be ignored, but for input parameters the new fields will need to be initialized. Fortunately,
-  all of these are expected to be in areas that are not supported by Android.</li>
-  <li>Interface <a class="external-link" href="http://en.wikipedia.org/wiki/Globally_unique_identifier">
-  GUIDs</a> will change. Refer to interfaces by symbolic name rather than GUID to avoid a
-  dependency.</li>
-  <li>{@code SLchar} will change from {@code unsigned char} to {@code char}. This primarily affects
-  the URI data locator and MIME data format.</li>
-  <li>{@code SLDataFormat_MIME.mimeType} will be renamed to {@code pMimeType}, and
-  {@code SLDataLocator_URI.URI} will be renamed to {@code pURI}. We recommend that you initialize
-  the {@code SLDataFormat_MIME} and {@code SLDataLocator_URI} data structures using a
-  brace-enclosed, comma-separated list of values, rather than by field name, to isolate your code
-  from this change. This technique is used in the example code.</li>
-  <li>{@code SL_DATAFORMAT_PCM} does not permit the application to specify the representation of
-  the data as signed integer, unsigned integer, or floating-point. The Android implementation
-  assumes that 8-bit data is unsigned integer and 16-bit is signed integer. In addition, the field
-  {@code samplesPerSec} is a misnomer, as the actual units are milliHz. These issues are expected
-  to be addressed in the next OpenSL ES version, which will introduce a new extended PCM data
-  format that permits the application to explicitly specify the representation and corrects the
-  field name. As this will be a new data format, and the current PCM data format will still be
-  available (though deprecated), it should not require any immediate changes to your code.</li>
-</ul>
-
-<h2 id="ae">Android Extensions</h2>
-
-<p>
-OpenSL ES for Android extends the reference OpenSL ES specification to make it compatible with
-Android, and to take advantage of the power and flexibility of the Android platform.
-</p>
-
-<p>
-The definition of the API for the Android extensions resides in <code>OpenSLES_Android.h</code>
-and the header files that it includes. Consult {@code OpenSLES_Android.h}
-for details about these extensions. This file is located under your installation root, in the
-{@code platforms/android-&lt;version&gt;/&lt;abi&gt;/include/SLES} directory. Unless otherwise
-noted, all interfaces are explicit.
-</p>
-
-<p>
-These extensions limit your application's portability to
-other OpenSL ES implementations, because they are Android-specific. You can mitigate this issue by
-avoiding use of the extensions or by using {@code #ifdef} to exclude them at compile time.
-</p>
-
-<p>
-Table 2 shows the Android-specific interfaces and data locators that Android OpenSL ES supports
-for each object type. The <em>Yes</em> values in the cells indicate the interfaces and data
-locators that are available for each object type.
-</p>
-
-<p class="table-caption" id="Android-extensions">
-  <strong>Table 2.</strong> Interfaces and data locators, by object type.</p>
-<table>
-  <tr>
-    <th scope="col">Feature</th>
-    <th scope="col">Audio player</th>
-    <th scope="col">Audio recorder</th>
-    <th scope="col">Engine</th>
-    <th scope="col">Output mix</th>
-  </tr>
-  <tr>
-    <td>Android buffer queue</td>
-    <td>Yes: Source (decode)</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android configuration</td>
-    <td>Yes</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android effect</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-  </tr>
-  <tr>
-    <td>Android effect capabilities</td>
-    <td>No</td>
-    <td>No</td>
-    <td>Yes</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android effect send</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android simple buffer queue</td>
-    <td>Yes: Source (playback) or sink (decode)</td>
-    <td>Yes</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android buffer queue data locator</td>
-    <td>Yes: Source (decode)</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android file descriptor data locator</td>
-    <td>Yes: Source</td>
-    <td>No</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-  <tr>
-    <td>Android simple buffer queue data locator</td>
-    <td>Yes: Source (playback) or sink (decode)</td>
-    <td>Yes: Sink</td>
-    <td>No</td>
-    <td>No</td>
-  </tr>
-</table>
-
-<h3 id="configuration-interface">Android configuration interface</h3>
-
-<p>
-The Android configuration interface provides a means to set
-platform-specific parameters for objects. This interface is different from other OpenSL ES
-1.0.1 interfaces in that your app can use it before instantiating the corresponding object; thus,
-you can configure the object before instantiating it. The
-{@code OpenSLES_AndroidConfiguration.h} header file</code>, which resides at
-{@code platforms/android-&lt;version&gt;/&lt;abi&gt;/include/SLES},
-documents the following available configuration keys and values:
-</p>
-
-<ul>
-<li>Stream type for audio players (default <code>SL_ANDROID_STREAM_MEDIA</code>).</li>
-<li>Record profile for audio recorders (default <code>SL_ANDROID_RECORDING_PRESET_GENERIC</code>).
-</li>
-</ul>
-
-<p>
-The following code snippet shows an example of how to set the Android audio stream type on an audio
-player:
-</p>
-
-<pre>
-// CreateAudioPlayer and specify SL_IID_ANDROIDCONFIGURATION
-// in the required interface ID array. Do not realize player yet.
-// ...
-SLAndroidConfigurationItf playerConfig;
-result = (*playerObject)-&gt;GetInterface(playerObject,
-    SL_IID_ANDROIDCONFIGURATION, &amp;playerConfig);
-assert(SL_RESULT_SUCCESS == result);
-SLint32 streamType = SL_ANDROID_STREAM_ALARM;
-result = (*playerConfig)-&gt;SetConfiguration(playerConfig,
-    SL_ANDROID_KEY_STREAM_TYPE, &amp;streamType, sizeof(SLint32));
-assert(SL_RESULT_SUCCESS == result);
-// ...
-// Now realize the player here.
-</pre>
-
-<p>
-You can use similar code to configure the preset for an audio recorder:
-</p>
-<pre>
-// ... obtain the configuration interface as the first four lines above, then:
-SLuint32 presetValue = SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION;
-result = (*playerConfig)-&gt;SetConfiguration(playerConfig,
-    RECORDING_PRESET, &amp;presetValue, sizeof(SLuint32));
-</pre>
-
-<h3>Android effects interfaces</h3>
-
-<p>
-Android's effect, effect send, and effect capabilities interfaces provide
-a generic mechanism for an application to query and use device-specific
-audio effects. Device manufacturers should document any available device-specific audio effects
-that they provide.
-</p>
-
-<p>
-Portable applications should use the OpenSL ES 1.0.1 APIs for audio effects instead of the Android
-effect extensions.
-</p>
-
-<h3>Android file descriptor data locator</h3>
-
-<p>
-The Android file descriptor data locator permits you to specify the source for an
-audio player as an open file descriptor with read access. The data format must be MIME.
-</p>
-<p>
-This extension is especially useful in conjunction with the native asset manager, because
-the app reads assets from the APK via a file descriptor.
-</p>
-
-<h3 id="simple">Android simple buffer queue data locator and interface</h3>
-
-<p>
-The Android simple buffer queue data locator and interface are
-identical to those in the OpenSL ES 1.0.1 reference specification, with two exceptions: You
-can also use Android simple buffer queues with both audio players and audio recorders. Also, PCM
-is the only data format you can use with these queues.
-In the reference specification, buffer queues are for audio players only, but they are
-compatible with data formats beyond PCM.
-</p>
-<p>
-For recording, your app should enqueue empty buffers. When a registered callback sends
-notification that the system has finished writing data to the buffer, the app can
-read the buffer.
-</p>
-<p>
-Playback works in the same way. For future source code
-compatibility, however, we suggest that applications use Android simple
-buffer queues instead of OpenSL ES 1.0.1 buffer queues.
-</p>
-
-<h3 id="dynamic-interfaces">Dynamic interfaces at object creation</h3>
-
-<p>
-For convenience, the Android implementation of OpenSL ES 1.0.1
-permits your app to specify dynamic interfaces when it instantiates an object.
-This is an alternative to using <code>DynamicInterfaceManagement::AddInterface()</code>
-to add these interfaces after instantiation.
-</p>
-
-<h3 id="bq-behavior">Buffer queue behavior</h3>
-
-<p>
-The Android implementation does not include the
-reference specification's requirement that the play cursor return to the beginning
-of the currently playing buffer when playback enters the {@code SL_PLAYSTATE_STOPPED}
-state. This implementation can conform to that behavior, or it can leave the location of the play
-cursor unchanged.
-</p>
-
-<p>
-As a result, your app cannot assume that either behavior occurs. Therefore,
-you should explicitly call the <code>BufferQueue::Clear()</code> method after a transition to
-<code>SL_PLAYSTATE_STOPPED</code>. Doing so sets the buffer queue to a known state.
-</p>
-
-<p>
-Similarly, there is no specification governing whether the trigger for a buffer queue callback must
-be a transition to <code>SL_PLAYSTATE_STOPPED</code> or execution of
-<code>BufferQueue::Clear()</code>. Therefore, we recommend that you do not create a dependency on
-one or the other; instead, your app should be able to handle both.
-</p>
-
-<h3>Reporting of extensions</h3>
-<p>
-There are three methods for querying whether the platform supports the Android extensions. These
-methods are:
-</p>
-
-<ul>
-<li><code>Engine::QueryNumSupportedExtensions()</code></li>
-<li><code>Engine::QuerySupportedExtension()</code></li>
-<li><code>Engine::IsExtensionSupported()</code></li>
-</ul>
-
-<p>
-Any of these methods returns <code>ANDROID_SDK_LEVEL_&lt;API-level&gt;</code>,
-where {@code API-level} is the platform API level; for example, {@code ANDROID_SDK_LEVEL_23}.
-A platform API level of 9 or higher means that the platform supports the extensions.
-</p>
-
-
-<h3 id="da">Decode audio to PCM</h3>
-
-<p>
-This section describes a deprecated Android-specific extension to OpenSL ES 1.0.1
-for decoding an encoded stream to PCM without immediate playback.
-The table below gives recommendations for use of this extension and alternatives.
-</p>
-
-<table>
-<tr>
-  <th>API level</th>
-  <th>Alternatives</th>
-</tr>
-<tr>
-  <td>13 and below</td>
-  <td>An open-source codec with a suitable license</td>
-</tr>
-<tr>
-  <td>14 to 15</td>
-  <td>An open-source codec with a suitable license</td>
-</tr>
-<tr>
-  <td>16 to 20</td>
-  <td>
-    The {@link android.media.MediaCodec} class or an open-source codec with a suitable license
-  </td>
-</tr>
-<tr>
-  <td>21 and above</td>
-  <td>
-    NDK MediaCodec in the {@code &lt;media/NdkMedia*.h&gt;} header files, the
-    {@link android.media.MediaCodec} class, or an open-source codec with a suitable license
-  </td>
-</tr>
-</table>
-
-<p class="note"><strong>Note: </strong>
-There is currently no documentation for the NDK version of the {@code MediaCodec} API. However,
-you can refer to the
-<a class="external-link" href="https://github.com/googlesamples/android-ndk/tree/master/native-codec">
-native-codec</a> sample code for an example.
-</p>
-
-<p>
-A standard audio player plays back to an audio device, specifying the output mix as the data sink.
-The Android extension differs in that an audio player instead
-acts as a decoder if the app has specified the data source either as a URI or as an Android
-file descriptor data locator described in MIME data format. In such a case, the data sink is
-an Android simple buffer queue data locator with PCM data format.
-</p>
-
-<p>
-This feature is primarily intended for games to pre-load their audio assets when changing to a
-new game level, which is similar to the functionality that the {@link android.media.SoundPool}
-class provides.
-</p>
-
-<p>
-The application should initially enqueue a set of empty buffers in the Android simple
-buffer queue. After that, the app fills the buffers with PCM data. The Android simple
-buffer queue callback fires after each buffer is filled. The callback handler processes
-the PCM data, re-enqueues the now-empty buffer, and then returns. The application is responsible for
-keeping track of decoded buffers; the callback parameter list does not include
-sufficient information to indicate the buffer that contains data or the buffer that should be
-enqueued next.
-</p>
-
-<p>
-The data source implicitly reports the end of stream (EOS) by delivering a
-<code>SL_PLAYEVENT_HEADATEND</code> event at the end of the stream. After the app has decoded
-all of the data it received, it makes no further calls to the Android simple buffer queue callback.
-</p>
-<p>
-The sink's PCM data format typically matches that of the encoded data source
-with respect to sample rate, channel count, and bit depth. However, you can decode to a different
-sample rate, channel count, or bit depth.
-For information about a provision to detect the actual PCM format, see <a href="#meta">
-Determining the format of decoded PCM data via metadata</a>.
-</p>
-<p>
-OpenSL ES for Android's PCM decoding feature supports pause and initial seek; it does not support
-volume control, effects, looping, or playback rate.
-</p>
-<p>
-Depending on the platform implementation, decoding may require resources
-that cannot be left idle.  Therefore, we recommend that you make sure to provide
-sufficient numbers of empty PCM buffers; otherwise, the decoder starves. This may happen,
-for example, if your app returns from the Android simple buffer queue callback without
-enqueueing another empty buffer.  The result of decoder starvation is
-unspecified, but may include: dropping the decoded
-PCM data, pausing the decoding process, or terminating the decoder outright.
-</p>
-
-<p class="note"><strong>Note: </strong>
-To decode an encoded stream to PCM but not play back immediately, for apps running on
-Android 4.x (API levels 16&ndash;20), we recommend using the {@link android.media.MediaCodec} class.
-For new applications running on Android 5.0 (API level 21) or higher, we recommend using the NDK
-equivalent, {@code &lt;NdkMedia*.h&gt;}. These header files reside in
-the {@code media/} directory under your installation root.
-</p>
-
-<h3>Decode streaming ADTS AAC to PCM</h3>
-
-<p>
-An audio player acts as a streaming decoder if the data source is an
-Android buffer queue data locator with MIME data format, and the data
-sink is an Android simple buffer queue data locator with PCM data format.
-Configure the MIME data format as follows:
-</p>
-
-<ul>
-<li>Container: {@code SL_CONTAINERTYPE_RAW}</li>
-<li>MIME type string: {@code SL_ANDROID_MIME_AACADTS}</li>
-</ul>
-
-<p>
-This feature is primarily intended for streaming media applications that
-deal with AAC audio but need to perform custom audio processing
-prior to playback.  Most applications that need to decode audio to PCM
-should use the method that <a href="#da">Decode audio to PCM</a> describes,
-as that method is simpler and handles more audio formats.  The technique described
-here is a more specialized approach, to be used only if both of these
-conditions apply:
-</p>
-
-<ul>
-<li>The compressed audio source is a stream of AAC frames contained in ADTS headers.
-</li>
-<li>The application manages this stream. The data is <em>not</em> located within
-a network resource whose identifier is a URI or within a local file whose identifier is
-a file descriptor.
-</li>
-</ul>
-
-<p>
-The application should initially enqueue a set of filled buffers in the Android buffer queue.
-Each buffer contains one or more complete ADTS AAC frames.
-The Android buffer queue callback fires after each buffer is emptied.
-The callback handler should refill and re-enqueue the buffer, and then return.
-The application need not keep track of encoded buffers; the callback parameter
-list includes sufficient information to indicate the buffer that should be enqueued next.
-The end of stream is explicitly marked by enqueuing an EOS item.
-After EOS, no more enqueues are permitted.
-</p>
-
-<p>
-We recommend that you make sure to provide full
-ADTS AAC buffers, to avoid starving the decoder. This may happen, for example, if your app
-returns from the Android buffer queue callback without enqueueing another full buffer.
-The result of decoder starvation is unspecified.
-</p>
-
-<p>
-In all respects except for the data source, the streaming decode method is the same as
-the one that <a href="#da">Decode audio to PCM</a> describes.
-</p>
-
-<p>
-Despite the similarity in names, an Android buffer queue is <em>not</em>
-the same as an <a href="#simple">Android simple buffer queue</a>. The streaming decoder
-uses both kinds of buffer queues: an Android buffer queue for the ADTS
-AAC data source, and an Android simple buffer queue for the PCM data
-sink.  For more information about the Android simple buffer queue API, see <a href="#simple">Android
-simple buffer queue data locator and interface</a>.
-For more information about the Android buffer queue API, see the {@code index.html} file in
-the {@code docs/Additional_library_docs/openmaxal/} directory under the installation root.
-</p>
-
-<h3 id="meta">Determining the format of decoded PCM data via metadata</h3>
-
-<p>
-The <code>SLMetadataExtractionItf</code> interface is part of the reference specification.
-However, the metadata keys that indicate the actual format of decoded PCM data are specific to
-Android. The <code>OpenSLES_AndroidMetadata.h</code> header file defines these metadata keys.
-This header file resides under your installation root, in the
-{@code platforms/android-&lt;version&gt;/&lt;abi&gt;/include/SLES} directory.
-</p>
-
-<p>
-The metadata key indices are available immediately after
-the <code>Object::Realize()</code> method finishes executing. However, the associated values are not
-available until after the app decodes the first encoded data.  A good
-practice is to query for the key indices in the main thread after calling the {@code
-Object::Realize} method, and to read the PCM format metadata values in the Android simple
-buffer queue callback handler when calling it for the first time. Consult the
-<a class="external-link" href="https://github.com/googlesamples/android-ndk">example code in the
-NDK package</a> for examples of working with this interface.
-</p>
-
-<p>
-Metadata key names are stable, but the key indices are not documented,
-and are subject to change.  An application should not assume that indices
-are persistent across different execution runs, and should not assume that
-multiple object instances share indices within the same run.
-</p>
-
-<h3 id="fp">Floating-point data</h3>
-
-<p>
-An app running on Android 5.0 (API level 21) and higher can supply data to an AudioPlayer in
-single-precision, floating-point format.
-</p>
-<p>
-In following example code, the {@code Engine::CreateAudioPlayer} method creates an audio player
-that uses floating-point data:
-</p>
-
-<pre>
-#include &lt;SLES/OpenSLES_Android.h&gt;
-...
-SLAndroidDataFormat_PCM_EX pcm;
-pcm.formatType = SL_ANDROID_DATAFORMAT_PCM_EX;
-pcm.numChannels = 2;
-pcm.sampleRate = SL_SAMPLINGRATE_44_1;
-pcm.bitsPerSample = 32;
-pcm.containerSize = 32;
-pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
-pcm.endianness = SL_BYTEORDER_LITTLEENDIAN;
-pcm.representation = SL_ANDROID_PCM_REPRESENTATION_FLOAT;
-...
-SLDataSource audiosrc;
-audiosrc.pLocator = ...
-audiosrc.pFormat = &amp;pcm;
-</pre>
-
-<h2 id="notes">Programming Notes</h2>
-<p><a href="{@docRoot}ndk/guides/audio/opensl-prog-notes.html">OpenSL ES Programming Notes</a>
- provides supplemental information to ensure proper implementation of OpenSL ES.</p>
-<p class="note"><strong>Note: </strong>
-For your convenience, we have included a copy of the OpenSL ES 1.0.1 specification with the NDK in
-{@code docs/opensles/OpenSL_ES_Specification_1.0.1.pdf}.
-</p>
-
-<h2 id="platform-issues">Platform Issues</h2>
-
-<p>
-This section describes known issues in the initial platform release that supports these APIs.
-</p>
-
-<h3>Dynamic interface management</h3>
-
-<p>
-{@code DynamicInterfaceManagement::AddInterface} does not work. Instead, specify the interface in
-the array that is passed to Create, as shown in the example code for environmental reverb.
-</p>
-
diff --git a/docs/html/ndk/guides/audio/opensl-prog-notes.jd b/docs/html/ndk/guides/audio/opensl-prog-notes.jd
deleted file mode 100644
index e70aa08..0000000
--- a/docs/html/ndk/guides/audio/opensl-prog-notes.jd
+++ /dev/null
@@ -1,461 +0,0 @@
-page.title=OpenSL ES Programming Notes
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#init">Objects and Interface Initialization</a></li>
-        <li><a href="#prefetch">Audio Player Prefetch</a></li>
-        <li><a href="#destroy">Destroy</a></li>
-        <li><a href="#panning">Stereo Panning</a></li>
-        <li><a href="#callbacks">Callbacks and Threads</a></li>
-        <li><a href="#perform">Performance</a></li>
-        <li><a href="#sandp">Security and Permissions</a></li>
-      </ol>
-    </div>
-</div>
-
-<p>
-The notes in this section supplement the
-<a class="external-link" href="https://www.khronos.org/registry/sles/">OpenSL ES 1.0.1
-specification</a>.
-</p>
-
-<h2 id="init">Objects and Interface Initialization</h2>
-
-<p>
-Two aspects of the OpenSL ES programming model that may be unfamiliar to new developers are the
-distinction between objects and interfaces, and the initialization sequence.
-</p>
-
-<p>
-Briefly, an OpenSL ES object is similar to the object concept in
- programming languages such as Java
-and C++, except an OpenSL ES object is only visible via its associated interfaces.
- This includes
-the initial interface for all objects, called {@code SLObjectItf}.
- There is no handle for an object
-itself, only a handle to the {@code SLObjectItf} interface of the object.
-</p>
-
-<p>
-An OpenSL ES object is first <em>created</em>, which returns an {@code SLObjectItf}, then
-<em>realized</em>. This is similar to the common programming pattern of first constructing an
-object (which should never fail other than for lack of memory or invalid parameters), and then
-completing initialization (which may fail due to lack of resources). The realize step gives the
-implementation a logical place to allocate additional resources if needed.
-</p>
-
-<p>
-As part of the API to create an object, an application specifies an array of desired interfaces
-that it plans to acquire later. Note that this array does not automatically
- acquire the interfaces;
-it merely indicates a future intention to acquire them. Interfaces are distinguished as
-<em>implicit</em> or <em>explicit</em>. An explicit interface must be listed in the array if it
-will be acquired later. An implicit interface need not be listed in the
- object create array, but
-there is no harm in listing it there. OpenSL ES has one more kind of interface called
-<em>dynamic</em>, which does not need to be specified in the object
- create array and can be added
-later after the object is created. The Android implementation provides
- a convenience feature to
-avoid this complexity, which is described in
- <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html#dynamic-interfaces">Dynamic interfaces at object creation</a>.
-</p>
-
-<p>
-After the object is created and realized, the application should acquire interfaces for each
-feature it needs, using {@code GetInterface} on the initial {@code SLObjectItf}.
-</p>
-
-<p>
-Finally, the object is available for use via its interfaces, though note that
- some objects require
-further setup. In particular, an audio player with URI data source needs a bit
- more preparation in
-order to detect connection errors. See the
- <a href="#prefetch">Audio player prefetch</a> section for details.
-</p>
-
-<p>
-After your application is done with the object, you should explicitly destroy it; see the
-<a href="#destroy">Destroy</a> section below.
-</p>
-
-<h2 id="prefetch">Audio Player Prefetch</h2>
-
-<p>
-For an audio player with URI data source, {@code Object::Realize} allocates
- resources but does not
-connect to the data source (<em>prepare</em>) or begin pre-fetching data. These occur once the
-player state is set to either {@code SL_PLAYSTATE_PAUSED} or {@code SL_PLAYSTATE_PLAYING}.
-</p>
-
-<p>
-Some information may still be unknown until relatively late in this sequence. In
-particular, initially {@code Player::GetDuration} returns {@code SL_TIME_UNKNOWN} and
-{@code MuteSolo::GetChannelCount} either returns successfully with channel count zero or the
-error result {@code SL_RESULT_PRECONDITIONS_VIOLATED}. These APIs return the proper values
-once they are known.
-</p>
-
-<p>
-Other properties that are initially unknown include the sample rate and
- actual media content type
-based on examining the content's header (as opposed to the
- application-specified MIME type and
-container type). These are also determined later during
- prepare/prefetch, but there are no APIs to
-retrieve them.
-</p>
-
-<p>
-The prefetch status interface is useful for detecting when all information
- is available, or your
-application can poll periodically. Note that some information, such as the
- duration of a streaming
-MP3, may <em>never</em> be known.
-</p>
-
-<p>
-The prefetch status interface is also useful for detecting errors. Register a callback
- and enable
-at least the {@code SL_PREFETCHEVENT_FILLLEVELCHANGE} and {@code SL_PREFETCHEVENT_STATUSCHANGE}
-events. If both of these events are delivered simultaneously, and
-{@code PrefetchStatus::GetFillLevel} reports a zero level, and
-{@code PrefetchStatus::GetPrefetchStatus} reports {@code SL_PREFETCHSTATUS_UNDERFLOW},
- then this
-indicates a non-recoverable error in the data source. This includes the inability to
- connect to the
-data source because the local filename does not exist or the network URI is invalid.
-</p>
-
-<p>
-The next version of OpenSL ES is expected to add more explicit support for
- handling errors in the
-data source. However, for future binary compatibility, we intend to continue
- to support the current
-method for reporting a non-recoverable error.
-</p>
-
-<p>
-In summary, a recommended code sequence is:
-</p>
-
-<ol>
-  <li>{@code Engine::CreateAudioPlayer}</li>
-  <li>{@code Object:Realize}</li>
-  <li>{@code Object::GetInterface} for {@code SL_IID_PREFETCHSTATUS}</li>
-  <li>{@code PrefetchStatus::SetCallbackEventsMask}</li>
-  <li>{@code PrefetchStatus::SetFillUpdatePeriod}</li>
-  <li>{@code PrefetchStatus::RegisterCallback}</li>
-  <li>{@code Object::GetInterface} for {@code SL_IID_PLAY}</li>
-  <li>{@code Play::SetPlayState} to {@code SL_PLAYSTATE_PAUSED}, or
-  {@code SL_PLAYSTATE_PLAYING}</li>
-</ol>
-
-<p class="note"><strong>Note: </strong>
-Preparation and prefetching occur here; during this time your callback is called with
-periodic status updates.
-</p>
-
-<h2 id="destroy">Destroy</h2>
-
-<p>
-Be sure to destroy all objects when exiting from your application.
- Objects should be destroyed in
-reverse order of their creation, as it is not safe to destroy an object that has any dependent
-objects. For example, destroy in this order: audio players and recorders, output mix, and then
-finally the engine.
-</p>
-
-<p>
-OpenSL ES does not support automatic garbage collection or
-<a class="external-link" href="http://en.wikipedia.org/wiki/Reference_counting">reference
-counting</a> of interfaces. After you call {@code Object::Destroy}, all extant
- interfaces that are
-derived from the associated object become undefined.
-</p>
-
-<p>
-The Android OpenSL ES implementation does not detect the incorrect use of such interfaces.
-Continuing to use such interfaces after the object is destroyed can cause your application to
-crash or behave in unpredictable ways.
-</p>
-
-<p>
-We recommend that you explicitly set both the primary object interface and all associated
-interfaces to NULL as part of your object destruction sequence, which prevents the accidental
-misuse of a stale interface handle.
-</p>
-
-<h2 id="panning">Stereo Panning</h2>
-
-<p>
-When {@code Volume::EnableStereoPosition} is used to enable stereo panning of a mono source,
- there is a 3-dB reduction in total
-<a class="external-link" href="http://en.wikipedia.org/wiki/Sound_power_level">sound power
-level</a>. This is needed to permit the total sound power level to remain constant as
- the source is
-panned from one channel to the other. Therefore, only enable stereo positioning if you need
-it. See the Wikipedia article on
-<a class="external-link" href="http://en.wikipedia.org/wiki/Panning_(audio)">audio panning</a>
- for more information.
-</p>
-
-<h2 id="callbacks">Callbacks and Threads</h2>
-
-<p>
-Callback handlers are generally called synchronously with respect to the event. That is, at the
-moment and location that the event is detected by the implementation. This point is
-asynchronous with respect to the application, so you should use a non-blocking synchronization
-mechanism to control access to any variables shared between the application and the callback
-handler. In the example code, such as for buffer queues, we have either omitted this
-synchronization or used blocking synchronization in the interest of simplicity. However, proper
-non-blocking synchronization is critical for any production code.
-</p>
-
-<p>
-Callback handlers are called from internal non-application threads that are not attached to the
-Android runtime, so they are ineligible to use JNI. Because these internal threads are
-critical to
-the integrity of the OpenSL ES implementation, a callback handler should also not block
- or perform
-excessive work.
-</p>
-
-<p>
-If your callback handler needs to use JNI or execute work that is not proportional to the
-callback, the handler should instead post an event for another thread to process. Examples of
-acceptable callback workload include rendering and enqueuing the next output buffer
-(for an AudioPlayer), processing the just-filled input buffer and enqueueing the next
- empty buffer
-(for an AudioRecorder), or simple APIs such as most of the <em>Get</em> family. See the
-<a href="#perform">Performance</a> section below regarding the workload.
-</p>
-
-<p>
-Note that the converse is safe: an Android application thread that has entered JNI
- is allowed to
-directly call OpenSL ES APIs, including those that block. However, blocking calls are not
-recommended from the main thread, as they may result in
- <em>Application Not Responding</em> (ANR).
-</p>
-
-<p>
-The determination regarding the thread that calls a callback handler is largely left up to the
-implementation. The reason for this flexibility is to permit future optimizations,
- especially on
-multi-core devices.
-</p>
-
-<p>
-The thread on which the callback handler runs is not guaranteed to have the same
- identity across
-different calls. Therefore, do not rely on the {@code pthread_t returned by pthread_self()}
- or the
-{@code pid_t returned by gettid()} to be consistent across calls. For the same reason,
- do not use
-the thread local storage (TLS) APIs such as {@code pthread_setspecific()} and
-{@code pthread_getspecific()} from a callback.
-</p>
-
-<p>
-The implementation guarantees that concurrent callbacks of the same kind, for the
- same object, does
-not occur. However, concurrent callbacks of different kinds for the same object are possible on
-different threads.
-</p>
-
-<h2 id="perform">Performance</h2>
-
-<p>
-As OpenSL ES is a native C API, non-runtime application threads that call OpenSL ES have no
-runtime-related overhead such as garbage collection pauses. With one exception described below,
-there is no additional performance benefit to the use of OpenSL ES other than this.
- In particular,
-the use of OpenSL ES does not guarantee enhancements such as lower audio latency and higher
-scheduling priority over that which the platform generally provides. On the other hand, as the
-Android platform and specific device implementations continue to evolve, an OpenSL ES application
-can expect to benefit from any future system performance improvements.
-</p>
-
-<p>
-One such evolution is support for reduced
-<a href="{@docRoot}ndk/guides/audio/output-latency.html">audio output latency</a>.
-The underpinnings for reduced
-output latency were first included in Android 4.1 (API level 16), and then
-continued progress occurred in Android 4.2 (API level 17). These improvements are available via
-OpenSL ES for device implementations that
- claim feature {@code android.hardware.audio.low_latency}.
-If the device doesn't claim this feature but supports Android 2.3 (API level 9)
-or later, then you can still use the OpenSL ES APIs but the output latency may be higher.
- The lower
-output latency path is used only if the application requests a buffer size and sample rate
- that are
-compatible with the device's native output configuration. These parameters are
- device-specific and
-should be obtained as described below.
-</p>
-
-<p>
-Beginning with Android 4.2 (API level 17), an application can query for the
-platform native or optimal output sample rate and buffer size for the device's primary output
-stream. When combined with the feature test just mentioned, an app can now configure itself
-appropriately for lower latency output on devices that claim support.
-</p>
-
-<p>
-For Android 4.2 (API level 17) and earlier, a buffer count of two or more is
-required for lower latency. Beginning with Android 4.3 (API level 18), a buffer
-count of one is sufficient for lower latency.
-</p>
-
-<p>
-All OpenSL ES interfaces for output effects preclude the lower latency path.
-</p>
-
-<p>
-The recommended sequence is as follows:
-</p>
-
-<ol>
-  <li>Check for API level 9 or higher to confirm the use of OpenSL ES.</li>
-  <li>Check for the {@code android.hardware.audio.low_latency} feature using code such as this:
-    <pre>import android.content.pm.PackageManager;
-...
-PackageManager pm = getContext().getPackageManager();
-boolean claimsFeature = pm.hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
-    </pre></li>
-  <li>Check for API level 17 or higher to confirm the use of
-  {@code android.media.AudioManager.getProperty()}.</li>
-  <li>Get the native or optimal output sample rate and buffer size for this device's
-  primary output
-  stream using code such as this:
-    <pre>import android.media.AudioManager;
-...
-AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
-String sampleRate = am.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE));
-String framesPerBuffer = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER));
-    </pre>
-  Note that {@code sampleRate} and {@code framesPerBuffer} are <em>strings</em>. First check for
-  null and then convert to int using {@code Integer.parseInt()}.</li>
-    <li>Now use OpenSL ES to create an AudioPlayer with PCM buffer queue data locator.</li>
-</ol>
-
-<p class="note"><strong>Note: </strong>
-You can use the
-<a class="external-link"
- href="https://play.google.com/store/apps/details?id=com.levien.audiobuffersize">
- Audio Buffer Size</a>
-test app to determine the native buffer size and sample rate for OpenSL ES audio
-applications on your audio device. You can also visit GitHub to view <a class="external-link"
-href="https://github.com/gkasten/high-performance-audio/tree/master/audio-buffer-size">
-audio-buffer-size</a> samples.
-
-<p>
-The number of lower latency audio players is limited. If your application requires more 
-than a few
-audio sources, consider mixing your audio at the application level. Be sure to destroy your audio
-players when your activity is paused, as they are a global resource shared with other apps.
-</p>
-
-<p>
-To avoid audible glitches, the buffer queue callback handler must execute within a small and
-predictable time window. This typically implies no unbounded blocking on mutexes, conditions,
-or I/O operations. Instead consider <em>try locks</em>, locks and waits with timeouts, and
-<a class="external-link"
- href="https://source.android.com/devices/audio/avoiding_pi.html#nonBlockingAlgorithms">
- non-blocking algorithms</a>.
-</p>
-
-<p>
-The computation required to render the next buffer (for AudioPlayer) or consume the previous
-buffer (for AudioRecord) should take approximately the same amount of time for each callback.
-Avoid algorithms that execute in a non-deterministic amount of time or are <em>bursty</em> in
-their computations. A callback computation is bursty if the CPU time spent in any given callback
-is significantly larger than the average. In summary, the ideal is for the CPU execution time of
-the handler to have variance near zero, and for the handler to not block for unbounded times.
-</p>
-
-<p>
-Lower latency audio is possible for these outputs only:
-</p>
-
-<ul>
-  <li>On-device speakers.</li>
-  <li>Wired headphones.</li>
-  <li>Wired headsets.</li>
-  <li>Line out.</li>
-  <li><a class="external-link" href="https://source.android.com/devices/audio/usb.html">
-  USB digital
-  audio</a>.</li>
-</ul>
-
-<p>
-On some devices, speaker latency is higher than other paths due to digital signal processing for
-speaker correction and protection.
-</p>
-
-<p>
-As of API level 21,
-<a href="{@docRoot}ndk/guides/audio/input-latency.html">lower latency audio input</a>
- is supported
-on select devices. To take advantage of
-this feature, first confirm that lower latency output is available as described above. The
-capability for lower latency output is a prerequisite for the lower latency input feature. Then,
-create an AudioRecorder with the same sample rate and buffer size as would be used for output.
-OpenSL ES interfaces for input effects preclude the lower latency path. The record preset
-{@code SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION} must be used for lower latency; this preset
-disables device-specific digital signal processing that may add latency to the input path. For
-more information on record presets, see the <a href="#configuration-interface">Android
-configuration interface</a> section above.
-</p>
-
-<p>
-For simultaneous input and output, separate buffer queue completion handlers are used for each
-side. There is no guarantee of the relative order of these callbacks, or the synchronization of
-the audio clocks, even when both sides use the same sample rate. Your application
- should buffer the
-data with proper buffer synchronization.
-</p>
-
-<p>
-One consequence of potentially independent audio clocks is the need for asynchronous sample rate
-conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
-conversion is to duplicate or drop samples as needed near a zero-crossing point.
- More sophisticated
-conversions are possible.
-</p>
-
-<h2 id="sandp">Security and Permissions</h2>
-
-<p>
-As far as who can do what, security in Android is done at the process level. Java programming
-language code cannot do anything more than native code, nor can native code do anything more than
-Java programming language code. The only differences between them are the available APIs.
-</p>
-
-<p>
-Applications using OpenSL ES must request the permissions that they would need for similar
-non-native APIs. For example, if your application records audio, then it needs the
-{@code android.permission.RECORD_AUDIO} permission. Applications that use audio effects need
-{@code android.permission.MODIFY_AUDIO_SETTINGS}. Applications that play network URI resources
-need {@code android.permission.NETWORK}. See
-<a href="https://developer.android.com/training/permissions/index.html">Working with System
-Permissions</a> for more information.
-</p>
-
-<p>
-Depending on the platform version and implementation, media content parsers and
- software codecs may
-run within the context of the Android application that calls OpenSL ES (hardware codecs are
-abstracted but are device-dependent). Malformed content designed to exploit parser and codec
-vulnerabilities is a known attack vector. We recommend that you play media only from trustworthy
-sources or that you partition your application such that code that handles media from
-untrustworthy sources runs in a relatively <em>sandboxed</em> environment. For example, you could
-process media from untrustworthy sources in a separate process. Though both processes would still
-run under the same UID, this separation does make an attack more difficult.
-</p>
diff --git a/docs/html/ndk/guides/audio/output-latency.jd b/docs/html/ndk/guides/audio/output-latency.jd
deleted file mode 100644
index 4aa97a6..0000000
--- a/docs/html/ndk/guides/audio/output-latency.jd
+++ /dev/null
@@ -1,310 +0,0 @@
-page.title=Audio Output Latency
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#prereq">Prerequisites</a></li>
-        <li><a href="#low-lat-track">Obtain a Low-Latency Track</a></li>
-        <li><a href="#buffer-size">Use the Optimal Buffer Size When Enqueuing Audio Data</a></li>
-        <li><a href="#warmup-lat">Avoid Warmup Latency</a></li>
-      </ol>
-      <h2>Also read</h2>
-
-      <ol>
-        <li><a href="https://source.android.com/devices/audio/latency_app.html" class="external-link">
-        Audio Latency for App Developers</a></li>
-        <li><a href="https://source.android.com/devices/audio/latency_contrib.html" class="external-link">
-        Contributors to Audio Latency</a></li>
-        <li><a href="https://source.android.com/devices/audio/latency_measure.html" class="external-link">
-        Measuring Audio Latency</a></li>
-        <li><a href="https://source.android.com/devices/audio/warmup.html" class="external-link">
-        Audio Warmup</a></li>
-        <li><a href="https://en.wikipedia.org/wiki/Latency_%28audio%29" class="external-link">
-        Latency (audio)</a></li>
-        <li><a href="https://en.wikipedia.org/wiki/Round-trip_delay_time" class="external-link">
-        Round-trip delay time</a></li>
-      </ol>
-    </div>
-  </div>
-
-<a href="https://www.youtube.com/watch?v=PnDK17zP9BI" class="notice-developers-video">
-<div>
-    <h3>Video</h3>
-    <p>Audio latency: buffer sizes</p>
-</div>
-</a>
-
-<a href="https://www.youtube.com/watch?v=92fgcUNCHic" class="notice-developers-video">
-<div>
-    <h3>Video</h3>
-    <p>Building great multi-media experiences on Android</p>
-</div>
-</a>
-
-<p>This page describes how to develop your audio app for low-latency output and how to avoid
-warmup latency.</p>
-
-<h2 id="prereq">Prerequisites</h2>
-
-<p>Low-latency audio is currently only supported when using Android's implementation of the
-OpenSL ES™ API specification, and the Android NDK:
-</p>
-
-<ol>
-  <li>Download and install the <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.</li>
-  <li>Read the <a href="{@docRoot}ndk/guides/audio/opensl-for-android.html">OpenSL ES
-  documentation</a>.
-</ol>
-
-<h2 id="low-lat-track">Obtain a Low-Latency Track</h2>
-
-<p>Latency is the time it takes for a signal to travel through a system.  These are the common
-types of latency related to audio apps:
-
-<ul>
-  <li><strong>Audio output latency</strong> is the time between an audio sample being generated by an
-app and the sample being played through the headphone jack or built-in speaker.</li>
-
-  <li><strong>Audio input latency</strong> is the time between an audio signal being received by a
-device’s audio input, such as the microphone, and that same audio data being available to an
-app.</li>
-
-  <li><strong>Round-trip latency</strong> is the sum of input latency, app processing time, and
-  output latency.</li>
-
-  <li><strong>Touch latency</strong> is the time between a user touching the screen and that
-touch event being received by an app.</li>
-</ul>
-
-<p>It is difficult to test audio output latency in isolation since it requires knowing exactly
-when the first sample is sent into the audio path (although this can be done using a
-<a href="https://source.android.com/devices/audio/testing_circuit.html" class="external-link">
-light testing circuit</a> and an oscilloscope). If you know the round-trip audio latency, you can
-use the rough rule of thumb: <strong>audio output latency is half the round-trip audio latency
-over paths without signal processing</strong>.
-</p>
-
-<p>To obtain the lowest latency, you must supply audio data that matches the device's optimal
-sample rate and buffer size. For more information, see
-<a href="https://source.android.com/devices/audio/latency_design.html" class="external-link">
-Design For Reduced Latency</a>.</p>
-
-<h3>Obtain the optimal sample rate</h3>
-
-<p>In Java, you can obtain the optimal sample rate from AudioManager as shown in the following
-code example:</p>
-
-<pre>
-AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
-String frameRate = am.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
-int frameRateInt = Integer.parseInt(frameRate);
-if (frameRateInt == 0) frameRateInt = 44100; // Use a default value if property not found
-</pre>
-
-<p class="note">
-  <strong>Note:</strong> The sample rate refers to the rate of each stream. If your source audio
-  has two channels (stereo), then you will have one stream playing a pair of samples (frame) at
-  <a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_SAMPLE_RATE">
-  PROPERTY_OUTPUT_SAMPLE_RATE</a>.
-</p>
-
-<h3>Use the optimal sample rate when creating your audio player</h3>
-
-<p>Once you have the optimal sample output rate, you can supply it when creating your player
-using OpenSL ES:</p>
-
-<pre>
-// create buffer queue audio player
-void Java_com_example_audio_generatetone_MainActivity_createBufferQueueAudioPlayer
-        (JNIEnv* env, jclass clazz, jint sampleRate, jint framesPerBuffer)
-{
-   ...
-   // specify the audio source format
-   SLDataFormat_PCM format_pcm;
-   format_pcm.numChannels = 2;
-   format_pcm.samplesPerSec = (SLuint32) sampleRate * 1000;
-   ...
-}
-</pre>
-
-<p class="note">
-  <strong>Note:</strong> {@code samplesPerSec} refers to the <em>sample rate per channel in
-  millihertz</em> (1 Hz = 1000 mHz).
-</p>
-
-<h3>Avoid adding output interfaces that involve signal processing</h3>
-
-<p>Only these interfaces are supported by the fast mixer:</p>
-
-<ul>
-  <li>SL_IID_ANDROIDSIMPLEBUFFERQUEUE</li>
-  <li>SL_IID_VOLUME</li>
-  <li>SL_IID_MUTESOLO</li>
-</ul>
-
-<p>These interfaces are not allowed because they involve signal processing and will cause
-your request for a fast-track to be rejected:</p>
-
-<ul>
-  <li>SL_IID_BASSBOOST</li>
-  <li>SL_IID_EFFECTSEND</li>
-  <li>SL_IID_ENVIRONMENTALREVERB</li>
-  <li>SL_IID_EQUALIZER</li>
-  <li>SL_IID_PLAYBACKRATE</li>
-  <li>SL_IID_PRESETREVERB</li>
-  <li>SL_IID_VIRTUALIZER</li>
-  <li>SL_IID_ANDROIDEFFECT</li>
-  <li>SL_IID_ANDROIDEFFECTSEND</li>
-</ul>
-
-<p>When you create your player, make sure you only add <em>fast</em> interfaces, as shown in
-the following example:</p>
-
-<pre>
-const SLInterfaceID interface_ids[2] = { SL_IID_ANDROIDSIMPLEBUFFERQUEUE, SL_IID_VOLUME };
-</pre>
-
-<h3>Verify you're using a low-latency track</h3>
-
-<p>Complete these steps to verify that you have successfully obtained a low-latency track:</p>
-
-<ol>
-  <li>Launch your app and then run the following command:</li>
-
-<pre>
-adb shell ps | grep your_app_name
-</pre>
-
-  <li>Make a note of your app's process ID.</li>
-
-  <li>Now, play some audio from your app. You have approximately three seconds to run the
-following command from the terminal:</li>
-
-<pre>
-adb shell dumpsys media.audio_flinger
-</pre>
-
-  <li>Scan for your process ID. If you see an <em>F</em> in the <em>Name</em> column, it's on a
-low-latency track (the F stands for <em>fast track</em>).</li>
-
-</ol>
-
-<h3>Measure round-trip latency</h3>
-
-<p>You can measure round-trip audio latency by creating an app that generates an audio signal,
-listens for that signal, and measures the time between sending it and receiving it.
-Alternatively, you can install this
-<a href="https://play.google.com/store/apps/details?id=org.drrickorang.loopback" class="external-link">
-latency testing app</a>. This performs a round-trip latency test using the
-<a href="https://source.android.com/devices/audio/latency_measure.html#larsenTest" class="external-link">
-Larsen test</a>. You can also
-<a href="https://github.com/gkasten/drrickorang/tree/master/LoopbackApp" class="external-link">
-view the source code</a> for the latency testing app.</p>
-
-<p>Since the lowest latency is achieved over audio paths with minimal signal processing, you may
-also want to use an
-<a href="https://source.android.com/devices/audio/latency_measure.html#loopback" class="external-link">
-Audio Loopback Dongle</a>, which allows the test to be run over the headset connector.</p>
-
-<p>The lowest possible round-trip audio latency varies greatly depending on device model and
-Android build. You can measure it yourself using the latency testing app and loopback
-dongle. When creating apps for <em>Nexus devices</em>, you can also use the
-<a href="https://source.android.com/devices/audio/latency_measurements.html" class="external-link">
-published measurements</a>.</p>
-
-<p>You can also get a rough idea of audio performance by testing whether the device reports
-support for the
-<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY">
-low_latency</a> and
-<a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_PRO">
-pro</a> hardware features.</p>
-
-<h3>Review the CDD and audio latency</h3>
-
-<p>The Android Compatibility Definition Document (CDD) enumerates the hardware and software
-requirements of a compatible Android device.
-See <a href="https://source.android.com/compatibility/" class="external-link">
-Android Compatibility</a> for more information on the overall compatibility program, and
-<a href="https://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf" class="external-link">
-CDD</a> for the actual CDD document.</p>
-
-<p>In the CDD, round-trip latency is specified as 20&nbsp;ms or lower (even though musicians
-generally require 10&nbsp;ms). This is because there are important use cases that are enabled by
-20&nbsp;ms.</p>
-
-<p>There is currently no API to determine audio latency over any path on an Android device at
-runtime. You can, however, use the following hardware feature flags to find out whether the
-device makes any guarantees for latency:</p>
-
-<ul>
-  <li><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY">
-android.hardware.audio.low_latency</a> indicates a continuous output latency of 45&nbsp;ms or
-less.</li>
-
-  <li><a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_PRO">
-android.hardware.audio.pro</a> indicates a continuous round-trip latency of 20&nbsp;ms or
-less.</li>
-</ul>
-
-<p>The criteria for reporting these flags is defined in the CDD in sections <em>5.6 Audio
-Latency</em> and <em>5.10 Professional Audio</em>.</p>
-
-<p>Here’s how to check for these features in Java:</p>
-
-<pre>
-boolean hasLowLatencyFeature =
-    getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
-
-boolean hasProFeature =
-    getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUDIO_PRO);
-</pre>
-
-<p>Regarding the relationship of audio features, the {@code android.hardware.audio.low_latency}
-feature is a prerequisite for {@code android.hardware.audio.pro}. A device can implement
-{@code android.hardware.audio.low_latency} and not {@code android.hardware.audio.pro}, but not
-vice-versa.</p>
-
-<h2 id="buffer-size">Use the Optimal Buffer Size When Enqueuing Audio Data</h2>
-
-<p>You can obtain the optimal buffer size in a similar way to the optimal frame rate, using the
-AudioManager API:</p>
-
-<pre>
-AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
-String framesPerBuffer = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
-int framesPerBufferInt = Integer.parseInt(framesPerBuffer);
-if (framesPerBufferInt == 0) framesPerBufferInt = 256; // Use default
-</pre>
-
-<p>The
-<a href="{@docRoot}reference/android/media/AudioManager.html#PROPERTY_OUTPUT_FRAMES_PER_BUFFER">
-PROPERTY_OUTPUT_FRAMES_PER_BUFFER</a> property indicates the number of audio frames
-that the HAL (Hardware Abstraction Layer) buffer can hold. You should construct your audio
-buffers so that they contain an exact multiple of this number. If you use the correct number
-of audio frames, your callbacks occur at regular intervals, which reduces jitter.</p>
-
-<p>It is important to use the API to determine buffer size rather than using a hardcoded value,
- because HAL buffer sizes differ across devices and across Android builds.</p>
-
-<h2 id="warmup-lat">Avoid Warmup Latency</h2>
-
-<p>When you enqueue audio data for the first time, it takes a small, but still significant,
-amount of time for the device audio circuit to warm up. To avoid this warmup latency, you should
-enqueue buffers of audio data containing silence, as shown in the following code example:</p>
-
-<pre>
-#define CHANNELS 1
-static short* silenceBuffer;
-int numSamples = frames * CHANNELS;
-silenceBuffer = malloc(sizeof(*silenceBuffer) * numSamples);
-    for (i = 0; i < numSamples; i++) {
-        silenceBuffer[i] = 0;
-    }
-</pre>
-
-<p>At the point when audio should be produced, you can switch to enqueuing buffers containing
-real audio data.</p>
-
diff --git a/docs/html/ndk/guides/audio/sample-rates.jd b/docs/html/ndk/guides/audio/sample-rates.jd
deleted file mode 100644
index da68597..0000000
--- a/docs/html/ndk/guides/audio/sample-rates.jd
+++ /dev/null
@@ -1,151 +0,0 @@
-page.title=Sample Rates
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#best">Best Practices for Sampling and Resampling</a></li>
-        <li><a href="#info">For More Information</a></li>
-      </ol>
-    </div>
-  </div>
-
-<a class="notice-developers-video" href="https://www.youtube.com/watch?v=6Dl6BdrA-sQ">
-<div>
-    <h3>Video</h3>
-    <p>Sample Rates: Why Can't We All Just Agree?</p>
-</div>
-</a>
-
-<p>As of Android 5.0 (Lollipop), the audio resamplers are now entirely based
-on FIR filters derived from a Kaiser windowed-sinc function. The Kaiser windowed-sinc
-offers the following properties:
-<ul>
-    <li>It is straightforward to calculate for its design parameters (stopband
- ripple, transition bandwidth, cutoff frequency, filter length).</li>
-<li>It is nearly optimal for reduction of stopband energy compared to overall
-energy.</li>
-</ul>
-See P.P. Vaidyanathan, <a class="external-link"
-href="https://drive.google.com/file/d/0B7tBh7YQV0DGak9peDhwaUhqY2c/view">
-<i>Multirate Systems and Filter Banks</i></a>, p. 50 for discussions of the
-Kaiser Window and its optimality and relationship to Prolate Spheroidal
-Windows.</p>
-
-<p>The design parameters are automatically computed based on internal
-quality determination and the sampling ratios desired. Based on the
-design parameters, the windowed-sinc filter is generated.  For music use,
-the resampler for 44.1 to 48 kHz and vice versa is generated at a higher
-quality than for arbitrary frequency conversion.</p>
-
-<p>The audio resamplers provide increased quality, as well as speed
-to achieve that quality. But resamplers can introduce small amounts
-of passband ripple and aliasing harmonic noise, and they can cause some high
-frequency loss in the transition band, so avoid using them unnecessarily.</p>
-
-<h2 id="best">Best Practices for Sampling and Resampling</h2>
-<p>This section describes some best practices to help you avoid problems with sampling rates.</p>
-<h3>Choose the sampling rate to fit the device</h3>
-
-<p>In general, it is best to choose the sampling rate to fit the device,
-typically 44.1 kHz or 48 kHz.  Use of a sample rate greater than
-48 kHz will typically result in decreased quality because a resampler must be
-used to play back the file.</p>
-
-<h3>Use simple resampling ratios (fixed versus interpolated polyphases)</h3>
-
-<p>The resampler operates in one of the following modes:</p>
-<ul>
-    <li>Fixed polyphase mode. The filter coefficients for each polyphase are precomputed.</li>
-    <li>Interpolated polyphase mode. The filter coefficients for each polyphase must
-be interpolated from the nearest two precomputed polyphases.</li>
-</ul>
-<p>The resampler is fastest in fixed polyphase mode, when the ratio of input
-rate over output rate L/M (taking out the greatest common divisor)
-has M less than 256.  For example, for 44,100 to 48,000 conversion, L = 147,
-M = 160.</p>
-
-<p>In fixed polyphase mode, the sampling rate is locked for as
-many samples converted and does not change.  In interpolated polyphase
-mode, the sampling rate is approximate. The drift is generally on the
-order of one sample over a few hours of playback on a 48-kHz device.
-This is not usually a concern because approximation error is much less than
-frequency error of internal quartz oscillators, thermal drift, or jitter
- (typically tens of ppm).</p>
-
-<p>Choose simple-ratio sampling rates such as 24 kHz (1:2) and 32 kHz (2:3) when playing back
- on a 48-kHz device, even though other sampling
-rates and ratios may be permitted through AudioTrack.</p>
-
-<h3>Use upsampling rather than downsampling when changing sample rates</h3>
-
-<p>Sampling rates can be changed on the fly. The granularity of
-such change is based on the internal buffering (typically a few hundred
-samples), not on a sample-by-sample basis. This can be used for effects.</p>
-
-<p>Do not dynamically change sampling rates when
-downsampling. When changing sample rates after an audio track is
-created, differences of around 5 to 10 percent from the original rate may
-trigger a filter recomputation when downsampling (to properly suppress
-aliasing). This can consume computing resources and may cause an audible click
-if the filter is replaced in real time.</p>
-
-<h3>Limit downsampling to no more than 6:1</h3>
-
-<p>Downsampling is typically triggered by hardware device requirements. When the
- Sample Rate converter is used for downsampling,
-try to limit the downsampling ratio to no more than 6:1 for good aliasing
-suppression (for example, no greater downsample than 48,000 to 8,000). The filter
-lengths adjust to match the downsampling ratio, but you sacrifice more
-transition bandwidth at higher downsampling ratios to avoid excessively
-increasing the filter length. There are no similar aliasing concerns for
-upsampling.  Note that some parts of the audio pipeline
-may prevent downsampling greater than 2:1.</p>
-
-<h3 id="latency">If you are concerned about latency, do not resample</h3>
-
-<p>Resampling prevents the track from being placed in the FastMixer
-path, which means that significantly higher latency occurs due to the additional,
- larger buffer in the ordinary Mixer path. Furthermore,
- there is an implicit delay from the filter length of the resampler,
- though this is typically on the order of one millisecond or less,
- which is not as large as the additional buffering for the ordinary Mixer path
- (typically 20 milliseconds).</p>
-
-<h2 id="info">For More Information</h2>
-<p>This section lists some additional resources about sampling and resampling.</p>
-
-<h3>Sample rates</h3>
-
-<p>
-<a href="http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29" class="external-link" >
-Sampling (signal processing)</a> at Wikipedia.</p>
-
-<h3>Resampling</h3>
-
-<p><a href="http://en.wikipedia.org/wiki/Sample_rate_conversion" class="external-link" >
-Sample rate conversion</a> at Wikipedia.</p>
-
-<p><a href="http://source.android.com/devices/audio/src.html" class="external-link" >
-Sample Rate Conversion</a> at source.android.com.</p>
-
-<h3>The high bit-depth and high kHz controversy</h3>
-
-<p><a href="http://people.xiph.org/~xiphmont/demo/neil-young.html" class="external-link" >
-24/192 Music Downloads ... and why they make no sense</a>
-by Christopher "Monty" Montgomery of Xiph.Org.</p>
-
-<p><a href="https://www.youtube.com/watch?v=cIQ9IXSUzuM" class="external-link" >
-D/A and A/D | Digital Show and Tell</a>
-video by Christopher "Monty" Montgomery of Xiph.Org.</p>
-
-<p><a href="http://www.trustmeimascientist.com/2013/02/04/the-science-of-sample-rates-when-higher-is-better-and-when-it-isnt/" class="external-link">
-The Science of Sample Rates (When Higher Is Better - And When It Isn't)</a>.</p>
-
-<p><a href="http://www.image-line.com/support/FLHelp/html/app_audio.htm" class="external-link" >
-Audio Myths &amp; DAW Wars</a></p>
-
-<p><a href="http://forums.stevehoffman.tv/threads/192khz-24bit-vs-96khz-24bit-debate-interesting-revelation.317660/" class="external-link">
-192kHz/24bit vs. 96kHz/24bit "debate"- Interesting revelation</a></p>
diff --git a/docs/html/ndk/guides/build.jd b/docs/html/ndk/guides/build.jd
deleted file mode 100644
index 6286328..0000000
--- a/docs/html/ndk/guides/build.jd
+++ /dev/null
@@ -1,18 +0,0 @@
-page.title=Building Your Project
-@jd:body
-
-<p>One of the NDK's core purposes is allowing you to build C and C++ source code into shared
-libraries that you can use in your app.</p>
-
-<p>This section explains how to build native binaries for use in your Android app. It begins by
-explaining the
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file, which
-defines properties specific to individual <i>modules</i>, or libraries. Then, it explains the
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file, which defines
-properties for all the modules that you use in your
-app. Next, it tells you how to use the <a href="{@docRoot}ndk/guides/ndk-build.html">
-{@code ndk-build}</a> script, which is what the NDK uses to build your sources. Last, it ventures
-into advanced territory, discussing how to incorporate the NDK into your own
-<a href="{@docRoot}ndk/guides/standalone_toolchain.html">toolchain</a>, if you prefer to
-build that way instead of using
-<a href="{@docRoot}ndk/guides/ndk-build.html">{@code ndk-build}</a>.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/concepts.jd b/docs/html/ndk/guides/concepts.jd
deleted file mode 100755
index 7879219..0000000
--- a/docs/html/ndk/guides/concepts.jd
+++ /dev/null
@@ -1,303 +0,0 @@
-page.title=Concepts
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#bb">Before Beginning</a></li>
-        <li><a href="#intro">Introduction</a></li>
-        <li><a href="#hiw">How It Works</a></li>
-        <li><a href="#naa">Native Activities and Applications</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<h2 id="bb">Before Beginning</h2>
-
-<p>This guide assumes that you are already familiar with concepts inherent in native programming and 
-in <a href="{@docRoot}developer/index.html">Android development</a>.</p>
-
-</ul>
-<h2 id="intro">Introduction</h2>
-
-<p>This section provides a high-level explanation of how the NDK works. The Android NDK is a set of
-tools allowing you to embed C or C++ (“native code”) into your Android apps. The ability to use
-native code in Android apps can be particularly useful to developers who wish to do one or more of
-the following:</p>
-<ul>
-<li>Port their apps between platforms.</li>
-<li>Reuse existing libraries, or provide their own libraries for reuse.
-</li>
-<li>Increase performance in certain cases, particularly computationally intensive ones like games.
-</li>
-</ul>
-<h2 id="hiw">How it Works</h2>
-
-<p>This section introduces the main components used in building a native application for Android,
-and goes on to describe the process of building and packaging.</p>
-<h3 id="mc">Main components</h3>
-
-<p>You should have an understanding of the following components as you build your app:</p>
-<ul>
-<li>ndk-build: The ndk-build script launches the build scripts at the heart of the NDK. These
-scripts:
-<ul>
-<li>Automatically probe your development system and app project file to determine what to build.</li>
-<li>Generate binaries.</li>
-<li>Copy the binaries to your app's project path.</li>
-</ul>
-<p>For more information, see
-<a href="{@docRoot}ndk/guides/ndk-build.html">ndk-build</a>.</p>
-</li>
-</ul>
-
-<ul>
-<li>Java: From your Java source, the Android build process generates {@code .dex}
-(Dalvik EXecutable) files, which are what the Android OS runs in the Dalvik Virtual Machine
-(“DVM”). Even if your app contains no Java source code at all, the build process still generates a
-{@code .dex} executable file within which the native component runs.
-
-<p>When developing Java components, use the {@code native} keyword to indicate methods implemented
-as native code. For example, the following function declaration tells the compiler that the
-implementation is in a native library:</p>
-
-
-
-<pre>
-public native int add(int  x, int  y);
-</pre>
-</li>
-</ul>
-
-<ul>
-<li>Native shared libraries: The NDK builds these libraries, or {@code .so} files, from your native
-source code.
-
-<p class="note"><strong>Note:</strong> If two libraries implement respective methods with the same
-signature, a link error occurs. In C, "signature" means method name only. In C++, "signature" means
-not only method name, but also its argument names and types.</p>
-</li>
-</ul>
-
-<ul>
-<li>Native static libraries: The NDK can also build static libraries, or {@code .a} files, which you
-can link against other libraries.</li>
-</ul>
-
-<ul>
-<li>Java Native Interface (JNI): The JNI is the interface via which the Java and C++ components
-talk to one another. This guide assumes knowledge of the JNI; for information about it, consult the
-<a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html">
-Java Native Interface Specification</a>.</li>
-</ul>
-
-<ul>
-<li>Application Binary Interface (ABI): The ABI defines exactly how your app's machine code is
-expected to interact with the system at runtime. The NDK builds {@code .so} files against these
-definitions. Different ABIs correspond to different architectures: The NDK includes ABI support for
-ARMEABI (default), MIPS, and x86. For more information, see
-<a href="{@docRoot}ndk/guides/abis.html">ABI Management</a>.</li>
-</ul>
-
-<ul>
-<li>Manifest: If you are writing an app with no Java component to it, you must declare the
-{@link android.app.NativeActivity} class in the
-<a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest</a>.
-<a href="#naa">Native Activities and Applications</a> provides more detail on how to do this, under
-“Using the {@code native_activity.h} interface.”
-</li>
-</ul>
-
-<p>The following two items are only required for building using the
-<a href="{@docRoot}ndk/guides/ndk-build.html">{@code ndk-build}</a> script,
-and for debugging using the <a href="{@docRoot}ndk/guides/ndk-gdb.html">
-{@code ndk-gdb}</a> script.
-
-<ul>
-<li><a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>:
-You must create an <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> configuration file inside your {@code jni} folder. The {@code ndk-build}
-script looks at this file, which defines the module and its name, the source files to be compiled,
-build flags and libraries to link.</li>
-</ul>
-
-<ul>
-<li><a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>: This file
-enumerates and describes the modules that your app requires. This information includes:
-
-<ul>
-<li>ABIs used to compile for specific platforms.</li>
-<li>Toolchains.</li>
-<li>Standard libraries to include (static and dynamic STLport or default system).</li>
-</ul>
-</li>
-</ul>
-
-
-<h3 id="fl">Flow</h3>
-
-<p>The general flow for developing a native app for Android is as follows:</p>
-<ol type="1">
-<li>Design your app, deciding which parts to implement in Java, and which parts to implement as
-native code.
-
-<p class="note"><strong>Note:</strong> While it is possible to completely avoid Java, you are likely
-to find the Android Java framework useful for tasks including controlling the display and UI.</p>
-</li>
-<li>Create an Android app Project as you would for any other Android project.</li>
-<li>If you are writing a native-only app, declare the {@link android.app.NativeActivity} class in
-{@code AndroidManifest.xml}. For more information, see the <a href="#naa">Native Activities and
-Applications</a>.
-</li>
-<li>Create an {@code Android.mk} file describing the native library, including name, flags, linked
-libraries, and source files to be compiled in the "JNI" directory.</li>
-<li>Optionally, you can create an {@code Application.mk} file configuring the target ABIs,
-toolchain, release/debug mode, and STL. For any of these that you do not specify, the following
-default values are used, respectively:
-<ul>
-<li>
-ABI: armeabi
- </li>
-<li>
-Toolchain: GCC 4.8
- </li>
-<li>
-Mode: Release
- </li>
-<li>
-STL: system
-</ul>
-</li>
-<li>Place your native source under the project's {@code jni} directory.</li>
-<li>Use ndk-build to compile the native ({@code .so}, {@code .a}) libraries.</li>
-<li>Build the Java component, producing the executable {@code .dex} file.</li>
-<li>Package everything into an APK file, containing {@code .so}, {@code .dex}, and other files
-needed for your app to run.
-</ol>
-
-
-<h2 id="naa">Native Activities and Applications</h2>
-
-<p>The Android SDK provides a helper class, {@link android.app.NativeActivity}, that allows you to
-write a completely native activity. {@link android.app.NativeActivity} handles the communication
-between the Android framework and your native code, so you do not have to subclass it or call its
-methods. All you need to do is declare your application to be native in your
-{@code AndroidManifest.xml} file, and begin creating your native application.</p>
-
-<p>An Android application using {@link android.app.NativeActivity} still runs in its own virtual
-machine, sandboxed from other applications. You can therefore still access Android framework APIs
-through the JNI. In certain cases, however&ndash;such as for sensors, input events, and
-assets&ndash;the NDK provides native interfaces that you can use instead of having to call
-across the JNI. For more information about such support, see
-<a href="{@docRoot}ndk/guides/stable_apis.html">Android NDK Native APIs</a>.</p>
-
-<p>Regardless of whether or not you are developing a native activity, we recommend that you create
-your projects with the traditional Android build tools. Doing so helps ensure building and packaging
-of Android applications with the correct structure.</p>
-
-<p>The Android NDK provides you with two choices to implement your native activity:</p>
-
-<ul>
-<li>The <a href="{@docRoot}ndk/reference/native__activity_8h.html">{@code native_activity.h}</a>
-header defines the native version of the
-{@link android.app.NativeActivity} class. It contains the callback interface and data structures
-that you need to create your native activity. Because the main thread of your application handles
-the callbacks, your callback implementations must not be blocking. If they block, you might receive
-ANR (Application Not Responding) errors because your main thread is unresponsive until the callback
-returns.</li>
-<li>The {@code android_native_app_glue.h} file defines a static helper library built on top of the
-<a href="{@docRoot}ndk/reference/native__activity_8h.html">{@code native_activity.h}</a> interface.
-It spawns another thread, which handles things such as
-callbacks or input events in an event loop. Moving these events to a separate thread prevents any
-callbacks from blocking your main thread.</li>
-</ul>
-
-<p>The {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.c} source is
-also available, allowing you to modify the implementation.</p>
-<p>For more information on how to use this static library, examine the native-activity sample
-application and its documentation. Further reading is also available in the comments in the {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.h} file.</p>
-
-<h3 id="na">Using the native_activity.h interface</h3>
-
-<p>To implement a native activity with the
-<a href="{@docRoot}ndk/reference/native__activity_8h.html">{@code native_activity.h}</a>
-interface:</p>
-
-<ol type="1">
-<li>Create a {@code jni/} directory in your project's root directory. This directory stores all of
-your native code.</li>
-<li>Declare your native activity in the {@code AndroidManifest.xml} file.</li>
-
-<p>Because your application has no Java code, set {@code android:hasCode} to {@code false}.</p>
-
-<pre>
-&lt;application android:label="@string/app_name" android:hasCode="false"&gt;
-</pre>
-
-<p>You must set the {@code android:name} attribute of the activity tag to
-{@link android.app.NativeActivity}.</p>
-
-<pre>
-&lt;activity android:name="android.app.NativeActivity"
-            android:label="@string/app_name"&gt;
-</pre>
-<p class="note"><strong>Note:</strong> You can subclass {@link android.app.NativeActivity}. If you
-do, use the name of the subclass instead of {@link android.app.NativeActivity}.</p>
-<p>The {@code android:value} attribute of the {@code meta-data} tag specifies the name of the shared
-library containing the entry point to the application (such as C/C++ {@code main}), omitting the
-{@code lib} prefix and {@code .so} suffix from the library name.</p>
-
-<pre>
-          &lt;meta-data android:name="android.app.lib_name"
-            android:value="native-activity" /&gt;
-            &lt;intent-filter&gt;
-              &lt;action android:name="android.intent.action.MAIN" /&gt;
-              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
-            &lt;/intent-filter&gt;
-          &lt;/activity&gt;
-        &lt;/application&gt;
-      &lt;/manifest&gt;
-</pre>
-
-<li>Create a file for your native activity, and implement the function named in the
-<a href="{@docRoot}ndk/reference/group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">
-{@code ANativeActivity_onCreate}</a> variable.
-The app calls this function when the native activity starts. This function, analogous
-to {@code main} in C/C++, receives a pointer to an
-<a href="{@docRoot}ndk/reference/struct_a_native_activity.html">{@code ANativeActivity}</a>
-structure, which contains function pointers to the various callback implementations that you need
-to write.
-Set the applicable callback function pointers in {@code ANativeActivity->callbacks} to the
-implementations of your callbacks.</li>
-
-<li>Set the {@code ANativeActivity->instance} field to the address of any instance of specific
-data that you want to use.</li>
-<li>Implement anything else that you want your activity to do upon starting.</li>
-<li>Implement the rest of the callbacks that you set in {@code ANativeActivity->callbacks}. For
-more information on when the callbacks are called, see
-<a href="{@docRoot}training/basics/activity-lifecycle/index.html">Managing the Activity
-Lifecycle</a>.
-</li>
-<li>Develop the rest of your application.</li>
-<li>Create an {@code Android.mk file} in the {@code jni/} directory of your project to describe your
-native module to the build system. For more information, see
-<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.</li>
-<li>Once you have an <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
-file, compile your native code using the {@code ndk-build} command.</li>
-
-<pre class="no-pretty-print">
-$ cd &lt;path&gt;/&lt;to&gt;/&lt;project&gt;
-$ &lt;ndk&gt;/ndk-build
-</pre>
-
-<li>Build and install your Android project as usual. If your native code is in
-the {@code jni/} directory, the build script automatically packages the {@code .so} file(s) built
-from it into the APK.</li>
-</ol>
-
-</li>
-</ul>
diff --git a/docs/html/ndk/guides/cpp-support.jd b/docs/html/ndk/guides/cpp-support.jd
deleted file mode 100644
index 6e902f5..0000000
--- a/docs/html/ndk/guides/cpp-support.jd
+++ /dev/null
@@ -1,326 +0,0 @@
-page.title=C++ Library Support
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#hr">Helper Runtimes</a></li>
-        <li><a href="#rc">Runtime Characteristics</a></li>
-        <li><a href="#ic">Important Considerations</a></li>
-        <li><a href="#li">Licensing</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The Android platform provides a very minimal C++ runtime support library ({@code libstdc++}).
-This minimal support does not include, for example:</p>
-
-<ul>
-   <li>Standard C++ Library support (except a few trivial headers).</li>
-   <li>C++ exceptions support</li>
-   <li>RTTI support</li>
-</ul>
-
-<p>The NDK provides headers for use with this default library. In addition, the NDK provides a
-number of helper runtimes that provide additional features. This page provides information about
-these helper runtimes, their characteristics, and how to use them.
-</p>
-
-<h2 id="hr">Helper Runtimes</h2>
-
-<p>Table 1 provides names, brief explanations, and features of runtimes available inthe NDK.</p>
-
-<p class="table-caption" id="runtimes">
-  <strong>Table 1.</strong> NDK Runtimes and Features.</p>
-
-<table>
-<tr>
-<th>Name</th>
-<th>Explanation>
-<th>Features
-</tr>
-
-<tr>
-<td><a href="#system">{@code libstdc++} (default)</a> </td>
-<td>The default minimal system C++ runtime library.</td>
-<td>N/A</td>
-</tr>
-
-<tr>
-<td><a href="#ga">{@code gabi++_static}</a> </td>
-<td>The GAbi++ runtime (static).</td>
-<td>C++ Exceptions and RTTI</td>
-</tr>
-
-<tr>
-<td><a href="#ga">{@code gabi++_shared}</a> </td>
-<td>The GAbi++ runtime (shared).</td>
-<td>C++ Exceptions and RTTI</td>
-</tr>
-
-<tr>
-<td><a href="#stl">{@code stlport_static}</a> </td>
-<td>The STLport runtime (static).</td>
-<td> C++ Exceptions and RTTI; Standard Library</td>
-</tr>
-
-<tr>
-<td><a href="#stl">{@code stlport_shared}</a> </td>
-<td>The STLport runtime (shared).</td>
-<td> C++ Exceptions and RTTI; Standard Library</td>
-</tr>
-
-<tr>
-<td><a href="#gn">{@code gnustl_static}</a> </td>
-<td>The GNU STL (static).</td>
-<td> C++ Exceptions and RTTI; Standard Library</td>
-</tr>
-
-<tr>
-<td><a href="#gn">{@code gnustl_shared}</a> </td>
-<td>The GNU STL (shared).</td>
-<td> C++ Exceptions and RTTI; Standard Library</td>
-</tr>
-
-<tr>
-<td><a href="#cs">{@code c++_static}</a> </td>
-<td>The LLVM libc++ runtime (static).</td>
-<td> C++ Exceptions and RTTI; Standard Library</td>
-</tr>
-
-<tr>
-<td><a href="#cs">{@code c++_shared}</a> </td>
-<td>The LLVM libc++ runtime (shared).</td>
-<td> C++ Exceptions and RTTI; Standard Library</td>
-</tr>
-</table>
-
-<h3>How to set your runtime</h3>
-
-<p>Use the {@code APP_STL} variable in your <a href="{@docRoot}ndk/guides/application_mk.html">
-{@code Application.mk}</a> file to specify the runtime you wish to use. Use the values in
-the "Name" column in Table 1 as your setting. For example:</p>
-
-<pre>
-APP_STL := gnustl_static
-</pre>
-
-<p>You may only select one runtime for your app, and can only do in
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
-
-<p>Even if you do not use the NDK build system, you can still use STLport, libc++ or GNU STL.
-For more information on how to use these runtimes with your own toolchain, see <a href="{@docRoot}ndk/guides/standalone_toolchain.html">Standalone Toolchain</a>.</p>
-
-<h2 id="rc">Runtime Characteristics</h2>
-<h3 id="system">libstdc++ (default system runtime)</h3>
-
-<p>This runtime only provides the following headers, with no support beyond them:</p>
-<ul>
-   <li>{@code cassert}</li>
-   <li>{@code cctype}</li>
-   <li>{@code cerrno}</li>
-   <li>{@code cfloat}</li>
-   <li>{@code climits}</li>
-   <li>{@code cmath}</li>
-   <li>{@code csetjmp}</li>
-   <li>{@code csignal}</li>
-   <li>{@code cstddef}</li>
-   <li>{@code cstdint}</li>
-   <li>{@code cstdio}</li>
-   <li>{@code cstdlib}</li>
-   <li>{@code cstring}</li>
-   <li>{@code ctime}</li>
-   <li>{@code cwchar}</li>
-   <li>{@code new}</li>
-   <li>{@code stl_pair.h}</li>
-   <li>{@code typeinfo}</li>
-   <li>{@code utility}</li>
-</ul>
-
-<h3 id="ga">GAbi++ runtime</h3>
-<p>This runtime provides the same headers as the default runtime, but adds support for RTTI
-(RunTime Type Information) and exception handling.</p>
-
-
-<h3 id="stl">STLport runtime</h3>
-<p>This runtime is an Android port of STLport
-(<a href="http://www.stlport.org">http://www.stlport.org</a>). It provides a complete set of C++
-standard library headers. It also, by embedding its own instance of GAbi++, provides support for
-RTTI and exception handling.</p>
-
-<p>While shared and static versions of this runtime are avilable, we recommend using the shared
-version. For more information, see <a href="#sr">Static runtimes</a>.</p>
-
-<p>The shared library file is named {@code libstlport_shared.so} instead of {@code libstdc++.so}
-as is common on other platforms.</p>
-
-<p>In addition to the static- and shared-library options, you can also force the NDK to
-build the library from sources by adding the following line to your {@code Application.mk}
-file, or setting it in your environment prior to building: </p>
-
-<pre>
-STLPORT_FORCE_REBUILD := true
-</pre>
-
-
-<h3 id="gn">GNU STL runtime</h3>
-<p>This runtime is the GNU Standard C++ Library, ({@code libstdc++-v3}). Its shared library file is
-named {@code libgnustl_shared.so}.</p>
-
-
-<h3 id="cs">libc++ runtime:</h3>
-<p>This runtime is an Android port of <a href="http://libcxx.llvm.org/">LLVM libc++</a>. Its
-shared library file is named {@code libc++_shared.so}.</p>
-
-<p>By default, this runtime compiles with {@code -std=c++11}. As with GNU {@code libstdc++}, you
-need to explicitly turn on exceptions or RTTI support. For information on how to do this, see
-<a href="#xp">C++ Exceptions</a> and <a href="#rt">RTTI</a>.</p>
-
-<p>The NDK provides prebuilt static and shared libraries for {@code libc++}, but you can force the
-NDK to rebuild {@code libc++} from sources by adding the following line to your
-{@code Application.mk} file, or setting it in your environment prior to building: </p>
-
-<pre>
-LIBCXX_FORCE_REBUILD := true
-</pre>
-
-<h4>Atomic support</h4>
-
-<p>If you include {@code <atomic>}, it's likely that you also need {@code libatomic}.
-If you are using {@code ndk-build}, add the following line:</p>
-
-<pre>
-LOCAL_LDLIBS += -latomic
-</pre>
-
-<p>If you are using your own toolchain, use:</p>
-
-<pre>
--latomic
-</pre>
-
-
-<h4>Compatibility</h4>
-
-<p>The NDK's libc++ is not stable. Not all the tests pass, and the test suite is not comprehensive.
-Some known issues are:</p>
-
-<ul>
-    <li>Using {@code c++_shared} on ARM can crash when an exception is thrown.</li>
-    <li>Support for {@code wchar_t} and the locale APIs is limited.</li>
-</ul>
-
-<p>You should also make sure to check the "Known Issues" section of the changelog for the NDK
-release you are using.</p>
-
-<p class="note"><strong>Warning: </strong>Attempting to change to an unsupported locale will
-<strong>not</strong> fail. The operation will succeed, but the locale will not change and the
-following message will appear in {@code logcat}.</p>
-
-<pre>
-newlocale() WARNING: Trying to set locale to en_US.UTF-8 other than "", "C" or "POSIX"
-</pre>
-
-
-<h2 id="ic">Important Considerations</h2>
-
-<h3 id="xp">C++ Exceptions</h3>
-<p>In all versions of the NDK later than NDKr5, the NDK toolchain allows you to use C++ runtimes
-that support exception handling. However, to ensure compatibility with earlier releases, it
-compiles all C++ sources with {@code -fno-exceptions} support by default. You can enable C++
-exceptions either for your entire app, or for individual modules.
-
-<p>To enable exception-handling support for your entire app, add the following line to
-your <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file.
-To enable exception-handling support for individual modules', add the following line to
-their respective <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> files.</p>
-
-<pre>
-APP_CPPFLAGS += -fexceptions
-</pre>
-
-<h3 id="rt">RTTI</h3>
-<p>In all versions of the NDK later than NDKr5, the NDK toolchain allows you to use C++ runtimes
-that support RTTI. However, to ensure compatibility with earlier releases, it compiles all C++
-sources with {@code -fno-rtti} by default.
-
-<p>To enable RTTI support for your entire app for your entire application, add the following line to
-your <a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file:
-
-<pre>
-APP_CPPFLAGS += -frtti
-</pre>
-
-To enable RTTI support for individual modules, add the following line to
-their respective <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> files:
-
-<pre>
-LOCAL_CPP_FEATURES += rtti
-</pre>
-
-Alternatively, you can use:
-
-<pre>
-LOCAL_CPPFLAGS += -frtti
-</pre>
-
-<h3 id="sr">Static runtimes</h3>
-<p>Linking the static library variant of a C++ runtime to more than one binary may result in
-unexpected behavior. For example, you may experience:</p>
-
-<ul>
-<li>Memory allocated in one library, and freed in the other, causing memory leakage or heap
-corruption.</li>
-<li>Exceptions raised in {@code libfoo.so} going uncaught in {@code libbar.so}, causing your app
-to crash.</li>
-<li>Buffering of {@code std::cout} not working properly</li>
-</ul>
-
-<p>In addition, if you link two shared libraries&ndash;or a shared library and an executable&ndash;
-against the same static runtime, the final binary image of each shared library includes a copy of
-the runtime's code. Having multiple instances of runtime code is problematic because of duplication
-of certain global variables that the runtime uses or provides internally.</p>
-
-<p>This problem does not apply to a project comprising a single shared library. For example,
-you can link against {@code stlport_static}, and expect your app to behave correctly. If your
-project requires several shared library modules, we recommend that you use the shared library
-variant of your C++ runtime.</p>
-
-<h3>Shared runtimes</h3>
-<p>If your app targets a version of Android earlier than Android 4.3 (Android API level 18),
-and you use the shared library variant of a given C++ runtime, you must load the shared library
-before any other library that depends on it.</p>
-
-<p>For example, an app may have the following modules:</p>
-
-<ul>
-<li>libfoo.so</li>
-<li>libbar.so which is used by libfoo.so</li>
-<li>libstlport_shared.so, used by both libfoo and libbar</li>
-</ul>
-
-<p>You must load the libraries in reverse dependency order: </p>
-<pre>
-    static {
-      System.loadLibrary("stlport_shared");
-      System.loadLibrary("bar");
-      System.loadLibrary("foo");
-    }
-</pre>
-
-<p class="note"><strong>Note: </strong>Do not use the {@code lib} prefix when calling
-{@code System.loadLibrary()}.</p>
-
-<h2 id="li">Licensing</h2>
-
-<p>STLport is licensed under a BSD-style open-source license. See
-{@code $NDK/sources/cxx-stl/stlport/README} for more details about STLport.</p>
-
-<p>GNU libstdc++ is covered by the GPLv3 license, and <em>not</em> the LGPLv2 or LGPLv3. For
-more information, see <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html">
-License</a> on the GCC website.</p>
-
-<p><a href="https://llvm.org/svn/llvm-project/libcxx/trunk/LICENSE.TXT">LLVM {@code libc++}</a>
-is dual-licensed under both the University of Illinois "BSD-Like" license and the MIT license.</p>
diff --git a/docs/html/ndk/guides/cpu-arm-neon.jd b/docs/html/ndk/guides/cpu-arm-neon.jd
deleted file mode 100644
index 1d12937..0000000
--- a/docs/html/ndk/guides/cpu-arm-neon.jd
+++ /dev/null
@@ -1,109 +0,0 @@
-page.title=NEON Support
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#ul">Using {@code LOCAL_ARM_NEON}</a></li>
-        <li><a href="#uns">Using the {@code .neon} Suffix</a></li>
-        <li><a href="#build">Build Requirements</a></li>
-        <li><a href="#rd">Runtime Detection</a></li>
-        <li><a href="#sc">Sample Code</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The NDK supports the ARM Advanced SIMD, an optional instruction-set extension of the ARMv7 spec.
-NEON provides a set of scalar/vector instructions and registers (shared with the FPU) comparable to
-MMX/SSE/3DNow! in the x86 world. To function, it requires VFPv3-D32 (32 hardware FPU 64-bit
-registers, instead of the minimum of 16).</p>
-
-<p>The NDK supports the compilation of modules or even specific source files with support for NEON.
-As a result, a specific compiler flag enables the use of GCC ARM NEON intrinsics and VFPv3-D32
-at the same time.</p>
-
-<p>Not all ARMv7-based Android devices support NEON, but devices that do may benefit significantly
-from its support for scalar/vector instructions. For x86 devices, the NDK can also translate NEON
-instructions into SSE, although with several restrictions. For more information, see
-<a href="{@docRoot}ndk/guides/x86.html#an">x86 Support for ARM NEON Intrinsics.</a></p>
-
-<h2 id="ul">Using LOCAL_ARM_NEON</h2>
-<p>To have the NDK build all its source files with NEON support, include the following line in
-your module definition:</p>
-
-<pre class="no-pretty-print">
-LOCAL_ARM_NEON := true
-</pre>
-
-<p>It can be especially useful to build all source files with NEON support if you want to build a
-static or shared library that specifically contains NEON code paths.</p>
-
-<h2 id="uns">Using the .neon Suffix</h2>
-<p>When listing source files for your {@code LOCAL_SRC_FILES} variable, you have the option of
-using the {@code .neon} suffix to indicate that you want to build binaries with NEON support.
-For example, the following example builds one file with {@code .neon} support, and another
-without it:</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES := foo.c.neon bar.c
-</pre>
-
-<p>You can combine the {@code .neon} suffix with the {@code .arm} suffix, which specifies the 32-bit
-ARM instruction set for non-NEON instructions. In such a definition, {@code arm} must come before
-{@code neon}. For example: {@code foo.c.arm.neon} works, but {@code foo.c.neon.arm} does not.</p>
-
-<h2 id="build">Build Requirements</h2>
-<p>NEON support only works with the {@code armeabi-v7a} and {@code x86} ABIs. If the NDK build
-scripts encounter other ABIs while attempting to build with NEON support, the NDK build scripts
-exit. x86 provides <a href="x86.html">partial NEON support</a> via translation header. It is
-important to use checks like the following in your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-
-<pre class="no-pretty-print">
-# define a static library containing our NEON code
-ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi-v7a x86))
-include $(CLEAR_VARS)
-LOCAL_MODULE    := mylib-neon
-LOCAL_SRC_FILES := mylib-neon.c
-LOCAL_ARM_NEON  := true
-include $(BUILD_STATIC_LIBRARY)
-endif # TARGET_ARCH_ABI == armeabi-v7a || x86
-</pre>
-
-<h2 id="rd">Runtime Detection</h2>
-<p>Your app must perform runtime detection to confirm that NEON-capable machine code can be run on
-the target device. This is because not all ARMv7-based Android devices support NEON. The app can
-perform this check using the
-<a href="{@docRoot}ndk/guides/cpu-features.html">{@code cpufeatures}</a> library that comes with
-this NDK.</p>
-
-<p>You should explicitly check that {@code android_getCpuFamily()} returns {@code
-ANDROID_CPU_FAMILY_ARM}, and that {@code android_getCpuFeatures()} returns a value including the
-{@code ANDROID_CPU_ARM_FEATURE_NEON flag} set. For example: </p>
-
-<pre class="no-pretty-print">
-#include &lt;cpu-features.h&gt;
-...
-...
-if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &amp;&amp;
-    (android_getCpuFeatures() &amp; ANDROID_CPU_ARM_FEATURE_NEON) != 0)
-{
-    // use NEON-optimized routines
-    ...
-}
-else
-{
-    // use non-NEON fallback routines instead
-    ...
-}
-
-...
-</pre>
-
-<h2 id="sc">Sample Code</h2>
-<p>The source code for the NDK's hello-neon sample provides an example of how to use the
-{@code cpufeatures} library and NEON intrinsics at the same time. This sample implements a tiny
-benchmark for a FIR filter loop using a C version, and a NEON-optimized one for devices that
-support it.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/cpu-features.jd b/docs/html/ndk/guides/cpu-features.jd
deleted file mode 100644
index 3323efd..0000000
--- a/docs/html/ndk/guides/cpu-features.jd
+++ /dev/null
@@ -1,210 +0,0 @@
-page.title=The cpufeatures Library
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#usage">Usage</a></li>
-        <li><a href="#functions">Functions</a></li>
-        <li><a href="#ch">Change History</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The NDK provides a small library named {@code cpufeatures} that your app can use at runtime to
-detect the target device's CPU family and the optional features it supports. It is designed to work
-as-is on all official Android platform versions.</p>
-
-<h2 id="usage">Usage</h2>
-<p>The {@code cpufeatures} library is available as an import module. To use it, follow the procedure
-below:</p>
-
-<ol>
-<li>List {@code cpufeatures} in your list of static library dependencies. For example:
-
-<pre class="no-pretty-print">
-LOCAL_STATIC_LIBRARIES := cpufeatures
-</pre>
-</li>
-
-<li>In your source code, include the {@code <cpu-features.h>} header file.</li>
-
-<li>At the end of your <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file,
-insert an instruction to import the {@code android/cpufeatures} module. For example:
-
-<pre class="no-pretty-print">
-$(call import-module,android/cpufeatures)
-</pre>
-
-<p>Here is a simple example of an {@code Android.mk} file that imports the {@code cpufeatures}
-library:</p>
-
-<pre class="no-pretty-print">
-&lt;project-path&gt;/jni/Android.mk:
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := &lt;your-module-name&gt;
-LOCAL_SRC_FILES := &lt;your-source-files&gt;
-LOCAL_STATIC_LIBRARIES := cpufeatures
-include $(BUILD_SHARED_LIBRARY)
-
-$(call import-module,android/cpufeatures)
-</pre>
-</li>
-</ol>
-
-<h2 id="functions">Functions</h2>
-<p>The {@code cpufeatures} library provides two functions. The first function returns the family to
-which the device's CPU belongs. Declare it as follows:</p>
-
-<pre class="no-pretty-print">
-AndroidCpuFamily android_getCpuFamily();
-</pre>
-
-<p>The function returns one of the following enums, representing the CPU family/architecture that
-the device supports.</p>
-<ul>
-<li>{@code ANDROID_CPU_FAMILY_ARM}</li>
-<li>{@code ANDROID_CPU_FAMILY_X86}</li>
-<li>{@code ANDROID_CPU_FAMILY_MIPS}</li>
-<li>{@code ANDROID_CPU_FAMILY_ARM64}</li>
-<li>{@code ANDROID_CPU_FAMILY_X86_64}</li>
-<li>{@code ANDROID_CPU_FAMILY_MIPS64}</li>
-</ul>
-
-<p>For a 32-bit executable on a 64-bit system, this function returns only the 32-bit value.</p>
-
-<p>The second function returns the set of optional features that the device's CPU supports. Declare
-it as follows:
-
-<pre class="no-pretty-print">
-uint64_t android_getCpuFeatures();
-</pre>
-
-<p>The return value takes the form of a set of bit flags, each flag representing one
-CPU-family-specific feature. The rest of this section provides information on features for
-the respective families.</p>
-
-<h4>32-bit ARM CPU family</h4>
-
-<p>The following flags are available for the 32-bit ARM CPU family:</p>
-<dl>
-<dt>{@code ANDROID_CPU_ARM_FEATURE_VFPv2}</dt>
-<dd>Indicates that the device's CPU supports the VFPv2 instruction set. Most ARMv6 CPUs support
-this instruction set.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_ARMv7}</dt>
-<dd>Indicates that the device's CPU supports the ARMv7-A instruction set as supported by the
-<a href="{@docRoot}ndk/guides/abis.html#v7a">armeabi-v7a</a> ABI. This instruction set supports both
-Thumb-2 and VFPv3-D16 instructions. This return value also indicates support for the VFPv3 hardware
-FPU instruction-set extension.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_VFPv3}</dt>
-<dd>Indicates that the device's CPU supports the VFPv3 hardware FPU instruction-set extension.
-<p>This value is equivalent to the {@code VFPv3-D16} instruction set, which provides provides only
-16 hardware double-precision FP registers.</p></dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_VFP_D32}</dt>
-<dd> Indicates that the device's CPU supports 32 hardware double-precision FP registers instead of
-16. Even when there are 32 hardware double-precision FP registers, there are still only 32
-single-precision registers mapped to the same register banks.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_NEON}</dt>
-<dd>Indicates that the device's CPU supports the ARM Advanced SIMD (NEON) vector instruction set
-extension. Note that ARM mandates that such CPUs also implement VFPv3-D32, which provides 32
-hardware FP registers (shared with the NEON unit).</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_VFP_FP16}</dt>
-<dd>Indicates that the device's CPU supports instructions to perform floating-point operations on
-16-bit registers. This feature is part of the VFPv4 specification.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_VFP_FMA}</dt>
-<dd>Indicates that the device's CPU supports the fused multiply-accumulate extension for the VFP
-instruction set. Also part of the VFPv4 specification.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_NEON_FMA}</dt>
-<dd>Indicates that the device's CPU supports the fused multiply-accumulate extension for the NEON
-instruction set. Also part of the VFPv4 specification.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_IDIV_ARM}</dt>
-<dd>Indicates that the device's CPU supports integer division in ARM mode. Only available on later-
-model CPUs, such as Cortex-A15.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_IDIV_THUMB2}</dt>
-<dd>Indicates that the device's CPU supports Integer division in Thumb-2 mode. Only available on
-later-model CPUs, such as Cortex-A15.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_iWMMXt}</dt>
-<dd>Indicates that the device's CPU supports an instruction-set extension that adds MMX registers
-and instructions. This feature is only available on a few XScale- based CPUs.</dd>
-
-<dt>{@code ANDROID_CPU_ARM_FEATURE_LDREX_STREX}</dt>
-<dd>Indicates that the device's CPU supports LDREX and STREX instructions available since ARMv6.
-Together, these instructions provide atomic updates on memory with the help of exclusive
-monitor.</dd>
-</dl>
-
-<h4>64-bit ARM CPU family</h4>
-
-<p>The following flags are available for the 64-bit ARM CPU family:</p>
-<dl>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_FP}</dt>
-<dd>Indicates that the device's CPU has a Floating Point Unit (FPU). All Android ARM64 devices must
-support this feature.</dd>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_ASIMD}</dt>
-<dd>Indicates that the device's CPU has an Advanced SIMD (ASIMD) unit. All Android ARM64 devices
-must support this feature.</dd>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_AES}</dt>
-<dd>Indicates that the device's CPU supports {@code AES} instructions.</dd>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_CRC32}</dt>
-<dd>Indicates that the device's CPU supports {@code CRC32} instructions.</dd>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_SHA1}</dt>
-<dd>Indicates that the device's CPU supports {@code SHA1} instructions.</dd>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_SHA2}</dt>
-<dd>Indicates that the device's CPU supports {@code SHA2} instructions.</dd>
-<dt>{@code ANDROID_CPU_ARM64_FEATURE_PMULL}</dt>
-<dd>Indicates that the device's CPU supports 64-bit {@code PMULL} and {@code PMULL2}
-instructions.</dd>
-</dl>
-
-<h4>32-bit x86 CPU family</h4>
-
-<p>The following flags are available for the 32-bit x86 CPU family.<p>
-<dl>
-<dt>{@code ANDROID_CPU_X86_FEATURE_SSSE3}</dt>
-Indicates that the device's CPU supports the SSSE3 instruction extension set.</dd>
-
-<dt>{@code ANDROID_CPU_X86_FEATURE_POPCNT}</dt>
-<dd>Indicates that the device's CPU supports the {@code POPCNT} instruction.</dd>
-
-<dt>{@code ANDROID_CPU_X86_FEATURE_MOVBE}</dt>
-<dd>Indicates that the device's CPU supports the {@code MOVBE} instruction. This instruction is
-specific to some Intel IA-32 CPUs, such as Atom.</dd>
-<dl>
-
-<p>{@code android_getCpuFeatures()} returns {@code 0} for CPU families for which there are no
-listed extensions.</p>
-
-<p>The following function returns the maximum number of CPU cores on the target device: </p>
-
-<pre class="no-pretty-print">
-int  android_getCpuCount(void);
-</pre>
-
-<h4>MIPS CPU family</h4>
-
-<dl>
-<dt>{@code ANDROID_CPU_MIPS_FEATURE_R6}</dt>
-<dd>Indicates that the CPU executes MIPS Release 6 instructions natively, and supports obsoleted R1..R5 instructions only via kernel traps.</dd>
-
-<dt>{@code ANDROID_CPU_MIPS_FEATURE_MSA}</dt>
-<dd>Indicates that the CPU supports MIPS SIMD Architecture instructions.</dd>
-</dl>
-
-<h2 id="ch">Change History</h2>
-<p>For the complete change history of this library, see the comments in
-{@code $NDK/sources/android/cpufeatures/cpu-features.c}, where {@code $NDK} is the root of your
-NDK installation.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/debug.jd b/docs/html/ndk/guides/debug.jd
deleted file mode 100644
index 3c4da3b..0000000
--- a/docs/html/ndk/guides/debug.jd
+++ /dev/null
@@ -1,11 +0,0 @@
-page.title=Debugging Your Project
-@jd:body
-
-<p>After you've built your app, you'll probably need to debug it. This section introduces you to the
-NDK's debugging tools.</p>
-
-<p>It begins by telling you how to use the <a href="{@docRoot}ndk/guides/ndk-gdb.html">
-{@code ndk-gdb}</a> tool to debug your code. It closes with an explanation of the
-<a href="{@docRoot}ndk/guides/ndk-stack.html">{@code ndk-stack}</a> tool, which helps you use the
-<a href="{@docRoot}tools/help/logcat.html">ADB logcat tool</a>
-as you debug.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/graphics/design-notes.jd b/docs/html/ndk/guides/graphics/design-notes.jd
deleted file mode 100644
index 272bd2d..0000000
--- a/docs/html/ndk/guides/graphics/design-notes.jd
+++ /dev/null
@@ -1,121 +0,0 @@
-page.title=Vulkan Design Guidelines
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#apply">Apply Display Rotation During Rendering</a></li>
-        <li><a href="#minimize">Minimize Render Passes Per Frame</a></li>
-        <li><a href="#choose">Choose Appropriate Memory Types</a></li>
-        <li><a href="#group">Group Descriptor Sets by Frequency</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>
-Vulkan is unlike earlier graphics APIs in that drivers do not perform certain
-optimizations, such as pipeline reuse, for apps. Instead, apps using Vulkan must
-implement such optimizations themselves. If they do not, they may exhibit worse
-performance than apps running OpenGL ES.
-</p>
-
-<p>
-When apps implement these optimizations themselves, they have the potential
-to do so more successfully than the driver can, because they have access to
-more specific information for a given use case. As a result, skillfully
-optimizing an app that uses Vulkan can yield better performance than if the
-app were using OpenGL ES.
-</p>
-
-<p>
-This page introduces several optimizations that your Android app can implement
-to gain performance boosts from Vulkan.
-</p>
-
-<h2 id="apply">Apply Display Rotation During Rendering</h2>
-
-<p>
-When the upward-facing direction of an app doesn’t match the orientation of the device’s
-display, the compositor rotates the application’s swapchain images so that it
-does match. It performs this rotation as it displays the images, which results
-in more power consumption&mdash;sometimes significantly more&mdash;than if it were not
-rotating them.
-</p>
-
-<p>
-By contrast, rotating swapchain images while generating them results in
-little, if any, additional power consumption. The
-{@code VkSurfaceCapabilitiesKHR::currentTransform} field indicates the rotation
-that the compositor applies to the window. After an app applies that rotation
-during rendering, the app uses the {@code VkSwapchainCreateInfoKHR::preTransform}
-field to report that the rotation is complete.
-</p>
-
-<h2 id="minimize">Minimize Render Passes Per Frame</h2>
-
-<p>
-On most mobile GPU architectures, beginning and ending a render pass is an
-expensive operation. Your app can improve performance by organizing rendering operations into
-as few render passes as possible.
-</p>
-
-<p>
-Different attachment-load and attachment-store ops offer different levels of
-performance. For example, if you do not need to preserve the contents of an attachment, you
-can use the much faster {@code VK_ATTACHMENT_LOAD_OP_CLEAR} or
-{@code VK_ATTACHMENT_LOAD_OP_DONT_CARE} instead of {@code VK_ATTACHMENT_LOAD_OP_LOAD}. Similarly, if
-you don't need to write the attachment's final values to memory for later use, you can use
-{@code VK_ATTACHMENT_STORE_OP_DONT_CARE} to attain much better performance than
-{@code VK_ATTACHMENT_STORE_OP_STORE}.
-</p>
-
-<p>
-Also, in most render passes, your app doesn’t need to load or store the
-depth/stencil attachment. In such cases, you can avoid having to allocate physical memory for
-the attachment by using the {@code VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT}
-flag when creating the attachment image. This bit provides the same benefits as does
-{@code glFramebufferDiscard} in OpenGL ES.
-</p>
-
-<h2 id="choose">Choose Appropriate Memory Types</h2>
-
-<p>
-When allocating device memory, apps must choose a memory type. Memory type
-determines how an app can use the memory, and also describes caching and
-coherence properties of the memory.  Different devices have different memory
-types available; different memory types exhibit different performance
-characteristics.
-</p>
-
-<p>
-An app can use a simple algorithm to pick the best memory type for a given
-use. This algorithm picks the first memory type in the
-{@code VkPhysicalDeviceMemoryProperties::memoryTypes} array that meets two criteria:
-The memory type must be allowed for the buffer
-or image, and must have the minimum properties that the app requires.
-</p>
-
-<p>
-Mobile systems generally don’t have separate physical memory heaps for the
-CPU and GPU. On such systems, {@code VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT} is not as
-significant as it is on systems that have discrete GPUs with their own, dedicated
-memory. An app should not assume this property is required.
-</p>
-
-<h2 id="group">Group Descriptor Sets by Frequency</h2>
-
-<p>
-If you have resource bindings that change at different frequencies, use
-multiple descriptor sets per pipeline rather than rebinding all resources for
-each draw. For example, you can have one set of descriptors for per-scene
-bindings, another set for per-material bindings, and a third set for
-per-mesh-instance bindings.
-</p>
-
-<p>
-Use immediate constants for the highest-frequency changes, such as changes
-executed with each draw call.
-</p>
-
diff --git a/docs/html/ndk/guides/graphics/getting-started.jd b/docs/html/ndk/guides/graphics/getting-started.jd
deleted file mode 100644
index 0c2d939..0000000
--- a/docs/html/ndk/guides/graphics/getting-started.jd
+++ /dev/null
@@ -1,201 +0,0 @@
-page.title=Vulkan Setup
-@jd:body
-
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#downloading">Downloading</a></li>
-        <li><a href="#testing">Testing Installation</a></li>
-        <li><a href="#compiling">Compiling Your Project</a></li>
-        <li><a href="#running">Running Your Project</a></li>
-        <li><a href="#using">Using the Dynamic Loader</a></li>
-      </ol>
-
-    </div>
-  </div>
-
-<p>
-This document explains how to get started with the Vulkan graphics library by downloading,
-compiling, and running several sample apps.
-</p>
-
-<p>
-Before beginning, make sure you have the right hardware and platform version prepared. You should
-be using one of the following devices, running at least Android N, Developer Preview 2:
-</p>
-
-<ul>
-   <li>Nexus 6P.</li>
-   <li>Nexus 5X.</li>
-   <li>Nexus Player.</li>
-</ul>
-
-<p>
-You can confirm your Android version by going to the <strong>Settings</strong> menu, and
-selecting <strong>About &lt;device&gt;</strong> > <strong>Android Version</strong>.
-Once you’ve confirmed that you have the right hardware and platform version set up, you can
-download the necessary software.
-</p>
-
-<h2 id="downloading">Downloading</h2>
-
-<p>
-Before getting started, you must download several tools and other software.
-</p>
-
-<ol style="1">
-   <li>If you don’t already have Android Studio,
-   <a href="{@docRoot}studio/index.html">download it.</a></li>
-
-<li><a href="https://github.com/android-ndk/ndk/wiki">Download</a> NDK r12-beta.</li>
-
-<li><a href="{@docRoot}preview/setup-sdk.html">Download and install
-the Android N-Preview SDK.</a></li>
-
-<li>(Optional) Build shaderc in NDK r12-beta by navigating to
-{@code &lt;ndk-root&gt;/sources/third_party/shaderc/},
-and running the following command:
-
-<pre class="no-pretty-print">
-../../../ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk \
- APP_STL:=c++_shared APP_ABI=all libshaderc_combined
-</pre>
-
-You can specify {@code APP_STL} as {@code gnustl_static},
-{@code gnustl_shared}, {@code c++_static},
-or {@code c++_shared}.</li>
-
-<li>Open a terminal window, and use git to clone the Android Vulkan samples from the
-repository in which they reside.
-
-<pre class="no-pretty-print">
-$ git clone https://github.com/googlesamples/vulkan-basic-samples.git
-</pre>
-</li>
-
-<li>
-Navigate to the {@code LunarGSamples/} directory, which is in the local repository
-that you checked out in the previous step.
-</li>
-
-<li>Update the gslang source by entering the following command:
-
-<pre class="no-pretty-print">
-$ ./update_external_sources.sh -s -g
-</pre>
-</li>
-
-</ol>
-
-
-<h2 id="testing">Testing Installation</h2>
-
-<p>
-To confirm that Vulkan is set up properly, you can test it with
-the set of Vulkan API samples provided partly for that purpose. Follow these steps to
-build and execute these samples:
-</p>
-
-<ol style="1">
-
-
-<li>(Optional) Build the source by entering the following commands:
-
-<pre class="no-pretty-print">
-$ cd API-samples
-$ cmake -DANDROID=ON -DANDROID_ABI=[armeabi-v7a|arm64-v8a| x86|x86_64|all(default)]
-</pre>
-</li>
-
-<li>
-Import the samples into Android Studio. To do so, choose <strong>File</strong> >
-<strong>Import
-project (Eclipse, ADT, Gradle)</strong> and
-select the {@code LunarGSamples/API-Samples/android} directory.
-
-<p>You may see an error about missing components or missing SDK version.
-Ignore this error message, and follow the installation prompts.</p>
-
-<p>After several minutes, the <em>Project</em> pane should
-resemble the window shown in Figure 1.</p>
-
-<img src="../images/project-pane.png"
-alt="Project pane after importing samples into Android Studio" id="figure1" />
-
-<p class="img-caption">
-<strong>Figure 1.</strong> Project pane displaying samples after they've been imported.
-
-</li>
-</ol>
-
-<h2 id="compiling">Compiling Your Project</h2>
-
-<p>To compile your project, follow these steps:</p>
-
-<ol style="1">
-<li>Select your project in the Android Studio <em>Project</em> panel.</li>
-<li>From the <strong>Build</strong> menu, choose <strong>Make Module &lt;module-name&gt; </strong>; or select <strong> Build APK </strong> to generate APK.</li>
-<li>Resolve any dependency issues, and then compile. As Figure 2 shows, you can select individual projects to compile by choosing them from the configuration pulldown.</li>
-
-<img src="../images/config-pulldown.png"
-alt="Selecting the "drawcube" project from the config pulldown id="figure2" />
-
-<p class="img-caption">
-<strong>Figure 2.</strong> Selecting an individual project to compile.
-
-</ol>
-
-<p class="note"><strong>Note: </strong>
-<a href="https://github.com/googlesamples/android-vulkan-tutorials">Additional
-tutorial samples</a> illustrate the use of shaders compiled with off-line
-compilation integrated into Android Studio. For simplicity, each tutorial
-is self-contained, and builds according to standard Android Studio
-<a href="{@docRoot}tools/studio/index.html">build procedures.</a>
-</p>
-
-<h2 id="running">Running Your Project</h2>
-
-<p>To run your project, choose an APK to run by choosing <strong>Run</strong> > <strong>Run &lt;project-name&gt;</strong>.</p>
-
-<p>To debug an APK, choose <strong>Run</strong> >
-<strong>Debug &lt;project-name&gt;</strong>.  For each project,
-there’s a Java version and a native (C or C++) version.  Run the
-native version of the app. For example, for drawcube,
-run drawcube-native.</p>
-
-<p>Most of the samples have simple functionality, and most stop
-automatically after running.  The drawcube example is one of
-the more visually interesting examples. When you run it, it
-should display the image in Figure 3</p>.
-
-<img src="../images/drawcube-output.png"
-alt="Successfully running shows a multicolored cube" id="figure3" />
-
-<p class="img-caption">
-<strong>Figure 3.</strong> The successfully compiled program runs and produces a display.
-</p>
-
-<h2 id="using">Using the Dynamic Loader</h2>
-<p>
-The samples use a dynamic loader helper function defined in {@code vulkan_wrapper.h/cpp} to
-retrieve Vulkan API pointers using {@code dlopen()} and {@code dlsym()}. It does this rather
-than statically linking them with {@code vulkan.so}.
-</p>
-
-<p>
-Using this loader allows the code to link against API level 23 and earlier versions of the platform, which don’t include the {@code vulkan.so} shared library, but can run on devices that support Vulkan API.
-</p>
-
-<p>
-The following snippet shows how to use the dynamic loader.
-</p>
-
-<pre>
-#include "vulkan_wrapper.h" // Include Vulkan_wrapper and dynamically load symbols.
-...
-// Before any Vulkan API usage,
-InitVulkan();
-</pre>
diff --git a/docs/html/ndk/guides/graphics/index.jd b/docs/html/ndk/guides/graphics/index.jd
deleted file mode 100644
index cbd4b9c..0000000
--- a/docs/html/ndk/guides/graphics/index.jd
+++ /dev/null
@@ -1,36 +0,0 @@
-page.title=Vulkan Graphics API
-@jd:body
-
-
-<p>The Android platform includes an Android-specific implementation of the
-<a class="external-link" href="https://www.khronos.org/vulkan/">Vulkan</a> API
-specification from the Khronos Group. Vulkan is a
-low-overhead, cross-platform API for high-performance, 3D graphics. It provides tools
-for creating high-quality, real-time graphics in
-applications. Vulkan also provides advantages such as reducing
-CPU overhead and providing support for the
-<a class="external-link" href="https://www.khronos.org/spir">SPIR-V Binary
-Intermediate language</a>.
-</p>
-
-<p>
-This section begins with information on how to
-<a href="{@docRoot}ndk/guides/graphics/getting-started.html">get started</a> using Vulkan in your
-Android app. Next, it provides useful information that you should know about
-<a href="{@docRoot}ndk/guides/graphics/design-notes.html">Vulkan design guidelines</a>
-on the Android platform. From there, it explains how
-to use Vulkan's <a href="{@docRoot}ndk/guides/graphics/shader-compilers.html">shader compilers</a>.
-Last, it teaches you how to use
-<a href="{@docRoot}ndk/guides/graphics/validation-layer.html">validation layers</a>
-to help assure stability in apps using Vulkan.
-</p>
-
-<p>
-For more general information about this cross-platform API specification, see
-Khronos's
-<a class="external-link" href="http://khr.io/vulkanlaunchoverview">
-Vulkan Overview</a>.
-You can also keep up with the latest Vulkan-related developments at the
-Vulkan
-<a class="external-link" href="https://www.khronos.org/#slider_vulkan">news page</a>.
-</p>
diff --git a/docs/html/ndk/guides/graphics/shader-compilers.jd b/docs/html/ndk/guides/graphics/shader-compilers.jd
deleted file mode 100644
index c51c21c..0000000
--- a/docs/html/ndk/guides/graphics/shader-compilers.jd
+++ /dev/null
@@ -1,194 +0,0 @@
-page.title=Vulkan Shader Compilers on Android
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#aot">AOT Compilation</a></li>
-        <li><a href="#runtime">Runtime Compilation</a></li>
-        <li><a href="#integrating">Integrating Into your Project</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>
-A Vulkan app must manage shaders differently from the way an OpenGL ES app does so:
-In OpenGL ES, you provide a shader as a set of strings forming the source text of a
-GLSL shader program. By contrast, the Vulkan API requires you to provide a shader in
-the form of an entry point in a <a href=”https://www.khronos.org/spir”>SPIR-V</a> module.
-</p>
-
-<p>
-The NDK includes a runtime library for compiling GLSL into SPIR-V.
-The runtime library is the same as the one in the
-<a href="https://github.com/google/shaderc">Shaderc</a> open source project, and use the same
-<a href="https://github.com/KhronosGroup/glslang">Glslang GLSL</a> reference compiler as a
-back end. By default, the Shaderc version of the
-compiler assumes you are compiling for Vulkan.  After checking whether your code is valid for
-Vulkan, the compiler automatically enables the {@code KHR_vulkan_glsl} extension. The Shaderc
-version of the compiler also generates Vulkan-compliant SPIR-V code.
-</p>
-
-<p>
-You can choose to compile SPIR-V modules into your Vulkan app during development, a
-practice called <em>ahead-of-time</em>, or <em>AOT</em>, compiling. Alternatively,
-you can have your app compile them from shipped or procedurally generated shader
-source when needed during runtime. This practice is called <em>runtime compiling</em>.
-</p>
-
-<p>
-The rest of this page provides more detail about each practice, and then explains
-how to integrate shader compilation into your Vulkan app.
-</p>
-
-<h2 id=”aot”>AOT Compilation</h2>
-
-<p>
-For AOT compilation, we recommend the <em>glslc</em> command-line compiler from GLSL to SPIR-V.
-This compiler is available from the <a href="https://github.com/google/shaderc">Shaderc</a>
-project.</a>Many of its command-line options are similar to those of GCC and Clang, allowing
-you to integrate glslc into build systems easily.
-</p>
-
-<p>
-The glslc tool compiles a single-source file to a SPIR-V module with a single shader
-entry point.  By default, the output file has the same name as that of the source file,
-but with the {@code .spv} extension appended.
-</p>
-
-<p>
-You use filename extensions to tell the glslc tool which graphics shader stage to compile,
-or whether a compute shader is being compiled. For information on how to use these filename
-extensions, and options you can use with the tool, see
-<a href="https://github.com/google/shaderc/tree/master/glslc#user-content-shader-stage-specification">
-Shader stage specification</a> in the
-<a href="https://github.com/google/shaderc/tree/master/glslc">
-glslc</a> manual.
-</p>
-
-<h2 id="runtime">Runtime Compilation</h2>
-
-<p>
-For JIT compilation of shaders during runtime, the NDK provides the libshaderc library,
-which has both C and C++ APIs.
-</p>
-
-<p>
-C++ applications should use the C++ API. We recommend that apps in other languages
-use the C API, because the C ABI is lower level, and likely to provide better stability.
-</p>
-
-<p>
-The following example shows how to use the C++ API:
-</p>
-
-<pre>
-#include &lt;iostream&gt;
-#include &lt;string&gt;
-#include &lt;vector&gt;
-#include &lt;shaderc/shaderc.hpp&gt;
-
-std::vector&lt;uint32_t&gt; compile_file(const std::string& name,
-                                   shaderc_shader_kind kind,
-                                   const std::string& data) {
-  shaderc::Compiler compiler;
-  shaderc::CompileOptions options;
-
-  // Like -DMY_DEFINE=1
-  options.AddMacroDefinition("MY_DEFINE", "1");
-
-  shaderc::SpvCompilationResult module = compiler.CompileGlslToSpv(
-      data.c_str(), data.size(), kind, name.c_str(), options);
-
-  if (module.GetCompilationStatus() !=
-      shaderc_compilation_status_success) {
-    std::cerr << module.GetErrorMessage();
-  }
-
-  std::vector&lt;uint32_t&gt; result(module.cbegin(), module.cend());
-  return result;
-}
-</pre>
-
-
-
-<h2 id=”integrating”>Integrating into Your Projects</h2>
-
-<p>
-You can integrate the Vulkan shader compiler into your app using either the project's
-{@code Android.mk} file or Gradle.
-</p>
-
-<h3 id=”androidmk”>Android.mk</h3>
-
-<p>
-Perform the following steps to use your project's {@code Android.mk}
-file to integrate the shader compiler.
-</p>
-
-<ol>
-<li>
-Include the following lines in your Android.mk file:
-<pre class="no-pretty-print">
-include $(CLEAR_VARS)
-     ...
-LOCAL_STATIC_LIBRARIES := shaderc
-     ...
-include $(BUILD_SHARED_LIBRARY)
-
-$(call import-module, third_party/shaderc)
-</pre>
-</li>
-
-<li>
-Set APP_STL to one of {@code c++_static}, {@code c++_shared}, {@code gnustl_static},
-or {@code gnustl_shared}.
-</li>
-</ol>
-
-
-
-<h3 id=”gradle”>Gradle</h3>
-
-<ol>
-<li>
-In a terminal window, navigate to
-{@code &lt;ndk_root&gt;/sources/third_party/shaderc/}.
-</li>
-
-<li>
-Run the following command:
-
-<pre class="no-pretty-print">
-$ ../../../ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk \
-APP_STL:=&lt;stl_version&gt; APP_ABI=all libshaderc_combined
-</pre>
-
-<p>
-This command places two folders in &lt;ndk_root&gt;/sources/third_party/shaderc/. The directory
-structure is as follows:
-</p>
-
-<pre class="no-pretty-print">
-include/
-  shaderc/
-    shaderc.h
-    shaderc.hpp
-libs/
-  &lt;stl_version&gt;/
-    {all of the abis}
-       libshaderc.a
-</pre>
-</li>
-
-<li>
-Add includes and link lines as you normally would for external libraries.
-</li>
-<p>
-The STL that you use to build your program must match the {@code stl} specified in
-{@code stl_version}.
-Only {@code c++_static}, {@code c++_shared}, {@code gnustl_static}, and
-{@code gnustl_shared} are supported.
-</p>
diff --git a/docs/html/ndk/guides/graphics/validation-layer.jd b/docs/html/ndk/guides/graphics/validation-layer.jd
deleted file mode 100644
index 1a7d832..0000000
--- a/docs/html/ndk/guides/graphics/validation-layer.jd
+++ /dev/null
@@ -1,433 +0,0 @@
-page.title=Vulkan Validation Layers on Android
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#ilp">Add Validation Layers to Project</a></li>
-        <li><a href="#gls">Getting Layer Source</a></li>
-        <li><a href="#verifying">Verifying Layer Build</a></li>
-        <li><a href="#enabling">Enabling Layers</a></li>
-        <li><a href="#debug">Enabling the Debug Callback</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>
-Most explicit graphics APIs do not perform error-checking, because doing so can result in a
-performance penalty. Vulkan provides error-checking in a manner that lets you use this feature at
-development time, but exclude it from the release build of your app, thus avoiding the penalty when
-it matters most. You do this by enabling <em>validation layers</em>. Validation layers intercept
-or hook Vulkan entry points for various debug and validation purposes.
-</p>
-
-<p>
-Each validation layer can contain definitions for one or more of these entry points, and
-intercepts the entry points for which it contains definitions. When a validation
-layer does not define an entry point, the system passes the entry point on to the next
-layer. Ultimately, an entry point not defined in any layer reaches the driver, the
-base level, unvalidated.
-</p>
-
-<p>
-The Android SDK, NDK, and Vulkan samples include Vulkan validation layers for
-use during development. You can hook these validation layers into the graphics stack, allowing
-them to report validation issues.  This instrumentation allows you to catch and fix misuses
-during development.
-</p>
-
-<p>
-This page explains how to:
-<ul>
-   <li>Integrate NDK's Layer Binaries.</li>
-   <li>Get source code for validation layers.</li>
-   <li>Verifying Layer Build.</li>
-   <li>Enabling Layers in Vulkan Application.</li>
-
-</ul>
-</p>
-
-<h2 id="ilp">Add Validation Layers to Project</h2>
-
-<p>
-  NDK release 12 and higher includes pre-built validation layer binaries. At
-  instance and device creation time, when requested by your application, the
-  Vulkan loader finds them in the APK installed location and loads them.
-</p>
-
-<p>
-  To use the pre-built validation layer binaries, either modify the gradle build
-  configuration of your project or manually add the binaries into the JNI
-  libraries directory of your project.
-</p>
-
-
-<h3 id="vl-gradle">Adding validation layers with Gradle</h3>
-
-<p>
-  You can add the validation layer your project using either Andorid Studio's
-  support for CMake and Ndk-build, or using Studio's experimental plugin for
-  Gradle. In general, you should use the CMake and Ndk-build configuration.
-</p>
-
-
-<p>
-  To add the libraries using Android Studio's support for CMake/Ndk-build,
-  add the following to your project's gradle configuration:
-</p>
-
-<pre class="no-pretty-print">
-sourceSets {
-  main {
-    jniLibs {
-      srcDir "${your-ndk-dir}/sources/third_party/vulkan/src/build-android/jniLibs"
-    }
-  }
-}</pre>
-
-<p>
-  To add the libraries using Android Studio's experimental plugin for Gradle,
-  add the following to your project's gradle configuration:
-</p>
-
-<pre class="no-pretty-print">
-sources {
-  main {
-    jniLibs {
-      source.srcDir "${your-ndk-dir}/sources/third_party/vulkan/src/build-android/jniLibs"
-    }
-  }
-}</pre>
-
-
-<h3 id="vl-jni-lib">Adding validation layers to JNI libraries</h3>
-
-<p>
-  If configuring your project's gradle build file is not working, you can
-  manually add the validation layer binaries to your project's JNI libraries
-  directory by using the following command line options:
-</p>
-
-<pre class="no-pretty-print">
-$ cd ${your-app-project-root}
-$ mkdir -p app/src/main
-$ cp -fr ${your-ndk-dir}/sources/third_party/vulkan/src/build-android/jniLibs app/src/main/
-</pre>
-
-
-<h2 id="gls">Getting Layer Source</h2>
-<p>
-If your app needs the latest validation layer, you can pull the latest source from the Khronos Group
-<a class="external-link" href="https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers">
-GitHub repository</a> and follow the build instructions there.
-</p>
-
-<h2 id="verifying">Verifying Layer Build</h2>
-
-<p>
-Regardless of whether you build with NDK's prebuilt layers or you build from the latest source code,
-the build process produces final file structure like the following:
-</p>
-
-<pre class="no-pretty-print">
-src/main/jniLibs/
-  arm64-v8a/
-    libVkLayer_core_validation.so
-    libVkLayer_device_limits.so
-    libVkLayer_image.so
-    libVkLayer_object_tracker.so
-    libVkLayer_parameter_validation.so
-    libVkLayer_swapchain.so
-    libVkLayer_threading.so
-    libVkLayer_unique_objects.so
-  armeabi-v7a/
-    libVkLayer_core_validation.so
-    ...
-</pre>
-
-<p>
-The following example shows how to verify that your APK contains the validation layers
-as expected:
-</p>
-
-<pre class="no-pretty-print">
-$ jar -xvf project.apk
- ...
- inflated: lib/arm64-v8a/libVkLayer_threading.so
- inflated: lib/arm64-v8a/libVkLayer_object_tracker.so
- inflated: lib/arm64-v8a/libVkLayer_swapchain.so
- inflated: lib/arm64-v8a/libVkLayer_unique_objects.so
- inflated: lib/arm64-v8a/libVkLayer_parameter_validation.so
- inflated: lib/arm64-v8a/libVkLayer_image.so
- inflated: lib/arm64-v8a/libVkLayer_core_validation.so
- inflated: lib/arm64-v8a/libVkLayer_device_limits.so
- ...
-</pre>
-
-
-<h2 id="enabling">Enabling Layers</h2>
-
-<p>The Vulkan API allows an app to enable both instance layers and device layers.</p>
-
-<h3>Instance layers</h3>
-
-<p>
-A layer that can intercept Vulkan instance-level entry points is called an instance layer.
-Instance-level entry points are those with {@code VkInstance} or {@code VkPhysicalDevice}
-as the first parameter.
-</p>
-
-<p>
-You can call {@code vkEnumerateInstanceLayerProperties()} to list the available instance layers
-and their properties. The system enables instance layers when {@code vkCreateInstace()} executes.
-</p>
-
-<p>
-The following code snippet shows how an app can use the Vulkan API to programmatically enable and
-query an instance layer:
-</p>
-
-<pre>
-// Get instance layer count using null pointer as last parameter
-uint32_t instance_layer_present_count = 0;
-vkEnumerateInstanceLayerProperties(&instance_layer_present_count, nullptr);
-
-// Enumerate instance layers with valid pointer in last parameter
-VkLayerProperties* layer_props =
-    (VkLayerProperties*)malloc(instance_layer_present_count * sizeof(VkLayerProperties));
-vkEnumerateInstanceLayerProperties(&instance_layer_present_count, layer_props));
-
-// Make sure the desired instance validation layers are available
-// NOTE:  These are not listed in an arbitrary order.  Threading must be
-//        first, and unique_objects must be last.  This is the order they
-//        will be inserted by the loader.
-const char *instance_layers[] = {
-    "VK_LAYER_GOOGLE_threading",
-    "VK_LAYER_LUNARG_parameter_validation",
-    "VK_LAYER_LUNARG_object_tracker",
-    "VK_LAYER_LUNARG_core_validation",
-    "VK_LAYER_LUNARG_device_limits",
-    "VK_LAYER_LUNARG_image",
-    "VK_LAYER_LUNARG_swapchain",
-    "VK_LAYER_GOOGLE_unique_objects"
-};
-
-uint32_t instance_layer_request_count =
-    sizeof(instance_layers) / sizeof(instance_layers[0]);
-for (uint32_t i = 0; i < instance_layer_request_count; i++) {
-    bool found = false;
-    for (uint32_t j = 0; j < instance_layer_present_count; j++) {
-        if (strcmp(instance_layers[i], layer_props[j].layerName) == 0) {
-            found = true;
-        }
-    }
-    if (!found) {
-        error();
-    }
-}
-
-// Pass desired instance layers into vkCreateInstance
-VkInstanceCreateInfo instance_info = {};
-instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
-instance_info.enabledLayerCount = instance_layer_request_count;
-instance_info.ppEnabledLayerNames = instance_layers;
-...
-</pre>
-
-<h3>Device layers</h3>
-
-<p>
-A layer that can intercept device-level entry points is called a device layer. Device-level entry
-points are those whose first parameter is {@code VkDevice}, {@code VkCommandBuffer},
-or {@code VkQueue}. The list of
-device layers to enable is included in the {@code ppEnabledLayerNames} field of the
-{@code VkDeviceCreateInfo}
-struct that the app passes into {@code vkCreateDevice()}.
-</p>
-
-<p>
-You can call {@code vkEnumerateDeviceLayerProperties} to list the available layers
-and their properties. The system enables device layers when it calls {@code vkCreateDevice()}.
-</p>
-
-<p>
-The following code snippet shows how an app can use the Vulkan API to programmatically enable a
-device layer.
-</p>
-
-<pre>
-
-// Get device layer count using null as last parameter
-uint32_t device_layer_present_count = 0;
-vkEnumerateDeviceLayerProperties(&device_layer_present_count, nullptr);
-
-// Enumerate device layers with valid pointer in last parameter
-VkLayerProperties* layer_props =
-   (VkLayerProperties *)malloc(device_layer_present_count * sizeof(VkLayerProperties));
-vkEnumerateDeviceLayerProperties(physical_device, device_layer_present_count, layer_props));
-
-// Make sure the desired device validation layers are available
-// Ensure threading is first and unique_objects is last!
-const char *device_layers[] = {
-    "VK_LAYER_GOOGLE_threading",
-    "VK_LAYER_LUNARG_parameter_validation",
-    "VK_LAYER_LUNARG_object_tracker",
-    "VK_LAYER_LUNARG_core_validation",
-    "VK_LAYER_LUNARG_device_limits",
-    "VK_LAYER_LUNARG_image",
-    "VK_LAYER_LUNARG_swapchain",
-    "VK_LAYER_GOOGLE_unique_objects"
-};
-
-uint32_t device_layer_request_count =
-   sizeof(device_layers) / sizeof(device_layers[0]);
-for (uint32_t i = 0; i < device_layer_request_count; i++) {
-    bool found = false;
-    for (uint32_t j = 0; j < device_layer_present_count; j++) {
-        if (strcmp(device_layers[i],
-           layer_props[j].layerName) == 0) {
-            found = true;
-        }
-    }
-    if (!found) {
-        error();
-    }
-}
-
-// Pass desired device layers into vkCreateDevice
-VkDeviceCreateInfo device_info = {};
-device_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
-device_info.enabledLayerCount = device_layer_request_count;
-device_info.ppEnabledLayerNames = device_layers;
-...
-</pre>
-
-<h2 id="debug">Enabling the Debug Callback</h2>
-
-<p>
-The Debug Report extension {@code VK_EXT_debug_report} allows your application to control
-layer behavior when an event occurs.</p>
-
-<p>
-Before using this extension, you must first make sure that the platform supports it.
-The following example shows how to check for debug extension support and
-register a callback if the extension is supported.
-</p>
-
-<pre>
-// Get the instance extension count
-uint32_t inst_ext_count = 0;
-vkEnumerateInstanceExtensionProperties(nullptr, &inst_ext_count, nullptr);
-
-// Enumerate the instance extensions
-VkExtensionProperties* inst_exts =
-    (VkExtensionProperties *)malloc(inst_ext_count * sizeof(VkExtensionProperties));
-vkEnumerateInstanceExtensionProperties(nullptr, &inst_ext_count, inst_exts);
-
-const char * enabled_inst_exts[16] = {};
-uint32_t enabled_inst_ext_count = 0;
-
-// Make sure the debug report extension is available
-for (uint32_t i = 0; i < inst_ext_count; i++) {
-    if (strcmp(inst_exts[i].extensionName,
-    VK_EXT_DEBUG_REPORT_EXTENSION_NAME) == 0) {
-        enabled_inst_exts[enabled_inst_ext_count++] =
-            VK_EXT_DEBUG_REPORT_EXTENSION_NAME;
-    }
-}
-
-if (enabled_inst_ext_count == 0)
-    return;
-
-// Pass the instance extensions into vkCreateInstance
-VkInstanceCreateInfo instance_info = {};
-instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
-instance_info.enabledExtensionCount = enabled_inst_ext_count;
-instance_info.ppEnabledExtensionNames = enabled_inst_exts;
-
-PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT;
-PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT;
-
-vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)
-    vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT");
-vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)
-    vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT");
-
-assert(vkCreateDebugReportCallbackEXT);
-assert(vkDestroyDebugReportCallbackEXT);
-
-// Create the debug callback with desired settings
-VkDebugReportCallbackEXT debugReportCallback;
-if (vkCreateDebugReportCallbackEXT) {
-    VkDebugReportCallbackCreateInfoEXT debugReportCallbackCreateInfo;
-    debugReportCallbackCreateInfo.sType =
-        VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT;
-    debugReportCallbackCreateInfo.pNext = NULL;
-    debugReportCallbackCreateInfo.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT |
-                                          VK_DEBUG_REPORT_WARNING_BIT_EXT |
-                                          VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
-    debugReportCallbackCreateInfo.pfnCallback = DebugReportCallback;
-    debugReportCallbackCreateInfo.pUserData = NULL;
-
-    vkCreateDebugReportCallbackEXT(instance, &debugReportCallbackCreateInfo,
-                                   nullptr, &debugReportCallback);
-}
-
-// Later, when shutting down Vulkan, call the following
-if (vkDestroyDebugReportCallbackEXT) {
-   vkDestroyDebugReportCallbackEXT(instance, debugReportCallback, nullptr);
-}
-
-</pre>
-
-<p>
-Once your app has registered and enabled the debug callback, the system routes debugging
-messages to a callback that you register. An example of such a callback appears below:
-</p>
-
-
-<pre>
-#include &lt;android/log.h&gt;
-
-static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(
-                                   VkDebugReportFlagsEXT msgFlags,
-                                   VkDebugReportObjectTypeEXT objType,
-                                   uint64_t srcObject, size_t location,
-                                   int32_t msgCode, const char * pLayerPrefix,
-                                   const char * pMsg, void * pUserData )
-{
-   if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
-       __android_log_print(ANDROID_LOG_ERROR,
-                           "AppName",
-                           "ERROR: [%s] Code %i : %s",
-                           pLayerPrefix, msgCode, pMsg);
-   } else if (msgFlags & VK_DEBUG_REPORT_WARNING_BIT_EXT) {
-       __android_log_print(ANDROID_LOG_WARN,
-                           "AppName",
-                           "WARNING: [%s] Code %i : %s",
-                           pLayerPrefix, msgCode, pMsg);
-   } else if (msgFlags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT) {
-       __android_log_print(ANDROID_LOG_WARN,
-                           "AppName",
-                           "PERFORMANCE WARNING: [%s] Code %i : %s",
-                           pLayerPrefix, msgCode, pMsg);
-   } else if (msgFlags & VK_DEBUG_REPORT_INFORMATION_BIT_EXT) {
-       __android_log_print(ANDROID_LOG_INFO,
-                           "AppName", "INFO: [%s] Code %i : %s",
-                           pLayerPrefix, msgCode, pMsg);
-   } else if (msgFlags & VK_DEBUG_REPORT_DEBUG_BIT_EXT) {
-       __android_log_print(ANDROID_LOG_VERBOSE,
-                           "AppName", "DEBUG: [%s] Code %i : %s",
-                           pLayerPrefix, msgCode, pMsg);
-   }
-
-   // Returning false tells the layer not to stop when the event occurs, so
-   // they see the same behavior with and without validation layers enabled.
-   return VK_FALSE;
-}
-</pre>
-
-
-
diff --git a/docs/html/ndk/guides/guides_toc.cs b/docs/html/ndk/guides/guides_toc.cs
deleted file mode 100644
index 09b2a12..0000000
--- a/docs/html/ndk/guides/guides_toc.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-<?cs # Table of contents for Dev Guide.
-
-       For each document available in translation, add an localized title to this TOC.
-       Do not add localized title for docs not available in translation.
-       Below are template spans for adding localized doc titles. Please ensure that
-       localized titles are added in the language order specified below.
-?>
-
-<ul id="nav">
-   <li class="nav-section">
-      <div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/index.html">
-      <span class="en">Getting Started</span></a></div>
-      <ul>
-         <li><a href="<?cs var:toroot ?>ndk/guides/setup.html">Setup</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/concepts.html">Concepts</a></li>
-      </ul>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/build.html">
-      <span class="en">
-      Building</span></a></div>
-      <ul>
-         <li><a href="<?cs var:toroot ?>ndk/guides/android_mk.html">Android.mk</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/application_mk.html">Application.mk</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/ndk-build.html">ndk-build</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/standalone_toolchain.html">Standalone Toolchain
-         </a></li>
-      </ul>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/arch.html">
-      <span class="en">Architectures and CPUs</span></a></div>
-      <ul>
-         <li><a href="<?cs var:toroot ?>ndk/guides/abis.html">ABI Management</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/cpu-arm-neon.html">NEON</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/x86.html">x86</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/x86-64.html">x86-64</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/mips.html">MIPS</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/cpu-features.html">The cpufeatures Library</a>
-         </li>
-      </ul>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/debug.html">
-      <span class="en">Debugging</span></a></div>
-      <ul>
-         <li><a href="<?cs var:toroot ?>ndk/guides/ndk-gdb.html">ndk-gdb</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/guides/ndk-stack.html">ndk-stack</a></li>
-      </ul>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/libs.html">
-      <span class="en">Libraries</span></a></div>
-      <ul>
-      <li><a href="<?cs var:toroot ?>ndk/guides/prebuilts.html">Prebuilt Libraries</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/cpp-support.html">C++ Support</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/stable_apis.html">Stable APIs</a></li>
-
-      </ul>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header"><a href="<?cs var:toroot ?>ndk/guides/audio/index.html">
-      <span class="en">Audio</span></a></div>
-      <ul>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/basics.html">Basics</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/opensl-for-android.html">OpenSL ES for
-      Android</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/input-latency.html">Audio Input
-      Latency</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/output-latency.html">Audio Output
-      Latency</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/floating-point.html">Floating-Point
-      Audio</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/sample-rates.html">Sample Rates
-      </a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/audio/opensl-prog-notes.html">OpenSL ES Programming Notes
-      </a></li>
-      </ul>
-   </li>
-
-      <li class="nav-section">
-      <div class="nav-section-header">
-      <a href="<?cs var:toroot ?>ndk/guides/graphics/index.html">
-      <span class="en">Vulkan</span></a></div>
-      <ul>
-      <li><a href="<?cs var:toroot ?>ndk/guides/graphics/getting-started.html">
-      Getting Started</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/graphics/design-notes.html">
-      Design Guidelines</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/graphics/shader-compilers.html">
-      Shader Compilers</a></li>
-      <li><a href="<?cs var:toroot ?>ndk/guides/graphics/validation-layer.html">
-      Validation Layers</a></li>
-      </ul>
-      </ul>
-   </li>
-
-
-</ul>
-
-
-<script type="text/javascript">
-<!--
-    buildToggleLists();
-    changeNavLang(getLangPref());
-//-->
-</script>
-
diff --git a/docs/html/ndk/guides/images/NDK_build_string.png b/docs/html/ndk/guides/images/NDK_build_string.png
deleted file mode 100644
index 338378b..0000000
--- a/docs/html/ndk/guides/images/NDK_build_string.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/images/NDK_build_string@2x.png b/docs/html/ndk/guides/images/NDK_build_string@2x.png
deleted file mode 100644
index 5ba3ce3..0000000
--- a/docs/html/ndk/guides/images/NDK_build_string@2x.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/images/config-pulldown.png b/docs/html/ndk/guides/images/config-pulldown.png
deleted file mode 100644
index 5af0870..0000000
--- a/docs/html/ndk/guides/images/config-pulldown.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/images/drawcube-output.png b/docs/html/ndk/guides/images/drawcube-output.png
deleted file mode 100644
index 3b7f775..0000000
--- a/docs/html/ndk/guides/images/drawcube-output.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/images/project-pane.png b/docs/html/ndk/guides/images/project-pane.png
deleted file mode 100644
index f6d624b..0000000
--- a/docs/html/ndk/guides/images/project-pane.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/images/verification_screen.png b/docs/html/ndk/guides/images/verification_screen.png
deleted file mode 100644
index 91858ba..0000000
--- a/docs/html/ndk/guides/images/verification_screen.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/images/verification_screen@2x.png b/docs/html/ndk/guides/images/verification_screen@2x.png
deleted file mode 100644
index 0d666c9..0000000
--- a/docs/html/ndk/guides/images/verification_screen@2x.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/guides/index.jd b/docs/html/ndk/guides/index.jd
deleted file mode 100644
index 465ce13..0000000
--- a/docs/html/ndk/guides/index.jd
+++ /dev/null
@@ -1,25 +0,0 @@
-page.title=Getting Started with the NDK
-@jd:body
-
-<p>The Native Development Kit (NDK) is a set of tools that allow you to leverage C and
-C++ code in your Android apps. You can use it either to build from your own source code, or to take
-advantage of existing prebuilt libraries.</p>
-
-<p>The NDK is not appropriate for most novice Android programmers, and has little value for many
-types of Android apps. It is often not worth the additional complexity it inevitably brings to the
-development process. However, it can be useful in cases in which you need to:</p>
-
-<ul>
-   <li>Squeeze extra performance out of a device for computationally intensive applications like
-   games or physics simulations.</li>
-   <li>Reuse your own or other developers' C or C++ libraries.</li>
-</ul>
-
-<p>This guide gives you the information you need to get up and running with the NDK. It starts by
-explaining the <a href="{@docRoot}ndk/guides/concepts.html">concepts</a> underpinning the NDK, and
-how to <a href="{@docRoot}ndk/guides/setup.html">set it up</a>. Next, it continues with information
-about targeting <a href="{@docRoot}ndk/guides/arch.html">different hardware platforms</a> in your
-builds. Then, it explains how to use
-the NDK to <a href="{@docRoot}ndk/guides/build.html">build</a> and
-<a href="{@docRoot}ndk/guides/debug.html">debug</a> your app. Finally, it discusses how to use your
-own and other prebuilt <a href="{@docRoot}ndk/guides/libs.html">libraries</a>.</p>
diff --git a/docs/html/ndk/guides/libs.jd b/docs/html/ndk/guides/libs.jd
deleted file mode 100644
index ea607de..0000000
--- a/docs/html/ndk/guides/libs.jd
+++ /dev/null
@@ -1,13 +0,0 @@
-page.title=Using Existing Libraries
-@jd:body
-
-<p>This section discusses the use of existing libraries&ndash;both your own, and those that the NDK
-provides.</p>
-
-<p>It begins by telling you how to use your own <a href="{@docRoot}ndk/guides/prebuilts.html">
-prebuilt libraries</a>. Then, it explains the <a href="{@docRoot}ndk/guides/cpp-support.html">
-C++ helper runtimes</a> available with the NDK, and how to use them. Finally, it provides
-information on <a href="{@docRoot}ndk/guides/stable_apis.html">the other libraries</a> that the NDK provides, such
-as <a href="https://www.khronos.org/opengles/">OpenGL ES</a> and
-<a href="https://www.khronos.org/opensles/">OpenSL ES</a>, and the minimum Android API levels
-required to support those libraries.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/mips.jd b/docs/html/ndk/guides/mips.jd
deleted file mode 100755
index d104ffe..0000000
--- a/docs/html/ndk/guides/mips.jd
+++ /dev/null
@@ -1,43 +0,0 @@
-page.title=MIPS Support
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#over">Overview</a></li>
-        <li><a href="#comp">Compatibility</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The NDK supports the {@code mips} ABI, which allows native code to run on Android-based devices
-that have CPUs supporting the MIPS32 instruction set.</p>
-
-<h2 id="over">Overview</h2>
-<p>To generate MIPS machine code, include {@code mips} in your
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file's
-{@code APP_ABI} definition. For example: </p>
-
-<pre class="no-pretty-print">
-APP_ABI := mips
-</pre>
-
-<p>For more information about defining the {@code APP_ABI} variable, see
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
-
-<p>The build system places generated libraries into {@code $PROJECT/libs/mips/}, where
-{@code $PROJECT} represents your project's root directory, and embeds them in your APK under
-the {@code /lib/mips/} directory.</p>
-
-<p>The Android package manager extracts these libraries when installing your APK on a compatible
-MIPS-based device, placing them under your app's private data directory.</p>
-
-<p>In the Google Play store, the server filters applications so that a consumer sees only the native
-libraries that run on the CPU powering his or her device.</p>
-
-<h2 id="comp">Compatibility</h2>
-<p>MIPS support requires, at minimum, Android 2.3 (Android API level 9). If your project files
-target an older API level, but include MIPS as a targeted platform, the NDK build script
-automatically selects the right set of native platform headers/libraries for you.</p>
diff --git a/docs/html/ndk/guides/ndk-build.jd b/docs/html/ndk/guides/ndk-build.jd
deleted file mode 100755
index e653bf5..0000000
--- a/docs/html/ndk/guides/ndk-build.jd
+++ /dev/null
@@ -1,168 +0,0 @@
-page.title=ndk-build
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#int">Internals</a></li>
-         <li><a href="#ifc">Invoking from the Command Line</a></li>
-         <li><a href="#6432">64-Bit and 32-Bit Toolchains</a></li>
-         <li><a href="#req">Requirements</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<p>The {@code ndk-build} file is a shell script introduced in Android NDK r4. Its purpose
-is to invoke the right NDK build script.
-
-<h2 id="int">Internals</h2>
-
-<p>Running the {@code ndk-build} script is equivalent to running the following command:</p>
-
-<pre class="no-pretty-print">
-$GNUMAKE -f &lt;ndk&gt;/build/core/build-local.mk
-&lt;parameters&gt;
-</pre>
-
-<p><code>$GNUMAKE</code> points to GNU Make 3.81 or later, and
-<code>&lt;ndk&gt;</code> points to your NDK installation directory. You can use
-this information to invoke ndk-build from other shell scripts, or even your own
-make files.</p>
-
-<h2 id="ifc">Invoking from the Command Line</h2>
-<p>The {@code ndk-build} file lives in the top level the NDK installation directory. To run it
-from the command line, invoke it while in or under your application project directory.
-For example: </p>
-
-<pre class="no-pretty-print">
-cd &lt;project&gt;
-$ &lt;ndk&gt;/ndk-build
-</pre>
-
-<p>In this example, <code>&lt;project&gt;</code> points to your
-project’s root directory, and <code>&lt;ndk&gt;</code> is the directory where
-you installed the NDK.</p>
-
-<p><a class="anchor" id="options"></a> </p>
-<h3>Options</h3>
-<p>All parameters to ndk-build are passed directly to the underlying GNU {@code make}
-command that runs the NDK build scripts. Combine <code>ndk-build</code> and
-options in the form <code>ndk-build &lt;option&gt;</code>. For example: </p>
-
-<pre class="no-pretty-print">
-$ ndk-build clean
-</pre>
-
-<p>The following options are available:</p>
-<dl>
-  <dt>{@code clean}</dt>
-  <dd>Remove any previously generated binaries.</dd>
-  <dt>{@code V=1}</dt>
-  <dd>Launch build, and display build commands.<dd>
-  <dt>{@code -B}</dt>
-  <dd>Force a complete rebuild.</dd>
-  <dt>{@code -B V=1}</dt>
-  <dd>Force a complete rebuild, and display build commands.</dd>
-  <dt>{@code NDK_LOG=1}</dd>
-  <dd>Display internal NDK log messages (used for debugging the NDK itself).</dd>
-  <dt>{@code NDK_DEBUG=1}</dt>
-  <dd>Force a debuggable build (see <a href="#dvr">Table 1</a>).</dd>
-  <dt>{@code NDK_DEBUG=0}</dt>
-  <dd>Force a release build (see <a href="#dvr">Table 1</a>).</dd>
-  <dt>{@code NDK_HOST_32BIT=1}</dt>
-  <dd>Always use the toolchain in 32-bit mode (see <a href="#6432">64-bit and 32-bit
-  Toolchains</a>).</dd>
-  <dt>{@code NDK_APPLICATION_MK=<file>}</dt>
-  <dd>Build, using a specific <code>Application.mk</code> file pointed to by the
-  {@code NDK_APPLICATION_MK} variable.</dd>
-  <dt>{@code -C <project>}</dt>
-  <dd>Build the native code for the project path located at {@code <project>}. Useful if you
-  don't want to {@code cd} to it in your terminal.</dd>
-</dl>
-
-<p><a class="anchor" id="dvr"></a> </p>
-<h3>Debuggable versus Release builds</h3>
-<p>Use the <code>NDK_DEBUG</code> option and, in certain cases,
-{@code AndroidManifest.xml} to specify debug or release build,
-optimization-related behavior, and inclusion of symbols. Table 1 shows the
-results of each possible combination of settings.</p>
-<p><em>Table 1.</em> Results of <code>NDK_DEBUG</code> (command line) and
-<code>android:debuggable</code> (manifest) combinations.</p>
-<table>
-<tr>
-<th></th><th>NDK_DEBUG=0 </th><th>NDK_DEBUG=1</th><th>NDK_DEBUG not specified
-</th></tr>
-<tr>
-<td>android:debuggble="true" </td><td>Debug; Symbols; Optimized*1
-</td><td>Debug; Symbols; Not optimized*2 </td><td>(same as NDK_DEBUG=1)
-</td></tr>
-<tr>
-<td>android:debuggable="false"</td><td>Release; Symbols; Optimized
-</td><td>Release; Symbols; Not optimized</td><td>Release; No symbols;
-Optimized*3 </td></tr>
-</table>
-*1: Useful for profiling.<br>
-*2: Default for running <a href="{@docRoot}ndk/guides/ndk-gdb.html">{@code ndk-gdb}</a>.<br>
-*3: Default mode.<br>
-<br>
-<p class="note"><strong>Note:</strong> {@code NDK_DEBUG=0} is the equivalent of
-{@code APP_OPTIM=release}, and complies with the GCC {@code -O2} option. {@code NDK_DEBUG=1} is the
-equivalent of {@code APP_OPTIM=debug} in {@code Application.mk}, and complies with the GCC
-{@code -O0} option. For more information about {@code APP_OPTIM}, see
-<a href="{@docRoot}ndk/guides/application_mk.html">Application.mk</a>.</p>
-<p>The syntax on the command line is, for example: </p>
-
-<pre class="no-pretty-print">
-$ ndk-build NDK_DEBUG=1
-</pre>
-
-<p>If you are using build tools from prior to SDK r8, you must also modify your
-{@code AndroidManifest.xml} file to specify debug mode. The syntax for doing so resembles the
-following:</p>
-
-<pre class="no-pretty-print">&lt;application android:label="@string/app_name"
-android:debuggable="true"&gt;
-</pre>
-
-From SDK r8 onward, you do not need to touch {@code AndroidManifest.xml}. Building a debug package
-(e.g. with ant debug or the corresponding option of the ADT plugin) causes the tool automatically to
-pick the native debug files generated with {@code NDK_DEBUG=1}.
-
-
-<h2 id="6432">64-Bit and 32-Bit Toolchains</h2>
-<p>Some toolchains come with both 64-bit and 32-bit versions. For example,
-directories {@code <ndk>/toolchain/<name>/prebuilt/} and
-{@code <ndk>/prebuilt/} may contain both {@code linux-x86} and
-{@code linux-x86_64} folders for Linux tools in 32-bit and 64-bit modes,
-respectively. The ndk-build script automatically chooses a 64-bit version of
-the toolchain if the host OS supports it. You can force the use of a 32-bit
-toolchain by using {@code NDK_HOST_32BIT=1} either in your environment or
-on the ndk-build command line.</p>
-<p>Note that 64-bit tools utilize host resources better (for instance, they are faster, and handle
-larger programs), and they can still generate 32-bit binaries for Android.</p>
-
-<h2 id="req">Requirements</h2>
-<p>You need GNU Make 3.81 or later to use ndk-build or the NDK in general.
-The build scripts will detect a non-compliant Make tool, and generate an error
-message.</p>
-<p>If you have GNU Make 3.81 installed, but the default <code>make</code>
-command doesn’t launch it, define {@code GNUMAKE} in your environment to point to it
-before launching ndk-build. For example: </p>
-
-<pre class="no-pretty-print">
-$ export GNUMAKE=/usr/local/bin/gmake
-$ ndk-build
-</pre>
-
-<p>You can override other host prebuilt tools in {@code $NDK/prebuilt/<OS>/bin/}
-with the following environment variables: </p>
-
-<pre class="no-pretty-print">
-$ export NDK_HOST_AWK=&lt;path-to-awk&gt;
-$ export NDK_HOST_ECHO=&lt;path-to-echo&gt;
-$ export NDK_HOST_CMP=&lt;path-to-cmp&gt;
-</pre>
diff --git a/docs/html/ndk/guides/ndk-gdb.jd b/docs/html/ndk/guides/ndk-gdb.jd
deleted file mode 100755
index 1a990f0..0000000
--- a/docs/html/ndk/guides/ndk-gdb.jd
+++ /dev/null
@@ -1,231 +0,0 @@
-page.title=ndk-gdb
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#req">Requirements</a></li>
-        <li><a href="#use">Usage</a></li>
-        <li><a href="#thread">Thread Support</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The NDK includes a helper shell script named {@code ndk-gdb} to easily launch a native debugging
-  session for your NDK-generated machine code.</p>
-
-<h2 id="req">Requirements</h2>
-
-<p>For native debugging to work, you must follow these requirements:</p>
-
-<ul>
-<li>Build your app using the {@code ndk-build} script. The {@code ndk-gdb} script
-does not support using the legacy {@code make APP=<name>} method to build.</p></li>
-<li>Enable app debugging in your {@code AndroidManifest.xml} file by including an
-{@code <application>} element that sets the {@code android:debuggable} attribute to {@code
-true}.</li>
-<li>Build your app to run on Android 2.2 (Android API level 8) or higher.</li>
-<li>Debug on a device or emulator running Android 2.2 or higher.
- For debugging purposes, the target
-API level that you declare in your {@code AndroidManifest.xml} file does not matter.</li>
-<li>Develop your app in a Unix shell. On Windows, use <a href="https://www.cygwin.com/">Cygwin</a>
-or the experimental {@code ndk-gdb-py} <a href="https://www.python.org/">Python</a>
-implementation.</li>
-<li>Use GNU Make 3.81 or higher.</li></ul>
-
-<h2 id="use">Usage</h2>
-  To invoke the {@code ndk-gdb} script, change into the application directory or any directory under
-  it. For example:</p>
-
-<pre class="no-pretty-print">
-cd $PROJECT
-$NDK/ndk-gdb
-</pre>
-
-<p>Here, {@code $PROJECT} points to your project's root directory, and {@code $NDK} points to your
-NDK installation path.</p>
-
-<p>When you invoke {@code ndk-gdb}, it configures the session to look for your source files
-and symbol/debug versions of your generated native libraries. On successfully attaching to your
-application process, {@code ndk-gdb} outputs a long series of error messages, noting that it cannot
-find various system libraries. This is normal, because your host machine does not contain
-symbol/debug versions of these libraries on your target device. You can safely ignore these
-messages.</p>
-
-<p>Next, {@code ndk-gdb} displays a normal GDB prompt.</p>
-
-<p>You interact with {@code ndk-gdb} in the same way as you would with GNU GDB. For example, you can
-use {@code b <location>} to set breakpoints, and {@code c} (for "continue") to
-resume execution. For a comprehensive list of commands, see the
-<a href="http://www.gnu.org/software/gdb/">GDB manual.</a></p>
-
-<p>Note that when you quit the GDB prompt, the application process that you're debugging stops. This
-behavior is a gdb limitation.</p>
-
-<p>{@code ndk-gdb} handles many error conditions, and displays an informative error message if it
-finds a problem. these checks include making sure that the following conditions are satisfied:</p>
-
-<ul>
-<li>Checks that ADB is in your path.</li>
-<li>Checks that your application is declared debuggable in its manifest.</li>
-<li>Checks that, on the device, the installed application with the same package name is also
-debuggable.</li>
-</ul>
-
-<p>By default, {@code ndk-gdb} searches for an already-running application process, and displays an
-error if it doesn't find one. You can, however, use the {@code --start} or
-{@code --launch=<name>} option to automatically start your activity before the debugging
-session. For more information, see <a href="#opt">Options</a>.</p>
-
-
-<h3 id="opt">Options</h3>
-<p>To see a complete list of options, type {@code ndk-gdb --help} on the command line. Table 1
-shows a number of the more commonly used ones, along with brief descriptions.</p>
-
-<p class="table-caption" id="table1">
-  <strong>Table 1.</strong> Common ndk-gdb options and their descriptions.</p>
-
-<table>
-<tr>
-<th>Option</th>
-<th>Description></th>
-<tr>
-
-<tr>
-<td>{@code --verbose}</td>
-<td><p>This option tells the build system to print verbose information about the native-debugging
-session setup. It is necessary only for debugging problems when the debugger can't connect to the
-app, and the error messages that {@code ndk-gdb} displays are not enough.</p></td>
-</tr>
-
-<tr>
-<td>{@code --force}</td>
-<td>By default, {@code ndk-gdb} aborts if it finds that another native debugging session is already
- running on the same device. This option kills the other session, and replaces it with a new one.
- Note that this option does not kill the actual app being debugged, which you must kill
- separately.</td>
-</tr>
-
-<tr>
-<td>{@code --start}</td>
-<td><p>When you start {@code ndk-gdb}, it tries by default to attach to an existing running instance of
-your app on the target device. You can override this default behavior by using {@code --start} to
-explicitly launch the application on the target device before the debugging session.</p></td>
-
-<p>Starting {@code ndk-gdb} with this option specified launches the first launchable activity listed
-in your application manifest. Use {@code --launch=<name>} to start the next launchable
-activity. To dump the list of launchable activities, run {@code --launch-list} from the command
-line.</p>
-</tr>
-
-<tr>
-<td>{@code --launch=<name>}</td>
-<td><p>This option is similar to {@code --start}, except that it allows you to start a specific
- activity from your application. This feature is only useful if your manifest defines multiple
- launchable activities.</p></td>
-</tr>
-
-<tr>
-<td>{@code --launch-list}</td>
-<td><p>This convenience option prints the list of all launchable activity names found in your
- app manifest. {@code --start} uses the first activity name.</p></td>
-</tr>
-
-<tr>
-<td>{@code --project=<path>}</td>
-<td>This option specifies the app project directory. It is useful if you want to launch the
- script without first having to change to the project directory.</p></td>
-</tr>
-
-<tr>
-<td>{@code --port=<port>}</td>
-<td> <p>By default, {@code ndk-gdb} uses local TCP port 5039 to communicate with the app it
- is debugging on the target device. Using a different port allows you to natively debug programs
- running on different devices or emulators connected to the same host machine.</p></td>
-</tr>
-
-<tr>
-<td>{@code --adb=<file>}</td>
-<td><p>This option specifies the <a href="{@docRoot}tools/help/adb.html">adb</a>
-tool executable. It is only necessary if you have not set your path to include that executable.</p>
-</td>
-</tr>
-
-<tr>
-<td>
-<li>{@code -d}</li>
-<li>{@code -e}</li>
-<li>{@code -s <serial>}</li></td>
-<td><p>These flags are similar to the adb commands with the same names. Set these flags if you have
-several devices or emulators connected to your host machine. Their meanings are as follows:</p>
-<dl>
-   <dt>{@code -d}</dt>
-   <dd>Connect to a single physical device.</dd>
-   <dt>{@code -e}</dt>
-   <dd>Connect to a single emulator device.</dd>
-   <dt>{@code -s <serial>}</dt>
-   <dd>Connect to a specific device or emulator. Here, {@code <serial>} is the device's name
-   as listed by the {@code adb devices} command.</dd>
-</dl>
-
-<p>Alternatively, you can define the {@code ADB_SERIAL} environment variable to list a specific
-device, without the need for a specific option.</p></td>
-</tr>
-
-<tr>
-<td>
-<li>{@code --exec=<file>}</li>
-<li>{@code -x <file>}</li>
-</td>
-<td><p>This option tells {@code ndk-gdb} to run the GDB initialization commands found in
-{@code <file>} after connecting to the process it is debugging. This is a useful feature if
-you want to do something repeatedly, such as setting up a list of breakpoints, and then resuming
-execution automatically.</p></td>
-</tr>
-
-<tr>
-<td>{@code --nowait}</td>
-<td><p>Disable pausing the Java code until GDB connects. Passing this option may cause the debugger
- to miss early breakpoints.</p>
-</tr>
-
-<tr>
-<td>{@code --tui}
-{@code -t}</td>
-<td><p>Enable Text User Interface if it is available.</p></td>
-</tr>
-
-<tr>
-<td>{@code --gnumake-flag=<flag>}</td>
-<td><p>This option is an extra flag (or flags) to pass to the
-{@code ndk-build} system when
-querying it for project information. You can use multiple instances of this option in the
-same command.</p></td>
-</tr>
-
-<tr>
-<td>{@code --stdcxx-py-pr={auto|none|gnustdcxx[-GCCVER]|stlport}}</td>
-<td><p>Use specified Python pretty-printers for displaying types in the Standard C++ Library.
- {@code auto} mode works by looking at the {@code .so} files for a {@code libstdc++} library,
- and as such only works for a shared library. When linking statically to a {@code libstdc++} library,
- you must specify the required printers. The default is {@code none}.</p></td>
-</tr>
-</table>
-
-<p class="note"><strong>Note: </strong>The final three options in this table are only for the
-Python version of {@code ndk-gdb}.</p></td>
-
-<h2 id="thread">Thread Support</h2>
-<p>If your app runs on a platform older than Android 2.3 (API level 9), {@code ndk-gdb}
-cannot debug native threads properly. The debugger can only debug the main thread, abd completely
-ignores the execution of other threads.</p>
-
-<p>If you place a breakpoint on a function executed on a non-main thread, the program exits, and
-GDB displays the following message:</p>
-
-<pre class="no-pretty-print">
-Program terminated with signal SIGTRAP, Trace/breakpoint trap.
-      The program no longer exists.
-</pre>
diff --git a/docs/html/ndk/guides/ndk-stack.jd b/docs/html/ndk/guides/ndk-stack.jd
deleted file mode 100644
index 45d433c..0000000
--- a/docs/html/ndk/guides/ndk-stack.jd
+++ /dev/null
@@ -1,86 +0,0 @@
-page.title=ndk-stack
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#use">Usage</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The {@code ndk-stack} tool allows you to filter stack traces as they appear in the
-output of <a href="{@docRoot}tools/help/logcat.html">{@code adb logcat}</a>. It also replaces any
-address inside a shared library with the corresponding
-{@code <source-file>:<line-number>} values from your source code, making issues easier
-to pinpoint.</p>
-
-<p>For example, it translates something like:</p>
-
-<pre>
-I/DEBUG   (   31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-I/DEBUG   (   31): Build fingerprint: 'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
-I/DEBUG   (   31): pid: 351, tid: 351  %gt;%gt;%gt; /data/local/ndk-tests/crasher &lt;&lt;&lt;
-I/DEBUG   (   31): signal 11 (SIGSEGV), fault addr 0d9f00d8
-I/DEBUG   (   31):  r0 0000af88  r1 0000a008  r2 baadf00d  r3 0d9f00d8
-I/DEBUG   (   31):  r4 00000004  r5 0000a008  r6 0000af88  r7 00013c44
-I/DEBUG   (   31):  r8 00000000  r9 00000000  10 00000000  fp 00000000
-I/DEBUG   (   31):  ip 0000959c  sp be956cc8  lr 00008403  pc 0000841e  cpsr 60000030
-I/DEBUG   (   31):          #00  pc 0000841e  /data/local/ndk-tests/crasher
-I/DEBUG   (   31):          #01  pc 000083fe  /data/local/ndk-tests/crasher
-I/DEBUG   (   31):          #02  pc 000083f6  /data/local/ndk-tests/crasher
-I/DEBUG   (   31):          #03  pc 000191ac  /system/lib/libc.so
-I/DEBUG   (   31):          #04  pc 000083ea  /data/local/ndk-tests/crasher
-I/DEBUG   (   31):          #05  pc 00008458  /data/local/ndk-tests/crasher
-I/DEBUG   (   31):          #06  pc 0000d362  /system/lib/libc.so
-I/DEBUG   (   31):
-</pre>
-
-<p>into the more readable output: </p>
-
-<pre>
-********** Crash dump: **********
-Build fingerprint: 'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
-pid: 351, tid: 351  &gt;&gt;&gt; /data/local/ndk-tests/crasher &lt;&lt;&lt;
-signal 11 (SIGSEGV), fault addr 0d9f00d8
-Stack frame #00  pc 0000841e  /data/local/ndk-tests/crasher : Routine zoo in /tmp/foo/crasher/jni/zoo.c:13
-Stack frame #01  pc 000083fe  /data/local/ndk-tests/crasher : Routine bar in /tmp/foo/crasher/jni/bar.c:5
-Stack frame #02  pc 000083f6  /data/local/ndk-tests/crasher : Routine my_comparison in /tmp/foo/crasher/jni/foo.c:9
-Stack frame #03  pc 000191ac  /system/lib/libc.so
-Stack frame #04  pc 000083ea  /data/local/ndk-tests/crasher : Routine foo in /tmp/foo/crasher/jni/foo.c:14
-Stack frame #05  pc 00008458  /data/local/ndk-tests/crasher : Routine main in /tmp/foo/crasher/jni/main.c:19
-Stack frame #06  pc 0000d362  /system/lib/libc.so
-</pre>
-
-<h2>Usage</h2>
-<p>To use {@code ndk-stack}, you first need a directory containing symbolic versions of your app's
-shared libraries. If you use the NDK build system ({@code ndk-build}), these shared-library
-files reside under {@code $PROJECT_PATH/obj/local/<abi>}, where {@code <abi>} represents
-your device's ABI. By default, the system uses the {@code armeabi} ABI.</p>
-
-<p>There are two ways to use the tool. You can feed the logcat text as direct input to the program.
-For example:</p>
-
-<pre class="no-pretty-print">
-adb logcat | $NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi
-</pre>
-
-<p>You can also use the {@code -dump} option to specify the logcat as an input file. For example:
-</p>
-
-<pre class="no-pretty-print">
-adb logcat &gt; /tmp/foo.txt
-$NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi -dump foo.txt
-</pre>
-
-<p>When it begins parsing the logcat output, the tool looks for an initial line of asterisks.
-For example:</p>
-
-<pre class="no-pretty-print">
-*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
-</pre>
-
-<p class="note"><strong>Note: </strong>When copy/pasting traces, don't forget this line, or
-{@code ndk-stack} won't work correctly.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/prebuilts.jd b/docs/html/ndk/guides/prebuilts.jd
deleted file mode 100644
index 4cb1819..0000000
--- a/docs/html/ndk/guides/prebuilts.jd
+++ /dev/null
@@ -1,145 +0,0 @@
-page.title=Using Prebuilt Libraries
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#dm">Declaring a Prebuilt Library</a></li>
-        <li><a href="#rp">Referencing the Prebuilt Library from Other Modules</a></li>
-        <li><a href="#dp">Debugging Prebuilt Libraries</a></li>
-        <li><a href="#sa">Selecting ABIs for Prebuilt Libraries</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>The NDK supports the use of prebuilt libraries, both static and shared. There are two principal
-use cases for this functionality:</p>
-
-<ul>
-   <li>Distributing your own libraries to third-party NDK developers without distributing your
-    sources.</li>
-   <li>Using a prebuilt version of your own libraries to speed up your build.</li>
-</ul>
-
-<p>This page explains how to use prebuilt libraries.</p>
-
-<h2 id="dm">Declaring a Prebuilt Library</h2>
-<p>You must declare each prebuilt library you use as a <em>single</em> independent module. To do
-  so, perform the following steps:
-
-<ol type="1">
-   <li>Give the module a name. This name does not need to be the same as that of the prebuilt
-    library, itself.</li>
-   <li>In the module's <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
-   file, assign to {@code LOCAL_SRC_FILES} the path to the prebuilt library you are providing.
-   Specify the path relative to the value of your {@code LOCAL_PATH} variable.</p>
-   <p class="note"><strong>Note: </strong> You must make sure to select the version of your prebuilt
-    library appropriate to your target ABI. For more information on ensuring library support for
-    ABIs, see <a href="#sa">Selecting ABIs for Prebuilt Libraries.</a></p></li>
-   <li>Include {@code PREBUILT_SHARED_LIBRARY} or {@code PREBUILT_STATIC_LIBRARY}, depending on
-    whether you are using a shared ({@code .so}) or static ({@code .a}) library.</li>
-</ol>
-
-  <p>Here is a trivial example that assumes the prebuilt library {@code libfoo.so} resides in
-  the same directory as the <a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a>
-  file that describes it.</p>
-
-<pre>
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := foo-prebuilt
-LOCAL_SRC_FILES := libfoo.so
-include $(PREBUILT_SHARED_LIBRARY)
-</pre>
-
-<p>In this example, the name of the module is the same as that of the prebuilt library.</p>
-
-<p>The build system places a copy of your prebuilt shared library into {@code $PROJECT/obj/local},
-and another copy, stripped of debug information, into {@code $PROJECT/libs/<abi>}. Here,
-{@code $PROJECT} is the root directory of your project.</p>
-
-<h2 id="rp">Referencing the Prebuilt Library from Other Modules</h2>
-<p>To reference a prebuilt library from other modules, specify its name as the value
-of the {@code LOCAL_STATIC_LIBRARIES} or {@code LOCAL_SHARED_LIBRARIES} variable in the
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> files associated with those
-other modules.</p>
-
-<p>For example, the description of a module using {@code libfoo.so} might be as follows:</p>
-
-<pre>
-include $(CLEAR_VARS)
-LOCAL_MODULE := foo-user
-LOCAL_SRC_FILES := foo-user.c
-LOCAL_SHARED_LIBRARIES := foo-prebuilt
-include $(BUILD_SHARED_LIBRARY)
-</pre>
-
-<p>Here, {@code LOCAL_MODULE} is the name of the module referring to the prebuilt; {@code
-  LOCAL_SHARED_LIBRARIES} is the name of the prebuilt, itself.</p>
-
-<h2>Exporting Headers for Prebuilt Libraries</h2>
-<p>The code in {@code foo-user.c} depends on specific declarations that normally
-reside in a header file, such as {@code foo.h}, distributed with the prebuilt library.
-For example, {@code foo-user.c} might have a line like the following:</p>
-
-<pre>
-#include &lt;foo.h&gt;
-</pre>
-
-<p>In such a case, you need to provide the header and its include path to the compiler when you
-build the {@code foo-user} module. A simple way to accomplish this task is to use exports in the
-prebuilt module definition. For example, as long as header {@code foo.h} is located under the
-{@code include} directory associated with the prebuilt module, you can declare it as follows:</p>
-
-<pre>
-include $(CLEAR_VARS)
-LOCAL_MODULE := foo-prebuilt
-LOCAL_SRC_FILES := libfoo.so
-LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
-include $(PREBUILT_SHARED_LIBRARY)
-</pre>
-
-<p>The {@code LOCAL_EXPORT_C_INCLUDES} definition here ensures that the build system
-exports the path to the prebuilt library's {@code include} directory, prepending that path onto the
-value of the {@code LOCAL_C_INCLUDES} for the module dependent on it.</p>
-
-<p>This operation allows the build system to find the necessary headers.</p>
-
-<h2 id="dp">Debugging Prebuilt Libraries</h2>
-<p>We recommend that you provide prebuilt shared libraries containing debug symbols. The NDK build
-system always strips the symbols from the version of the library that it installs into
-{@code $PROJECT/libs/<abi>/}, but you can use the debug version for debugging with
-{@code ndk-gdb}.</p>
-
-<h2 id="sa">Selecting ABIs for Prebuilt Libraries</h2>
-<p>You must make sure to select the right version of your prebuilt shared library for your targeted
-ABI. The <a href="{@docRoot}ndk/guides/android_mk.html#taa">
-{@code TARGET_ARCH_ABI}</a> variable in the <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file can point the build system at the appropriate version of the library.
-</p>
-
-<p>For example, assume that your project contains two versions of library {@code libfoo.so}:</p>
-
-<pre class="no-pretty-print">
-armeabi/libfoo.so
-x86/libfoo.so
-</pre>
-
-<p>The following snippet shows how to use {@code TARGET_ARCH_ABI} so that the build system selects
-  the appropriate version of the library:</p>
-
-<pre>
-include $(CLEAR_VARS)
-LOCAL_MODULE := foo-prebuilt
-LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libfoo.so
-LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
-include $(PREBUILT_SHARED_LIBRARY)
-</pre>
-
-<p>If you have specified {@code armeabi} as the value of {@code TARGET_ARCH_ABI}, the build system
-uses the version of {@code libfoo.so} located in the {@code armeabi} directory. If you have
-specified {@code x86} as the value {@code TARGET_ARCH_ABI}, the build system uses the version in the
-{@code x86} directory.</p>
diff --git a/docs/html/ndk/guides/sample.jd b/docs/html/ndk/guides/sample.jd
deleted file mode 100644
index 18ca0b8..0000000
--- a/docs/html/ndk/guides/sample.jd
+++ /dev/null
@@ -1,11 +0,0 @@
-page.title=Sample Walkthroughs
-@jd:body
-
-<div class="contents">
-<div class="textblock"><p>This section explains several of the sample apps provided with the NDK. It assumes that you already have a working knowledge of programming in Java and native code, and focuses on issues particular to working with the NDK.</p>
-<p>It discusses the following samples:</p>
-<ul>
-<li><a href="./md_2__samples_sample--hellojni.html">hello-jni</a>: A very basic app that illustrates core workings of the NDK.</li>
-<li><a href="./md_2__samples_sample--nativeactivity.html">native-activity</a>: An app that shows the fundamentals of how to construct a purely native app. It places particular emphasis on the android_native_app_glue library.</li>
-<li><a href="./md_2__samples_samples-teapot.html">Teapot</a>: A simple OpenGL demo, showcasing the <code>ndk_helper</code> class. </li>
-</ul>
\ No newline at end of file
diff --git a/docs/html/ndk/guides/setup.jd b/docs/html/ndk/guides/setup.jd
deleted file mode 100644
index d3ace07..0000000
--- a/docs/html/ndk/guides/setup.jd
+++ /dev/null
@@ -1,93 +0,0 @@
-page.title=Setup
-@jd:body
-
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#install">Installation</a></li>
-        <li><a href="#configure">Configuring Eclipse</a></li>
-        <li><a href="#verify">Verification</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-
-<div class="contents">
-<div class="textblock"><p>This document explains how to:</p>
-<ul>
-<li><a href="#install">Get</a> and install the NDK.</li>
-<li><a href="#configure">Configure</a> your system and the Eclipse and the Android Development Tool
-(ADT) for use with it.</li>
-<li><a href="#verify">Verify</a>, using a simple sample, that everything is working as expected.
-</li>
-</ul>
-<p>This document assumes that you are already familiar with Java-based Android development. For more
-information on that topic, see the
-<a href="{@docRoot}">Android developer site</a>.</p>
-
-<h2 id="install">Installation</h2>
-<p>To install and configure the NDK, follow these steps:</p>
-<ol type="1">
-<li>Get and install the <a href="{@docRoot}studio/index.html">Android SDK</a>.</li>
-<li><a href="{@docRoot}ndk/downloads/index.html">Download</a> the NDK,
-making sure to download the correct version for your development platform. You may place the
-unzipped directory anywhere on your local drive.</li>
-<li>Update your {@code PATH} environment variable with the location of the directory that
-contains the NDK.</li>
-</ol>
-
-
-<h2 id="configure">Configuring Eclipse</h2>
-<p>Eclipse must know where the NDK is in order to use it when building your app. Follow these steps
-to set the location of the NDK.</p>
-<ol type="1">
-<li>Launch Eclipse, which is installed as part of the Android SDK.</li>
-<li>Open <b>Window</b> &gt; <b>Preferences</b>.</li>
-<li>In the pane on the left side of the <i>Preferences</i> window, select <i>Android</i>.
-The <i>Android</i> section expands, revealing a number of subsections.</li>
-<li>Select <b>NDK</b>. In the pane on the right side of the <i>Preferences</i> window, browse to
-the directory that contains the NDK.</li>
-<li>Click <b>OK</b> to return to the <i>Package Explorer</i> display.</li>
-</ol>
-
-<h2 id="verify">Verification</h2>
-<h3>Eclipse</h3>
-<p>To confirm that you have installed the NDK, set it up correctly, and properly configured Eclipse,
-follow these steps:</p>
-<ol type="1">
-<li>Import the hello-jni sample from {@code <ndk>/samples/}, as you would any other Android
-project.</li>
-<li>In the <i>Project Explorer</i> pane, right-click the project name (<i>HelloJni</i>). A
-context menu appears.</li>
-<li>From the context menu, select <b>Android Tools</b> &gt; <b>Add Native Support</b>. The
-<i>Add Android Native Support</i> window appears.</li>
-<li>Accept the default library name (“hello-jni”), and click <b>Finish</b>.</li>
-<li>Build and execute the application.</li>
-</ol>
-<h3>Command line</h3>
-<p>Follow these steps to build from the command line:</p>
-<ol type="1">
-<li>Change to the root directory of your project.</li>
-<li>Execute ndk-build to build the native component of your app. do this by
-typing {@code ndk-build} at the command prompt.</li>
-<li>Build and install your project as you would a regular Android app written in Java. For more
-information, see
-<a href="{@docRoot}tools/building/index.html">Building and Running</a> and
-<a href="{@docRoot}tools/building/building-cmdline.html">Building and Running
-from the Command Line</a>.</li>
-</ol>
-
-<p>If you have successfully installed and configured the NDK, the screen on your target device looks
-as shown in Figure 1.</p>
-
-<img src="./images/verification_screen.png" srcset="./images/verification_screen@2x.png 2x"
-alt="Output: Hello from JNI!" id="figure1" />
-
-<p class="img-caption">
-<strong>Figure 1.</strong> Target-device screen after successful launch.
-</p>
diff --git a/docs/html/ndk/guides/stable_apis.jd b/docs/html/ndk/guides/stable_apis.jd
deleted file mode 100644
index c38e684..0000000
--- a/docs/html/ndk/guides/stable_apis.jd
+++ /dev/null
@@ -1,501 +0,0 @@
-page.title=Android NDK Native APIs
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#purpose">Overview</a></li>
-        <li><a href="#mnu">Major Native API Updates</a><li>
-          <ol>
-        <li><a href="#a3">Android API level 3</a></li>
-        <li><a href="#a4">Android API level 4</a></li>
-        <li><a href="#a5">Android API level 5</a></li>
-        <li><a href="#a8">Android API level 8</a></li>
-        <li><a href="#a9">Android API level 9</a></li>
-        <li><a href="#a14">Android API level 14</a></li>
-        <li><a href="#a18">Android API level 18</a></li>
-          </ol>
-      </ol>
-    </div>
-  </div>
-
-<p>The Android NDK provides a set of native headers and shared library files that has gradually
-increased with successive releases of new Android API levels. This page explains these headers and
-files, and maps them to specific
-<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels"> Android API levels</a>.
-</p>
-
-<h2 id="purpose">Overview</h2>
-<p>There are two basic steps to enable your app to use the libraries that the NDK provides:
-</p>
-
-<ol type ="1">
-<li>Include in your code the headers associated with the libraries you wish to use.</li>
-
-<li>Tell the build system that your native module needs to link against the libraries at load time.
-For example, to link against  {@code /system/lib/libfoo.so}, add the following line to your
-<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a> file:</li>
-
-<pre>
-LOCAL_LDLIBS := -lfoo
-</pre>
-
-<p>To list multiple libraries, use a space as a delimiter. For more information about using the
-{@code LOCAL_LDLIBS} variable, see <a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.
-</p>
-
-</ol>
-
-<p>For all API levels, the build system automatically links the standard C libraries, the
-standard C++ libraries, real-time extensions, and {@code pthread}; you do not need
-to include them when defining your {@code LOCAL_LDLIBS} variable. For more information about
-the C and C++ libraries, see <a href="#a3">Android API level 3</a>.</p>
-
-<p>The NDK often provides new headers and libraries for new Android releases. These files reside
-under {@code $NDK/platforms/android-<level>/<abi>/usr/include}. When the NDK does not
-have a specific new group of headers and libraries for an Android API level, it means that
-an app targeting that level should use the most recently released NDK assets. For example,
-there was no new release of NDK headers or libraries for Android API levels 6 and 7. Therefore,
-when developing an app targeting Android API level 7, you should use the headers and libraries
-located under {@code android-5/}.</p>
-
-<p>Table 1 shows the correspondence between NDK-supported API levels and Android releases.</p>
-
-<p class="table-caption" id="table1">
-  <strong>Table 1.</strong> NDK-supported API levels and corresponding Android releases.</p>
-<table>
-  <tr>
-    <th scope="col">NDK-supported API level</th>
-    <th scope="col">Android release</th>
-  </tr>
-  <tr>
-    <td>3</td>
-    <td>1.5</td>
-  </tr>
-    <tr>
-    <td>4</td>
-    <td>1.6</td>
-  </tr>
-    <tr>
-    <td>5</td>
-    <td>2.0</td>
-  </tr>
-  <tr>
-    <td>8</td>
-    <td>2.2</td>
-  </tr>
-    <tr>
-    <td>9</td>
-    <td>2.3 through 3.0.x</td>
-  </tr>
-  <tr>
-    <td>12</td>
-    <td>3.1.x</td>
-  </tr>
-  <tr>
-    <td>13</td>
-    <td>3.2</td>
-  </tr>
-  <tr>
-    <td>14</td>
-    <td>4.0 through 4.0.2</td>
-  </tr>
-  <tr>
-    <td>15</td>
-    <td>4.0.3 and 4.0.4</td>
-  </tr>
-    <tr>
-    <td>16</td>
-    <td>4.1 and 4.1.1</td>
-  </tr>
-    <tr>
-    <td>17</td>
-    <td>4.2 and 4.2.2</td>
-  </tr>
-    <tr>
-    <td>18</td>
-    <td>4.3</td>
-  </tr>
-    <tr>
-    <td>19</td>
-    <td>4.4</td>
-  </tr>
-    <tr>
-    <td>21</td>
-    <td>4.4W and 5.0</td>
-</table>
-
-<p>Each new release of NDK headers and libraries for a given Android API level is cumulative; you
-are nearly always safe if you use the most recently released headers when building your app. For
-example, you can use the NDK headers for Android API level 21 for an app targeting API level 16. By doing so, however, you increase your APK's footprint.</p>
-
-<p>
-For more information about Android API levels, see
-<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API Level?</a>.
-</p>
-
-<h2 id="mnu">Major Native API Updates</h2>
-
-<h3 id="a3">Android API level 3</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 1.5 system
-images and above.</p>
-
-<h4>C library</h4>
-<p>The C library headers for Android 1.5 are available through their standard names, such as
-{@code stdlib.h} and {@code stdio.h}. If a header is missing at build time, it's because the
-header is not available on the 1.5 system image.</p>
-
-<h4>C++ library</h4>
-<p>An <em>extremely</em> minimal C++ support API is available. For more
-information on C++ library support, see
-<a href="{@docRoot}ndk/guides/cpp-support.html">C++ Library Support</a>.</p>
-
-<h4>Android-specific log support</h4>
-
-<p>{@code <android/log.h>} contains various definitions that an app can use to send log
-messages to the kernel from native code. For more information about these definitions, see the
-comments in {@code $NDK/platforms/android-3/arch-arm/usr/include/android/log.h}, where {@code $NDK}
-is the root of your NDK installation.</p>
-
-<p>You can write your own wrapper macros to access this functionality. If you wish to perform
-logging, your native module should link to {@code /system/lib/liblog.so}. Implement this
-linking by including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS := -llog
-</pre>
-
-<h4>ZLib compression library</h4>
-<p>You can use the <a href="http://www.zlib.net/manual.html">Zlib compression library</a>
-by including {@code zlib.h} and {@code zconf.h}. You must also link your native
-module against {@code /system/lib/libz.so} by including the following line in your
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS := -lz
-</pre>
-
-<h4>Dynamic linker library</h4>
-<p>You can access the Android dynamic linker's {@code dlopen()}, {@code dlsym()}, and
-{@code dlclose()} functions by including {@code dlfcn.h}. You must also link against
-{@code /system/lib/libdl.so} by including the following line in your
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS := -ldl
-</pre>
-
-<h3 id="a4">Android API level 4</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 1.6 system
-images and above.</p>
-
-<h4>OpenGL ES 1.x Library</h4>
-<p>The standard OpenGL ES headers {@code gl.h} and {@code glext.h} contain
-the declarations necessary for performing OpenGL ES 1.x rendering calls from native code.</p>
-
-<p>To use these headers, link your native module to {@code /system/lib/libGLESv1_CM.so} by
-including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-</p>
-
-<pre>
-LOCAL_LDLIBS := -lGLESv1_CM
-</pre>
-<p>All Android-based devices support OpenGL ES 1.0, because Android provides an Open GL 1.0-capable
-software renderer that can be used on devices without GPUs.</p>
-<p>Only Android devices that have the necessary GPU fully support OpenGL ES 1.1. An app can
-query the OpenGL ES version string and extension string to determine whether the current device
-supports the features it needs. For information on how to perform this query, see the description of
-<a href="http://www.khronos.org/opengles/sdk/1.1/docs/man/glGetString.xml">{@code glGetString()}</a>
-in the OpenGL specification.</p>
-
-<p>Additionally, you must put a
-<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate the version of
-<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>
-that your application requires.</p>
-
-<p>The <a href="#egl">EGL APIs</a> are only available starting from API level 9. You can, however,
-use the VM to perform some of the operations that you would get from those APIS. These operations
-include surface creation and flipping. For an example of how to use {@code GLSurfaceView}, see
-<a href="http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html">
-Introducing GLSurfaceView</a>.</p>
-
-<p>The san-angeles sample application provides an example of how to perform these operations,
-rendering each frame in native code. This sample is a small Android port of the excellent
-<a href="http://jet.ro/visuals/san-angeles-observation/">San Angeles Observation</a> demo
-program.</p>
-
-<h3 id="a5">Android API level 5</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 2.0 system
-images and above.</p>
-
-<h4>OpenGL ES 2.0 library:</h4>
-<p>The standard OpenGL ES 2.0 headers {@code <GLES2/gl2.h>} and {@code <GLES2/gl2ext.h>}
-contain the declarations needed for performing OpenGL ES 2.0 rendering calls from native code.
-These rendering calls provide the ability to use the GLSL language to define and use vertex and
-fragment shaders.</p>
-
-<p>To use OpenGL ES 2.0, link your native module to {@code /system/lib/libGLESv2.so} by
-including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS := -lGLESv2
-</pre>
-
-<p>Not all devices support OpenGL ES 2.0. An app can query the OpenGL
-ES version string and extension string to determine whether the current device
-supports the features it needs. For information on how to perform this query, see the description of
-<a href="https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml">
-{@code glGetString()}</a> in the OpenGL specification.</p>
-
-<p>Additionally, you must put a
-<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
-application requires. For more information about the OpenGL ES settings for
-{@code <uses-feature>}, see
-<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
-
-<p>The hello-gl2 sample application provies a basic example of how to use OpenGL ES 2.0 with the
-NDK.</p>
-
-<p>The <a href="#egl">EGL APIs</a> are only available starting from API level 9. You can, however,
-use the VM to perform some of the operations that you would get from those APIs. These operations
-include surface creation and flipping. For an example of how to use {@code GLSurfaceView}, see
-<a href="http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html">
-Introducing GLSurfaceView</a>.</p>
-
-<p class="note"><strong>Note:</strong> The Android emulator does not support OpenGL ES 2.0 hardware
-emulation. Running and testing code that uses this API requires a real device with hardware that can
-support OpenGL ES 2.0.</p>
-
-<h3 id="a8">Android API level 8</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 2.2 system
-images and above.</p>
-
-<h4>jnigraphics</h4>
-<p>The {@code jnigraphics} library exposes a C-based interface that allows native code to reliably access
-the pixel buffers of Java bitmap objects. The workflow for using {@code jnigraphics} is as follows:
-</p>
-
-<ol type="1">
-<li>Use {@code AndroidBitmap_getInfo()} to retrieve information from JNI, such as width and height,
-about a given bitmap handle.</li>
-
-<li>Use {@code AndroidBitmap_lockPixels()} to lock the pixel buffer and retrieve a pointer to it.
-Doing so ensures that the pixels do not move until the app calls
-{@code AndroidBitmap_unlockPixels()}.</li>
-
-<li>In native code, modify the pixel buffer as appropriate for its pixel format, width, and other
-characteristics.</li>
-
-<li>Call {@code AndroidBitmap_unlockPixels()} to unlock the buffer.</li>
-</ol>
-
-<p>To use {@code jnigraphics}, include the {@code <bitmap.h>} header in your source code, and
-link against {@code jnigraphics} by including the following line in your
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS += -ljnigraphics
-</pre>
-
-<p>Additional details about this feature are in the comments of the {@code bitmap.h} file.
-
-<h3 id="a9">Android API level 9</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 2.3 system
-images and above.</p>
-
-<h4 id="egl"> EGL</h4>
-<p>EGL provides a native platform interface for allocating and managing OpenGLES surfaces.
-For more information about its features, see <a href="http://www.khronos.org/egl">
-EGL Native Platform Interface</a>.</p>
-
-<p>EGL allows you to perform the following operations from native code:</p>
-
-<ul>
-<li>List supported EGL configurations.</li>
-<li>Allocate and release OpenGLES surfaces.</li>
-<li>Swap or flip surfaces.</li>
-</ul>
-
-<p>The following headers provide EGL functionality:</p>
-<ul>
-   <li>{@code EGL/egl.h}: the main EGL API definitions.</li>
-   <li>{@code EGL/eglext.h}: EGL extension-related definitions.</li>
-</ul>
-
-<p>To link against the system's EGL library, add the following line to your
-<a href="{@docRoot}ndk/guides/android_mk.html">{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS += -lEGL
-</pre>
-
-<h4 id="osl">OpenSL ES</h4>
-<p>Android native audio handling is based on the Khronos Group OpenSL ES 1.0.1 API.</p>
-
-<p>The standard OpenSL ES headers {@code OpenSLES.h} and {@code OpenSLES_Platform.h} contain
-the declarations necessary for performing audio input and output from the native side of Android.
-The NDK distribution of the OpenSL ES also provides Android-specific extensions. For information
-about these extensions, see the comments in {@code OpenSLES_Android.h} and
-{@code OpenSLES_AndroidConfiguration.h}.</p>
-
-
-<p>The system library {@code libOpenSLES.so} implements the public native audio functions. Link
-against it by adding the following line to your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS += -lOpenSLES
-</pre>
-
-<p>For more information about the OpenSL ES API, refer to
-{@code $NDK/docs/Additional_library_docs/opensles/index.html}, where {@code $NDK} is your NDK
-installation root directory.</p>
-
-<h4>Android native application APIs</h4>
-<p>Starting from API level 9, you can write an entire Android app with native code, without using
-any Java.</p>
-
-<p class="note"><strong>Note: </strong>Writing your app in native code is not, in itself, enough
-for your app to run in the VM. Moreover, your app must still access most features of the Android
-platform via JNI.</p>
-
-<p>This release provides the following native headers:</p>
-<ul>
-<li>{@code <native_activity.h>}</li>
-<li>{@code <looper.h>}</li>
-<li>{@code <input.h>}</li>
-<li>{@code <keycodes.h>}</li>
-<li>{@code <sensor.h>}</li>
-<li>{@code <rect.h>}</li>
-<li>{@code <window.h>}</li>
-<li>{@code <native_window.h>}</li>
-<li>{@code <native_window_jni.h>}</li>
-<li>{@code <configuration.h>}</li>
-<li>{@code <asset_manager.h>}</li>
-<li>{@code <storage_manager.h>}</li>
-<li>{@code <obb.h>}</li>
-</ul>
-
-<p>For more information about these headers, see the
-<a href="{@docRoot}ndk/reference/index.html">NDK API Reference documentation</a>, as well as
-the comments in the headers, themselves. Also, for more information about the larger topic of
-writing native apps, see <a href="{@docRoot}ndk/guides/concepts.html#naa">
-Native Activities and Applications</a>.
-
-<p>When you include one or more of these headers, you must also link against the
-{@code libandroid.so} library. To link against {@code libandroid.so}, include the following line in
-your <a href="{@docRoot}ndk/guides/android_mk.html"> {@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS += -landroid
-</pre>
-
-<h3 id="a14">Android API level 14</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 4.0 system
-images and above.</p>
-
-<h4>OpenMAX AL</h4>
-<p>Android native multimedia handling is based on Khronos Group OpenMAX AL 1.0.1 API.</p>
-<p>The standard OpenMAX AL headers {@code <OMXAL/OpenMAXAL.h>} and
-{@code <OMXAL/OpenMAXAL_Platform.h>} contain the declarations necessary for performing
-multimedia output from the native side of Android.</p>
-
-<p>The NDK distribution of OpenMAX AL also provides Android-specific extensions. For information
-about these extensions, see the comments in {@code OpenMAXAL_Android.h}.</p>
-
-<p>The system library {@code libOpenMAXAL.so} implements the public native multimedia functions.
-To link against this library, include the following line in your
-<a href="{@docRoot}ndk/guides/android_mk.html"> {@code Android.mk}</a> file:</p>
-
-<pre class="fragment">    LOCAL_LDLIBS += -lOpenMAXAL
-</pre><p>For more information about this topic, see {@code $NDK/docs/openmaxal/index.html},
-where {@code $NDK} is the root directory of your NDK installation.</p>
-
-<h4>OpenSL ES</h4>
-<p>OpenSL ES support for this Android API level adds PCM support. For more information about
-OpenSL ES support in the NDK, see <a href="#osl">OpenSL ES</a>.</p>
-
-<h3 id="a18">Android API level 18</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 4.3 system
-images and above.</p>
-
-<h4>OpenGL ES 3.0</h4>
-
-<p>The standard OpenGL ES 3.0 headers {@code gl3.h} and {@code gl3ext.h} contain the declarations
-needed for performing OpenGL ES 3.0 rendering calls from native code. These rendering calls provide
-the ability to use the GLSL language to define and use vertex and fragment shaders.
-
-<p>To use OpenGL ES 3.0, link your native module against {@code /system/lib/libGLESv3.so} by
-including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS := -lGLESv3
-</pre>
-
-<p>Not all devices support OpenGL ES 3.0. An app can query the OpenGL
-ES version string and extension string to determine whether the current device
-supports the features it needs. For information on how to perform this query, see the description of
-<a href="https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml">
-{@code glGetString()}</a> in the OpenGL specification.</p>
-
-<p>Additionally, you must put a
-<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
-application requires. For more information about the OpenGL ES settings for
-{@code <uses-feature>}, see
-<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
-
-<p>The gles3jni sample application provides a basic example of how to use OpenGL ES 3.0 with the
-NDK.</p>
-
-<p class="note"><strong>Note:</strong> The Android emulator does not support OpenGL ES 3.0 hardware
-emulation. Running and testing code that uses this API requires a real device with hardware that can
-support OpenGL ES 3.0.</p>
-
-
-<h3 id="a18">Android API level 21</h3>
-<p>The NDK provides the following APIs for developing native code that runs on Android 4.3 system
-images and above.</p>
-
-<h4>OpenGL ES 3.1</h4>
-
-<p>The standard OpenGL ES 3.1 headers {@code gl31.h} and {@code gl3ext.h} contain the declarations
-needed for performing OpenGL ES 3.1 rendering calls from native code. These rendering calls provide
-the ability to use the GLSL language to define and use vertex and fragment shaders.
-
-<p>To use OpenGL ES 3.1, link your native module against {@code /system/lib/libGLESv3.so} by
-including the following line in your <a href="{@docRoot}ndk/guides/android_mk.html">
-{@code Android.mk}</a> file:</p>
-
-<pre>
-LOCAL_LDLIBS := -lGLESv3
-</pre>
-
-<p>Not all devices support OpenGL ES 3.1. An app can query the OpenGL
-ES version string and extension string to determine whether the current device
-supports the features it needs. For information on how to perform this query, see the description of
-<a href="https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetString.xml">
-{@code glGetString()}</a> in the OpenGL specification.</p>
-
-<p>Additionally, you must put a
-<a href="http://developer.android.com/guide/topics/manifest/uses-feature-element.html">{@code
-<uses-feature>}</a> tag in your manifest file to indicate which version of OpenGL ES your
-application requires. For more information about the OpenGL ES settings for
-{@code <uses-feature>}, see
-<a href="http://developer.android.com/guide/topics/graphics/opengl.html#manifest">OpenGL ES</a>.</p>
-
-<p>The gles3jni sample application provides a basic example of how to use OpenGL ES 3.1 with the
-NDK.</p>
-
-<p class="note"><strong>Note:</strong> The Android emulator does not support OpenGL ES 3.1 hardware
-emulation. Running and testing code that uses this API requires a real device with hardware that can
-support OpenGL ES 3.1.</p>
-
diff --git a/docs/html/ndk/guides/standalone_toolchain.jd b/docs/html/ndk/guides/standalone_toolchain.jd
deleted file mode 100755
index 7a6f906..0000000
--- a/docs/html/ndk/guides/standalone_toolchain.jd
+++ /dev/null
@@ -1,605 +0,0 @@
-page.title=Standalone Toolchain
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#syt">Selecting Your Toolchain</a></li>
-        <li><a href="#sys">Selecting Your Sysroot</a></li>
-        <li><a href="#itc">Invoking the Compiler</a></li>
-        <li><a href="#wwc">Working with Clang</a></li>
-        <li><a href="#abi">ABI Compatibility</a></li>
-        <li><a href="#war">Warnings and Limitations</a></li>
-      </ol>
-    </div>
-  </div>
-
-<p>You can use the toolchains provided with the Android NDK independently, or as plug-ins
-with an existing IDE. This flexibility
-can be useful if you already have your own build system, and only need the ability to invoke the
-cross-compiler in order to add support to Android for it.</p>
-
-<p>A typical use case is invoking the configure script of an open-source library that expects a
-cross-compiler in the {@code CC} environment variable.</p>
-
-<p class="note"><strong>Note:</strong> This page assumes significant understanding of
-compiling, linking, and low-level architecture. In addition, the techniques it describes are
-unnecessary for most use cases. In most cases, we recommend that you forego using a standalone
-toolchain, and instead stick to the NDK build system.</p>
-
-<h2 id="syt">Selecting Your Toolchain</h2>
-<p>Before anything else, you need to decide which processing architecture your standalone toolchain
-is going to target. Each architecture corresponds to a different toolchain name, as Table 1
-shows.</p>
-
-<p class="table-caption" id="table1">
-  <strong>Table 1.</strong> {@code APP_ABI} settings for different instruction sets.</p>
-<table>
-  <tr>
-    <th scope="col">Architecture</th>
-    <th scope="col">Toolchain name</th>
-  </tr>
-  <tr>
-    <td>ARM-based</td>
-    <td>{@code arm-linux-androideabi-<gcc-version>}</td>
-  </tr>
-  <tr>
-    <td>x86-based</td>
-    <td>{@code x86-<gcc-version>}</td>
-  </tr>
-  <tr>
-    <td>MIPS-based</td>
-    <td>{@code mipsel-linux-android-<gcc-version>}</td>
-  </tr>
-  <tr>
-    <td>ARM64-based</td>
-    <td>{@code aarch64-linux-android-<gcc-version>}</td>
-  </tr>
-  <tr>
-    <td>X86-64-based</td>
-    <td>{@code x86_64-<gcc-version>}</td>
-  </tr>
-  <tr>
-    <td>MIPS64-based</td>
-    <td>{@code mips64el-linux-android--<gcc-version>}</td>
-  </tr>
-</table>
-
-
-
-<h2 id="sys">Selecting Your Sysroot</h2>
-<p>The next thing you need to do is define your <i>sysroot</i> (A sysroot is a directory containing
-the system headers and libraries for your target). To define the sysroot, you must must know the
-Android API level you want to target for native support; available native APIs vary by Android API
-level.</p>
-
-<p>Native APIs for the respective <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">
-Android API levels</a> reside under {@code $NDK/platforms/}; each API-level
-directory, in turn, contains subdirectories for the various CPUs and architectures. The
-following example shows how to define a <em>sysroot</em> for a build targeting Android 5.0
-(API level 21), for ARM architecture:</p>
-
-<pre class="no-pretty-print">
-SYSROOT=$NDK/platforms/android-21/arch-arm
-</pre>
-
-For more detail about the Android API levels and the respective native APIs they support, see
-<a href={@docRoot}ndk/guides/stable_apis.html>Android NDK Native APIs</a>.
-
-<h2 id="itc">Invoking the Compiler</h2>
-
-<p>There are two ways to invoke the compiler. One method is simple, and leaves most of the lifting
-to the build system. The other is more advanced, but provides more flexibility.</p>
-
-<h3 id="sm">Simple method</h3>
-<p>The simplest way to build is by invoking the appropriate compiler directly from the command
-line, using the {@code --sysroot} option to indicate the location of the system files for the
-platform you're targeting. For example:</p>
-
-<pre class="no-pretty-print">
-export CC="$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/ \
-linux-x86/bin/arm-linux-androideabi-gcc-4.8 --sysroot=$SYSROOT"
-$CC -o foo.o -c foo.c
-</pre>
-
-<p>While this method is simple, it lacks in flexibility: It does not allow you to use any C++ STL
-(STLport, libc++, or the GNU libstdc++) with it. It also does not support exceptions or RTTI.</p>
-
-<p>For Clang, you need to perform an additional two steps:</p>
-<ul>
-<ol type="1">
-<li>Add the appropriate {@code -target} for the target architecture, as Table 2 shows.</li>
-
-<p class="table-caption" id="table2">
-  <strong>Table 2.</strong> Architectures and corresponding values for {@code -target}.</p>
-   <table>
-  <tr>
-    <th scope="col">Architecture</th>
-    <th scope="col">Value</th>
-  </tr>
-  <tr>
-    <td>armeabi</td>
-    <td>{@code -target armv5te-none-linux-androideabi}</td>
-  </tr>
-  <tr>
-    <td>armeabi-v7a</td>
-    <td>{@code -target armv7-none-linux-androideabi}</td>
-  </tr>
-  <tr>
-     <td>arm64-v8a</td>
-     <td>{@code -target aarch64-none-linux-android}</td>
-  </tr>
-  <tr>
-    <td>x86</td>
-    <td>{@code -target i686-none-linux-android}</td>
-  </tr>
-  <tr>
-    <td>x86_64</td>
-    <td>{@code -target x86_64-none-linux-android}</td>
-  </tr>
-  <tr>
-    <td>mips</td>
-    <td>{@code -target mipsel-none-linux-android}</td>
-  </tr>
-</table>
-
-<li>Add assembler and linker support by adding the {@code -gcc-toolchain} option, as in the
-following example:</li>
-<pre class="no-pretty-print">
--gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
-</pre>
-</ol>
-
-Ultimately, a command to compile using Clang might look like this:
-
-<pre class="no-pretty-print">
-export CC="$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/ \
-linux-x86/bin/arm-linux-androideabi-gcc-4.8 --sysroot=$SYSROOT" -target \
-armv7-none-linux-androideabi \
--gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64"
-$CC -o foo.o -c foo.c
-</pre>
-</ul>
-
-<h3>Advanced method</h3>
-<p>The NDK provides the {@code make-standalone-toolchain.sh} shell script to allow you to perform a
-customized toolchain installation from the command line. This approach affords you more flexibility
-than the procedure described in <a href="#sm">Simple method</a>.</p>
-
-<p>The script is located in the {@code $NDK/build/tools/} directory, where {@code $NDK} is the
-installation root for the NDK. An example of the use of this script appears below:</p>
-
-<pre class="no-pretty-print">
-$NDK/build/tools/make-standalone-toolchain.sh \
---arch=arm --platform=android-21 --install-dir=/tmp/my-android-toolchain
-</pre>
-
-<p>This command creates a directory named {@code /tmp/my-android-toolchain/}, containing a copy of
-the {@code android-21/arch-arm} sysroot, and of the toolchain binaries for a 32-bit ARM
-architecture.</p>
-
-<p>Note that the toolchain binaries do not depend on or contain host-specific paths, in other words,
-you can install them in any location, or even move them if you need to.</p>
-
-<p>By default, the build system uses the 32-bit, ARM-based GCC 4.8 toolchain. You can specify a
-different value, however, by specifying {@code --arch=<toolchain>} as an option.
-Table 3 shows the values to use for other toolchains:
-
-<p class="table-caption" id="table3">
-  <strong>Table 3.</strong> Toolchains and corresponding values, using {@code --arch}.</p>
-   <table>
-  <tr>
-    <th scope="col">Toolchain</th>
-    <th scope="col">Value</th>
-  </tr>
-  <tr>
-    <td>mips64 compiler</td>
-    <td>{@code --arch=mips64}</td>
-  </tr>
-  <tr>
-    <td>mips GCC 4.8 compiler</td>
-    <td>{@code --arch=mips}</td>
-  </tr>
-  <tr>
-    <td>x86 GCC 4.8 compiler</td>
-    <td>{@code --arch=x86}</td>
-  </tr>
-  <tr>
-    <td>x86_64 GCC 4.8 compiler</td>
-    <td>{@code --arch=x86_64}</td>
-  </tr>
-  <tr>
-    <td>mips GCC 4.8 compiler</td>
-    <td>{@code --arch=mips}</td>
-  </tr>
-</table>
-
-<p>Alternatively, you can use the {@code --toolchain=<toolchain>} option. Table 4 shows the
-values you can specify for {@code <toolchain>}:</p>
-
-<p class="table-caption" id="table4">
-  <strong>Table 4.</strong> Toolchains and corresponding values, using {@code --toolchain}.</p>
-   <table>
-  <tr>
-    <th scope="col">Toolchain</th>
-    <th scope="col">Value</th>
-  </tr>
-
-  <tr>
-    <td>arm</td>
-    <td>
-       <li>{@code --toolchain=arm-linux-androideabi-4.8}</li>
-       <li>{@code --toolchain=arm-linux-androideabi-4.9}</li>
-       <li>{@code --toolchain=arm-linux-android-clang3.5}</li>
-       <li>{@code --toolchain=arm-linux-android-clang3.6}</li>
-    </td>
-  </tr>
-  <tr>
-    <td>x86</td>
-    <td>
-       <li>{@code --toolchain=x86-linux-android-4.8}</li>
-       <li>{@code --toolchain=x86-linux-android-4.9}</li>
-       <li>{@code --toolchain=x86-linux-android-clang3.5}</li>
-       <li>{@code --toolchain=x86-linux-android-clang3.6}</li>
-    </td>
-  </tr>
-  <tr>
-    <td>mips</td>
-    <td>
-       <li>{@code --toolchain=mips-linux-android-4.8}</li>
-       <li>{@code --toolchain=mips-linux-android-4.9}</li>
-       <li>{@code --toolchain=mips-linux-android-clang3.5}</li>
-       <li>{@code --toolchain=mips-linux-android-clang3.6}</li>
-    </td>
-  </tr>
-
-  <tr>
-    <td>arm64</td>
-    <td>
-       <li>{@code --toolchain=aarch64-linux-android-4.9}</li>
-       <li>{@code --toolchain=aarch64-linux-android-clang3.5}</li>
-       <li>{@code --toolchain=aarch64-linux-android-clang3.6}</li>
-    </td>
-  </tr>
-  <tr>
-    <td>x86_64</td>
-    <td>
-       <li>{@code --toolchain=x86_64-linux-android-4.9}</li>
-       <li>{@code --toolchain=x86_64-linux-android-clang3.5}</li>
-       <li>{@code --toolchain=x86_64-linux-android-clang3.6}</li>
-    </td>
-  </tr>
-  <tr>
-    <td>mips64</td>
-    <td>
-       <li>{@code --toolchain=mips64el-linux-android-4.9}</li>
-       <li>{@code --toolchain=mips64el-linux-android-clang3.5}</li>
-       <li>{@code --toolchain=mips64el-linux-android-clang3.6}</li>
-    </td>
-  </tr>
-</table>
-
-<p class="note"><strong>Note: </strong> Table 4 is not an exhaustive list. Other combinations may
-also be valid, but are unverified.</p>
-
-<p>You can also copy Clang/LLVM 3.6, using one of two methods: You can append {@code -clang3.6} to
-the {@code --toolchain} option, so that the {@code --toolchain} option looks like the following
-example:
-
-<pre class="no-pretty-print">
---toolchain=arm-linux-androideabi-clang3.6
-</pre>
-
-<p>You can also add {@code -llvm-version=3.6} as a separate option on the command
-line.</p>
-
-<p class="note"><strong>Note: </strong>Instead of specifying a specific version, you can also
-use {@code <version>}, which defaults
-to the highest available version of Clang.</p>
-
-<p>By default, the build system builds for a 32-bit host toolchain. You can specify a 64-bit
-host toolchain instead. Table 5 shows the value to use with {@code -system} for different
-platforms.</p>
-
-<p class="table-caption" id="table5">
-  <strong>Table 5.</strong> Host toolchains and corresponding values, using {@code -system}.</p>
-   <table>
-  <tr>
-    <th scope="col">Host toolchain</th>
-    <th scope="col">Value</th>
-  </tr>
-  <tr>
-    <td>64-bit Linux</td>
-    <td>{@code -system=linux-x86_64}</td>
-  </tr>
-  <tr>
-    <td>64-bit MacOSX</td>
-    <td>{@code -system=darwin-x86_64}</td>
-  </tr>
-  <tr>
-    <td>64-bit Windows</td>
-    <td>{@code -system=windows-x86_64}</td>
-  </tr>
-</table>
-
-For more information on specifying a 64- or 32-bit instruction host toolchain, see
-<a href="{@docRoot}ndk/guides/ndk-build.html#6432">64-Bit and 32-Bit Toolchains</a>.
-
-<p>You may specify {@code --stl=stlport} to copy {@code libstlport} instead of the default
-{@code libgnustl}. If you do so, and you wish to link against the shared library, you must
-explicitly use {@code -lstlport_shared}. This requirement is similar to having to use
-{@code -lgnustl_shared} for GNU {@code libstdc++}.</p>
-
-<p>Similarly, you can specify {@code --stl=libc++} to copy the LLVM libc++ headers and libraries.
-To link against the shared library, you must explicitly use -lc++_shared.</p>
-
-<p>You can make these settings directly, as in the following example:</p>
-
-<pre class="no-pretty-print">
-export PATH=/tmp/my-android-toolchain/bin:$PATH
-export CC=arm-linux-androideabi-gcc   # or export CC=clang
-export CXX=arm-linux-androideabi-g++  # or export CXX=clang++
-</pre>
-
-<p>Note that if you omit the {@code -install-dir} option, the {@code make-standalone-toolchain.sh}
-shell script creates a tarball in {@code tmp/ndk/<toolchain-name>.tar.bz2}. This tarball makes
-it easy to archive, as well as to redistribute the binaries.</p>
-
-<p>This standalone toolchain provides an additional benefit, as well, in that it contains a working
-copy of a C++ STL library, with working exceptions and RTTI support.</p>
-
-<p>For more options and details, use {@code --help}.</p>
-
-<h2 id="wwc">Working with Clang</h2>
-<p>You can install Clang binaries in the standalone installation by using the
-{@code --llvm-version=<version>} option. {@code <version>} is a LLVM/Clang version
-number, such as {@code 3.5} or {@code 3.6}. For example:
-
-<pre class="no-pretty-print">
-build/tools/make-standalone-toolchain.sh \
---install-dir=/tmp/mydir \
---toolchain=arm-linux-androideabi-4.8 \
---llvm-version=3.6
-</pre>
-
-<p>Note that Clang binaries are copied along with the GCC ones, because they rely on the same
-assembler, linker, headers, libraries, and C++ STL implementation.</p>
-
-<p>This operation also installs two scripts, named {@code clang} and {@code clang++}, under
-{@code <install-dir>/bin/@}. These scripts invoke the real {@code clang} binary with default
-target architecture flags. In other words, they should work without any modification, and you should
-be able to use them in your own builds by just setting the {@code CC} and {@code CXX} environment
-variables to point to them.</p>
-
-<h4>Invoking Clang</h4>
-<p>In an ARM standalone installation built with {@code llvm-version=3.6}, invoking
-<a href="http://clang.llvm.org/">Clang</a> on a Unix system takes the form of a single line. For
-instance:</p>
-
-<pre class="no-pretty-print">
-`dirname $0`/clang36 -target armv5te-none-linux-androideabi "$@"
-</pre>
-
-<p><code>clang++</code> invokes <code>clang++31</code> in the same way.</p>
-
-<h4>Clang targets with ARM</h4>
-
-<p>When building for ARM, Clang changes the target based on the presence of the
-{@code -march=armv7-a} and/or {@code -mthumb} options:</p>
-
-<p class="table-caption" id="table5">
-  <strong>Table 5.</strong> Specifiable {@code -march} values and their resulting targets.</p>
-   <table>
-  <tr>
-    <th scope="col">{@code -march} value</th>
-    <th scope="col">Resulting target</th>
-  </tr>
-  <tr>
-    <td>{@code -march=armv7-a}</td>
-    <td>{@code armv7-none-linux-androideabi}</td>
-  </tr>
-  <tr>
-    <td>{@code -mthumb}</td>
-    <td>{@code thumb-none-linux-androideabi}</td>
-  </tr>
-  <tr>
-    <td>Both {@code -march=armv7-a} and {@code -mthumb}</td>
-    <td>{@code thumbv7-none-linux-androideabi}</td>
-  </tr>
-</table>
-
-<p>You may also override with your own {@code -target} if you wish.</p>
-
-<p>The {@code -gcc-toolchain} option is unnecessary because, in a standalone package,
-Clang locates {@code as} and {@code ld} in a predefined relative location. <p>
-
-<p>{@code clang} and {@code clang++} should be easy drop-in replacements for {@code gcc} and
-{@code g++} in a makefile. When in doubt, add the following options to verify that they are
-working properly:</p>
-
-<ul>
-<li>{@code -v} to dump commands associated with compiler driver issues</li>
-<li>{@code -###} to dump command line options, including implicitly predefined ones.</li>
-<li>{@code -x c < /dev/null -dM -E} to dump predefined preprocessor definitions</li>
-<li>{@code -save-temps} to compare {@code *.i} or {@code *.ii} preprocessed files.</li>
-</ul>
-
-<p>For more information about Clang, see
-<a href="http://clang.llvm.org/">http://clang.llvm.org/</a>, especially the GCC compatibility
-section.</p>
-
-
-<h2 id="abi">ABI Compatibility</h2>
-<p>The machine code that the ARM toolchain generates should be compatible with the official Android
-{@code armeabi} <a href="{@docRoot}ndk/guides/abis.html">ABI</a> by default.</p>
-
-<p>We recommend use of the {@code -mthumb} compiler flag to force the generation of 16-bit Thumb-1
-instructions (the default being 32-bit ARM instructions).</p>
-
-<p>If you want to target the armeabi-v7a ABI, you must set the following flags: </p>
-
-<pre class="no-pretty-print">
-CFLAGS= -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16
-</pre>
-
-<p>The first flag enables Thumb-2 instructions. The second flag enables hardware-FPU instructions
-while ensuring that the system passes floating-point parameters in core registers, which is critical
-for ABI compatibility.</p>
-
-<p class="note"><strong>Note: </strong>In versions of the NDK prior to r9b, do not use these flags
-separately. You must set all or none of them. Otherwise, unpredictable behavior and crashes may
-result.</p>
-
-<p>To use NEON instructions, you must change the {@code -mfpu} compiler flag:</p>
-
-<pre class="no-pretty-print">
-CFLAGS= -march=armv7-a -mfloat-abi=softfp -mfpu=neon
-</pre>
-
-<p>Note that this setting forces the use of {@code VFPv3-D32}, per the ARM specification.</p>
-
-<p>Also, make sure to provide the following two flags to the linker:</p>
-
-<pre class="no-pretty-print">
-LDFLAGS= -march=armv7-a -Wl,--fix-cortex-a8
-</pre>
-
-<p>The first flag instructs the linker to pick {@code libgcc.a}, {@code libgcov.a}, and
-{@code crt*.o}, which are tailored for armv7-a. The 2nd flag is required as a workaround for a CPU
-bug in some Cortex-A8 implementations.</p>
-
-<p>Since NDK version r9b, all Android native APIs taking or returning double or float values have
-{@code attribute((pcs("aapcs")))} for ARM. This makes it possible to compile user code in
-{@code -mhard-float} (which implies {@code -mfloat-abi=hard}), and still link with the Android
-native APIs that comply with the softfp ABI. For more information on this, see the comments in
-{@code $NDK/tests/device/hard-float/jni/Android.mk}.</p>
-
-<p>If you want to use NEON intrinsics on x86, the build system can translate them to the native x86
-SSE intrinsics using a special C/C++ language header with the same name, {@code arm_neon.h}, as the
-standard ARM NEON intrinsics header.</p>
-
-<p>By default, the x86 ABI supports SIMD up to SSSE3, and the header covers ~93% of (1869 of 2009)
-NEON functions.</p>
-
-<p>You don't have to use any specific compiler flag when targeting the MIPS ABI.</p>
-
-<p>To learn more about ABI support, see <a href="{@docRoot}ndk/guides/x86.html">x86 Support</a>.</p>
-
-<h2 id="war">Warnings and Limitations</h2>
-<h3>Windows support</h3>
-<p>The Windows binaries do not depend on Cygwin. This lack of dependency makes them faster. The
-cost, however, is that they do not understand Cygwin path specifications like
-{@code cygdrive/c/foo/bar}, as opposed to {@code C:/foo/bar}.</p>
-
-<p>The NDK build system ensures that all paths passed to the compiler from Cygwin are automatically
-translated, and manages other complexities, as well. If you have a custom build system,
-you may need to resolve these complexities yourself.</p>
-
-<p>For information on contributing to support for Cygwin/MSys, visit the android-ndk
-<a href="https://groups.google.com/forum/#!forum/android-ndk">forum</a>.</p>
-
-<h3>wchar_t support</h3>
-
-<p>The Android platform did not really support {@code wchar_t} until Android 2.3 (API level 9). This
-fact has several ramifications:</p>
-<ul>
-<li>If you target platform Android 2.3 or higher, the size of {@code wchar_t} is 4 bytes, and most
-{@code wide-char} functions are available in the C library (with the exception of multi-byte
-encoding/decoding functions and {@code wsprintf}/{@code wsscanf}).</li>
-
-<li>If you target any lower API level, the size of {@code wchar_t} is 1 byte, and none of the
-wide-char functions works.</li>
-</ul>
-
-<p>We recommend that you get rid of any dependencies on the {@code wchar_t} type, and switch to
-better representations. The support provided in Android is only there to help you migrate existing
-code.</p>
-
-<h3>Exceptions, RTTI, and STL</h3>
-<p>The toolchain binaries support C++ exceptions and RTTI by default. To disable C++ exceptions
-and RTTI when building sources (to generate lighter-weight machine code, for example), use
-{@code -fno-exceptions} and {@code -fno-rtti}.</p>
-
-<p>To use these features in conjunction with GNU libstdc++, you must explicitly link with libsupc++.
-To do so, use {@code -lsupc++} when linking binaries. For example:</p>
-
-<pre class="no-pretty-print">
-arm-linux-androideabi-g++ .... -lsupc++
-</pre>
-
-<p>You do not need to do this when using the STLport or libc++ library.</p>
-
-<h3>C++ STL support</h3>
-<p>The standalone toolchain includes a copy of a C++ Standard Template Library implementation. This
-implementation is either for GNU libstdc++, STLport, or libc++, depending on what you specify for the
-{@code --stl=<name>} option described previously. To use this implementation of STL, you need
-to link your project with the proper library:</p>
-
-<ul>
-<li>
-Use {@code -lstdc++} to link against the static library version of any implementation. Doing so
-ensures that all required C++ STL code is included into your final binary. This method is ideal if
-you are only generating a single shared library or executable.</p>
-
-<p>This is the method that we recommend.</p>
-</li>
-
-<li>Alternatively, use {@code -lgnustl_shared} to link against the shared library version of GNU
-{@code libstdc++}. If you use this option, you must also make sure to copy
-{@code libgnustl_shared.so} to your device in order for your code to load properly. Table 6 shows
-where this file is for each toolchain type.
-</li>
-
-<p class="note"><strong>Note: </strong>GNU libstdc++ is licensed under the GPLv3 license, with a
-linking exception. If you cannot comply with its requirements, you cannot redistribute the
-shared library in your project.</p>
-
-
-<li>Use {@code -lstlport_shared} to link against the shared library version of STLport. When you do
-so, you need to make sure that you also copy {@code libstlport_shared.so} to your device in order
-for your code to load properly. Table 6 shows where this file is for each toolchain:</li>
-
-<p class="table-caption" id="table6">
-  <strong>Table 6.</strong> Specifiable {@code -march} values and their resulting targets.</p>
-   <table>
-  <tr>
-    <th scope="col">Toolchain</th>
-    <th scope="col">Location</th>
-  </tr>
-  <tr>
-    <td>arm</td>
-    <td>{@code $TOOLCHAIN/arm-linux-androideabi/lib/}</td>
-  </tr>
-  <tr>
-    <td>arm64</td>
-    <td>{@code $TOOLCHAIN/aarch64-linux-android/lib/}</td>
-  </tr>
-  <tr>
-    <td>x86</td>
-    <td>{@code $TOOLCHAIN/i686-linux-android/lib/}</td>
-  </tr>
-  <tr>
-    <td>x86_64</td>
-    <td>{@code $TOOLCHAIN/x86_64-linux-android/lib/}</td>
-  </tr>
-  <tr>
-    <td>mips</td>
-    <td>{@code $TOOLCHAIN/mipsel-linux-android/lib/}</td>
-  </tr>
-  <tr>
-    <td>mips64</td>
-    <td>{@code $TOOLCHAIN/mips64el-linux-android/lib/}</td>
-  </tr>
-</table>
-
-<p class="note"><strong>Note: </strong>If your project contains multiple shared libraries or
-executables, you must link against a shared-library STL implementation. Otherwise, the build
-system does not define certain global uniquely, which can result in unpredictable runtime behavior.
-This behavior may include crashes and failure to properly catch exceptions.</p>
-
-<p>The reason the shared version of the libraries is not simply called {@code libstdc++.so} is that
-this name would conflict at runtime with the system's own minimal C++ runtime. For this reason,
-the build system enforces a new name for the GNU ELF library. The static library does not have
-this problem.</p>
diff --git a/docs/html/ndk/guides/x86-64.jd b/docs/html/ndk/guides/x86-64.jd
deleted file mode 100644
index c2f0d28..0000000
--- a/docs/html/ndk/guides/x86-64.jd
+++ /dev/null
@@ -1,52 +0,0 @@
-page.title=Support for 64-bit x86
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#over">Overview</a></li>
-         <li><a href="#st">Standalone Toolchain</a></li>
-         <li><a href="#comp">Compatibilty</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<p>The Android NDK supports the {@code x86_64} ABI. This ABI allows native code to run on
-Android-based devices using CPUs that support the 64-bit x86 instruction set.</p>
-
-<h2 id="over">Overview</h2>
-<p>To generate 64-bit machine code for x86, add {@code x86_64} to the {@code APP_ABI} definition in
-your {@code Application.mk} file. For example:
-
-<pre>
-APP_ABI := x86_64
-</pre>
-
-For more information on how to specify values for {@code APP_ABI}, see
-<a href="{@docRoot}ndk/guides/application_mk.html">Application.mk</a>.</p>
-
-<p>The build system places libraries generated for the {@code x86_64} ABI into
-{@code $PROJECT/libs/x86_64/} on your host machine, where {@code $PROJECT} is the root directory
-of your project. It also embeds them in your APK, under {@code /lib/x86_64/}.</p>
-
-<p>The Android package manager extracts these libraries when installing your APK on a compatible
-64-bit, x86-powered device, placing them under your app's private data directory.</p>
-
-<p>In the Google Play store, the server filters applications so that a consumer sees only the native
-libraries that run on the CPU powering his or her device.</p>
-
-<h2 id="st">Standalone Toolchain</h2>
-
-<p>You can use the 64-bit x86 toolchain in standalone mode with the NDK. For more
-information about doing so, see <a href="{@docRoot}ndk/guides/standalone_toolchain.html">
-Standalone Toolchain</a>, under the "Advanced method" section.
-
-<h2 id="comp">Compatibility</h2>
-<p>The NDK provides native versions of Android APIs for 64-bit x86 machine code starting from
-Android 5.0 (Android API level 21). If your project files target an older API level, but include
-{@code x86_64} as a targeted platform, the NDK build script automatically selects the right set of
-native platform headers and libraries for you.</p>
diff --git a/docs/html/ndk/guides/x86.jd b/docs/html/ndk/guides/x86.jd
deleted file mode 100644
index 3a01b05..0000000
--- a/docs/html/ndk/guides/x86.jd
+++ /dev/null
@@ -1,215 +0,0 @@
-page.title=x86 Support
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#over">Overview</a></li>
-         <li><a href="#an">ARM NEON Intrinsics Support</a></li>
-         <li><a href="#st">Standalone Toolchain</a></li>
-         <li><a href="#comp">Compatibility</a></li>
-      </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<p>The NDK includes support for the {@code x86} ABI, which allows native code to run on
-Android-based devices running on CPUs supporting the IA-32 instruction set.</p>
-
-<h2 id="over">Overview</h2>
-<p>To generate x86 machine code, add {@code x86} to the {@code APP_ABI} definition in your
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a> file. For example:</p>
-
-<pre class="no-pretty-print">
-APP_ABI := armeabi armeabi-v7a x86
-</pre
-
-<p>For more information about defining the {@code APP_ABI} variable, see
-<a href="{@docRoot}ndk/guides/application_mk.html">{@code Application.mk}</a>.</p>
-
-<p>The build system places generated libraries into {@code $PROJECT/libs/x86/}, where
-{@code $PROJECT} represents your project's root directory, and embeds them in your APK under
-{@code /lib/mips/}.</p>
-
-<p>The Android package extracts these libraries when installing your APK on a compatible x86-based
-device, placing them under your app's private data directory.</p>
-
-<p>In the Google Play store, the server filters applications so that a consumer sees only the native
-libraries that run on the CPU powering his or her device.</p>
-
-<h2 id="an">x86 Support for ARM NEON Intrinsics</h2>
-<p>Support for ARM NEON intrinsics is provided in the form of C/C++ language headers with the same
-name as the standard ARM NEON intrinsics header, {@code arm_neon.h}. These headers are available for
-all NDK x86 toolchains. They translate NEON intrinsics to native x86 SSE ones.</p>
-
-<p>Characteristics of this solution include the following:</p>
-<ul>
-<li>Default use of SSE through SSSE3 for porting ARM NEON to Intel SSE, covering ~93%
-(1869 of total 2009) of all NEON functions.</li>
-<li>Redefinition of ARM NEON 128 bit vectors into the equivalent x86 SIMD data.</li>
-<li>Redefinition of some functions from ARM NEON to Intel SSE if a 1:1 correspondence exists.</li>
-<li>Implementation of some ARM NEON functions using Intel SIMD if it will yield a performant result.
-</li>
-<li>Implementation of some of the remaining NEON functions using the serial solution, and issuing
-the corresponding "low performance" compiler warning.</li>
-</ul>
-
-
-<h3>Performance</h3>
-<p>In most cases, you should be able to attain performance similar to what you would get from ARM
-NEON code. Recommendations for best results include:</p>
-
-<ul>
-<li>Use 16-byte data alignment for faster load and store.</li>
-<li>Avoid using constants with NEON functions. Using constants results in a performance penalty due
-to having to load constants. If you must use constants, try to initialize them outside of hotspot
-loops. If possible, replace them with logical and compare operations.</li>
-<li>Try to avoid functions marked as "serially implemented" because they need to store data from
-registers to memory. Instead, process them serially and reload them. You may be able to change the
-data type or algorithm used to vectorize the whole port instead of leaving it as a serial one.</li>
-</ul>
-
-<p>For more information on this topic, see
-<a href="http://software.intel.com/en-us/blogs/2012/12/12/from-arm-neon-to-intel-mmxsse-automatic-porting-solution-tips-and-tricks">
-From ARM NEON to Intel SSE&ndash; the automatic porting solution, tips and tricks</a>.</p>
-
-<h3>Known differences from ARM version</h3>
-<p>In the great majority of cases, x86 implementations produce the same results as ARM
-implementations for NEON. x86 implementations pass
-<a href="https://gitorious.org/arm-neon-tests/arm-neon-tests">NEON tests</a> nearly 100% of the
-time. Still, there are several corner cases in which an x86 implementation produces results
-different from its ARM counterpart. Known incompatibilities are as follows:</p>
-
-<ul>
-<li>{@code VRECPS/VRECPSQ}<br/>
-  If one of the operands is +/- infinity and the second is +/- 0.0:
-  <ul>
-    <li>On ARM CPUs, these instructions
-    <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDIACI.html">
-    return a result element equal to 2.0</a>.</li>
-
-    <li>x86 CPUs return {@code QNaN Indefinite}. For more information about the QNaN floating-point
-    indefinite, see "4.2.2 Floating-Point Data Types" and "4.8.3.7 QNaN Floating-Point Indefinite,"
-    in the
-    <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
-    </li>
-
-  </ul>
-</li>
-<li>{@code VRSQRTS/VRSQRTSQ}<br/>
-  If one of the operands is +/- infinity and the second is +/- 0.0:
-  <ul>
-    <li>On ARM CPUs, these instructions
-    <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDIACI.html">
-    return a result element equal to 1.5</a>.</li>
-
-    <li>x86 CPUs return {@code QNaN Indefinite}. For more information about the QNaN floating-point
-    indefinite, see "4.2.2 Floating-Point Data Types" and "4.8.3.7 QNaN Floating-Point Indefinite,"
-    in the
-    <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
-    </li>
-  </ul>
-</li>
-
-<li>{@code VMAX/VMAXQ}<br/>
-  If one of the operands is NaN, or both operands are +/- 0.0:
-  <ul>
-    <li>On ARM CPUs, floating-point maximum works as follows:
-      <ul>
-        <li>max(+0.0, -0.0) = +0.0.</li>
-        <li>If any input is a NaN, the corresponding result element is the default NaN.</li>
-      </ul>
-      To learn more about this condition and result, see the
-      <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDEEBE.html">
-      ARM Compiler toolchain Assembler Reference</a>, ignoring the "Superseded" watermark.
-    </li>
-
-    <li>On x86 CPUs, floating-point maximum works as follows:
-      <ul>
-        <li>If one of the source operands is NaN, then return the second source operand.</li>
-        <li>If both source operands are equal to 0, then return the second source operand.</li>
-      </ul>
-      For more information about these conditions and results, see Volume 1 Appendix E chapter
-      E.4.2.3 and Volume 2, p 3-488, of the
-      <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s
-      Manual</a>.
-    </li>
-  </ul>
-</li>
-
-<li>{@code VMIN/VMINQ}<br/>
-  If one of the operands is NaN or both are +/- 0.0:
-  <ul>
-    <li>On ARM CPUs floating-point minimum works as follows:
-      <ul>
-        <li>min(+0.0, -0.0) = -0.0.</li>
-        <li>If any input is a NaN, the corresponding result element is the default NaN.</li>
-      </ul>
-      To learn more about this condition and result, see the
-      <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489h/CIHDEEBE.html">
-      ARM Compiler toolchain Assembler Reference</a>, ignoring the "Superseded" watermark.
-    </li>
-    <li>On x86 CPUs floating-point minimum works as follows:
-      <ul>
-        <li>If one of the source operands is NaN, than return the second source operand.</li>
-        <li>If both source operands are equal to 0, than return the second source operand.</li>
-      </ul>
-      For more information about these conditions and results, see Volume 1 Appendix E chapter
-      E.4.2.3 and Volume 2, p 3-497, of the
-      <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s
-      Manual</a>.
-    </li>
-  </ul>
-</li>
-
-<li>{@code VRECPE/VRECPEQ}<br/>
-  These instructions provide different levels of accuracy on ARM and x86 CPUs. For more information
-  about these differences, see
-  <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14282.html">
-  How do I use VRECPE/VRECPEQ for reciprocal estimate?</a> on the ARM website, and Volume 2, p.
-  4-281 of the
-  <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
-</li>
-
-<li>{@code VRSQRTE/VRSQRTEQ}<br/>
-  <ul>
-    <li>These instructions provide different levels of accuracy on ARM and x86 CPUs. For more
-    information about these differences, see the
-    <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204h/CIHCHECJ.html">
-    RealView Compilation Tools Assembler Guide</a>, and Volume 2, p. 4-325 of the
-    <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s Manual</a>.
-    </li>
-
-    <li>If one of the operands is negative or -infinity then
-      <ul>
-        <li>On ARM CPUs, these instructions by default return a (positive) NaN. For more information
-        about this result, see the
-        <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/CIHIICBB.html">
-        ARM Compiler toolchain Assembler Reference</a>.</li>
-        <li>On x86 CPUs, these instructions return a (negative) QNaN floating-point Indefinite. For
-        more information about this result, see Volume 1, Appendix E, E.4.2.3, of the
-      <a href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf">Intel® 64 and IA-32 Architectures Software Developer’s
-      Manual</a>.</li>
-      </ul>
-    </li>
-  </ul>
-</li>
-</ul>
-
-<h3>Sample code</h3>
-<p>In your project make sure to include the {@code arm_neon.h} header, and define include
-{@code x86} in your definition of {@code APP_ABI}. The build system then ports your code to x86.</p>
-
-<p>For an example of how porting ARM NEON to x86 SSE works, see the hello-neon sample.</p>
-
-<h2 id="st">Standalone Toolchain</h2>
-<p>You can incorporate the {@code x86} ABI into your own toolchain. For more information, see
-<a href="{@docRoot}ndk/guides/standalone_toolchain.html">Standalone Toolchain</a>.</p>
-
-<h2 id="comp">Compatibility</h2>
-<p>x86 support requires, at minimum, Android 2.3 (Android API level 9). If your project files
-target an older API level, but include x86 as a targeted platform, the NDK build script
-automatically selects the right set of native platform headers/libraries for you.</p>
\ No newline at end of file
diff --git a/docs/html/ndk/index.jd b/docs/html/ndk/index.jd
deleted file mode 100644
index fc1c595..0000000
--- a/docs/html/ndk/index.jd
+++ /dev/null
@@ -1,51 +0,0 @@
-page.title=Android NDK
-page.tags="ndk, native, c, c++",
-meta.tags="ndk, native, c++"
-fullpage=true
-section.landing=true
-header.hide=1
-footer.hide=1
-@jd:body
-
-<section class="dac-expand dac-hero dac-dark dac-invert" style="background-repeat:no-repeat;">
-  <div class="wrap">
-    <div class="cols dac-hero-content" style="margin-top:32px">
-      <div class="col-7of16 cdol-push-1of16">
-        <h1 class="dac-hero-title">Android NDK</h1>
-        <p class="dac-hero-description">
-        The Android NDK is a toolset that lets you implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can help you reuse existing code libraries written in those languages.
-        </p>
-
-        <a class="dac-hero-cta" href="/ndk/guides/index.html">
-          <span class="dac-sprite dac-auto-chevron"></span>
-          Get Started
-        </a><br>
-      </div>
-      <div class="col-8of16 col-push-1of16" style="margin-top:48px">
-
-        <span style="color:#00e5ff;font-family:'Roboto Mono', monospace;font-weight:400">public class <span
-        style="color:#eee">MyActivity</span> extends Activity {<br>
-              <span style="color:#ccc">&nbsp;&nbsp;/**<br>
-                &nbsp;&nbsp;* Native method implemented in C/C++<br>
-                &nbsp;&nbsp;*/</span><br>
-                &nbsp;&nbsp;public <span style="color:#1DE9B6;font-weight:700">native</span> void <span style="color:#eee">computeFoo()</span>;<br>
-              }</span>
-      </div>
-    </div>
-  </div>
-</section>
-
-<div class="wrap dac-offset-parent">
-  <a class="dac-fab dac-scroll-button" data-scroll-button href="#latest">
-    <i class="dac-sprite dac-arrow-down-gray"></i>
-  </a>
-</div>
-<section class="dac-section dac-gray dac-small" id="latest"><div class="wrap">
-  <h2 class="norule">Latest</h2>
-  <div class="resource-widget resource-flow-layout col-16"
-       data-query="type:blog+tag:ndk"
-       data-cardSizes="6x6"
-       data-maxResults="9"
-       data-items-per-page="6"
-       data-initial-results="3"></div>
-</div></section>
diff --git a/docs/html/ndk/reference/_book.yaml b/docs/html/ndk/reference/_book.yaml
deleted file mode 100644
index ab8b8f9..0000000
--- a/docs/html/ndk/reference/_book.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-toc:
-- title: Asset Manager
-  path: /ndk/reference/group___asset.html
-  section:
-  - title: asset_manager.h
-    path: /ndk/reference/asset__manager_8h.html
-  - title: asset_manager_jni.h
-    path: /ndk/reference/asset__manager__jni_8h.html
-
-- title: Bitmap
-  path: /ndk/reference/group___bitmap.html
-  section:
-  - title: bitmap.h
-    path: /ndk/reference/bitmap_8h.html
-
-- title: Configuration
-  path: /ndk/reference/group___configuration.html
-  section:
-  - title: configuration.h
-    path: /ndk/reference/configuration_8h.html
-
-- title: Input
-  path: /ndk/reference/group___input.html
-  section:
-  - title: input.h
-    path: /ndk/reference/input_8h.html
-  - title: keycodes.h
-    path: /ndk/reference/keycodes_8h.html
-
-- title: Looper
-  path: /ndk/reference/group___looper.html
-  section:
-  - title: looper.h
-    path: /ndk/reference/looper_8h.html
-
-- title: Native Activity and Window
-  path: /ndk/reference/group___native_activity.html
-  section:
-  - title: native_activity.h
-    path: /ndk/reference/native__activity_8h.html
-  - title: native_window.h
-    path: /ndk/reference/native__window_8h.html
-  - title: native_window.h
-    path: /ndk/reference/native__window__jni_8h.html
-  - title: rect.h
-    path: /ndk/reference/rect_8h.html
-
-- title: Sensor
-  path: /ndk/reference/group___sensor.html
-  section:
-  - title: sensor.h
-    path: /ndk/reference/sensor_8h.html
-
-- title: Storage Manager
-  path: /ndk/reference/group___storage.html
-  section:
-  - title: storage_manager.h
-    path: /ndk/reference/storage__manager_8h.html
-  - title: obb.h
-    path: /ndk/reference/obb_8h.html
diff --git a/docs/html/ndk/reference/annotated.jd b/docs/html/ndk/reference/annotated.jd
deleted file mode 100644
index 8045f8d..0000000
--- a/docs/html/ndk/reference/annotated.jd
+++ /dev/null
@@ -1,25 +0,0 @@
-page.title=Data Structures
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">Data Structures</div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
-<table class="directory">
-<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_heart_rate_event.html" target="_self">AHeartRateEvent</a></td><td class="desc"></td></tr>
-<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_meta_data_event.html" target="_self">AMetaDataEvent</a></td><td class="desc"></td></tr>
-<tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_native_activity.html" target="_self">ANativeActivity</a></td><td class="desc"></td></tr>
-<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_native_activity_callbacks.html" target="_self">ANativeActivityCallbacks</a></td><td class="desc"></td></tr>
-<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_native_window___buffer.html" target="_self">ANativeWindow_Buffer</a></td><td class="desc"></td></tr>
-<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_android_bitmap_info.html" target="_self">AndroidBitmapInfo</a></td><td class="desc"></td></tr>
-<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_rect.html" target="_self">ARect</a></td><td class="desc"></td></tr>
-<tr id="row_7_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_sensor_event.html" target="_self">ASensorEvent</a></td><td class="desc"></td></tr>
-<tr id="row_8_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_sensor_vector.html" target="_self">ASensorVector</a></td><td class="desc"></td></tr>
-<tr id="row_9_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct_a_uncalibrated_event.html" target="_self">AUncalibratedEvent</a></td><td class="desc"></td></tr>
-</table>
-</div><!-- directory -->
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/asset__manager_8h.jd b/docs/html/ndk/reference/asset__manager_8h.jd
deleted file mode 100644
index 88d8dea..0000000
--- a/docs/html/ndk/reference/asset__manager_8h.jd
+++ /dev/null
@@ -1,75 +0,0 @@
-page.title=asset_manager.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">asset_manager.h File Reference<div class="ingroups"><a class="el" href="group___asset.html">Asset</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga90c459935e76acf809b9ec90d1872771"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td></tr>
-<tr class="separator:ga90c459935e76acf809b9ec90d1872771"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td></tr>
-<tr class="separator:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td></tr>
-<tr class="separator:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">AASSET_MODE_UNKNOWN</a> = 0, 
-<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">AASSET_MODE_RANDOM</a> = 1, 
-<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">AASSET_MODE_STREAMING</a> = 2, 
-<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">AASSET_MODE_BUFFER</a> = 3
- }</td></tr>
-<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">AAssetManager_openDir</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *dirName)</td></tr>
-<tr class="separator:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *filename, int mode)</td></tr>
-<tr class="separator:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
-<tr class="separator:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">AAssetDir_rewind</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
-<tr class="separator:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gace1c4d0da274d643c5b10ca218cc6088"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
-<tr class="separator:gace1c4d0da274d643c5b10ca218cc6088"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaadd86322c1fda5121b6d33745c317fb9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">AAsset_read</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, void *buf, size_t count)</td></tr>
-<tr class="separator:gaadd86322c1fda5121b6d33745c317fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">AAsset_seek</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t offset, int whence)</td></tr>
-<tr class="separator:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">AAsset_seek64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t offset, int whence)</td></tr>
-<tr class="separator:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1f241e49f691dafcada23bcb76155122"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga1f241e49f691dafcada23bcb76155122"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga553a14512a98542306238c3ce70d344f"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">AAsset_getBuffer</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga553a14512a98542306238c3ce70d344f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">AAsset_getLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">AAsset_getLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">AAsset_getRemainingLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga21e7221d88dcc44106843192b66755b5"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">AAsset_getRemainingLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga21e7221d88dcc44106843192b66755b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1af4ffd050016e99961e24f550981677"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">AAsset_openFileDescriptor</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t *outStart, off_t *outLength)</td></tr>
-<tr class="separator:ga1af4ffd050016e99961e24f550981677"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">AAsset_openFileDescriptor64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t *outStart, off64_t *outLength)</td></tr>
-<tr class="separator:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga20344cb952a77fa1004f592fb1b55124"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">AAsset_isAllocated</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga20344cb952a77fa1004f592fb1b55124"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/asset__manager__jni_8h.jd b/docs/html/ndk/reference/asset__manager__jni_8h.jd
deleted file mode 100644
index 8aace05..0000000
--- a/docs/html/ndk/reference/asset__manager__jni_8h.jd
+++ /dev/null
@@ -1,25 +0,0 @@
-page.title=asset_manager_jni.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">asset_manager_jni.h File Reference<div class="ingroups"><a class="el" href="group___asset.html">Asset</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;<a class="el" href="asset__manager_8h.html">android/asset_manager.h</a>&gt;</code><br/>
-<code>#include &lt;jni.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:gadfd6537af41577735bcaee52120127f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava</a> (JNIEnv *env, jobject assetManager)</td></tr>
-<tr class="separator:gadfd6537af41577735bcaee52120127f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/bc_s.png b/docs/html/ndk/reference/bc_s.png
deleted file mode 100644
index fd162ea..0000000
--- a/docs/html/ndk/reference/bc_s.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/bdwn.png b/docs/html/ndk/reference/bdwn.png
deleted file mode 100644
index 7c943f0..0000000
--- a/docs/html/ndk/reference/bdwn.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/bitmap_8h.jd b/docs/html/ndk/reference/bitmap_8h.jd
deleted file mode 100644
index 518cab1..0000000
--- a/docs/html/ndk/reference/bitmap_8h.jd
+++ /dev/null
@@ -1,61 +0,0 @@
-page.title=bitmap.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#define-members">Macros</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">bitmap.h File Reference<div class="ingroups"><a class="el" href="group___bitmap.html">Bitmap</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
-<code>#include &lt;jni.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
-Macros</h2></td></tr>
-<tr class="memitem:gafb665ac9fefad34ac5c035f5d1314080"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">ANDROID_BITMAP_RESUT_SUCCESS</a>&#160;&#160;&#160;<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a></td></tr>
-<tr class="separator:gafb665ac9fefad34ac5c035f5d1314080"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a> = 0, 
-<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374">ANDROID_BITMAP_RESULT_BAD_PARAMETER</a> = -1, 
-<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d">ANDROID_BITMAP_RESULT_JNI_EXCEPTION</a> = -2, 
-<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990">ANDROID_BITMAP_RESULT_ALLOCATION_FAILED</a> = -3
- }</td></tr>
-<tr class="separator:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaea286a2d4c61ae2abb02b51500499f13"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a> { <br/>
-&#160;&#160;<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021">ANDROID_BITMAP_FORMAT_NONE</a> = 0, 
-<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057">ANDROID_BITMAP_FORMAT_RGBA_8888</a> = 1, 
-<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91">ANDROID_BITMAP_FORMAT_RGB_565</a> = 4, 
-<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528">ANDROID_BITMAP_FORMAT_RGBA_4444</a> = 7, 
-<br/>
-&#160;&#160;<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca">ANDROID_BITMAP_FORMAT_A_8</a> = 8
-<br/>
- }</td></tr>
-<tr class="separator:gaea286a2d4c61ae2abb02b51500499f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga80292ee39d8a675928e38849742b54bf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">AndroidBitmap_getInfo</a> (JNIEnv *env, jobject jbitmap, <a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> *info)</td></tr>
-<tr class="separator:ga80292ee39d8a675928e38849742b54bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">AndroidBitmap_lockPixels</a> (JNIEnv *env, jobject jbitmap, void **addrPtr)</td></tr>
-<tr class="separator:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">AndroidBitmap_unlockPixels</a> (JNIEnv *env, jobject jbitmap)</td></tr>
-<tr class="separator:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/classes.jd b/docs/html/ndk/reference/classes.jd
deleted file mode 100644
index e0ec721..0000000
--- a/docs/html/ndk/reference/classes.jd
+++ /dev/null
@@ -1,20 +0,0 @@
-page.title=Data Structure Index
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">Data Structure Index</div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="qindex"><a class="qindex" href="#letter_A">A</a></div>
-<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
-<tr><td rowspan="2" valign="bottom"><a name="letter_A"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;A&#160;&#160;</div></td></tr></table>
-</td><td valign="top"><a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a>&#160;&#160;&#160;</td><td></td></tr>
-<tr><td valign="top"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>&#160;&#160;&#160;</td><td></td></tr>
-<tr><td valign="top"><a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_a_rect.html">ARect</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>&#160;&#160;&#160;</td><td></td></tr>
-<tr><td></td><td></td><td></td><td></td><td></td></tr>
-</table>
-<div class="qindex"><a class="qindex" href="#letter_A">A</a></div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/closed.png b/docs/html/ndk/reference/closed.png
deleted file mode 100644
index e4e2b25..0000000
--- a/docs/html/ndk/reference/closed.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/configuration_8h.jd b/docs/html/ndk/reference/configuration_8h.jd
deleted file mode 100644
index 3f5f07c..0000000
--- a/docs/html/ndk/reference/configuration_8h.jd
+++ /dev/null
@@ -1,222 +0,0 @@
-page.title=configuration.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">configuration.h File Reference<div class="ingroups"><a class="el" href="group___configuration.html">Configuration</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;<a class="el" href="asset__manager_8h.html">android/asset_manager.h</a>&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga6709434d0f99b8367d0df2dfdfbef45a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a></td></tr>
-<tr class="separator:ga6709434d0f99b8367d0df2dfdfbef45a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga99fb83031ce9923c84392b4e92f956b5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af44cee3290a23999b0358c5638747a5f">ACONFIGURATION_ORIENTATION_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad9bf5c1fb90f9fdb20f984d0574592fe">ACONFIGURATION_ORIENTATION_PORT</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad5746872ff6871379fca93c60bfac8a3">ACONFIGURATION_ORIENTATION_LAND</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">ACONFIGURATION_ORIENTATION_SQUARE</a> = 0x0003, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa73bcf45261366840fea743372682fa6">ACONFIGURATION_TOUCHSCREEN_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5adfbeb370edd3b4372c9b0f86f152dde0">ACONFIGURATION_TOUCHSCREEN_NOTOUCH</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">ACONFIGURATION_TOUCHSCREEN_STYLUS</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4bf2a8323ec6d072aa48d5fc2cff645e">ACONFIGURATION_TOUCHSCREEN_FINGER</a> = 0x0003, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae628b2bf594733b7c19ae394616cec6c">ACONFIGURATION_DENSITY_DEFAULT</a> = 0, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ddb34b2376422d2323720049eb57f3">ACONFIGURATION_DENSITY_LOW</a> = 120, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2511479d7cd574c4b293d535e4dc337e">ACONFIGURATION_DENSITY_MEDIUM</a> = 160, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10e6c3d636f3f6de75de9208913b0d8f">ACONFIGURATION_DENSITY_TV</a> = 213, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5ef4a97dc058235cdfa9fcfe3300c7eb">ACONFIGURATION_DENSITY_HIGH</a> = 240, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a38a03b3b1c64725679605d8d479c85a0">ACONFIGURATION_DENSITY_XHIGH</a> = 320, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad6353daf63778a6ec6f2bd3815d7e6e4">ACONFIGURATION_DENSITY_XXHIGH</a> = 480, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2bd04af33e868a77bd4d83e7d70368ec">ACONFIGURATION_DENSITY_XXXHIGH</a> = 640, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a966a3855351a97ae865264afd74c1534">ACONFIGURATION_DENSITY_ANY</a> = 0xfffe, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a7c1af92914155c418b99844c6aab33d7">ACONFIGURATION_DENSITY_NONE</a> = 0xffff, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a593f722738682ae4500dab6427670f4a">ACONFIGURATION_KEYBOARD_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a40195a1a2d8e21c74d99606d8a1a9918">ACONFIGURATION_KEYBOARD_NOKEYS</a> = 0x0001, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a263ff8efb4d2c757e557adc0d0cdeedf">ACONFIGURATION_KEYBOARD_QWERTY</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1aaf1a887f146737030cce95c53066ea">ACONFIGURATION_KEYBOARD_12KEY</a> = 0x0003, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90e914b60d28c081b313f4b7b6600f47">ACONFIGURATION_NAVIGATION_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a3d95e899305aeae366fb7f8d8b6c290a">ACONFIGURATION_NAVIGATION_NONAV</a> = 0x0001, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace2e3ed21322100712992ca09f4b75b5">ACONFIGURATION_NAVIGATION_DPAD</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad2807d00cb2f5dcb9f456045dd8443a4">ACONFIGURATION_NAVIGATION_TRACKBALL</a> = 0x0003, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a80b53370f65ad283a4fd025f36422bea">ACONFIGURATION_NAVIGATION_WHEEL</a> = 0x0004, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a34d3a830bc2964000052f8486fd76b0c">ACONFIGURATION_KEYSHIDDEN_ANY</a> = 0x0000, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5abfbfc3a10affed059263555b00429ab2">ACONFIGURATION_KEYSHIDDEN_NO</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5e6a5a3f4175644886bde7d0ed4b1ebf">ACONFIGURATION_KEYSHIDDEN_YES</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1a56b72c730e40f22f3b8727e54c376c">ACONFIGURATION_KEYSHIDDEN_SOFT</a> = 0x0003, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a6db7dd6a67196df88117dcdc904e0cb3">ACONFIGURATION_NAVHIDDEN_ANY</a> = 0x0000, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae6ff9883e3e89f8d9ea5c0ebe077c9c5">ACONFIGURATION_NAVHIDDEN_NO</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a79b3a5fe10e948bb79db47b516d46cf5">ACONFIGURATION_NAVHIDDEN_YES</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a9abcd34a6c549e048fc75a545081584e">ACONFIGURATION_SCREENSIZE_ANY</a> = 0x00, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1163af972206a65a5d18bda12fdc511c">ACONFIGURATION_SCREENSIZE_SMALL</a> = 0x01, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a019727e684f25ba921f3479abd62b9f2">ACONFIGURATION_SCREENSIZE_NORMAL</a> = 0x02, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af871d177fdceedb75612cfc1281d2c12">ACONFIGURATION_SCREENSIZE_LARGE</a> = 0x03, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0ca385ed504fc92f6ff3f0857e916c9c">ACONFIGURATION_SCREENSIZE_XLARGE</a> = 0x04, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a41e55e57da42fd09c378f59c1a63710f">ACONFIGURATION_SCREENLONG_ANY</a> = 0x00, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a428bb8fcd8bc731b67b0773dc62781c5">ACONFIGURATION_SCREENLONG_NO</a> = 0x1, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a91fc014d328507568d225d691b3babfd">ACONFIGURATION_SCREENLONG_YES</a> = 0x2, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10d0916da7fa88c945a9cda259407d4c">ACONFIGURATION_UI_MODE_TYPE_ANY</a> = 0x00, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae7efe2713b6718311da76c828b5b444e">ACONFIGURATION_UI_MODE_TYPE_NORMAL</a> = 0x01, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae10bb854f461f60cf399852f8f327077">ACONFIGURATION_UI_MODE_TYPE_DESK</a> = 0x02, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5d6575185e41d909469a1dcf5f81bf4f">ACONFIGURATION_UI_MODE_TYPE_CAR</a> = 0x03, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4738dded616f028fbbedcbad764e7969">ACONFIGURATION_UI_MODE_TYPE_TELEVISION</a> = 0x04, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad99004a7a1b2a97d29b639664947f8e3">ACONFIGURATION_UI_MODE_TYPE_APPLIANCE</a> = 0x05, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ac8c3e2207f2356bc6a1dffc6a615d131">ACONFIGURATION_UI_MODE_TYPE_WATCH</a> = 0x06, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a975087bbd4087b57a68ef3cdbfeb77a1">ACONFIGURATION_UI_MODE_NIGHT_ANY</a> = 0x00, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90ebe564e3a3e384d5b013100f81e4b7">ACONFIGURATION_UI_MODE_NIGHT_NO</a> = 0x1, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a437af4527fac5407de256ec1ef055046">ACONFIGURATION_UI_MODE_NIGHT_YES</a> = 0x2, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aad653f0c960112177fdc387a4a0577fa">ACONFIGURATION_SCREEN_WIDTH_DP_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab66ad42d0cf72fd7e8cd99b92b625432">ACONFIGURATION_SCREEN_HEIGHT_DP_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a227120217d8b6a9d5add3ccc4b283702">ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4687ede31c438dd9f2701cab88de1dbe">ACONFIGURATION_LAYOUTDIR_ANY</a> = 0x00, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a05242d8f2d254b43ff9414ff1aa38a83">ACONFIGURATION_LAYOUTDIR_LTR</a> = 0x01, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af98332983b787ab9355b527079636870">ACONFIGURATION_LAYOUTDIR_RTL</a> = 0x02, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4d40f2aef365c78a52f699b89439db28">ACONFIGURATION_MCC</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ade91a319638eede201579d15f86578a5">ACONFIGURATION_MNC</a> = 0x0002, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ecff796bd0690a9a8498c7de03e9b4">ACONFIGURATION_LOCALE</a> = 0x0004, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a255cfb57ac18d460c5614565a84f5561">ACONFIGURATION_TOUCHSCREEN</a> = 0x0008, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0195de2a57f028a8171c42beff0b0e88">ACONFIGURATION_KEYBOARD</a> = 0x0010, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a54e71234e32ed037e2d47472f80eb416">ACONFIGURATION_KEYBOARD_HIDDEN</a> = 0x0020, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65e9d31615d2b4adf3738d9a12a1556b">ACONFIGURATION_NAVIGATION</a> = 0x0040, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a591461d864136d482fe06e01fd945786">ACONFIGURATION_ORIENTATION</a> = 0x0080, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace87b4f25e5fd6fe0f3316d21ecc66a1">ACONFIGURATION_DENSITY</a> = 0x0100, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a76ca1eb0e9346d93da592afbbf9a3b72">ACONFIGURATION_SCREEN_SIZE</a> = 0x0200, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1be62e4fc31cf3d3102c99f7c6b4c71b">ACONFIGURATION_VERSION</a> = 0x0400, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a12d69ffef9135c1c55e1b8b5c2589e7c">ACONFIGURATION_SCREEN_LAYOUT</a> = 0x0800, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a43a324af59372efd08b34431825cf67e">ACONFIGURATION_UI_MODE</a> = 0x1000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5acce415252e0ad95117a05bbe910f06de">ACONFIGURATION_SMALLEST_SCREEN_SIZE</a> = 0x2000, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65834be1230d1694e5ce8a6f407acab2">ACONFIGURATION_LAYOUTDIR</a> = 0x4000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa6cda2f222580dbef27f1277d967d58c">ACONFIGURATION_MNC_ZERO</a> = 0xffff
-<br/>
- }</td></tr>
-<tr class="separator:ga99fb83031ce9923c84392b4e92f956b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga9543655922980466eb05c7be94a0a567"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">AConfiguration_new</a> ()</td></tr>
-<tr class="separator:ga9543655922980466eb05c7be94a0a567"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga60fe264b97da84d3370eb9e220159e6d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga60fe264b97da84d3370eb9e220159e6d">AConfiguration_delete</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga60fe264b97da84d3370eb9e220159e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga75e061fd0b4f761e08e43af36508c4f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">AConfiguration_fromAssetManager</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *out, <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *am)</td></tr>
-<tr class="separator:ga75e061fd0b4f761e08e43af36508c4f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaabff04218a0a76afb8d3ea551b001565"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaabff04218a0a76afb8d3ea551b001565">AConfiguration_copy</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *dest, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *src)</td></tr>
-<tr class="separator:gaabff04218a0a76afb8d3ea551b001565"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1e78004237a931086d2ae4bd8324bd30"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1e78004237a931086d2ae4bd8324bd30">AConfiguration_getMcc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga1e78004237a931086d2ae4bd8324bd30"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae6198b4eaf3e34168f4b13b8b5975d93"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gae6198b4eaf3e34168f4b13b8b5975d93">AConfiguration_setMcc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t mcc)</td></tr>
-<tr class="separator:gae6198b4eaf3e34168f4b13b8b5975d93"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4783776a4fad4501898472375d781fb9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4783776a4fad4501898472375d781fb9">AConfiguration_getMnc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga4783776a4fad4501898472375d781fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf060ef69c3636f62e90ae0b520eecb8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaaf060ef69c3636f62e90ae0b520eecb8">AConfiguration_setMnc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t mnc)</td></tr>
-<tr class="separator:gaaf060ef69c3636f62e90ae0b520eecb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7b004c13448704afb0ea2040d69468c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7b004c13448704afb0ea2040d69468c1">AConfiguration_getLanguage</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, char *outLanguage)</td></tr>
-<tr class="separator:ga7b004c13448704afb0ea2040d69468c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1f3c6cf6667655f83777acda7387ddff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1f3c6cf6667655f83777acda7387ddff">AConfiguration_setLanguage</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, const char *language)</td></tr>
-<tr class="separator:ga1f3c6cf6667655f83777acda7387ddff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad2b47f787012a82a67a20e5de5211d46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad2b47f787012a82a67a20e5de5211d46">AConfiguration_getCountry</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, char *outCountry)</td></tr>
-<tr class="separator:gad2b47f787012a82a67a20e5de5211d46"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac2f5d414a6466634b1639b5c6f8879ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gac2f5d414a6466634b1639b5c6f8879ac">AConfiguration_setCountry</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, const char *country)</td></tr>
-<tr class="separator:gac2f5d414a6466634b1639b5c6f8879ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa7d8e3e9871dc925fef3e342a92e4e22"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaa7d8e3e9871dc925fef3e342a92e4e22">AConfiguration_getOrientation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gaa7d8e3e9871dc925fef3e342a92e4e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadcaa8540bad4172a74032143bcaade04"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gadcaa8540bad4172a74032143bcaade04">AConfiguration_setOrientation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t orientation)</td></tr>
-<tr class="separator:gadcaa8540bad4172a74032143bcaade04"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad305e6cf86fa915c24212e71bb2bf027"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad305e6cf86fa915c24212e71bb2bf027">AConfiguration_getTouchscreen</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gad305e6cf86fa915c24212e71bb2bf027"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0d51dbe710c1afe31ece4dd6a8c188ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga0d51dbe710c1afe31ece4dd6a8c188ff">AConfiguration_setTouchscreen</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t touchscreen)</td></tr>
-<tr class="separator:ga0d51dbe710c1afe31ece4dd6a8c188ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4c994e0555947340582094c3da32a663"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4c994e0555947340582094c3da32a663">AConfiguration_getDensity</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga4c994e0555947340582094c3da32a663"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9217af9858a7166dcb9a877192779eac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9217af9858a7166dcb9a877192779eac">AConfiguration_setDensity</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t density)</td></tr>
-<tr class="separator:ga9217af9858a7166dcb9a877192779eac"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafd0f76ccd4fe4bda5172b8e0bc6675e4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafd0f76ccd4fe4bda5172b8e0bc6675e4">AConfiguration_getKeyboard</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gafd0f76ccd4fe4bda5172b8e0bc6675e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4ab3429c5505c108c09349f1ddef572f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4ab3429c5505c108c09349f1ddef572f">AConfiguration_setKeyboard</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t keyboard)</td></tr>
-<tr class="separator:ga4ab3429c5505c108c09349f1ddef572f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae3ff1541b63f5b9256f7c0ebae372977"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gae3ff1541b63f5b9256f7c0ebae372977">AConfiguration_getNavigation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gae3ff1541b63f5b9256f7c0ebae372977"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad21dd14fb823a6a80b66132a05ce8913"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad21dd14fb823a6a80b66132a05ce8913">AConfiguration_setNavigation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t navigation)</td></tr>
-<tr class="separator:gad21dd14fb823a6a80b66132a05ce8913"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7a8317ab975f621f3fe62ed1b44f2605"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7a8317ab975f621f3fe62ed1b44f2605">AConfiguration_getKeysHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga7a8317ab975f621f3fe62ed1b44f2605"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5a80a02aa10cfa17de0795054e927183"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga5a80a02aa10cfa17de0795054e927183">AConfiguration_setKeysHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t keysHidden)</td></tr>
-<tr class="separator:ga5a80a02aa10cfa17de0795054e927183"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafe8d3a9c2f715ea76c8e4a99c2db9eaa"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafe8d3a9c2f715ea76c8e4a99c2db9eaa">AConfiguration_getNavHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gafe8d3a9c2f715ea76c8e4a99c2db9eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga67e86e0347596421771af841710308d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga67e86e0347596421771af841710308d5">AConfiguration_setNavHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t navHidden)</td></tr>
-<tr class="separator:ga67e86e0347596421771af841710308d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4aa7062198e5aacd9fabb04d0453dd91"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4aa7062198e5aacd9fabb04d0453dd91">AConfiguration_getSdkVersion</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga4aa7062198e5aacd9fabb04d0453dd91"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga06c66072902ee455011120188ca4810b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga06c66072902ee455011120188ca4810b">AConfiguration_setSdkVersion</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t sdkVersion)</td></tr>
-<tr class="separator:ga06c66072902ee455011120188ca4810b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9d2c1b8731795d8e74be7e23cbc77552"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9d2c1b8731795d8e74be7e23cbc77552">AConfiguration_getScreenSize</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga9d2c1b8731795d8e74be7e23cbc77552"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7bcf05150933ead34a01061d05ad3245"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7bcf05150933ead34a01061d05ad3245">AConfiguration_setScreenSize</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t screenSize)</td></tr>
-<tr class="separator:ga7bcf05150933ead34a01061d05ad3245"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab7d1f5aa59e8fa4db0a1b91bb322034c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gab7d1f5aa59e8fa4db0a1b91bb322034c">AConfiguration_getScreenLong</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gab7d1f5aa59e8fa4db0a1b91bb322034c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaed853ab7e2bc915591d05997130bc448"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaed853ab7e2bc915591d05997130bc448">AConfiguration_setScreenLong</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t screenLong)</td></tr>
-<tr class="separator:gaed853ab7e2bc915591d05997130bc448"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1d75777892f38208feb3d2a94a977fcf"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1d75777892f38208feb3d2a94a977fcf">AConfiguration_getUiModeType</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga1d75777892f38208feb3d2a94a977fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec61e3cf91cd79e8b76a35bbcb15789d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaec61e3cf91cd79e8b76a35bbcb15789d">AConfiguration_setUiModeType</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t uiModeType)</td></tr>
-<tr class="separator:gaec61e3cf91cd79e8b76a35bbcb15789d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga447f16a9e4f8400e5e0328900749ff16"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga447f16a9e4f8400e5e0328900749ff16">AConfiguration_getUiModeNight</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga447f16a9e4f8400e5e0328900749ff16"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga08df1e801afbe4a12411e393b8141e42"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga08df1e801afbe4a12411e393b8141e42">AConfiguration_setUiModeNight</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t uiModeNight)</td></tr>
-<tr class="separator:ga08df1e801afbe4a12411e393b8141e42"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga61e5fe9612c170c33e1c7e9fb92f2219"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga61e5fe9612c170c33e1c7e9fb92f2219">AConfiguration_getScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga61e5fe9612c170c33e1c7e9fb92f2219"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafc51d45679095965fe3ba1abd402f120"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafc51d45679095965fe3ba1abd402f120">AConfiguration_setScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:gafc51d45679095965fe3ba1abd402f120"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9905a4765f8d0d921c476ebce01c7648"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9905a4765f8d0d921c476ebce01c7648">AConfiguration_getScreenHeightDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga9905a4765f8d0d921c476ebce01c7648"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6ffac3b41415ec8a3031737ccdcd63b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6ffac3b41415ec8a3031737ccdcd63b8">AConfiguration_setScreenHeightDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:ga6ffac3b41415ec8a3031737ccdcd63b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7fc015e41fad342edba66a003d9848aa"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7fc015e41fad342edba66a003d9848aa">AConfiguration_getSmallestScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga7fc015e41fad342edba66a003d9848aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6b004c9585671efc5cebd96c1d43c4f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6b004c9585671efc5cebd96c1d43c4f0">AConfiguration_setSmallestScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:ga6b004c9585671efc5cebd96c1d43c4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga13dbf2fc9a382c62b391e7de9cf9b468"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga13dbf2fc9a382c62b391e7de9cf9b468">AConfiguration_getLayoutDirection</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga13dbf2fc9a382c62b391e7de9cf9b468"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf47215cf551594f8c2a0594419b47e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaaf47215cf551594f8c2a0594419b47e1">AConfiguration_setLayoutDirection</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:gaaf47215cf551594f8c2a0594419b47e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabfe69b0dccae425a16fe94d084f20402"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gabfe69b0dccae425a16fe94d084f20402">AConfiguration_diff</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config1, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config2)</td></tr>
-<tr class="separator:gabfe69b0dccae425a16fe94d084f20402"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafb27b901a1d7d44ed866608fb8399a18"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">AConfiguration_match</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *base, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *requested)</td></tr>
-<tr class="separator:gafb27b901a1d7d44ed866608fb8399a18"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafd2bb31057c8d57efcea7603458d2a8d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafd2bb31057c8d57efcea7603458d2a8d">AConfiguration_isBetterThan</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *base, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *test, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *requested)</td></tr>
-<tr class="separator:gafd2bb31057c8d57efcea7603458d2a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/deprecated.jd b/docs/html/ndk/reference/deprecated.jd
deleted file mode 100644
index 0e69db6..0000000
--- a/docs/html/ndk/reference/deprecated.jd
+++ /dev/null
@@ -1,23 +0,0 @@
-page.title=Deprecated List
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">Deprecated List </div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><dl class="reflist">
-<dt><a class="anchor" id="_deprecated000001"></a>Global <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">ACONFIGURATION_ORIENTATION_SQUARE</a>  </dt>
-<dd>Not currently supported or used.  </dd>
-<dt><a class="anchor" id="_deprecated000002"></a>Global <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">ACONFIGURATION_TOUCHSCREEN_STYLUS</a>  </dt>
-<dd>Not currently supported or used.  </dd>
-<dt><a class="anchor" id="_deprecated000004"></a>Global <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">AWINDOW_FLAG_BLUR_BEHIND</a>  </dt>
-<dd>Blurring is no longer supported.  </dd>
-<dt><a class="anchor" id="_deprecated000006"></a>Global <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">AWINDOW_FLAG_DITHER</a>  </dt>
-<dd>This flag is no longer used.  </dd>
-<dt><a class="anchor" id="_deprecated000005"></a>Global <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</a>  </dt>
-<dd>This flag has no effect. </dd>
-</dl>
-</div></div><!-- contents -->
diff --git a/docs/html/ndk/reference/dir_035c76f7235f5f563d38e3ab90cb9716.jd b/docs/html/ndk/reference/dir_035c76f7235f5f563d38e3ab90cb9716.jd
deleted file mode 100644
index 025427a..0000000
--- a/docs/html/ndk/reference/dir_035c76f7235f5f563d38e3ab90cb9716.jd
+++ /dev/null
@@ -1,49 +0,0 @@
-page.title=android Directory Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">android Directory Reference</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:asset__manager_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager_8h.html">asset_manager.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:asset__manager__jni_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager__jni_8h.html">asset_manager_jni.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:bitmap_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html">bitmap.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:configuration_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="configuration_8h.html">configuration.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:input_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="input_8h.html">input.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:keycodes_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="keycodes_8h.html">keycodes.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:looper_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="looper_8h.html">looper.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:native__activity_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="native__activity_8h.html">native_activity.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:native__window_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="native__window_8h.html">native_window.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:native__window__jni_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="native__window__jni_8h.html">native_window_jni.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:obb_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="obb_8h.html">obb.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:rect_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rect_8h.html">rect.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:sensor_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sensor_8h.html">sensor.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:storage__manager_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="storage__manager_8h.html">storage_manager.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:window_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="window_8h.html">window.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/dir_d44c64559bbebec7f509842c48db8b23.jd b/docs/html/ndk/reference/dir_d44c64559bbebec7f509842c48db8b23.jd
deleted file mode 100644
index e42811e..0000000
--- a/docs/html/ndk/reference/dir_d44c64559bbebec7f509842c48db8b23.jd
+++ /dev/null
@@ -1,21 +0,0 @@
-page.title=include Directory Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">include Directory Reference</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
-Directories</h2></td></tr>
-<tr class="memitem:dir_035c76f7235f5f563d38e3ab90cb9716"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/doxygen-dac.css b/docs/html/ndk/reference/doxygen-dac.css
deleted file mode 100644
index 96b6d84..0000000
--- a/docs/html/ndk/reference/doxygen-dac.css
+++ /dev/null
@@ -1,53 +0,0 @@
-#jd-content td {
-}
-
-#jd-content table {
-    background-color: transparent;
-    width: 100%;
-}
-
-#jd-content tr.heading td {
-    background-color: #999;
-    padding: 0px 12px;
-}
-
-#jd-content tr.heading h2 {
-    font-size: 14px;
-    font-weight: bold;
-    font-family: Roboto, sans-serif;
-    margin: 0px;
-    color: #fff;
-}
-
-#jd-content tr.heading hr, #jd-content td.memSeparator, #jd-content div.headertitle {
-    display: none;
-}
-
-
-#jd-content table td.memItemLeft {
-    text-align: right;
-    width: 20%;
-}
-
-#jd-content table td.memItemRight {
-}
-
-#jd-content div.memproto {
-    font-size: 1.15em;
-    background-color: #e2e2e2;
-    padding: 3px;    
-}
-
-#jd-content div.memproto table {
-    margin: 0px;
-    width: auto;
-}
-
-#jd-content table.memname td {
-    border: none;
-    padding: 2px;
-}
-
-#jd-content div.memdoc {
-    margin: 7px 18px;
-}
diff --git a/docs/html/ndk/reference/doxygen.css b/docs/html/ndk/reference/doxygen.css
deleted file mode 100644
index 94f4bf2..0000000
--- a/docs/html/ndk/reference/doxygen.css
+++ /dev/null
@@ -1,1366 +0,0 @@
-/* The standard CSS for doxygen 1.8.6 */
-
-body, table, div, p, dl {
-	font: 400 14px/22px Roboto,sans-serif;
-}
-
-/* @group Heading Levels */
-
-h1.groupheader {
-	font-size: 150%;
-}
-
-.title {
-	font: 400 14px/28px Roboto,sans-serif;
-	font-size: 150%;
-	font-weight: bold;
-	margin: 10px 2px;
-}
-
-h2.groupheader {
-	border-bottom: 1px solid #A9A9A9;
-	color: #585858;
-	font-size: 150%;
-	font-weight: normal;
-	margin-top: 1.75em;
-	padding-top: 8px;
-	padding-bottom: 4px;
-	width: 100%;
-}
-
-h3.groupheader {
-	font-size: 100%;
-}
-
-h1, h2, h3, h4, h5, h6 {
-	-webkit-transition: text-shadow 0.5s linear;
-	-moz-transition: text-shadow 0.5s linear;
-	-ms-transition: text-shadow 0.5s linear;
-	-o-transition: text-shadow 0.5s linear;
-	transition: text-shadow 0.5s linear;
-	margin-right: 15px;
-}
-
-h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
-	text-shadow: 0 0 15px cyan;
-}
-
-dt {
-	font-weight: bold;
-}
-
-div.multicol {
-	-moz-column-gap: 1em;
-	-webkit-column-gap: 1em;
-	-moz-column-count: 3;
-	-webkit-column-count: 3;
-}
-
-p.startli, p.startdd {
-	margin-top: 2px;
-}
-
-p.starttd {
-	margin-top: 0px;
-}
-
-p.endli {
-	margin-bottom: 0px;
-}
-
-p.enddd {
-	margin-bottom: 4px;
-}
-
-p.endtd {
-	margin-bottom: 2px;
-}
-
-/* @end */
-
-caption {
-	font-weight: bold;
-}
-
-span.legend {
-        font-size: 70%;
-        text-align: center;
-}
-
-h3.version {
-        font-size: 90%;
-        text-align: center;
-}
-
-div.qindex, div.navtab{
-	background-color: #F1F1F1;
-	border: 1px solid #BDBDBD;
-	text-align: center;
-}
-
-div.qindex, div.navpath {
-	width: 100%;
-	line-height: 140%;
-}
-
-div.navtab {
-	margin-right: 15px;
-}
-
-/* @group Link Styling */
-
-a {
-	color: #646464;
-	font-weight: normal;
-	text-decoration: none;
-}
-
-.contents a:visited {
-	color: #747474;
-}
-
-a:hover {
-	text-decoration: underline;
-}
-
-a.qindex {
-	font-weight: bold;
-}
-
-a.qindexHL {
-	font-weight: bold;
-	background-color: #B8B8B8;
-	color: #ffffff;
-	border: 1px double #A8A8A8;
-}
-
-.contents a.qindexHL:visited {
-        color: #ffffff;
-}
-
-a.el {
-	font-weight: bold;
-}
-
-a.elRef {
-}
-
-a.code, a.code:visited, a.line, a.line:visited {
-	color: #4665A2; 
-}
-
-a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
-	color: #4665A2; 
-}
-
-/* @end */
-
-dl.el {
-	margin-left: -1cm;
-}
-
-pre.fragment {
-        border: 1px solid #C4CFE5;
-        background-color: #FBFCFD;
-        padding: 4px 6px;
-        margin: 4px 8px 4px 2px;
-        overflow: auto;
-        word-wrap: break-word;
-        font-size:  9pt;
-        line-height: 125%;
-        font-family: monospace, fixed;
-        font-size: 105%;
-}
-
-div.fragment {
-        padding: 4px 6px;
-        margin: 4px 8px 4px 2px;
-	background-color: #FCFCFC;
-	border: 1px solid #D5D5D5;
-}
-
-div.line {
-	font-family: monospace, fixed;
-        font-size: 13px;
-	min-height: 13px;
-	line-height: 1.0;
-	text-wrap: unrestricted;
-	white-space: -moz-pre-wrap; /* Moz */
-	white-space: -pre-wrap;     /* Opera 4-6 */
-	white-space: -o-pre-wrap;   /* Opera 7 */
-	white-space: pre-wrap;      /* CSS3  */
-	word-wrap: break-word;      /* IE 5.5+ */
-	text-indent: -53px;
-	padding-left: 53px;
-	padding-bottom: 0px;
-	margin: 0px;
-	-webkit-transition-property: background-color, box-shadow;
-	-webkit-transition-duration: 0.5s;
-	-moz-transition-property: background-color, box-shadow;
-	-moz-transition-duration: 0.5s;
-	-ms-transition-property: background-color, box-shadow;
-	-ms-transition-duration: 0.5s;
-	-o-transition-property: background-color, box-shadow;
-	-o-transition-duration: 0.5s;
-	transition-property: background-color, box-shadow;
-	transition-duration: 0.5s;
-}
-
-div.line.glow {
-	background-color: cyan;
-	box-shadow: 0 0 10px cyan;
-}
-
-
-span.lineno {
-	padding-right: 4px;
-	text-align: right;
-	border-right: 2px solid #0F0;
-	background-color: #E8E8E8;
-        white-space: pre;
-}
-span.lineno a {
-	background-color: #D8D8D8;
-}
-
-span.lineno a:hover {
-	background-color: #C8C8C8;
-}
-
-div.ah {
-	background-color: black;
-	font-weight: bold;
-	color: #ffffff;
-	margin-bottom: 3px;
-	margin-top: 3px;
-	padding: 0.2em;
-	border: solid thin #333;
-	border-radius: 0.5em;
-	-webkit-border-radius: .5em;
-	-moz-border-radius: .5em;
-	box-shadow: 2px 2px 3px #999;
-	-webkit-box-shadow: 2px 2px 3px #999;
-	-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-	background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
-	background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
-}
-
-div.groupHeader {
-	margin-left: 16px;
-	margin-top: 12px;
-	font-weight: bold;
-}
-
-div.groupText {
-	margin-left: 16px;
-	font-style: italic;
-}
-
-body {
-	background-color: white;
-	color: black;
-        margin: 0;
-}
-
-div.contents {
-	margin-top: 10px;
-	margin-left: 12px;
-	margin-right: 8px;
-}
-
-td.indexkey {
-	background-color: #F1F1F1;
-	font-weight: bold;
-	border: 1px solid #D5D5D5;
-	margin: 2px 0px 2px 0;
-	padding: 2px 10px;
-        white-space: nowrap;
-        vertical-align: top;
-}
-
-td.indexvalue {
-	background-color: #F1F1F1;
-	border: 1px solid #D5D5D5;
-	padding: 2px 10px;
-	margin: 2px 0px;
-}
-
-tr.memlist {
-	background-color: #F2F2F2;
-}
-
-p.formulaDsp {
-	text-align: center;
-}
-
-img.formulaDsp {
-	
-}
-
-img.formulaInl {
-	vertical-align: middle;
-}
-
-div.center {
-	text-align: center;
-        margin-top: 0px;
-        margin-bottom: 0px;
-        padding: 0px;
-}
-
-div.center img {
-	border: 0px;
-}
-
-address.footer {
-	text-align: right;
-	padding-right: 12px;
-}
-
-img.footer {
-	border: 0px;
-	vertical-align: middle;
-}
-
-/* @group Code Colorization */
-
-span.keyword {
-	color: #008000
-}
-
-span.keywordtype {
-	color: #604020
-}
-
-span.keywordflow {
-	color: #e08000
-}
-
-span.comment {
-	color: #800000
-}
-
-span.preprocessor {
-	color: #806020
-}
-
-span.stringliteral {
-	color: #002080
-}
-
-span.charliteral {
-	color: #008080
-}
-
-span.vhdldigit { 
-	color: #ff00ff 
-}
-
-span.vhdlchar { 
-	color: #000000 
-}
-
-span.vhdlkeyword { 
-	color: #700070 
-}
-
-span.vhdllogic { 
-	color: #ff0000 
-}
-
-blockquote {
-        background-color: #F9F9F9;
-        border-left: 2px solid #B8B8B8;
-        margin: 0 24px 0 4px;
-        padding: 0 12px 0 16px;
-}
-
-/* @end */
-
-/*
-.search {
-	color: #003399;
-	font-weight: bold;
-}
-
-form.search {
-	margin-bottom: 0px;
-	margin-top: 0px;
-}
-
-input.search {
-	font-size: 75%;
-	color: #000080;
-	font-weight: normal;
-	background-color: #e8eef2;
-}
-*/
-
-td.tiny {
-	font-size: 75%;
-}
-
-.dirtab {
-	padding: 4px;
-	border-collapse: collapse;
-	border: 1px solid #BDBDBD;
-}
-
-th.dirtab {
-	background: #F1F1F1;
-	font-weight: bold;
-}
-
-hr {
-	height: 0px;
-	border: none;
-	border-top: 1px solid #7A7A7A;
-}
-
-hr.footer {
-	height: 1px;
-}
-
-/* @group Member Descriptions */
-
-table.memberdecls {
-	border-spacing: 0px;
-	padding: 0px;
-}
-
-.memberdecls td, .fieldtable tr {
-	-webkit-transition-property: background-color, box-shadow;
-	-webkit-transition-duration: 0.5s;
-	-moz-transition-property: background-color, box-shadow;
-	-moz-transition-duration: 0.5s;
-	-ms-transition-property: background-color, box-shadow;
-	-ms-transition-duration: 0.5s;
-	-o-transition-property: background-color, box-shadow;
-	-o-transition-duration: 0.5s;
-	transition-property: background-color, box-shadow;
-	transition-duration: 0.5s;
-}
-
-.memberdecls td.glow, .fieldtable tr.glow {
-	background-color: cyan;
-	box-shadow: 0 0 15px cyan;
-}
-
-.mdescLeft, .mdescRight,
-.memItemLeft, .memItemRight,
-.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
-	background-color: #FAFAFA;
-	border: none;
-	margin: 4px;
-	padding: 1px 0 0 8px;
-}
-
-.mdescLeft, .mdescRight {
-	padding: 0px 8px 4px 8px;
-	color: #555;
-}
-
-.memSeparator {
-        border-bottom: 1px solid #DEE4F0;
-        line-height: 1px;
-        margin: 0px;
-        padding: 0px;
-}
-
-.memItemLeft, .memTemplItemLeft {
-        white-space: nowrap;
-}
-
-.memItemRight {
-	width: 100%;
-}
-
-.memTemplParams {
-	color: #747474;
-        white-space: nowrap;
-	font-size: 80%;
-}
-
-/* @end */
-
-/* @group Member Details */
-
-/* Styles for detailed member documentation */
-
-.memtemplate {
-	font-size: 80%;
-	color: #747474;
-	font-weight: normal;
-	margin-left: 9px;
-}
-
-.memnav {
-	background-color: #F1F1F1;
-	border: 1px solid #BDBDBD;
-	text-align: center;
-	margin: 2px;
-	margin-right: 15px;
-	padding: 2px;
-}
-
-.mempage {
-	width: 100%;
-}
-
-.memitem {
-	padding: 0;
-	margin-bottom: 10px;
-	margin-right: 5px;
-        -webkit-transition: box-shadow 0.5s linear;
-        -moz-transition: box-shadow 0.5s linear;
-        -ms-transition: box-shadow 0.5s linear;
-        -o-transition: box-shadow 0.5s linear;
-        transition: box-shadow 0.5s linear;
-        display: table !important;
-        width: 100%;
-}
-
-.memitem.glow {
-         box-shadow: 0 0 15px cyan;
-}
-
-.memname {
-        font-weight: bold;
-        margin-left: 6px;
-}
-
-.memname td {
-	vertical-align: bottom;
-}
-
-.memproto, dl.reflist dt {
-        border-top: 1px solid #C0C0C0;
-        border-left: 1px solid #C0C0C0;
-        border-right: 1px solid #C0C0C0;
-        padding: 6px 0px 6px 0px;
-        color: #3D3D3D;
-        font-weight: bold;
-        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
-        background-image:url('nav_f.png');
-        background-repeat:repeat-x;
-        background-color: #EAEAEA;
-        /* opera specific markup */
-        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        border-top-right-radius: 4px;
-        border-top-left-radius: 4px;
-        /* firefox specific markup */
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-        -moz-border-radius-topright: 4px;
-        -moz-border-radius-topleft: 4px;
-        /* webkit specific markup */
-        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        -webkit-border-top-right-radius: 4px;
-        -webkit-border-top-left-radius: 4px;
-
-}
-
-.memdoc, dl.reflist dd {
-        border-bottom: 1px solid #C0C0C0;      
-        border-left: 1px solid #C0C0C0;      
-        border-right: 1px solid #C0C0C0; 
-        padding: 6px 10px 2px 10px;
-        background-color: #FCFCFC;
-        border-top-width: 0;
-        background-image:url('nav_g.png');
-        background-repeat:repeat-x;
-        background-color: #FFFFFF;
-        /* opera specific markup */
-        border-bottom-left-radius: 4px;
-        border-bottom-right-radius: 4px;
-        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-        /* firefox specific markup */
-        -moz-border-radius-bottomleft: 4px;
-        -moz-border-radius-bottomright: 4px;
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-        /* webkit specific markup */
-        -webkit-border-bottom-left-radius: 4px;
-        -webkit-border-bottom-right-radius: 4px;
-        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-}
-
-dl.reflist dt {
-        padding: 5px;
-}
-
-dl.reflist dd {
-        margin: 0px 0px 10px 0px;
-        padding: 5px;
-}
-
-.paramkey {
-	text-align: right;
-}
-
-.paramtype {
-	white-space: nowrap;
-}
-
-.paramname {
-	color: #602020;
-	white-space: nowrap;
-}
-.paramname em {
-	font-style: normal;
-}
-.paramname code {
-        line-height: 14px;
-}
-
-.params, .retval, .exception, .tparams {
-        margin-left: 0px;
-        padding-left: 0px;
-}       
-
-.params .paramname, .retval .paramname {
-        font-weight: bold;
-        vertical-align: top;
-}
-        
-.params .paramtype {
-        font-style: italic;
-        vertical-align: top;
-}       
-        
-.params .paramdir {
-        font-family: "courier new",courier,monospace;
-        vertical-align: top;
-}
-
-table.mlabels {
-	border-spacing: 0px;
-}
-
-td.mlabels-left {
-	width: 100%;
-	padding: 0px;
-}
-
-td.mlabels-right {
-	vertical-align: bottom;
-	padding: 0px;
-	white-space: nowrap;
-}
-
-span.mlabels {
-        margin-left: 8px;
-}
-
-span.mlabel {
-        background-color: #9A9A9A;
-        border-top:1px solid #848484;
-        border-left:1px solid #848484;
-        border-right:1px solid #D5D5D5;
-        border-bottom:1px solid #D5D5D5;
-	text-shadow: none;
-	color: white;
-	margin-right: 4px;
-	padding: 2px 3px;
-	border-radius: 3px;
-	font-size: 7pt;
-	white-space: nowrap;
-	vertical-align: middle;
-}
-
-
-
-/* @end */
-
-/* these are for tree view when not used as main index */
-
-div.directory {
-        margin: 10px 0px;
-        border-top: 1px solid #A8B8D9;
-        border-bottom: 1px solid #A8B8D9;
-        width: 100%;
-}
-
-.directory table {
-        border-collapse:collapse;
-}
-
-.directory td {
-        margin: 0px;
-        padding: 0px;
-	vertical-align: top;
-}
-
-.directory td.entry {
-        white-space: nowrap;
-        padding-right: 6px;
-	padding-top: 3px;
-}
-
-.directory td.entry a {
-        outline:none;
-}
-
-.directory td.entry a img {
-        border: none;
-}
-
-.directory td.desc {
-        width: 100%;
-        padding-left: 6px;
-	padding-right: 6px;
-	padding-top: 3px;
-	border-left: 1px solid rgba(0,0,0,0.05);
-}
-
-.directory tr.even {
-	padding-left: 6px;
-	background-color: #F9F9F9;
-}
-
-.directory img {
-	vertical-align: -30%;
-}
-
-.directory .levels {
-        white-space: nowrap;
-        width: 100%;
-        text-align: right;
-        font-size: 9pt;
-}
-
-.directory .levels span {
-        cursor: pointer;
-        padding-left: 2px;
-        padding-right: 2px;
-	color: #646464;
-}
-
-div.dynheader {
-        margin-top: 8px;
-	-webkit-touch-callout: none;
-	-webkit-user-select: none;
-	-khtml-user-select: none;
-	-moz-user-select: none;
-	-ms-user-select: none;
-	user-select: none;
-}
-
-address {
-	font-style: normal;
-	color: #464646;
-}
-
-table.doxtable {
-	border-collapse:collapse;
-        margin-top: 4px;
-        margin-bottom: 4px;
-}
-
-table.doxtable td, table.doxtable th {
-	border: 1px solid #4A4A4A;
-	padding: 3px 7px 2px;
-}
-
-table.doxtable th {
-	background-color: #5B5B5B;
-	color: #FFFFFF;
-	font-size: 110%;
-	padding-bottom: 4px;
-	padding-top: 5px;
-}
-
-table.fieldtable {
-        /*width: 100%;*/
-        margin-bottom: 10px;
-        border: 1px solid #C0C0C0;
-        border-spacing: 0px;
-        -moz-border-radius: 4px;
-        -webkit-border-radius: 4px;
-        border-radius: 4px;
-        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
-}
-
-.fieldtable td, .fieldtable th {
-        padding: 3px 7px 2px;
-}
-
-.fieldtable td.fieldtype, .fieldtable td.fieldname {
-        white-space: nowrap;
-        border-right: 1px solid #C0C0C0;
-        border-bottom: 1px solid #C0C0C0;
-        vertical-align: top;
-}
-
-.fieldtable td.fieldname {
-        padding-top: 3px;
-}
-
-.fieldtable td.fielddoc {
-        border-bottom: 1px solid #C0C0C0;
-        /*width: 100%;*/
-}
-
-.fieldtable td.fielddoc p:first-child {
-        margin-top: 0px;
-}       
-        
-.fieldtable td.fielddoc p:last-child {
-        margin-bottom: 2px;
-}
-
-.fieldtable tr:last-child td {
-        border-bottom: none;
-}
-
-.fieldtable th {
-        background-image:url('nav_f.png');
-        background-repeat:repeat-x;
-        background-color: #EAEAEA;
-        font-size: 90%;
-        color: #3D3D3D;
-        padding-bottom: 4px;
-        padding-top: 5px;
-        text-align:left;
-        -moz-border-radius-topleft: 4px;
-        -moz-border-radius-topright: 4px;
-        -webkit-border-top-left-radius: 4px;
-        -webkit-border-top-right-radius: 4px;
-        border-top-left-radius: 4px;
-        border-top-right-radius: 4px;
-        border-bottom: 1px solid #C0C0C0;
-}
-
-
-.tabsearch {
-	top: 0px;
-	left: 10px;
-	height: 36px;
-	background-image: url('tab_b.png');
-	z-index: 101;
-	overflow: hidden;
-	font-size: 13px;
-}
-
-.navpath ul
-{
-	font-size: 11px;
-	background-image:url('tab_b.png');
-	background-repeat:repeat-x;
-	background-position: 0 -5px;
-	height:30px;
-	line-height:30px;
-	color:#ABABAB;
-	border:solid 1px #D3D3D3;
-	overflow:hidden;
-	margin:0px;
-	padding:0px;
-}
-
-.navpath li
-{
-	list-style-type:none;
-	float:left;
-	padding-left:10px;
-	padding-right:15px;
-	background-image:url('bc_s.png');
-	background-repeat:no-repeat;
-	background-position:right;
-	color:#595959;
-}
-
-.navpath li.navelem a
-{
-	height:32px;
-	display:block;
-	text-decoration: none;
-	outline: none;
-	color: #434343;
-	font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
-	text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
-	text-decoration: none;        
-}
-
-.navpath li.navelem a:hover
-{
-	color:#929292;
-}
-
-.navpath li.footer
-{
-        list-style-type:none;
-        float:right;
-        padding-left:10px;
-        padding-right:15px;
-        background-image:none;
-        background-repeat:no-repeat;
-        background-position:right;
-        color:#595959;
-        font-size: 8pt;
-}
-
-
-div.summary
-{
-	float: right;
-	font-size: 8pt;
-	padding-right: 5px;
-	width: 50%;
-	text-align: right;
-}       
-
-div.summary a
-{
-	white-space: nowrap;
-}
-
-div.ingroups
-{
-	font-size: 8pt;
-	width: 50%;
-	text-align: left;
-}
-
-div.ingroups a
-{
-	white-space: nowrap;
-}
-
-div.header
-{
-        background-image:url('nav_h.png');
-        background-repeat:repeat-x;
-	background-color: #FAFAFA;
-	margin:  0px;
-	border-bottom: 1px solid #D5D5D5;
-}
-
-div.headertitle
-{
-	padding: 5px 5px 5px 10px;
-}
-
-dl
-{
-        padding: 0 0 0 10px;
-}
-
-/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
-dl.section
-{
-	margin-left: 0px;
-	padding-left: 0px;
-}
-
-dl.note
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #D0C000;
-}
-
-dl.warning, dl.attention
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #FF0000;
-}
-
-dl.pre, dl.post, dl.invariant
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #00D000;
-}
-
-dl.deprecated
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #505050;
-}
-
-dl.todo
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #00C0E0;
-}
-
-dl.test
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #3030E0;
-}
-
-dl.bug
-{
-        margin-left:-7px;
-        padding-left: 3px;
-        border-left:4px solid;
-        border-color: #C08050;
-}
-
-dl.section dd {
-	margin-bottom: 6px;
-}
-
-
-#projectlogo
-{
-	text-align: center;
-	vertical-align: bottom;
-	border-collapse: separate;
-}
- 
-#projectlogo img
-{ 
-	border: 0px none;
-}
- 
-#projectname
-{
-	font: 300% Tahoma, Arial,sans-serif;
-	margin: 0px;
-	padding: 2px 0px;
-}
-    
-#projectbrief
-{
-	font: 120% Tahoma, Arial,sans-serif;
-	margin: 0px;
-	padding: 0px;
-}
-
-#projectnumber
-{
-	font: 50% Tahoma, Arial,sans-serif;
-	margin: 0px;
-	padding: 0px;
-}
-
-#titlearea
-{
-	padding: 0px;
-	margin: 0px;
-	width: 100%;
-	border-bottom: 1px solid #848484;
-}
-
-.image
-{
-        text-align: center;
-}
-
-.dotgraph
-{
-        text-align: center;
-}
-
-.mscgraph
-{
-        text-align: center;
-}
-
-.diagraph
-{
-        text-align: center;
-}
-
-.caption
-{
-	font-weight: bold;
-}
-
-div.zoom
-{
-	border: 1px solid #AFAFAF;
-}
-
-dl.citelist {
-        margin-bottom:50px;
-}
-
-dl.citelist dt {
-        color:#545454;
-        float:left;
-        font-weight:bold;
-        margin-right:10px;
-        padding:5px;
-}
-
-dl.citelist dd {
-        margin:2px 0;
-        padding:5px 0;
-}
-
-div.toc {
-        padding: 14px 25px;
-        background-color: #F7F7F7;
-        border: 1px solid #E3E3E3;
-        border-radius: 7px 7px 7px 7px;
-        float: right;
-        height: auto;
-        margin: 0 20px 10px 10px;
-        width: 200px;
-}
-
-div.toc li {
-        background: url("bdwn.png") no-repeat scroll 0 5px transparent;
-        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
-        margin-top: 5px;
-        padding-left: 10px;
-        padding-top: 2px;
-}
-
-div.toc h3 {
-        font: bold 12px/1.2 Arial,FreeSans,sans-serif;
-	color: #747474;
-        border-bottom: 0 none;
-        margin: 0;
-}
-
-div.toc ul {
-        list-style: none outside none;
-        border: medium none;
-        padding: 0px;
-}       
-
-div.toc li.level1 {
-        margin-left: 0px;
-}
-
-div.toc li.level2 {
-        margin-left: 15px;
-}
-
-div.toc li.level3 {
-        margin-left: 30px;
-}
-
-div.toc li.level4 {
-        margin-left: 45px;
-}
-
-.inherit_header {
-        font-weight: bold;
-        color: gray;
-        cursor: pointer;
-	-webkit-touch-callout: none;
-	-webkit-user-select: none;
-	-khtml-user-select: none;
-	-moz-user-select: none;
-	-ms-user-select: none;
-	user-select: none;
-}
-
-.inherit_header td {
-        padding: 6px 0px 2px 5px;
-}
-
-.inherit {
-        display: none;
-}
-
-tr.heading h2 {
-        margin-top: 12px;
-        margin-bottom: 4px;
-}
-
-/* tooltip related style info */
-
-.ttc {
-        position: absolute;
-        display: none;
-}
-
-#powerTip {
-	cursor: default;
-	white-space: nowrap;
-	background-color: white;
-	border: 1px solid gray;
-	border-radius: 4px 4px 4px 4px;
-	box-shadow: 1px 1px 7px gray;
-	display: none;
-	font-size: smaller;
-	max-width: 80%;
-	opacity: 0.9;
-	padding: 1ex 1em 1em;
-	position: absolute;
-	z-index: 2147483647;
-}
-
-#powerTip div.ttdoc {
-        color: grey;
-	font-style: italic;
-}
-
-#powerTip div.ttname a {
-        font-weight: bold;
-}
-
-#powerTip div.ttname {
-        font-weight: bold;
-}
-
-#powerTip div.ttdeci {
-        color: #006318;
-}
-
-#powerTip div {
-        margin: 0px;
-        padding: 0px;
-        font: 12px/16px Roboto,sans-serif;
-}
-
-#powerTip:before, #powerTip:after {
-	content: "";
-	position: absolute;
-	margin: 0px;
-}
-
-#powerTip.n:after,  #powerTip.n:before,
-#powerTip.s:after,  #powerTip.s:before,
-#powerTip.w:after,  #powerTip.w:before,
-#powerTip.e:after,  #powerTip.e:before,
-#powerTip.ne:after, #powerTip.ne:before,
-#powerTip.se:after, #powerTip.se:before,
-#powerTip.nw:after, #powerTip.nw:before,
-#powerTip.sw:after, #powerTip.sw:before {
-	border: solid transparent;
-	content: " ";
-	height: 0;
-	width: 0;
-	position: absolute;
-}
-
-#powerTip.n:after,  #powerTip.s:after,
-#powerTip.w:after,  #powerTip.e:after,
-#powerTip.nw:after, #powerTip.ne:after,
-#powerTip.sw:after, #powerTip.se:after {
-	border-color: rgba(255, 255, 255, 0);
-}
-
-#powerTip.n:before,  #powerTip.s:before,
-#powerTip.w:before,  #powerTip.e:before,
-#powerTip.nw:before, #powerTip.ne:before,
-#powerTip.sw:before, #powerTip.se:before {
-	border-color: rgba(128, 128, 128, 0);
-}
-
-#powerTip.n:after,  #powerTip.n:before,
-#powerTip.ne:after, #powerTip.ne:before,
-#powerTip.nw:after, #powerTip.nw:before {
-	top: 100%;
-}
-
-#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
-	border-top-color: #ffffff;
-	border-width: 10px;
-	margin: 0px -10px;
-}
-#powerTip.n:before {
-	border-top-color: #808080;
-	border-width: 11px;
-	margin: 0px -11px;
-}
-#powerTip.n:after, #powerTip.n:before {
-	left: 50%;
-}
-
-#powerTip.nw:after, #powerTip.nw:before {
-	right: 14px;
-}
-
-#powerTip.ne:after, #powerTip.ne:before {
-	left: 14px;
-}
-
-#powerTip.s:after,  #powerTip.s:before,
-#powerTip.se:after, #powerTip.se:before,
-#powerTip.sw:after, #powerTip.sw:before {
-	bottom: 100%;
-}
-
-#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
-	border-bottom-color: #ffffff;
-	border-width: 10px;
-	margin: 0px -10px;
-}
-
-#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
-	border-bottom-color: #808080;
-	border-width: 11px;
-	margin: 0px -11px;
-}
-
-#powerTip.s:after, #powerTip.s:before {
-	left: 50%;
-}
-
-#powerTip.sw:after, #powerTip.sw:before {
-	right: 14px;
-}
-
-#powerTip.se:after, #powerTip.se:before {
-	left: 14px;
-}
-
-#powerTip.e:after, #powerTip.e:before {
-	left: 100%;
-}
-#powerTip.e:after {
-	border-left-color: #ffffff;
-	border-width: 10px;
-	top: 50%;
-	margin-top: -10px;
-}
-#powerTip.e:before {
-	border-left-color: #808080;
-	border-width: 11px;
-	top: 50%;
-	margin-top: -11px;
-}
-
-#powerTip.w:after, #powerTip.w:before {
-	right: 100%;
-}
-#powerTip.w:after {
-	border-right-color: #ffffff;
-	border-width: 10px;
-	top: 50%;
-	margin-top: -10px;
-}
-#powerTip.w:before {
-	border-right-color: #808080;
-	border-width: 11px;
-	top: 50%;
-	margin-top: -11px;
-}
-
-@media print
-{
-  #top { display: none; }
-  #side-nav { display: none; }
-  #nav-path { display: none; }
-  body { overflow:visible; }
-  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
-  .summary { display: none; }
-  .memitem { page-break-inside: avoid; }
-  #doc-content
-  {
-    margin-left:0 !important;
-    height:auto !important;
-    width:auto !important;
-    overflow:inherit;
-    display:inline;
-  }
-}
-
diff --git a/docs/html/ndk/reference/doxygen.png b/docs/html/ndk/reference/doxygen.png
deleted file mode 100644
index da7e8aa..0000000
--- a/docs/html/ndk/reference/doxygen.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/dynsections.js b/docs/html/ndk/reference/dynsections.js
deleted file mode 100644
index ed092c7..0000000
--- a/docs/html/ndk/reference/dynsections.js
+++ /dev/null
@@ -1,97 +0,0 @@
-function toggleVisibility(linkObj)
-{
- var base = $(linkObj).attr('id');
- var summary = $('#'+base+'-summary');
- var content = $('#'+base+'-content');
- var trigger = $('#'+base+'-trigger');
- var src=$(trigger).attr('src');
- if (content.is(':visible')===true) {
-   content.hide();
-   summary.show();
-   $(linkObj).addClass('closed').removeClass('opened');
-   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
- } else {
-   content.show();
-   summary.hide();
-   $(linkObj).removeClass('closed').addClass('opened');
-   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
- } 
- return false;
-}
-
-function updateStripes()
-{
-  $('table.directory tr').
-       removeClass('even').filter(':visible:even').addClass('even');
-}
-function toggleLevel(level)
-{
-  $('table.directory tr').each(function(){ 
-    var l = this.id.split('_').length-1;
-    var i = $('#img'+this.id.substring(3));
-    var a = $('#arr'+this.id.substring(3));
-    if (l<level+1) {
-      i.attr('src','ftv2folderopen.png');
-      a.attr('src','ftv2mnode.png');
-      $(this).show();
-    } else if (l==level+1) {
-      i.attr('src','ftv2folderclosed.png');
-      a.attr('src','ftv2pnode.png');
-      $(this).show();
-    } else {
-      $(this).hide();
-    }
-  });
-  updateStripes();
-}
-
-function toggleFolder(id)
-{
-  //The clicked row
-  var currentRow = $('#row_'+id);
-  var currentRowImages = currentRow.find("img");
-
-  //All rows after the clicked row
-  var rows = currentRow.nextAll("tr");
-
-  //Only match elements AFTER this one (can't hide elements before)
-  var childRows = rows.filter(function() {
-    var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
-    return this.id.match(re);
-  });
-
-  //First row is visible we are HIDING
-  if (childRows.filter(':first').is(':visible')===true) {
-    currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png');
-    currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png');
-    rows.filter("[id^=row_"+id+"]").hide();
-  } else { //We are SHOWING
-    //All sub images
-    var childImages = childRows.find("img");
-    var childImg = childImages.filter("[id^=img]");
-    var childArr = childImages.filter("[id^=arr]");
-
-    currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row
-    currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row
-    childImg.attr('src','ftv2folderclosed.png'); //children closed
-    childArr.attr('src','ftv2pnode.png'); //children closed
-    childRows.show(); //show all children
-  }
-  updateStripes();
-}
-
-
-function toggleInherit(id)
-{
-  var rows = $('tr.inherit.'+id);
-  var img = $('tr.inherit_header.'+id+' img');
-  var src = $(img).attr('src');
-  if (rows.filter(':first').is(':visible')===true) {
-    rows.css('display','none');
-    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
-  } else {
-    rows.css('display','table-row'); // using show() causes jump in firefox
-    $(img).attr('src',src.substring(0,src.length-10)+'open.png');
-  }
-}
-
diff --git a/docs/html/ndk/reference/files.jd b/docs/html/ndk/reference/files.jd
deleted file mode 100644
index 1144d5bb..0000000
--- a/docs/html/ndk/reference/files.jd
+++ /dev/null
@@ -1,30 +0,0 @@
-page.title=File List
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">File List</div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
-<table class="directory">
-<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="asset__manager_8h.html" target="_self">asset_manager.h</a></td><td class="desc"></td></tr>
-<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="asset__manager__jni_8h.html" target="_self">asset_manager_jni.h</a></td><td class="desc"></td></tr>
-<tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="bitmap_8h.html" target="_self">bitmap.h</a></td><td class="desc"></td></tr>
-<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="configuration_8h.html" target="_self">configuration.h</a></td><td class="desc"></td></tr>
-<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="input_8h.html" target="_self">input.h</a></td><td class="desc"></td></tr>
-<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="keycodes_8h.html" target="_self">keycodes.h</a></td><td class="desc"></td></tr>
-<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="looper_8h.html" target="_self">looper.h</a></td><td class="desc"></td></tr>
-<tr id="row_7_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="native__activity_8h.html" target="_self">native_activity.h</a></td><td class="desc"></td></tr>
-<tr id="row_8_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="native__window_8h.html" target="_self">native_window.h</a></td><td class="desc"></td></tr>
-<tr id="row_9_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="native__window__jni_8h.html" target="_self">native_window_jni.h</a></td><td class="desc"></td></tr>
-<tr id="row_10_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="obb_8h.html" target="_self">obb.h</a></td><td class="desc"></td></tr>
-<tr id="row_11_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="rect_8h.html" target="_self">rect.h</a></td><td class="desc"></td></tr>
-<tr id="row_12_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="sensor_8h.html" target="_self">sensor.h</a></td><td class="desc"></td></tr>
-<tr id="row_13_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="storage__manager_8h.html" target="_self">storage_manager.h</a></td><td class="desc"></td></tr>
-<tr id="row_14_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="window_8h.html" target="_self">window.h</a></td><td class="desc"></td></tr>
-</table>
-</div><!-- directory -->
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/ftv2blank.png b/docs/html/ndk/reference/ftv2blank.png
deleted file mode 100644
index 63c605b..0000000
--- a/docs/html/ndk/reference/ftv2blank.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2cl.png b/docs/html/ndk/reference/ftv2cl.png
deleted file mode 100644
index d660c7b..0000000
--- a/docs/html/ndk/reference/ftv2cl.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2doc.png b/docs/html/ndk/reference/ftv2doc.png
deleted file mode 100644
index 7f92e54..0000000
--- a/docs/html/ndk/reference/ftv2doc.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2folderclosed.png b/docs/html/ndk/reference/ftv2folderclosed.png
deleted file mode 100644
index 359f2073..0000000
--- a/docs/html/ndk/reference/ftv2folderclosed.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2folderopen.png b/docs/html/ndk/reference/ftv2folderopen.png
deleted file mode 100644
index c5103ed..0000000
--- a/docs/html/ndk/reference/ftv2folderopen.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2lastnode.png b/docs/html/ndk/reference/ftv2lastnode.png
deleted file mode 100644
index 63c605b..0000000
--- a/docs/html/ndk/reference/ftv2lastnode.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2link.png b/docs/html/ndk/reference/ftv2link.png
deleted file mode 100644
index 7f92e54..0000000
--- a/docs/html/ndk/reference/ftv2link.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2mlastnode.png b/docs/html/ndk/reference/ftv2mlastnode.png
deleted file mode 100644
index 9d1437d..0000000
--- a/docs/html/ndk/reference/ftv2mlastnode.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2mnode.png b/docs/html/ndk/reference/ftv2mnode.png
deleted file mode 100644
index 9d1437d..0000000
--- a/docs/html/ndk/reference/ftv2mnode.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2mo.png b/docs/html/ndk/reference/ftv2mo.png
deleted file mode 100644
index e2513ee..0000000
--- a/docs/html/ndk/reference/ftv2mo.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2node.png b/docs/html/ndk/reference/ftv2node.png
deleted file mode 100644
index 63c605b..0000000
--- a/docs/html/ndk/reference/ftv2node.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2ns.png b/docs/html/ndk/reference/ftv2ns.png
deleted file mode 100644
index c61a541..0000000
--- a/docs/html/ndk/reference/ftv2ns.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2plastnode.png b/docs/html/ndk/reference/ftv2plastnode.png
deleted file mode 100644
index a2fffb6..0000000
--- a/docs/html/ndk/reference/ftv2plastnode.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2pnode.png b/docs/html/ndk/reference/ftv2pnode.png
deleted file mode 100644
index a2fffb6..0000000
--- a/docs/html/ndk/reference/ftv2pnode.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2splitbar.png b/docs/html/ndk/reference/ftv2splitbar.png
deleted file mode 100644
index 343046b..0000000
--- a/docs/html/ndk/reference/ftv2splitbar.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/ftv2vertline.png b/docs/html/ndk/reference/ftv2vertline.png
deleted file mode 100644
index 63c605b..0000000
--- a/docs/html/ndk/reference/ftv2vertline.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/functions.jd b/docs/html/ndk/reference/functions.jd
deleted file mode 100644
index fade0d5..0000000
--- a/docs/html/ndk/reference/functions.jd
+++ /dev/null
@@ -1,327 +0,0 @@
-page.title=Data Fields
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-<div class="textblock">Here is a list of all struct and union fields with links to the structures/unions they belong to:</div>
-
-<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
-<li>acceleration
-: <a class="el" href="struct_a_sensor_event.html#aab1f50881089166ff5f3d46f7bfcf09c">ASensorEvent</a>
-</li>
-<li>assetManager
-: <a class="el" href="struct_a_native_activity.html#a0f76f065768b8f896ce47a3089fb438d">ANativeActivity</a>
-</li>
-<li>azimuth
-: <a class="el" href="struct_a_sensor_vector.html#a01b03ebfa7d0a95760e743f611fecbc5">ASensorVector</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
-<li>bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a52bd7f09c4decadcfbc0347fda4163d6">AUncalibratedEvent</a>
-</li>
-<li>bits
-: <a class="el" href="struct_a_native_window___buffer.html#a089d8e968fac54a9e45f059b8b78cf9b">ANativeWindow_Buffer</a>
-</li>
-<li>bottom
-: <a class="el" href="struct_a_rect.html#a4479860c72ca8e96ac4fb1cc149dd71b">ARect</a>
-</li>
-<li>bpm
-: <a class="el" href="struct_a_heart_rate_event.html#ab0560092cbaa233e74bb0d543a85965d">AHeartRateEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
-<li>callbacks
-: <a class="el" href="struct_a_native_activity.html#af96995a13e77baf0d71c37d20c79ad51">ANativeActivity</a>
-</li>
-<li>clazz
-: <a class="el" href="struct_a_native_activity.html#ab10b01c3c23c4ddb9d2ddadd71b03c94">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
-<li>data
-: <a class="el" href="struct_a_sensor_event.html#a31244897a6c7f657a9aec807dd1e09ae">ASensorEvent</a>
-</li>
-<li>distance
-: <a class="el" href="struct_a_sensor_event.html#a06f14a9abd47b91465f895d5259cdc1b">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
-<li>env
-: <a class="el" href="struct_a_native_activity.html#ae6f0d0cd46e56b7e299b489cb60dd27e">ANativeActivity</a>
-</li>
-<li>externalDataPath
-: <a class="el" href="struct_a_native_activity.html#a2a61553b2f660ea8b57fcc2b495e109f">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
-<li>flags
-: <a class="el" href="struct_android_bitmap_info.html#a773b39d480759f67926cb18ae2219281">AndroidBitmapInfo</a>
-, <a class="el" href="struct_a_sensor_event.html#a773b39d480759f67926cb18ae2219281">ASensorEvent</a>
-</li>
-<li>format
-: <a class="el" href="struct_a_native_window___buffer.html#a49d503b84d084937e3ceeda9f0b4659e">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a49d503b84d084937e3ceeda9f0b4659e">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
-<li>heart_rate
-: <a class="el" href="struct_a_sensor_event.html#a2325abb12f65d7cbceec766e6db506d8">ASensorEvent</a>
-</li>
-<li>height
-: <a class="el" href="struct_a_native_window___buffer.html#a5d8006e753a3e76ff637a4e092bbed71">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a6ad4f820ce4e75cda0686fcaad5168be">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
-<li>instance
-: <a class="el" href="struct_a_native_activity.html#ae1b90392cd257d16fd66a85bac1b08cd">ANativeActivity</a>
-</li>
-<li>internalDataPath
-: <a class="el" href="struct_a_native_activity.html#aa52947cdd1476b95e858d83c0f5b0220">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
-<li>left
-: <a class="el" href="struct_a_rect.html#a9ee4ce87784b0ebeaadce132ce7d421f">ARect</a>
-</li>
-<li>light
-: <a class="el" href="struct_a_sensor_event.html#aaf8b2537020ae0b7450785724d77a3e0">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
-<li>magnetic
-: <a class="el" href="struct_a_sensor_event.html#a776bc8e3beff52764ef2d6d423563d64">ASensorEvent</a>
-</li>
-<li>meta_data
-: <a class="el" href="struct_a_sensor_event.html#a40a6e69697a42e0f0ad04a09d7f113d3">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_o"></a>- o -</h3><ul>
-<li>obbPath
-: <a class="el" href="struct_a_native_activity.html#a0aff284eb9ab311d81f20955258798cf">ANativeActivity</a>
-</li>
-<li>onConfigurationChanged
-: <a class="el" href="struct_a_native_activity_callbacks.html#a2926b45334319089e4e25fbc86d74c3f">ANativeActivityCallbacks</a>
-</li>
-<li>onContentRectChanged
-: <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks</a>
-</li>
-<li>onDestroy
-: <a class="el" href="struct_a_native_activity_callbacks.html#a45598ebed3d15847b4f97acb9e15076e">ANativeActivityCallbacks</a>
-</li>
-<li>onInputQueueCreated
-: <a class="el" href="struct_a_native_activity_callbacks.html#a17b41ec9bb8b0b9e42d1e269a62a4d59">ANativeActivityCallbacks</a>
-</li>
-<li>onInputQueueDestroyed
-: <a class="el" href="struct_a_native_activity_callbacks.html#a82675193f867bc64180016923b0bb129">ANativeActivityCallbacks</a>
-</li>
-<li>onLowMemory
-: <a class="el" href="struct_a_native_activity_callbacks.html#aac61f647cbd971321c692a74a1136f67">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowCreated
-: <a class="el" href="struct_a_native_activity_callbacks.html#ac997f07e53ba58179a2133e86e5cbd31">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowDestroyed
-: <a class="el" href="struct_a_native_activity_callbacks.html#a150442c0611e8ce24a32a7c805e7c9db">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowRedrawNeeded
-: <a class="el" href="struct_a_native_activity_callbacks.html#a3cad4792af363b9a40599d09afeab56c">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowResized
-: <a class="el" href="struct_a_native_activity_callbacks.html#ab7bd120b8816508561126308f699f116">ANativeActivityCallbacks</a>
-</li>
-<li>onPause
-: <a class="el" href="struct_a_native_activity_callbacks.html#aee8a4dcff234b94d0bf0bc85efea42c2">ANativeActivityCallbacks</a>
-</li>
-<li>onResume
-: <a class="el" href="struct_a_native_activity_callbacks.html#ac2c85491a68e6dece3d82782c1254e73">ANativeActivityCallbacks</a>
-</li>
-<li>onSaveInstanceState
-: <a class="el" href="struct_a_native_activity_callbacks.html#a16a270d24a484a376e28bc6c48fc22a1">ANativeActivityCallbacks</a>
-</li>
-<li>onStart
-: <a class="el" href="struct_a_native_activity_callbacks.html#acda344fd29c2018640a85a585317d92c">ANativeActivityCallbacks</a>
-</li>
-<li>onStop
-: <a class="el" href="struct_a_native_activity_callbacks.html#adefa99d16d11d21bb8a83ba426047605">ANativeActivityCallbacks</a>
-</li>
-<li>onWindowFocusChanged
-: <a class="el" href="struct_a_native_activity_callbacks.html#a620ef54556eac0b2b28d7e6d0644ee4a">ANativeActivityCallbacks</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
-<li>pitch
-: <a class="el" href="struct_a_sensor_vector.html#a282e7d4378d4a18a805b8980295ac86c">ASensorVector</a>
-</li>
-<li>pressure
-: <a class="el" href="struct_a_sensor_event.html#ac870e1249bab4a2a68cc4126761d24ef">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
-<li>relative_humidity
-: <a class="el" href="struct_a_sensor_event.html#ad60830bc80efb7e8a11d6fb25518f55b">ASensorEvent</a>
-</li>
-<li>reserved
-: <a class="el" href="struct_a_native_window___buffer.html#a60cc5aad4013157e2e7434d6de450656">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_a_sensor_vector.html#a72aca6ea6d8153b28ea8f139b932ec3e">ASensorVector</a>
-</li>
-<li>reserved0
-: <a class="el" href="struct_a_sensor_event.html#a3b1869501b35bf41f2ff54de072b6c2c">ASensorEvent</a>
-</li>
-<li>reserved1
-: <a class="el" href="struct_a_sensor_event.html#a3c2ed5a26d302c47f7b3f2dd0bbf7f94">ASensorEvent</a>
-</li>
-<li>right
-: <a class="el" href="struct_a_rect.html#a3d3a4d6bf8bc6c866fa737e11590cc4e">ARect</a>
-</li>
-<li>roll
-: <a class="el" href="struct_a_sensor_vector.html#a26fd84d522945b6038221d9e38c7cc39">ASensorVector</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
-<li>sdkVersion
-: <a class="el" href="struct_a_native_activity.html#a40b4b64be7ecfac23751618313eb610d">ANativeActivity</a>
-</li>
-<li>sensor
-: <a class="el" href="struct_a_meta_data_event.html#a470f19badf179fe205462c060e5175b4">AMetaDataEvent</a>
-, <a class="el" href="struct_a_sensor_event.html#a470f19badf179fe205462c060e5175b4">ASensorEvent</a>
-</li>
-<li>status
-: <a class="el" href="struct_a_heart_rate_event.html#a555c2084e8436de01dc76a23590e8824">AHeartRateEvent</a>
-, <a class="el" href="struct_a_sensor_vector.html#a555c2084e8436de01dc76a23590e8824">ASensorVector</a>
-</li>
-<li>step_counter
-: <a class="el" href="struct_a_sensor_event.html#a2e54280490afc977b11157e387841145">ASensorEvent</a>
-</li>
-<li>stride
-: <a class="el" href="struct_a_native_window___buffer.html#a4438e3445d33be6d33b2c0dbe9c2e0d7">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a981556a4e63b7b6d9f94975c7a8930ab">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
-<li>temperature
-: <a class="el" href="struct_a_sensor_event.html#afc1d28cfbce795d6ea954ebe725241f5">ASensorEvent</a>
-</li>
-<li>timestamp
-: <a class="el" href="struct_a_sensor_event.html#a8a591d341723df9496cda98e225b25b4">ASensorEvent</a>
-</li>
-<li>top
-: <a class="el" href="struct_a_rect.html#ad07137116129d873220209ea65f9d3d4">ARect</a>
-</li>
-<li>type
-: <a class="el" href="struct_a_sensor_event.html#a449e574ed6911881dc55507cb5635c2c">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
-<li>u64
-: <a class="el" href="struct_a_sensor_event.html#a89806d4445310e62ed4b68c9e2698b27">ASensorEvent</a>
-</li>
-<li>uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#a9c22454e765672782b7198d57a92f5fd">AUncalibratedEvent</a>
-</li>
-<li>uncalibrated_gyro
-: <a class="el" href="struct_a_sensor_event.html#a4e35158edcd83e4651d7083ebdb41bae">ASensorEvent</a>
-</li>
-<li>uncalibrated_magnetic
-: <a class="el" href="struct_a_sensor_event.html#a3c746f01a48fbdefaad12c35be0dd715">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
-<li>v
-: <a class="el" href="struct_a_sensor_vector.html#a9a1a1a00f1e45435cc3001b553000a21">ASensorVector</a>
-</li>
-<li>vector
-: <a class="el" href="struct_a_sensor_event.html#aebf12879fa9b61c671584994ddad9610">ASensorEvent</a>
-</li>
-<li>version
-: <a class="el" href="struct_a_sensor_event.html#a67fae7dd1de9edce3656ed214d20377f">ASensorEvent</a>
-</li>
-<li>vm
-: <a class="el" href="struct_a_native_activity.html#a5e163c28566d4563eafeabd7dcab7eeb">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
-<li>what
-: <a class="el" href="struct_a_meta_data_event.html#a397e31e246d23c1be3fa82ca4af8b930">AMetaDataEvent</a>
-</li>
-<li>width
-: <a class="el" href="struct_a_native_window___buffer.html#a395d15e7c2b09961c1bfd1da6179b64c">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a325272ddd9a962f05deb905101d25cbd">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_x"></a>- x -</h3><ul>
-<li>x
-: <a class="el" href="struct_a_sensor_vector.html#ad0da36b2558901e21e7a30f6c227a45e">ASensorVector</a>
-</li>
-<li>x_bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a56c4ea73587a9ea20595cca9bcfe9593">AUncalibratedEvent</a>
-</li>
-<li>x_uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#ac8b7f8daea042eaa2b86f0bf2160c44a">AUncalibratedEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_y"></a>- y -</h3><ul>
-<li>y
-: <a class="el" href="struct_a_sensor_vector.html#aa4f0d3eebc3c443f9be81bf48561a217">ASensorVector</a>
-</li>
-<li>y_bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a130457eaa905b467bc43fedb02cbb16a">AUncalibratedEvent</a>
-</li>
-<li>y_uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#a43437dd77e26c6b89ab1c91aeb63fd64">AUncalibratedEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_z"></a>- z -</h3><ul>
-<li>z
-: <a class="el" href="struct_a_sensor_vector.html#af73583b1e980b0aa03f9884812e9fd4d">ASensorVector</a>
-</li>
-<li>z_bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a6e265324293107afbfa9e587941a4036">AUncalibratedEvent</a>
-</li>
-<li>z_uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#ae677be5f98570cc5a1fd7fddcd8a6841">AUncalibratedEvent</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/functions_vars.jd b/docs/html/ndk/reference/functions_vars.jd
deleted file mode 100644
index 129c7ec..0000000
--- a/docs/html/ndk/reference/functions_vars.jd
+++ /dev/null
@@ -1,327 +0,0 @@
-page.title=Data Fields - Variables
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;
-
-<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
-<li>acceleration
-: <a class="el" href="struct_a_sensor_event.html#aab1f50881089166ff5f3d46f7bfcf09c">ASensorEvent</a>
-</li>
-<li>assetManager
-: <a class="el" href="struct_a_native_activity.html#a0f76f065768b8f896ce47a3089fb438d">ANativeActivity</a>
-</li>
-<li>azimuth
-: <a class="el" href="struct_a_sensor_vector.html#a01b03ebfa7d0a95760e743f611fecbc5">ASensorVector</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
-<li>bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a52bd7f09c4decadcfbc0347fda4163d6">AUncalibratedEvent</a>
-</li>
-<li>bits
-: <a class="el" href="struct_a_native_window___buffer.html#a089d8e968fac54a9e45f059b8b78cf9b">ANativeWindow_Buffer</a>
-</li>
-<li>bottom
-: <a class="el" href="struct_a_rect.html#a4479860c72ca8e96ac4fb1cc149dd71b">ARect</a>
-</li>
-<li>bpm
-: <a class="el" href="struct_a_heart_rate_event.html#ab0560092cbaa233e74bb0d543a85965d">AHeartRateEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
-<li>callbacks
-: <a class="el" href="struct_a_native_activity.html#af96995a13e77baf0d71c37d20c79ad51">ANativeActivity</a>
-</li>
-<li>clazz
-: <a class="el" href="struct_a_native_activity.html#ab10b01c3c23c4ddb9d2ddadd71b03c94">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
-<li>data
-: <a class="el" href="struct_a_sensor_event.html#a31244897a6c7f657a9aec807dd1e09ae">ASensorEvent</a>
-</li>
-<li>distance
-: <a class="el" href="struct_a_sensor_event.html#a06f14a9abd47b91465f895d5259cdc1b">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
-<li>env
-: <a class="el" href="struct_a_native_activity.html#ae6f0d0cd46e56b7e299b489cb60dd27e">ANativeActivity</a>
-</li>
-<li>externalDataPath
-: <a class="el" href="struct_a_native_activity.html#a2a61553b2f660ea8b57fcc2b495e109f">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
-<li>flags
-: <a class="el" href="struct_android_bitmap_info.html#a773b39d480759f67926cb18ae2219281">AndroidBitmapInfo</a>
-, <a class="el" href="struct_a_sensor_event.html#a773b39d480759f67926cb18ae2219281">ASensorEvent</a>
-</li>
-<li>format
-: <a class="el" href="struct_a_native_window___buffer.html#a49d503b84d084937e3ceeda9f0b4659e">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a49d503b84d084937e3ceeda9f0b4659e">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
-<li>heart_rate
-: <a class="el" href="struct_a_sensor_event.html#a2325abb12f65d7cbceec766e6db506d8">ASensorEvent</a>
-</li>
-<li>height
-: <a class="el" href="struct_a_native_window___buffer.html#a5d8006e753a3e76ff637a4e092bbed71">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a6ad4f820ce4e75cda0686fcaad5168be">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
-<li>instance
-: <a class="el" href="struct_a_native_activity.html#ae1b90392cd257d16fd66a85bac1b08cd">ANativeActivity</a>
-</li>
-<li>internalDataPath
-: <a class="el" href="struct_a_native_activity.html#aa52947cdd1476b95e858d83c0f5b0220">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
-<li>left
-: <a class="el" href="struct_a_rect.html#a9ee4ce87784b0ebeaadce132ce7d421f">ARect</a>
-</li>
-<li>light
-: <a class="el" href="struct_a_sensor_event.html#aaf8b2537020ae0b7450785724d77a3e0">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
-<li>magnetic
-: <a class="el" href="struct_a_sensor_event.html#a776bc8e3beff52764ef2d6d423563d64">ASensorEvent</a>
-</li>
-<li>meta_data
-: <a class="el" href="struct_a_sensor_event.html#a40a6e69697a42e0f0ad04a09d7f113d3">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_o"></a>- o -</h3><ul>
-<li>obbPath
-: <a class="el" href="struct_a_native_activity.html#a0aff284eb9ab311d81f20955258798cf">ANativeActivity</a>
-</li>
-<li>onConfigurationChanged
-: <a class="el" href="struct_a_native_activity_callbacks.html#a2926b45334319089e4e25fbc86d74c3f">ANativeActivityCallbacks</a>
-</li>
-<li>onContentRectChanged
-: <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks</a>
-</li>
-<li>onDestroy
-: <a class="el" href="struct_a_native_activity_callbacks.html#a45598ebed3d15847b4f97acb9e15076e">ANativeActivityCallbacks</a>
-</li>
-<li>onInputQueueCreated
-: <a class="el" href="struct_a_native_activity_callbacks.html#a17b41ec9bb8b0b9e42d1e269a62a4d59">ANativeActivityCallbacks</a>
-</li>
-<li>onInputQueueDestroyed
-: <a class="el" href="struct_a_native_activity_callbacks.html#a82675193f867bc64180016923b0bb129">ANativeActivityCallbacks</a>
-</li>
-<li>onLowMemory
-: <a class="el" href="struct_a_native_activity_callbacks.html#aac61f647cbd971321c692a74a1136f67">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowCreated
-: <a class="el" href="struct_a_native_activity_callbacks.html#ac997f07e53ba58179a2133e86e5cbd31">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowDestroyed
-: <a class="el" href="struct_a_native_activity_callbacks.html#a150442c0611e8ce24a32a7c805e7c9db">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowRedrawNeeded
-: <a class="el" href="struct_a_native_activity_callbacks.html#a3cad4792af363b9a40599d09afeab56c">ANativeActivityCallbacks</a>
-</li>
-<li>onNativeWindowResized
-: <a class="el" href="struct_a_native_activity_callbacks.html#ab7bd120b8816508561126308f699f116">ANativeActivityCallbacks</a>
-</li>
-<li>onPause
-: <a class="el" href="struct_a_native_activity_callbacks.html#aee8a4dcff234b94d0bf0bc85efea42c2">ANativeActivityCallbacks</a>
-</li>
-<li>onResume
-: <a class="el" href="struct_a_native_activity_callbacks.html#ac2c85491a68e6dece3d82782c1254e73">ANativeActivityCallbacks</a>
-</li>
-<li>onSaveInstanceState
-: <a class="el" href="struct_a_native_activity_callbacks.html#a16a270d24a484a376e28bc6c48fc22a1">ANativeActivityCallbacks</a>
-</li>
-<li>onStart
-: <a class="el" href="struct_a_native_activity_callbacks.html#acda344fd29c2018640a85a585317d92c">ANativeActivityCallbacks</a>
-</li>
-<li>onStop
-: <a class="el" href="struct_a_native_activity_callbacks.html#adefa99d16d11d21bb8a83ba426047605">ANativeActivityCallbacks</a>
-</li>
-<li>onWindowFocusChanged
-: <a class="el" href="struct_a_native_activity_callbacks.html#a620ef54556eac0b2b28d7e6d0644ee4a">ANativeActivityCallbacks</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
-<li>pitch
-: <a class="el" href="struct_a_sensor_vector.html#a282e7d4378d4a18a805b8980295ac86c">ASensorVector</a>
-</li>
-<li>pressure
-: <a class="el" href="struct_a_sensor_event.html#ac870e1249bab4a2a68cc4126761d24ef">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
-<li>relative_humidity
-: <a class="el" href="struct_a_sensor_event.html#ad60830bc80efb7e8a11d6fb25518f55b">ASensorEvent</a>
-</li>
-<li>reserved
-: <a class="el" href="struct_a_native_window___buffer.html#a60cc5aad4013157e2e7434d6de450656">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_a_sensor_vector.html#a72aca6ea6d8153b28ea8f139b932ec3e">ASensorVector</a>
-</li>
-<li>reserved0
-: <a class="el" href="struct_a_sensor_event.html#a3b1869501b35bf41f2ff54de072b6c2c">ASensorEvent</a>
-</li>
-<li>reserved1
-: <a class="el" href="struct_a_sensor_event.html#a3c2ed5a26d302c47f7b3f2dd0bbf7f94">ASensorEvent</a>
-</li>
-<li>right
-: <a class="el" href="struct_a_rect.html#a3d3a4d6bf8bc6c866fa737e11590cc4e">ARect</a>
-</li>
-<li>roll
-: <a class="el" href="struct_a_sensor_vector.html#a26fd84d522945b6038221d9e38c7cc39">ASensorVector</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
-<li>sdkVersion
-: <a class="el" href="struct_a_native_activity.html#a40b4b64be7ecfac23751618313eb610d">ANativeActivity</a>
-</li>
-<li>sensor
-: <a class="el" href="struct_a_meta_data_event.html#a470f19badf179fe205462c060e5175b4">AMetaDataEvent</a>
-, <a class="el" href="struct_a_sensor_event.html#a470f19badf179fe205462c060e5175b4">ASensorEvent</a>
-</li>
-<li>status
-: <a class="el" href="struct_a_heart_rate_event.html#a555c2084e8436de01dc76a23590e8824">AHeartRateEvent</a>
-, <a class="el" href="struct_a_sensor_vector.html#a555c2084e8436de01dc76a23590e8824">ASensorVector</a>
-</li>
-<li>step_counter
-: <a class="el" href="struct_a_sensor_event.html#a2e54280490afc977b11157e387841145">ASensorEvent</a>
-</li>
-<li>stride
-: <a class="el" href="struct_a_native_window___buffer.html#a4438e3445d33be6d33b2c0dbe9c2e0d7">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a981556a4e63b7b6d9f94975c7a8930ab">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
-<li>temperature
-: <a class="el" href="struct_a_sensor_event.html#afc1d28cfbce795d6ea954ebe725241f5">ASensorEvent</a>
-</li>
-<li>timestamp
-: <a class="el" href="struct_a_sensor_event.html#a8a591d341723df9496cda98e225b25b4">ASensorEvent</a>
-</li>
-<li>top
-: <a class="el" href="struct_a_rect.html#ad07137116129d873220209ea65f9d3d4">ARect</a>
-</li>
-<li>type
-: <a class="el" href="struct_a_sensor_event.html#a449e574ed6911881dc55507cb5635c2c">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
-<li>u64
-: <a class="el" href="struct_a_sensor_event.html#a89806d4445310e62ed4b68c9e2698b27">ASensorEvent</a>
-</li>
-<li>uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#a9c22454e765672782b7198d57a92f5fd">AUncalibratedEvent</a>
-</li>
-<li>uncalibrated_gyro
-: <a class="el" href="struct_a_sensor_event.html#a4e35158edcd83e4651d7083ebdb41bae">ASensorEvent</a>
-</li>
-<li>uncalibrated_magnetic
-: <a class="el" href="struct_a_sensor_event.html#a3c746f01a48fbdefaad12c35be0dd715">ASensorEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
-<li>v
-: <a class="el" href="struct_a_sensor_vector.html#a9a1a1a00f1e45435cc3001b553000a21">ASensorVector</a>
-</li>
-<li>vector
-: <a class="el" href="struct_a_sensor_event.html#aebf12879fa9b61c671584994ddad9610">ASensorEvent</a>
-</li>
-<li>version
-: <a class="el" href="struct_a_sensor_event.html#a67fae7dd1de9edce3656ed214d20377f">ASensorEvent</a>
-</li>
-<li>vm
-: <a class="el" href="struct_a_native_activity.html#a5e163c28566d4563eafeabd7dcab7eeb">ANativeActivity</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
-<li>what
-: <a class="el" href="struct_a_meta_data_event.html#a397e31e246d23c1be3fa82ca4af8b930">AMetaDataEvent</a>
-</li>
-<li>width
-: <a class="el" href="struct_a_native_window___buffer.html#a395d15e7c2b09961c1bfd1da6179b64c">ANativeWindow_Buffer</a>
-, <a class="el" href="struct_android_bitmap_info.html#a325272ddd9a962f05deb905101d25cbd">AndroidBitmapInfo</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_x"></a>- x -</h3><ul>
-<li>x
-: <a class="el" href="struct_a_sensor_vector.html#ad0da36b2558901e21e7a30f6c227a45e">ASensorVector</a>
-</li>
-<li>x_bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a56c4ea73587a9ea20595cca9bcfe9593">AUncalibratedEvent</a>
-</li>
-<li>x_uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#ac8b7f8daea042eaa2b86f0bf2160c44a">AUncalibratedEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_y"></a>- y -</h3><ul>
-<li>y
-: <a class="el" href="struct_a_sensor_vector.html#aa4f0d3eebc3c443f9be81bf48561a217">ASensorVector</a>
-</li>
-<li>y_bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a130457eaa905b467bc43fedb02cbb16a">AUncalibratedEvent</a>
-</li>
-<li>y_uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#a43437dd77e26c6b89ab1c91aeb63fd64">AUncalibratedEvent</a>
-</li>
-</ul>
-
-
-<h3><a class="anchor" id="index_z"></a>- z -</h3><ul>
-<li>z
-: <a class="el" href="struct_a_sensor_vector.html#af73583b1e980b0aa03f9884812e9fd4d">ASensorVector</a>
-</li>
-<li>z_bias
-: <a class="el" href="struct_a_uncalibrated_event.html#a6e265324293107afbfa9e587941a4036">AUncalibratedEvent</a>
-</li>
-<li>z_uncalib
-: <a class="el" href="struct_a_uncalibrated_event.html#ae677be5f98570cc5a1fd7fddcd8a6841">AUncalibratedEvent</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals.jd b/docs/html/ndk/reference/globals.jd
deleted file mode 100644
index cb6dc11..0000000
--- a/docs/html/ndk/reference/globals.jd
+++ /dev/null
@@ -1,2294 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div>
-
-<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
-<li>AAsset
-: <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">asset_manager.h</a>
-</li>
-<li>AAsset_close()
-: <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">asset_manager.h</a>
-</li>
-<li>AAsset_getBuffer()
-: <a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">asset_manager.h</a>
-</li>
-<li>AAsset_getLength()
-: <a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">asset_manager.h</a>
-</li>
-<li>AAsset_getLength64()
-: <a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">asset_manager.h</a>
-</li>
-<li>AAsset_getRemainingLength()
-: <a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">asset_manager.h</a>
-</li>
-<li>AAsset_getRemainingLength64()
-: <a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">asset_manager.h</a>
-</li>
-<li>AAsset_isAllocated()
-: <a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_BUFFER
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_RANDOM
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_STREAMING
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_UNKNOWN
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">asset_manager.h</a>
-</li>
-<li>AAsset_openFileDescriptor()
-: <a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">asset_manager.h</a>
-</li>
-<li>AAsset_openFileDescriptor64()
-: <a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">asset_manager.h</a>
-</li>
-<li>AAsset_read()
-: <a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">asset_manager.h</a>
-</li>
-<li>AAsset_seek()
-: <a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">asset_manager.h</a>
-</li>
-<li>AAsset_seek64()
-: <a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">asset_manager.h</a>
-</li>
-<li>AAssetDir
-: <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">asset_manager.h</a>
-</li>
-<li>AAssetDir_close()
-: <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">asset_manager.h</a>
-</li>
-<li>AAssetDir_getNextFileName()
-: <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">asset_manager.h</a>
-</li>
-<li>AAssetDir_rewind()
-: <a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">asset_manager.h</a>
-</li>
-<li>AAssetManager
-: <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">asset_manager.h</a>
-</li>
-<li>AAssetManager_fromJava()
-: <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">asset_manager_jni.h</a>
-</li>
-<li>AAssetManager_open()
-: <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">asset_manager.h</a>
-</li>
-<li>AAssetManager_openDir()
-: <a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">asset_manager.h</a>
-</li>
-<li>AConfiguration
-: <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">configuration.h</a>
-</li>
-<li>AConfiguration_copy()
-: <a class="el" href="group___configuration.html#gaabff04218a0a76afb8d3ea551b001565">configuration.h</a>
-</li>
-<li>AConfiguration_delete()
-: <a class="el" href="group___configuration.html#ga60fe264b97da84d3370eb9e220159e6d">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace87b4f25e5fd6fe0f3316d21ecc66a1">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a966a3855351a97ae865264afd74c1534">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_DEFAULT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae628b2bf594733b7c19ae394616cec6c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_HIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5ef4a97dc058235cdfa9fcfe3300c7eb">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_LOW
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ddb34b2376422d2323720049eb57f3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_MEDIUM
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2511479d7cd574c4b293d535e4dc337e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_NONE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a7c1af92914155c418b99844c6aab33d7">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_TV
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10e6c3d636f3f6de75de9208913b0d8f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_XHIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a38a03b3b1c64725679605d8d479c85a0">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_XXHIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad6353daf63778a6ec6f2bd3815d7e6e4">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_XXXHIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2bd04af33e868a77bd4d83e7d70368ec">configuration.h</a>
-</li>
-<li>AConfiguration_diff()
-: <a class="el" href="group___configuration.html#gabfe69b0dccae425a16fe94d084f20402">configuration.h</a>
-</li>
-<li>AConfiguration_fromAssetManager()
-: <a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">configuration.h</a>
-</li>
-<li>AConfiguration_getCountry()
-: <a class="el" href="group___configuration.html#gad2b47f787012a82a67a20e5de5211d46">configuration.h</a>
-</li>
-<li>AConfiguration_getDensity()
-: <a class="el" href="group___configuration.html#ga4c994e0555947340582094c3da32a663">configuration.h</a>
-</li>
-<li>AConfiguration_getKeyboard()
-: <a class="el" href="group___configuration.html#gafd0f76ccd4fe4bda5172b8e0bc6675e4">configuration.h</a>
-</li>
-<li>AConfiguration_getKeysHidden()
-: <a class="el" href="group___configuration.html#ga7a8317ab975f621f3fe62ed1b44f2605">configuration.h</a>
-</li>
-<li>AConfiguration_getLanguage()
-: <a class="el" href="group___configuration.html#ga7b004c13448704afb0ea2040d69468c1">configuration.h</a>
-</li>
-<li>AConfiguration_getLayoutDirection()
-: <a class="el" href="group___configuration.html#ga13dbf2fc9a382c62b391e7de9cf9b468">configuration.h</a>
-</li>
-<li>AConfiguration_getMcc()
-: <a class="el" href="group___configuration.html#ga1e78004237a931086d2ae4bd8324bd30">configuration.h</a>
-</li>
-<li>AConfiguration_getMnc()
-: <a class="el" href="group___configuration.html#ga4783776a4fad4501898472375d781fb9">configuration.h</a>
-</li>
-<li>AConfiguration_getNavHidden()
-: <a class="el" href="group___configuration.html#gafe8d3a9c2f715ea76c8e4a99c2db9eaa">configuration.h</a>
-</li>
-<li>AConfiguration_getNavigation()
-: <a class="el" href="group___configuration.html#gae3ff1541b63f5b9256f7c0ebae372977">configuration.h</a>
-</li>
-<li>AConfiguration_getOrientation()
-: <a class="el" href="group___configuration.html#gaa7d8e3e9871dc925fef3e342a92e4e22">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenHeightDp()
-: <a class="el" href="group___configuration.html#ga9905a4765f8d0d921c476ebce01c7648">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenLong()
-: <a class="el" href="group___configuration.html#gab7d1f5aa59e8fa4db0a1b91bb322034c">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenSize()
-: <a class="el" href="group___configuration.html#ga9d2c1b8731795d8e74be7e23cbc77552">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenWidthDp()
-: <a class="el" href="group___configuration.html#ga61e5fe9612c170c33e1c7e9fb92f2219">configuration.h</a>
-</li>
-<li>AConfiguration_getSdkVersion()
-: <a class="el" href="group___configuration.html#ga4aa7062198e5aacd9fabb04d0453dd91">configuration.h</a>
-</li>
-<li>AConfiguration_getSmallestScreenWidthDp()
-: <a class="el" href="group___configuration.html#ga7fc015e41fad342edba66a003d9848aa">configuration.h</a>
-</li>
-<li>AConfiguration_getTouchscreen()
-: <a class="el" href="group___configuration.html#gad305e6cf86fa915c24212e71bb2bf027">configuration.h</a>
-</li>
-<li>AConfiguration_getUiModeNight()
-: <a class="el" href="group___configuration.html#ga447f16a9e4f8400e5e0328900749ff16">configuration.h</a>
-</li>
-<li>AConfiguration_getUiModeType()
-: <a class="el" href="group___configuration.html#ga1d75777892f38208feb3d2a94a977fcf">configuration.h</a>
-</li>
-<li>AConfiguration_isBetterThan()
-: <a class="el" href="group___configuration.html#gafd2bb31057c8d57efcea7603458d2a8d">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0195de2a57f028a8171c42beff0b0e88">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_12KEY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1aaf1a887f146737030cce95c53066ea">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a593f722738682ae4500dab6427670f4a">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_HIDDEN
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a54e71234e32ed037e2d47472f80eb416">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_NOKEYS
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a40195a1a2d8e21c74d99606d8a1a9918">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_QWERTY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a263ff8efb4d2c757e557adc0d0cdeedf">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a34d3a830bc2964000052f8486fd76b0c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5abfbfc3a10affed059263555b00429ab2">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_SOFT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1a56b72c730e40f22f3b8727e54c376c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5e6a5a3f4175644886bde7d0ed4b1ebf">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65834be1230d1694e5ce8a6f407acab2">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4687ede31c438dd9f2701cab88de1dbe">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR_LTR
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a05242d8f2d254b43ff9414ff1aa38a83">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR_RTL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af98332983b787ab9355b527079636870">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LOCALE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ecff796bd0690a9a8498c7de03e9b4">configuration.h</a>
-</li>
-<li>AConfiguration_match()
-: <a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">configuration.h</a>
-</li>
-<li>ACONFIGURATION_MCC
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4d40f2aef365c78a52f699b89439db28">configuration.h</a>
-</li>
-<li>ACONFIGURATION_MNC
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ade91a319638eede201579d15f86578a5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_MNC_ZERO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa6cda2f222580dbef27f1277d967d58c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVHIDDEN_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a6db7dd6a67196df88117dcdc904e0cb3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVHIDDEN_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae6ff9883e3e89f8d9ea5c0ebe077c9c5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVHIDDEN_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a79b3a5fe10e948bb79db47b516d46cf5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65e9d31615d2b4adf3738d9a12a1556b">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90e914b60d28c081b313f4b7b6600f47">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_DPAD
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace2e3ed21322100712992ca09f4b75b5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_NONAV
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a3d95e899305aeae366fb7f8d8b6c290a">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_TRACKBALL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad2807d00cb2f5dcb9f456045dd8443a4">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_WHEEL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a80b53370f65ad283a4fd025f36422bea">configuration.h</a>
-</li>
-<li>AConfiguration_new()
-: <a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a591461d864136d482fe06e01fd945786">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af44cee3290a23999b0358c5638747a5f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_LAND
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad5746872ff6871379fca93c60bfac8a3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_PORT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad9bf5c1fb90f9fdb20f984d0574592fe">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_SQUARE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_HEIGHT_DP_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab66ad42d0cf72fd7e8cd99b92b625432">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_LAYOUT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a12d69ffef9135c1c55e1b8b5c2589e7c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_SIZE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a76ca1eb0e9346d93da592afbbf9a3b72">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_WIDTH_DP_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aad653f0c960112177fdc387a4a0577fa">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENLONG_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a41e55e57da42fd09c378f59c1a63710f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENLONG_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a428bb8fcd8bc731b67b0773dc62781c5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENLONG_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a91fc014d328507568d225d691b3babfd">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a9abcd34a6c549e048fc75a545081584e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_LARGE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af871d177fdceedb75612cfc1281d2c12">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_NORMAL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a019727e684f25ba921f3479abd62b9f2">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_SMALL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1163af972206a65a5d18bda12fdc511c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_XLARGE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0ca385ed504fc92f6ff3f0857e916c9c">configuration.h</a>
-</li>
-<li>AConfiguration_setCountry()
-: <a class="el" href="group___configuration.html#gac2f5d414a6466634b1639b5c6f8879ac">configuration.h</a>
-</li>
-<li>AConfiguration_setDensity()
-: <a class="el" href="group___configuration.html#ga9217af9858a7166dcb9a877192779eac">configuration.h</a>
-</li>
-<li>AConfiguration_setKeyboard()
-: <a class="el" href="group___configuration.html#ga4ab3429c5505c108c09349f1ddef572f">configuration.h</a>
-</li>
-<li>AConfiguration_setKeysHidden()
-: <a class="el" href="group___configuration.html#ga5a80a02aa10cfa17de0795054e927183">configuration.h</a>
-</li>
-<li>AConfiguration_setLanguage()
-: <a class="el" href="group___configuration.html#ga1f3c6cf6667655f83777acda7387ddff">configuration.h</a>
-</li>
-<li>AConfiguration_setLayoutDirection()
-: <a class="el" href="group___configuration.html#gaaf47215cf551594f8c2a0594419b47e1">configuration.h</a>
-</li>
-<li>AConfiguration_setMcc()
-: <a class="el" href="group___configuration.html#gae6198b4eaf3e34168f4b13b8b5975d93">configuration.h</a>
-</li>
-<li>AConfiguration_setMnc()
-: <a class="el" href="group___configuration.html#gaaf060ef69c3636f62e90ae0b520eecb8">configuration.h</a>
-</li>
-<li>AConfiguration_setNavHidden()
-: <a class="el" href="group___configuration.html#ga67e86e0347596421771af841710308d5">configuration.h</a>
-</li>
-<li>AConfiguration_setNavigation()
-: <a class="el" href="group___configuration.html#gad21dd14fb823a6a80b66132a05ce8913">configuration.h</a>
-</li>
-<li>AConfiguration_setOrientation()
-: <a class="el" href="group___configuration.html#gadcaa8540bad4172a74032143bcaade04">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenHeightDp()
-: <a class="el" href="group___configuration.html#ga6ffac3b41415ec8a3031737ccdcd63b8">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenLong()
-: <a class="el" href="group___configuration.html#gaed853ab7e2bc915591d05997130bc448">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenSize()
-: <a class="el" href="group___configuration.html#ga7bcf05150933ead34a01061d05ad3245">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenWidthDp()
-: <a class="el" href="group___configuration.html#gafc51d45679095965fe3ba1abd402f120">configuration.h</a>
-</li>
-<li>AConfiguration_setSdkVersion()
-: <a class="el" href="group___configuration.html#ga06c66072902ee455011120188ca4810b">configuration.h</a>
-</li>
-<li>AConfiguration_setSmallestScreenWidthDp()
-: <a class="el" href="group___configuration.html#ga6b004c9585671efc5cebd96c1d43c4f0">configuration.h</a>
-</li>
-<li>AConfiguration_setTouchscreen()
-: <a class="el" href="group___configuration.html#ga0d51dbe710c1afe31ece4dd6a8c188ff">configuration.h</a>
-</li>
-<li>AConfiguration_setUiModeNight()
-: <a class="el" href="group___configuration.html#ga08df1e801afbe4a12411e393b8141e42">configuration.h</a>
-</li>
-<li>AConfiguration_setUiModeType()
-: <a class="el" href="group___configuration.html#gaec61e3cf91cd79e8b76a35bbcb15789d">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SMALLEST_SCREEN_SIZE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5acce415252e0ad95117a05bbe910f06de">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a227120217d8b6a9d5add3ccc4b283702">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a255cfb57ac18d460c5614565a84f5561">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa73bcf45261366840fea743372682fa6">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_FINGER
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4bf2a8323ec6d072aa48d5fc2cff645e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_NOTOUCH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5adfbeb370edd3b4372c9b0f86f152dde0">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_STYLUS
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a43a324af59372efd08b34431825cf67e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_NIGHT_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a975087bbd4087b57a68ef3cdbfeb77a1">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_NIGHT_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90ebe564e3a3e384d5b013100f81e4b7">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_NIGHT_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a437af4527fac5407de256ec1ef055046">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10d0916da7fa88c945a9cda259407d4c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_APPLIANCE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad99004a7a1b2a97d29b639664947f8e3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_CAR
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5d6575185e41d909469a1dcf5f81bf4f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_DESK
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae10bb854f461f60cf399852f8f327077">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_NORMAL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae7efe2713b6718311da76c828b5b444e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_TELEVISION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4738dded616f028fbbedcbad764e7969">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_WATCH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ac8c3e2207f2356bc6a1dffc6a615d131">configuration.h</a>
-</li>
-<li>ACONFIGURATION_VERSION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1be62e4fc31cf3d3102c99f7c6b4c71b">configuration.h</a>
-</li>
-<li>AHeartRateEvent
-: <a class="el" href="group___sensor.html#gae85b6eac76abe74e6e53d78bb3a4858c">sensor.h</a>
-</li>
-<li>AINPUT_EVENT_TYPE_KEY
-: <a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea696f0d7635f7a24c17d3f1e4ccdd44ba">input.h</a>
-</li>
-<li>AINPUT_EVENT_TYPE_MOTION
-: <a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea2182dfda2cceb5425dcc2823b9b6b56a">input.h</a>
-</li>
-<li>AINPUT_KEYBOARD_TYPE_ALPHABETIC
-: <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaba1f5ab6bc79749ba96a5d2a3af0e574">input.h</a>
-</li>
-<li>AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC
-: <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaf0226d750ea830eb557ae68bd4a1c82a">input.h</a>
-</li>
-<li>AINPUT_KEYBOARD_TYPE_NONE
-: <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fcea32cb7ce34cdce7095962f0766cc6c3ac">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_ORIENTATION
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaf9be9c04a41b610d994a3d1d7e90d06d">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_PRESSURE
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa79aca706b12b28d0ab14762902fed31a">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_SIZE
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa46f3a6cf859fb161cd29398d8448c688">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOOL_MAJOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaa860f54aa9e5a269dba6a54bbcf3c27c">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOOL_MINOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa19226f6cf713c1b4d0973a163daf6cf1">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOUCH_MAJOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa7ead43624c96e165fd8a25e77148aa67">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOUCH_MINOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa301181a0f20681135c15010b39bb575d">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_X
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa0e5816bc48cdb33f2b488a109596ffe1">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_Y
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaab48108c9450ea1b7cd021be7d8cbc332">input.h</a>
-</li>
-<li>AINPUT_SOURCE_ANY
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ab04317e7dd273ff5c87038df67d9796e">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_BUTTON
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dacf1bf3d7b3c6e59f907bdffc9b33370e">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_JOYSTICK
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daaaeffb6442807dd96ec62e9d8a696b57">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_MASK
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daae438f475d03ea60fd9fb356abd7fa01">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_NAVIGATION
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da078a18d85d078412721c336a879bcc1a">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_NONE
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dafd6d5e71f09f6452acf017559481444c">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_POINTER
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da7495274e98fb30dee3dfd903b878cf47">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_POSITION
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da682f6982bb55ee809f6acd2deb550167">input.h</a>
-</li>
-<li>AINPUT_SOURCE_DPAD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ad0fbfeff9f8d57104bff14c70ce5e3ef">input.h</a>
-</li>
-<li>AINPUT_SOURCE_GAMEPAD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a6417cb50ecd6ade48c708268434a49d3">input.h</a>
-</li>
-<li>AINPUT_SOURCE_JOYSTICK
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25afb28f10dc074e7f7435f5904c513edb5">input.h</a>
-</li>
-<li>AINPUT_SOURCE_KEYBOARD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a9860918666dd8c0b9d00a8da7af51e6d">input.h</a>
-</li>
-<li>AINPUT_SOURCE_MOUSE
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae71d3dcbd004bccb6e00fde47097cd86">input.h</a>
-</li>
-<li>AINPUT_SOURCE_STYLUS
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a86d4983c71432b27634ba41a64bffdf9">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TOUCH_NAVIGATION
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a3712c4e4fb8ad7f6ae6e40d48e5c6ee7">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TOUCHPAD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e0715d4b544653ab11893434172a2ef">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TOUCHSCREEN
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a55ea411f927aed8964fa72fec0da444f">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TRACKBALL
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e49d9153c86f60f626d7f797f4e78b6">input.h</a>
-</li>
-<li>AINPUT_SOURCE_UNKNOWN
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae9348bc04cdaa88b5b010f77a4945454">input.h</a>
-</li>
-<li>AInputEvent
-: <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">input.h</a>
-</li>
-<li>AInputEvent_getDeviceId()
-: <a class="el" href="group___input.html#ga9dd3fd81e51dbfde19ab861541242aa1">input.h</a>
-</li>
-<li>AInputEvent_getSource()
-: <a class="el" href="group___input.html#gac90d4b497669dbc709ec9650db4e49be">input.h</a>
-</li>
-<li>AInputEvent_getType()
-: <a class="el" href="group___input.html#ga8292ae06aa8120c52d7380d228600b9c">input.h</a>
-</li>
-<li>AInputQueue
-: <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">input.h</a>
-</li>
-<li>AInputQueue_attachLooper()
-: <a class="el" href="group___input.html#ga900711156bfb58d1a4b158da7874930f">input.h</a>
-</li>
-<li>AInputQueue_detachLooper()
-: <a class="el" href="group___input.html#gaeebe9f83392ac79b31ca40a6fd4dbeff">input.h</a>
-</li>
-<li>AInputQueue_finishEvent()
-: <a class="el" href="group___input.html#ga17e87e0f35d47d729eac31a0dfb1ac33">input.h</a>
-</li>
-<li>AInputQueue_getEvent()
-: <a class="el" href="group___input.html#ga88de12e2b39787ba7d3e4ce2ea46a48c">input.h</a>
-</li>
-<li>AInputQueue_hasEvents()
-: <a class="el" href="group___input.html#ga2b72ad6ab5ef656e8c41163aa7871c96">input.h</a>
-</li>
-<li>AInputQueue_preDispatchEvent()
-: <a class="el" href="group___input.html#gadecd32e6c7aefa4a508b355550d3eaa9">input.h</a>
-</li>
-<li>AKEY_EVENT_ACTION_DOWN
-: <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a123c3bd18fd93b53d8aedbe7597f7b49">input.h</a>
-</li>
-<li>AKEY_EVENT_ACTION_MULTIPLE
-: <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a08e2d927e155478ee66ec46ebd845ab0">input.h</a>
-</li>
-<li>AKEY_EVENT_ACTION_UP
-: <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635abf18b7c5384c5de8657a0650f8da57c3">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_CANCELED
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da3198fad5ab75df614bb41f0f602a9e55">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_CANCELED_LONG_PRESS
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2daf09856f03f2fffee9a82cb8e508efb7a">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_EDITOR_ACTION
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dab9dbcf990d1e4405e32f847fdea52013">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_FALLBACK
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da14f574126d2544863fa8042ddd0f48c0">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_FROM_SYSTEM
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dae1e7ec188b2404fadd94cfba89afd5d6">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_KEEP_TOUCH_MODE
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dadc0a063ca412b0ea08474df422bf9b41">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_LONG_PRESS
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da39f9f7bdf2e256db0e2a8a5dfbfb7185">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_SOFT_KEYBOARD
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da7dbb272c7b28be9c084df3446a629f32">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_TRACKING
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da91e70ab527f27a1779f4550d457f1689">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dad4b5eba5b14e4076c69bc7185f2804f8">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_WOKE_HERE
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da6473a1afc0cc39e029c2a217bc57cdba">input.h</a>
-</li>
-<li>AKEY_STATE_DOWN
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a286ec0a7aff5903a982be0cd6785b62c">input.h</a>
-</li>
-<li>AKEY_STATE_UNKNOWN
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a9506627d5377c67dbc7fc58804b2cdfd">input.h</a>
-</li>
-<li>AKEY_STATE_UP
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04afa14022f587487c24d401c87e71c8e28">input.h</a>
-</li>
-<li>AKEY_STATE_VIRTUAL
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04ad09fd9fe458ca6c66ead9b9a75c56192">input.h</a>
-</li>
-<li>AKEYCODE_0
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23f585ea17aeceaad2111c51ab289e79">keycodes.h</a>
-</li>
-<li>AKEYCODE_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabcac88b54f8d764bc4573ecc5b9571b0">keycodes.h</a>
-</li>
-<li>AKEYCODE_11
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa22858c3c30d596ad60f355f75df86e1">keycodes.h</a>
-</li>
-<li>AKEYCODE_12
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa781c31195e55b2dcbdd772560dc61aa5">keycodes.h</a>
-</li>
-<li>AKEYCODE_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2079c6fb75141968b60ed79fe895d6db">keycodes.h</a>
-</li>
-<li>AKEYCODE_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa40ccc018c0637e4d938e66b789054551">keycodes.h</a>
-</li>
-<li>AKEYCODE_3D_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68d314a5ec06701205cd0097c5c7145c">keycodes.h</a>
-</li>
-<li>AKEYCODE_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c2d141c3906bd97cfec91443356f7b">keycodes.h</a>
-</li>
-<li>AKEYCODE_5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca99d2be4a3723ba3406944ad623f6e">keycodes.h</a>
-</li>
-<li>AKEYCODE_6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa72bc6560e24d08ff8f3116dac9179079">keycodes.h</a>
-</li>
-<li>AKEYCODE_7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa27070499acdb6c527a285b3840ec7bff">keycodes.h</a>
-</li>
-<li>AKEYCODE_8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93543b23683b33724ecf77ac5a8c19ab">keycodes.h</a>
-</li>
-<li>AKEYCODE_9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa31cd4d7c4e59cf7b057b6c248cff516d">keycodes.h</a>
-</li>
-<li>AKEYCODE_A
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa424a091c62d40f5d65908c9730ae9014">keycodes.h</a>
-</li>
-<li>AKEYCODE_ALT_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3dec175158abe8679bedd98ed1bc3e1a">keycodes.h</a>
-</li>
-<li>AKEYCODE_ALT_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd9b6b0846c6999f5df47d29e58ac95d">keycodes.h</a>
-</li>
-<li>AKEYCODE_APOSTROPHE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab5518a8502914ea5f87ef5d29b32b1b1">keycodes.h</a>
-</li>
-<li>AKEYCODE_APP_SWITCH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa53a59a262d6d523bdc2bd30a1e427bad">keycodes.h</a>
-</li>
-<li>AKEYCODE_ASSIST
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3f036adb654c7752890a283ecbf838">keycodes.h</a>
-</li>
-<li>AKEYCODE_AT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7284f79a266ede479b79726082642e16">keycodes.h</a>
-</li>
-<li>AKEYCODE_AVR_INPUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa57d42dbd8ea4219f76fb116f234e6504">keycodes.h</a>
-</li>
-<li>AKEYCODE_AVR_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa479d36f9814bd00c8986a252664b938b">keycodes.h</a>
-</li>
-<li>AKEYCODE_B
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa65d3bf8d6a8a6c2f7c1b08394f313758">keycodes.h</a>
-</li>
-<li>AKEYCODE_BACK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeb71c74bf556ba72e9c8f8dcbe5453d0">keycodes.h</a>
-</li>
-<li>AKEYCODE_BACKSLASH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac90eb064382e3c482ae86abb7b3f701">keycodes.h</a>
-</li>
-<li>AKEYCODE_BOOKMARK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa03ce46d177e020690aa9d26a0fa850ae">keycodes.h</a>
-</li>
-<li>AKEYCODE_BREAK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa047501f9cf9bce00e6048d8759ea3a23">keycodes.h</a>
-</li>
-<li>AKEYCODE_BRIGHTNESS_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7cf1bf3528b6d8a0e86998287fe00650">keycodes.h</a>
-</li>
-<li>AKEYCODE_BRIGHTNESS_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0af6ec416c09d160e364466faa955c36">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa28c72c33ab93d83539d0790b7e48336a">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_10
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7e6f8621909f3461032c33f9c8acaa7">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_11
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab413971c698b6e25d3955667c0142ac1">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_12
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafe4ee1e5446dd12bbb579b412048e79e">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_13
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaabde2ed26594b89d5769eef9f0d1fe6f">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_14
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f08dfd2c30ddedf1d2983680e89041b">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_15
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d8d0fb1a610fdb4e53f0fb675b7d7d0">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_16
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa224370cba99bda2db6a1c82fd2f7fa39">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab8089673fea303c7a299eefd2c327cc3">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa706a5ff492c80b4653e6fe0dcd278ca1">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c425a063bf6976e1ff8ae9f3cfcbe6">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47149f963528ec7abe55066abfb7caf5">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55057c8cda53a4c539d02ab1a93ca58b">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac09e0c0cbbf6449bf106e4199600db35">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaee64b3e0f30ed09e3c9f01b6c8877c3f">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac8e54092c8be5dc0e114ec35f40e00dc">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_A
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaef2d2ec912aaa9e7215aeab79f7fb086">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_B
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa721765c8f0bbcdb68af06817dbec8e53">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_C
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad622ad5df40d2fdf806abb2adda73b3d">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_L1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa32e159826404c7d76c2a433c24de82a2">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_L2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa36a38421637cfa5ebfd8a0296650cdf4">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa19839eebec939407d901a33b75cf2594">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_R1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7c614b3966583b0ad027e45f594ede46">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_R2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa46d487e9fe31855b7b46739bad58fe3e">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_SELECT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa598289bc85f647c237729126ea392a43">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_START
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3c818d106f4ec793a43749c4c26a8a4">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_THUMBL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68c5d8dcd8fe708ada8f4a4e17feb638">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_THUMBR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9759d817172d268ced1748909a5f5fbe">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_X
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa21174962f95e32cd0345ce657d03ebc7">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_Y
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6654a8b2c700f7783433c86fcdae7919">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_Z
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06156b68e6de951b44fc662e1b16041f">keycodes.h</a>
-</li>
-<li>AKEYCODE_C
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeed584f454e508ce931bcb33d37adb04">keycodes.h</a>
-</li>
-<li>AKEYCODE_CALCULATOR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa293523c40bb9f1d793cd0b984f636573">keycodes.h</a>
-</li>
-<li>AKEYCODE_CALENDAR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa114be17d1853c77a7406c024d9e4f076">keycodes.h</a>
-</li>
-<li>AKEYCODE_CALL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8b5720ebdd3576c2b536ec9228273d8f">keycodes.h</a>
-</li>
-<li>AKEYCODE_CAMERA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8670880765756933d3d1a10186d39e26">keycodes.h</a>
-</li>
-<li>AKEYCODE_CAPS_LOCK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab9dcb68b35c85d380846c85f323868f1">keycodes.h</a>
-</li>
-<li>AKEYCODE_CAPTIONS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81ba8d5343362b841b8a62b8679ff994">keycodes.h</a>
-</li>
-<li>AKEYCODE_CHANNEL_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa18f1808c6a819e787c9a9941f78b910f">keycodes.h</a>
-</li>
-<li>AKEYCODE_CHANNEL_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa056914fd17ae539dca44f43745d8e05c">keycodes.h</a>
-</li>
-<li>AKEYCODE_CLEAR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95bd8c25adeaa570108c7403f08a2901">keycodes.h</a>
-</li>
-<li>AKEYCODE_COMMA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca0bfbdc67b2c6f76e8fcaaf782c227">keycodes.h</a>
-</li>
-<li>AKEYCODE_CONTACTS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0aa2cfca11b7cabf82341a9dbec83f10">keycodes.h</a>
-</li>
-<li>AKEYCODE_CTRL_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaca9d0df6cc18492209eb287e659aeb1">keycodes.h</a>
-</li>
-<li>AKEYCODE_CTRL_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa99b317cf2f1eb6b06d0226e05223e60c">keycodes.h</a>
-</li>
-<li>AKEYCODE_D
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7e4cb3ef66209a2779be2c8239b57b51">keycodes.h</a>
-</li>
-<li>AKEYCODE_DEL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd013221b457d98975dc47e49817e28a">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_CENTER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e9c93273fd39148f54167133aa5b9ae">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa84b721b13aae56c9f1d3c22b3d81627a">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa668dfb3ed79a37c2c07838c161c1b344">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac6f9d81b6239696a1836695bbfc6a975">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf2fd3133a88f3b6725834032bd74bd9e">keycodes.h</a>
-</li>
-<li>AKEYCODE_DVR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf2f03b925a02ba6de9fd98737546a60">keycodes.h</a>
-</li>
-<li>AKEYCODE_E
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae218af7ceb207227bb10f0525e68a8d0">keycodes.h</a>
-</li>
-<li>AKEYCODE_EISU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaadd69273b99eb0b848d98b2d6b3ad3234">keycodes.h</a>
-</li>
-<li>AKEYCODE_ENDCALL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaff971957ae3a4e272b21987854e18d9b">keycodes.h</a>
-</li>
-<li>AKEYCODE_ENTER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac784a7bbbfbdab05fab6c6a1f29c98ff">keycodes.h</a>
-</li>
-<li>AKEYCODE_ENVELOPE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaade96efe470f428bb5c4eaea6ffc3681c">keycodes.h</a>
-</li>
-<li>AKEYCODE_EQUALS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0a197df7ec719c95ddcd6836e76c8498">keycodes.h</a>
-</li>
-<li>AKEYCODE_ESCAPE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac52177e5508edacb8e9c6d3a25db4fb6">keycodes.h</a>
-</li>
-<li>AKEYCODE_EXPLORER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaded9ec81ae6dab451665317723b94083">keycodes.h</a>
-</li>
-<li>AKEYCODE_F
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa455f71ecfe59af0fbd901ac0d0a8d53a">keycodes.h</a>
-</li>
-<li>AKEYCODE_F1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3b84f2c503a9e839f3d36e10e3307fcf">keycodes.h</a>
-</li>
-<li>AKEYCODE_F10
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa60660b13acab39282d0558cdcc93474">keycodes.h</a>
-</li>
-<li>AKEYCODE_F11
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa64cc7b1d8e53d90ff57c39d0b5a4dd22">keycodes.h</a>
-</li>
-<li>AKEYCODE_F12
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa491000231e0ba221b6916b1d9d2c9fb7">keycodes.h</a>
-</li>
-<li>AKEYCODE_F2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1360f7ec66aa6421e240dae637262e84">keycodes.h</a>
-</li>
-<li>AKEYCODE_F3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a4ce6105e12a3a9071cae2f40515085">keycodes.h</a>
-</li>
-<li>AKEYCODE_F4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa882050e4d0f917470a5b91fbf6ae9ebf">keycodes.h</a>
-</li>
-<li>AKEYCODE_F5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab01807c72b46620bb50fcb6abe24d937">keycodes.h</a>
-</li>
-<li>AKEYCODE_F6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa04a12e81ed80bb42ef5c63cedf0dc60">keycodes.h</a>
-</li>
-<li>AKEYCODE_F7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9583b8e4b0d994b7e3a193b67cf6020c">keycodes.h</a>
-</li>
-<li>AKEYCODE_F8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55ca54d42d8df70de2ce9031db1344c8">keycodes.h</a>
-</li>
-<li>AKEYCODE_F9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0c8225c0ef98da730933ae914077dbc9">keycodes.h</a>
-</li>
-<li>AKEYCODE_FOCUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23be9506f92f6efe14d47306a39a2187">keycodes.h</a>
-</li>
-<li>AKEYCODE_FORWARD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafbf0a16c7746e5dee2fd3adbd50da88a">keycodes.h</a>
-</li>
-<li>AKEYCODE_FORWARD_DEL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9516bc190d37fea27e07ddab0c607b51">keycodes.h</a>
-</li>
-<li>AKEYCODE_FUNCTION
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1764b777aa56605f4029d3c71fe70722">keycodes.h</a>
-</li>
-<li>AKEYCODE_G
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa165067e10464019411f768bba9e533d9">keycodes.h</a>
-</li>
-<li>AKEYCODE_GRAVE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa929561086ae7b519fa962597bc85f171">keycodes.h</a>
-</li>
-<li>AKEYCODE_GUIDE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf33a5fa1f163245360aeed89d64b0233">keycodes.h</a>
-</li>
-<li>AKEYCODE_H
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad89a91a1500cb162f22962781ebfd9dc">keycodes.h</a>
-</li>
-<li>AKEYCODE_HEADSETHOOK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0d3d29515a4815fe8d6d8d3291507a33">keycodes.h</a>
-</li>
-<li>AKEYCODE_HELP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab062b403701292c9e2db96a1f88cc6d9">keycodes.h</a>
-</li>
-<li>AKEYCODE_HENKAN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab0686dd37c57d833d1158b7f1d85ee02">keycodes.h</a>
-</li>
-<li>AKEYCODE_HOME
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa526c2411b7476b7ae579f57a0378b2dd">keycodes.h</a>
-</li>
-<li>AKEYCODE_I
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4d44b5e4a19580540d8d77bf5755d74b">keycodes.h</a>
-</li>
-<li>AKEYCODE_INFO
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e76263257a5dc654a413c9dc2fd649">keycodes.h</a>
-</li>
-<li>AKEYCODE_INSERT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62f663d11e91af750a51ddd060b08644">keycodes.h</a>
-</li>
-<li>AKEYCODE_J
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa70c259612ccec117d70afaef947a6a7a">keycodes.h</a>
-</li>
-<li>AKEYCODE_K
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ce56cf50d3632c275c524bd78d0d932">keycodes.h</a>
-</li>
-<li>AKEYCODE_KANA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62d090ae5c95a04dacdff79817dad531">keycodes.h</a>
-</li>
-<li>AKEYCODE_KATAKANA_HIRAGANA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3be7db22b3c8aa046a46631e44863c28">keycodes.h</a>
-</li>
-<li>AKEYCODE_L
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab61c534fd0f4e56c4ba13861a2f5982b">keycodes.h</a>
-</li>
-<li>AKEYCODE_LANGUAGE_SWITCH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7b8e87b47c17c5f1e97fcb56faaa26ff">keycodes.h</a>
-</li>
-<li>AKEYCODE_LAST_CHANNEL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa187963dd6f74b96f132f23e01dea35e9">keycodes.h</a>
-</li>
-<li>AKEYCODE_LEFT_BRACKET
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabdeda0d373aa37ef2ded5ffdfc008708">keycodes.h</a>
-</li>
-<li>AKEYCODE_M
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa43b19e5e5234ce90c8e7ef67dd0cabd1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MANNER_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa380279768c5c50d92bef2a88394f967f">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_AUDIO_TRACK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3cdb53cdf8c576e272502da06daa52e1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_CLOSE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6788c6e1443140b0ec4d004d8293e998">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_EJECT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa317bffd44306b021c401d3a26b82a7f6">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_FAST_FORWARD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa69e648024402af688d490a2041f15bca">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_NEXT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5a6c3fc963e8163852b9a23e3a198b3">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PAUSE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f4e0178c2028b3042b0a5948e38e4e4">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PLAY
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa615cf6202b0ae0ed550f42f6c64b36a1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PLAY_PAUSE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa42f8fe71e8d45b5a83d83d80c3da40e1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PREVIOUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81432c31b00d47f768c29163eb276acb">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_RECORD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e1eae0b245176aaa024a53411441f9">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_REWIND
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaecd53183b84c23a2ca65670a23674319">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_STOP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac4faa33993d80db1326073ea15a38e7d">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_TOP_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3ddf83cb2f701911b03c3a738e2e73a">keycodes.h</a>
-</li>
-<li>AKEYCODE_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa707b85e89923b0f760be795972a87d76">keycodes.h</a>
-</li>
-<li>AKEYCODE_META_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaadfb2d920bbe422c096120d39811c58">keycodes.h</a>
-</li>
-<li>AKEYCODE_META_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68038455e2b0846db51f9957e0df9cb8">keycodes.h</a>
-</li>
-<li>AKEYCODE_MINUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaca10bd34ad0abecfecace908b8cb92ca">keycodes.h</a>
-</li>
-<li>AKEYCODE_MOVE_END
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5605f49f5271430f5f150efb3cd0398a">keycodes.h</a>
-</li>
-<li>AKEYCODE_MOVE_HOME
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7544f3de2fb5f78bec62af94a32fdc58">keycodes.h</a>
-</li>
-<li>AKEYCODE_MUHENKAN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7321e5c6b3cbab142bd16957653b2ac7">keycodes.h</a>
-</li>
-<li>AKEYCODE_MUSIC
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14508751d70a0404b194d4b6df83ec72">keycodes.h</a>
-</li>
-<li>AKEYCODE_MUTE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f6675d38f50e3556a8531839fd83f02">keycodes.h</a>
-</li>
-<li>AKEYCODE_N
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c0b26804c89560a9e87c45f7f9fed36">keycodes.h</a>
-</li>
-<li>AKEYCODE_NOTIFICATION
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6115506352a5828532fc6a0b91683331">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUM
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe6e880f65bebbdd5246a4164c4ab37a">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUM_LOCK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad5e349eadd3255c6ad4982dc40ed23ef">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_0
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa343df35e6a0ad0599e19b8ef7174909b">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c0ec8e42917fa9ac53977db3e6aeb17">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4dfd17c2209908e1ec890e10a3211f89">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1efe1886a4b472b999215c0e81f7386">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1fdd16681c1441b934f679b94fd0e4f8">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5916003e7c737a8cc06e52d2ee76c3b">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa13b83389e0f5de129227af4b8d3f035d">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaed9468951ef2887c07c8095c2e7d4c93">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5f0a300566235720eb93fee9f2196642">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad0c490e3965df546e2d5a83edf423d95">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_ADD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9d2fefa9a3f6037f48b247e66dd28c35">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_COMMA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa900e3bb0bc4ff70ba786f18ff4db0bd1">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_DIVIDE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac108b744e8f93af69158d146425236c">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_DOT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6aab6b5914e120b43b3a1a8269e9cee1">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_ENTER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa79432be5f7a44e99ddc3721fd9fd212e">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_EQUALS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c1007a59641499ee5e1508e747c5ed">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_LEFT_PAREN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacc903e9eb495cf6cef7c6bc825f82f54">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_MULTIPLY
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47ce00b838e7ee0a34066dc2595ac735">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_RIGHT_PAREN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7662e0f2a099239dc69f6a27c7daabf9">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_SUBTRACT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bee314dbbea0a349eb301d10256bbe">keycodes.h</a>
-</li>
-<li>AKEYCODE_O
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa249667bc4a59d99be1914535877329fb">keycodes.h</a>
-</li>
-<li>AKEYCODE_P
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac68ef56b78bd0c8626cc68bb6cb9156f">keycodes.h</a>
-</li>
-<li>AKEYCODE_PAGE_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0b7fe1c18f53e6328657858a88826393">keycodes.h</a>
-</li>
-<li>AKEYCODE_PAGE_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4fd0d4ea5b6898f4a40011b97a739a04">keycodes.h</a>
-</li>
-<li>AKEYCODE_PAIRING
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0ecddd3dce52cf60c96c5d430b1f553">keycodes.h</a>
-</li>
-<li>AKEYCODE_PERIOD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9dd68c8ecebd4e274e8c357dcdfe8a04">keycodes.h</a>
-</li>
-<li>AKEYCODE_PICTSYMBOLS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacdc7c004da1594fa156de87befef5f41">keycodes.h</a>
-</li>
-<li>AKEYCODE_PLUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7f72d867b311e0845aef732dcc66495">keycodes.h</a>
-</li>
-<li>AKEYCODE_POUND
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf448758c44899e41b67f76dfe3be51e9">keycodes.h</a>
-</li>
-<li>AKEYCODE_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_BLUE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e82219fdb937fee5a22426c607dd4e0">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_GREEN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad50c1e2136e47843a8dabca929f8ead1">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_RED
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2d9e3e82e69955f649b586f4518e074c">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_YELLOW
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafa813640412bd41a181f0ec3a33dddc4">keycodes.h</a>
-</li>
-<li>AKEYCODE_Q
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa932cf6ea8d87e6d6d97af658dd0fa206">keycodes.h</a>
-</li>
-<li>AKEYCODE_R
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaba25ac2c15a8edbbbff16a9fe6e74532">keycodes.h</a>
-</li>
-<li>AKEYCODE_RIGHT_BRACKET
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa084dfa52626040a08d374f8aec066e6a">keycodes.h</a>
-</li>
-<li>AKEYCODE_RO
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae8b0af04dac5ea56fd55e577fd9e6be4">keycodes.h</a>
-</li>
-<li>AKEYCODE_S
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae1ed25c28a8fce578cddb17ca6888ff6">keycodes.h</a>
-</li>
-<li>AKEYCODE_SCROLL_LOCK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa78ff5c8316235635f76e3c3179e9a7fc">keycodes.h</a>
-</li>
-<li>AKEYCODE_SEARCH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac644fd307fd0ef0d3ed3d2e074c1a4b7">keycodes.h</a>
-</li>
-<li>AKEYCODE_SEMICOLON
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac0a2920161f4f2d97b0b060614b23391">keycodes.h</a>
-</li>
-<li>AKEYCODE_SETTINGS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bbd457230c3028df6b91d5bdda9159">keycodes.h</a>
-</li>
-<li>AKEYCODE_SHIFT_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafb9875645596928cec46368e74499dc4">keycodes.h</a>
-</li>
-<li>AKEYCODE_SHIFT_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf9eab1348ae1e8f18ad5bf3c77df4212">keycodes.h</a>
-</li>
-<li>AKEYCODE_SLASH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa54c047be3811d637a33d9b3e39d16e1a">keycodes.h</a>
-</li>
-<li>AKEYCODE_SLEEP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafc077e5a6b447ea060c144f6e65bd207">keycodes.h</a>
-</li>
-<li>AKEYCODE_SOFT_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2dc78d3a93876b77402d2a7f02e4b899">keycodes.h</a>
-</li>
-<li>AKEYCODE_SOFT_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8cadfbfcaaa83fef168de13639adfcae">keycodes.h</a>
-</li>
-<li>AKEYCODE_SPACE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa10389300ac5d70f8d9733564b3cab4e7">keycodes.h</a>
-</li>
-<li>AKEYCODE_STAR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1461fbf54e3dcba96e5d6d0638c18305">keycodes.h</a>
-</li>
-<li>AKEYCODE_STB_INPUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa988b0372359b2bca7390878fdba9e1b5">keycodes.h</a>
-</li>
-<li>AKEYCODE_STB_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab28aea3a51b11c9f227ce8cd5ff55a3d">keycodes.h</a>
-</li>
-<li>AKEYCODE_SWITCH_CHARSET
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad6a1f88b2cc3b6ff8f1724eb01473ec3">keycodes.h</a>
-</li>
-<li>AKEYCODE_SYM
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c1c6752d5db5e02da51d8937e5e3c6f">keycodes.h</a>
-</li>
-<li>AKEYCODE_SYSRQ
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14e22c69bcd47ffb4445ee18a4332d84">keycodes.h</a>
-</li>
-<li>AKEYCODE_T
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2feac8b458ef8eb9c0a0dd73766927c2">keycodes.h</a>
-</li>
-<li>AKEYCODE_TAB
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1b1bfda850b2acd0b60e8456e2bfa958">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0776ffae512b4848e53fce762a3a5017">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_ANTENNA_CABLE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe33a80d6d3bf889af25cbd77fdb89f9">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_AUDIO_DESCRIPTION
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa419f0adac43cad104cd6cf83dc5f13f6">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5fca6a9ec1ce246bf3c53d859ac9f5eb">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaccc5900ca5dd399d5ce11dd8ca324678">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_CONTENTS_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4c18feeafff3c41081073c025ee017b8">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_DATA_SERVICE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa954c2251b2cb53f47637802cb66baf06">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1750b29e396bd1fd237ed4aadacc8f5">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPONENT_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa156e2dba81e7c73624ccf8c2ef8833ae">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPONENT_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8db9b6ee1457267abea03430781bb0ec">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPOSITE_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c3097f14c6582958ba1d14d70115ccd">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPOSITE_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaada13cbb9d619bc610678ad66325647b9">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a50de965f50ab3aa42772aac0808445">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7ec65c008471d771bf879ec012f5c7f">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a0f267a2696d15bf16127121b1f1c7f">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4437c1d8d2d33058cfa71ec7b2771ec5">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_VGA_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa149b2c8a4817075c0a41e0adf11c8e85">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_MEDIA_CONTEXT_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaadde70071f6a432f367079efa6e1a6fe">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_NETWORK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec5e46a5afc57953d1772e086307aa42">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_NUMBER_ENTRY
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa630a08e07a3b4c6bcac9a1a72d176055">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafda3b0ea1b158831fc443bf4911a3930">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_RADIO_SERVICE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93dd3fd752701af5a5491e01cc15db72">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3707d4396417535a611e4548afe33936">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE_BS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8c52e7d06525c0ee5d943d63a0fa8ea5">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE_CS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4eea1809a9ff679ed7773332d728c6b0">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE_SERVICE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17c0e68066b86610ff168c6367af36eb">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TELETEXT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3d7b89756df37f01d6d0f13beff1db">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TERRESTRIAL_ANALOG
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14f2b6fe8550832ef9e3f9aa53164073">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TERRESTRIAL_DIGITAL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacad8c149251a78760a5fe4931b9cdf16">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TIMER_PROGRAMMING
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0293c2a63e4d955080334bef6640840">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_ZOOM_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8e79045045293070c8eb9e408f1335b4">keycodes.h</a>
-</li>
-<li>AKEYCODE_U
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac1a220314f986aae45d7fe3b35501595">keycodes.h</a>
-</li>
-<li>AKEYCODE_UNKNOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa593f8ae18990d627785719284a12a6f">keycodes.h</a>
-</li>
-<li>AKEYCODE_V
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4043bc48fa55cce7825176052d6e199a">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOICE_ASSIST
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95898663b7f74c93d0b860a43528c744">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOLUME_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a882dae17080d3b5f3329e79db60c66">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOLUME_MUTE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa174a5c7c39753235109696e82870c575">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOLUME_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5b81e325d9efd633eef7535a5b538882">keycodes.h</a>
-</li>
-<li>AKEYCODE_W
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0c80e98547c3daa01f3d9e7f4f00425">keycodes.h</a>
-</li>
-<li>AKEYCODE_WAKEUP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa903c5152d26b3011ae521afa06759429">keycodes.h</a>
-</li>
-<li>AKEYCODE_WINDOW
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe7531c40ff4a31614ff6fd61802ebe8">keycodes.h</a>
-</li>
-<li>AKEYCODE_X
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec585cebac89004faffbdc28dc6d81c5">keycodes.h</a>
-</li>
-<li>AKEYCODE_Y
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06fc277ef25acdd89d64c18eed0daa9b">keycodes.h</a>
-</li>
-<li>AKEYCODE_YEN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ee19d21912056b902e283efa2d9d14b">keycodes.h</a>
-</li>
-<li>AKEYCODE_Z
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7439a09f219a0addc13c758ef7508cce">keycodes.h</a>
-</li>
-<li>AKEYCODE_ZENKAKU_HANKAKU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf782be8df9a8ca5dc86c9bfeabac6f22">keycodes.h</a>
-</li>
-<li>AKEYCODE_ZOOM_IN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacfce9bb78ef8106dce4868f81cca4fb4">keycodes.h</a>
-</li>
-<li>AKEYCODE_ZOOM_OUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf035f5234c3df4589f35a50e99e0535">keycodes.h</a>
-</li>
-<li>AKeyEvent_getAction()
-: <a class="el" href="group___input.html#ga36ec0b59f98f86a7ca263ba91279896d">input.h</a>
-</li>
-<li>AKeyEvent_getDownTime()
-: <a class="el" href="group___input.html#gaf475b6f0860bdfca4ceea7bc46eab1a9">input.h</a>
-</li>
-<li>AKeyEvent_getEventTime()
-: <a class="el" href="group___input.html#gae3eac7d68195d1767c947ca267842696">input.h</a>
-</li>
-<li>AKeyEvent_getFlags()
-: <a class="el" href="group___input.html#ga2a18e98efe0c4ccb6f39bb13c555010e">input.h</a>
-</li>
-<li>AKeyEvent_getKeyCode()
-: <a class="el" href="group___input.html#ga6b01ecd60018a5445f4917a861ca9466">input.h</a>
-</li>
-<li>AKeyEvent_getMetaState()
-: <a class="el" href="group___input.html#gabdda62b40b22727af2fb41740bf4787b">input.h</a>
-</li>
-<li>AKeyEvent_getRepeatCount()
-: <a class="el" href="group___input.html#ga5358fe3ebbd4b5b2f88a4ad2eba6f885">input.h</a>
-</li>
-<li>AKeyEvent_getScanCode()
-: <a class="el" href="group___input.html#ga4a0a846b7a195aeb290dfcd2250137d9">input.h</a>
-</li>
-<li>ALooper
-: <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">looper.h</a>
-</li>
-<li>ALooper_acquire()
-: <a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">looper.h</a>
-</li>
-<li>ALooper_addFd()
-: <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">looper.h</a>
-</li>
-<li>ALooper_callbackFunc
-: <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_ERROR
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_HANGUP
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_INPUT
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_INVALID
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_OUTPUT
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d">looper.h</a>
-</li>
-<li>ALooper_forThread()
-: <a class="el" href="group___looper.html#ga741ccd90a0eb9209c6bddf2326d89e4a">looper.h</a>
-</li>
-<li>ALOOPER_POLL_CALLBACK
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2">looper.h</a>
-</li>
-<li>ALOOPER_POLL_ERROR
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4">looper.h</a>
-</li>
-<li>ALOOPER_POLL_TIMEOUT
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443">looper.h</a>
-</li>
-<li>ALOOPER_POLL_WAKE
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47">looper.h</a>
-</li>
-<li>ALooper_pollAll()
-: <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">looper.h</a>
-</li>
-<li>ALooper_pollOnce()
-: <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">looper.h</a>
-</li>
-<li>ALooper_prepare()
-: <a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">looper.h</a>
-</li>
-<li>ALOOPER_PREPARE_ALLOW_NON_CALLBACKS
-: <a class="el" href="group___looper.html#ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb">looper.h</a>
-</li>
-<li>ALooper_release()
-: <a class="el" href="group___looper.html#gab723c3c2ac2c66bc695913a194073727">looper.h</a>
-</li>
-<li>ALooper_removeFd()
-: <a class="el" href="group___looper.html#gaf7d68ed05698b251489b4f6c8e54daad">looper.h</a>
-</li>
-<li>ALooper_wake()
-: <a class="el" href="group___looper.html#gab2585652f8ae2e2444979194ebe32aaf">looper.h</a>
-</li>
-<li>AMETA_ALT_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca256c74b768ecee57e3218e81ae6945df">input.h</a>
-</li>
-<li>AMETA_ALT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caba44b1077427e4da1d202e0c8f772881">input.h</a>
-</li>
-<li>AMETA_ALT_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca985db074c0f44749ca86b5cc0454056a">input.h</a>
-</li>
-<li>AMETA_CAPS_LOCK_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafc467c98d509b0de28b298801a0c3e37">input.h</a>
-</li>
-<li>AMETA_CTRL_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca752c837afd5ff0fcf75ddee7b6808be6">input.h</a>
-</li>
-<li>AMETA_CTRL_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cabe927318a2a11a46be3e9d78dbd81ef5">input.h</a>
-</li>
-<li>AMETA_CTRL_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca0ab007e367ae136b873b3e6636747419">input.h</a>
-</li>
-<li>AMETA_FUNCTION_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca545b31b72b0454c22c170ff534ddfdf1">input.h</a>
-</li>
-<li>AMETA_META_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca6f923de8f2cd72e3ad86149c0747906f">input.h</a>
-</li>
-<li>AMETA_META_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca9c04e7c2ad1f0f41af60402188a29c4a">input.h</a>
-</li>
-<li>AMETA_META_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafdf56d1259ae16c97161c443d7949bdf">input.h</a>
-</li>
-<li>AMETA_NONE
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cae0a3cb26517b3f876beb37594494526d">input.h</a>
-</li>
-<li>AMETA_NUM_LOCK_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca15d234534a6870add5594f02b7333dc6">input.h</a>
-</li>
-<li>AMETA_SCROLL_LOCK_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafe8dacdc6566f655a3eab73ea4a9af5a">input.h</a>
-</li>
-<li>AMETA_SHIFT_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa01fa027cdd8951530437bcbe04c3ed7">input.h</a>
-</li>
-<li>AMETA_SHIFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa3d5f49c3a55b653a94c798a2c93b197">input.h</a>
-</li>
-<li>AMETA_SHIFT_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cac52930581c339216218a6f50c5b57aa1">input.h</a>
-</li>
-<li>AMETA_SYM_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca8af1e90950a728baca807a83e50b22ea">input.h</a>
-</li>
-<li>AMetaDataEvent
-: <a class="el" href="group___sensor.html#ga0378daec23b2d8a70438ef7c3912475f">sensor.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_CANCEL
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_DOWN
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a225e61c48ba334abc1b5811db02edcf1">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_HOVER_ENTER
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a247b2c60ad92f3130ad43c907986ffb3">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_HOVER_EXIT
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600ac00b1eacfbea779863abf3fcf02134aa">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_HOVER_MOVE
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a84bc9fb3c01ff7ca9ee452a510e7de60">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_MASK
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600abf84a22c84d4b7228102b80f3af92a4f">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_MOVE
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a41c56c4e772953fce60c93bc671639a3">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_OUTSIDE
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_DOWN
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a1618c641fd3f49fa7483f298d05b3cd2">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_INDEX_MASK
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a51384339fbb57c0087f7f50c45d9cff3">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT
-: <a class="el" href="group___input.html#gaeb170c0fbeeed1d999160566f09f169e">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_UP
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600af2ef56aa7220eeb2073b9b028737bc1e">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_SCROLL
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a45ba62b1e6fab4e84d5782d7c35ced04">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_UP
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a43798b2b7a6de4616d150b2438b8419e">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_BRAKE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae3a99764f3681dd9e094852bb2489ece">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_DISTANCE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae800909411a1e83173b0eef7aa458d0e">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GAS
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0223f235a6044815918af2abafcbf16">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_1
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadcc18afd3a7069412617df34db5a27bc">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_10
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da29ba08f4ddc658e0127ee5bc08d185f2">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_11
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafc64a4b307f62bb12b645918aa7edb57">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_12
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae5d32b3e9cec4936ae1e074f320c3063">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_13
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f19f5bc52e5eaec5ebd4f07aad12180">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_14
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadb866d826ecf25161d7c7f86166e149b">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_15
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da7e86befc8502b8df687284f3c40b2eca">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_16
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daaaa011ba929b18c6da71153638f92336">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_2
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac4addf06abfa6c76f0578ddde049aad5">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_3
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac7df57ef5082e10be83f66d7477bce9c">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_4
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da321873d126b7d545665096694cb7d9d9">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_5
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da9b47cef7060197e1b0302a8a718c3085">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_6
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daad7e47a1b5fb66864b6d988374f50a84">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_7
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da222c06f51a60e59504b635dbf89a025b">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_8
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab59a8a373a913e40b146ed762976d6fe">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_9
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da721fa0fbca8b22f1ecc8d3870f4e7443">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_HAT_X
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da04245c76cb9b32dcba920661f11ac9da">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_HAT_Y
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da98c323321d908db459e7cf86a7e8a482">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_HSCROLL
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da92955e6b0f3f82af66a505c854e9edff">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_LTRIGGER
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae4c65c3b1bd2946ff9e18c6041cdb591">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_ORIENTATION
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da114f2b3fc233ccf7a4470787c31457d2">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_PRESSURE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da3b4fd0f17cfdeb6a055babecd2b0ded8">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RTRIGGER
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da116e80c6be166290ca481fefa5de38c1">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RUDDER
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da318a0782f895949407fc192fc4280257">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RX
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da689b612864177d6b57d4181442e3e38e">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RY
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa20188da209300e1f80f6f5bd4058e13">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RZ
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da381948b3321afd390ad164345eb9206b">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_SIZE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da4baba3ccaec881089a864ba6deaf8bd6">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_THROTTLE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da6d1f5d64e607104964eb43d8fae07a4f">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TILT
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafca0a235f69c4b38bfc95e7a7b8d9ab1">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOOL_MAJOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa273d64c392f86ae789fd5e24661ba0a">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOOL_MINOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadebd200b37ffaf36b94e7e478c559142">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOUCH_MAJOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da792b9e01044a2e43e7f80e5559db20c2">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOUCH_MINOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa8b24b0f01f24898a36e5751c8eca63c">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_VSCROLL
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dad11be04b4b81715cad905ee9fa348e99">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_WHEEL
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0ae83ebd74e672bb35378b92a440b1d">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_X
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f4b5b009634039a1f361048a5fc6064">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_Y
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da64f7de8558265bd8179d206eb33eff6c">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_Z
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5a689e572da9bc5feafcb6c011368305">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_BACK
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a1841d075a2992ff7fbefa3fd50189b86">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_FORWARD
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a4105edf43f7748c52c859cc5aa7dc438">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_PRIMARY
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ab388f65477b9dd4c51e6367111168d65">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_SECONDARY
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a08118700ecb4e147528a0e725afc9451">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_TERTIARY
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ae6e2af1e7065e035e8a10a595827180f">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_BOTTOM
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388ad8b662839787e1c7dd2616f32c02aaeb">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_LEFT
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388afb70c13f16daade25ba8132a5ea3cf52">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_NONE
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a37dd7496968e6defbecc3c8d6ab2734d">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_RIGHT
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a7d45674e03f1876a43d4810508905078">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_TOP
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a915e1ade9b600d11a3c70a17a88de757">input.h</a>
-</li>
-<li>AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED
-: <a class="el" href="group___input.html#ggab04a0655cd1e3bcac5e8f48c18df1a57a200623e1e4eee7797cad30917d289d7a">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_ERASER
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf9932f65b5b6b5800fb5873a60dbf0cb">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_FINGER
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eafd789262defb8a268fa80d26b0c30bcc">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_MOUSE
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7be0c750d7d6719e7c948914400ae0de">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_STYLUS
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf05dc95a74e560c89cec1f3100185fc7">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_UNKNOWN
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7e1ea0c955ebbac1349866e8995e0208">input.h</a>
-</li>
-<li>AMotionEvent_getAction()
-: <a class="el" href="group___input.html#ga73ea2093cc2343675ac43dd08bef4247">input.h</a>
-</li>
-<li>AMotionEvent_getAxisValue()
-: <a class="el" href="group___input.html#ga9d364cdcebf85237f599b25861f38c21">input.h</a>
-</li>
-<li>AMotionEvent_getButtonState()
-: <a class="el" href="group___input.html#ga1aa7ebb749416491b6f0c55ae87ddf49">input.h</a>
-</li>
-<li>AMotionEvent_getDownTime()
-: <a class="el" href="group___input.html#gad44be7697e68891688cd7bcfaffec209">input.h</a>
-</li>
-<li>AMotionEvent_getEdgeFlags()
-: <a class="el" href="group___input.html#gad7e1f0caa4c27194d4a8756a18432299">input.h</a>
-</li>
-<li>AMotionEvent_getEventTime()
-: <a class="el" href="group___input.html#ga7e13fbf3cff0700b0b620284ebdd3a33">input.h</a>
-</li>
-<li>AMotionEvent_getFlags()
-: <a class="el" href="group___input.html#ga2891d19197c070207098fa48adeb35af">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalAxisValue()
-: <a class="el" href="group___input.html#ga7ca740e1324f3cdb934252dce0c982d0">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalEventTime()
-: <a class="el" href="group___input.html#ga523f1a760754206965b42b08d62f9346">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalOrientation()
-: <a class="el" href="group___input.html#gaab9cb8fa670175ecc73c75eed4e5cd3f">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalPressure()
-: <a class="el" href="group___input.html#gaa8e9352ee5b043b3e1b6e2062d491010">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalRawX()
-: <a class="el" href="group___input.html#ga5d36c2e7420001c86ae2aa1168fe6f83">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalRawY()
-: <a class="el" href="group___input.html#ga6deb0e7690a93aa53e5872c2691b69fe">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalSize()
-: <a class="el" href="group___input.html#ga0a04bb7ec12928db7e62645e7fad3a9e">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalToolMajor()
-: <a class="el" href="group___input.html#ga160a5830e791e8c42ae97f51b92233d2">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalToolMinor()
-: <a class="el" href="group___input.html#gafe01aa7576a6d1bce750fb8482355849">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalTouchMajor()
-: <a class="el" href="group___input.html#gaf437f223668b97f19ebdbad4b9cf4483">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalTouchMinor()
-: <a class="el" href="group___input.html#ga126715d966e989652aa1ae5d38e0e898">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalX()
-: <a class="el" href="group___input.html#ga49a8ca89ff377b5ed2355e8d7220ae07">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalY()
-: <a class="el" href="group___input.html#ga30fc4e5d3ce144955859f8c97b51b73d">input.h</a>
-</li>
-<li>AMotionEvent_getHistorySize()
-: <a class="el" href="group___input.html#ga0aef34c236db6d7a56a50bf590be7bcc">input.h</a>
-</li>
-<li>AMotionEvent_getMetaState()
-: <a class="el" href="group___input.html#ga5644f0d952e3dea57ba9f7ce51dff2bb">input.h</a>
-</li>
-<li>AMotionEvent_getOrientation()
-: <a class="el" href="group___input.html#gad28422998da15b789edcba6b8bc5d615">input.h</a>
-</li>
-<li>AMotionEvent_getPointerCount()
-: <a class="el" href="group___input.html#ga612e68d104adbc6d14d87510e8066bd8">input.h</a>
-</li>
-<li>AMotionEvent_getPointerId()
-: <a class="el" href="group___input.html#ga599e21a79c706807243a8ee31b116138">input.h</a>
-</li>
-<li>AMotionEvent_getPressure()
-: <a class="el" href="group___input.html#ga97fcaa6cd08c9d54b35711e482e06c8d">input.h</a>
-</li>
-<li>AMotionEvent_getRawX()
-: <a class="el" href="group___input.html#gafe45e29ef138cc30592237ce479837f0">input.h</a>
-</li>
-<li>AMotionEvent_getRawY()
-: <a class="el" href="group___input.html#ga5a09c3d742a93270861aa05f24257c23">input.h</a>
-</li>
-<li>AMotionEvent_getSize()
-: <a class="el" href="group___input.html#ga9b1f3c3df46b5269f9e74d2dd70c88a8">input.h</a>
-</li>
-<li>AMotionEvent_getToolMajor()
-: <a class="el" href="group___input.html#gac04099690f278a6a27191c2027b12a77">input.h</a>
-</li>
-<li>AMotionEvent_getToolMinor()
-: <a class="el" href="group___input.html#ga2222d459759ba4a8269647012d2718fb">input.h</a>
-</li>
-<li>AMotionEvent_getToolType()
-: <a class="el" href="group___input.html#ga2babe4e2e79952e004538f8f1878649c">input.h</a>
-</li>
-<li>AMotionEvent_getTouchMajor()
-: <a class="el" href="group___input.html#ga9ac18fe19534e07d80441582f489d471">input.h</a>
-</li>
-<li>AMotionEvent_getTouchMinor()
-: <a class="el" href="group___input.html#ga65f71e257b5fcb29dcbaaf59b3fcb3a7">input.h</a>
-</li>
-<li>AMotionEvent_getX()
-: <a class="el" href="group___input.html#ga22e255a5fa52761cd92ce78af91e9757">input.h</a>
-</li>
-<li>AMotionEvent_getXOffset()
-: <a class="el" href="group___input.html#ga7a94ce622eb78a17737fd8bddbf86e21">input.h</a>
-</li>
-<li>AMotionEvent_getXPrecision()
-: <a class="el" href="group___input.html#ga81a9be07673a01f43fd0241c7b4c254f">input.h</a>
-</li>
-<li>AMotionEvent_getY()
-: <a class="el" href="group___input.html#ga113f58a37e41f2a6c3007d68418edfa6">input.h</a>
-</li>
-<li>AMotionEvent_getYOffset()
-: <a class="el" href="group___input.html#ga7f6bd2c12d912f502c245b6ced6d3704">input.h</a>
-</li>
-<li>AMotionEvent_getYPrecision()
-: <a class="el" href="group___input.html#gae311e6e28bce4be905526f9ea71278ed">input.h</a>
-</li>
-<li>ANativeActivity
-: <a class="el" href="group___native_activity.html#ga8abd07923f37feb1ce724d139cc2609d">native_activity.h</a>
-</li>
-<li>ANativeActivity_createFunc
-: <a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">native_activity.h</a>
-</li>
-<li>ANativeActivity_finish()
-: <a class="el" href="group___native_activity.html#ga4d872ae54a239704c06a0517e23cc0ad">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY
-: <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS
-: <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f">native_activity.h</a>
-</li>
-<li>ANativeActivity_hideSoftInput()
-: <a class="el" href="group___native_activity.html#gaf673d6efea7ce517ef46ff2551b25944">native_activity.h</a>
-</li>
-<li>ANativeActivity_onCreate
-: <a class="el" href="group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">native_activity.h</a>
-</li>
-<li>ANativeActivity_setWindowFlags()
-: <a class="el" href="group___native_activity.html#gaa1d091ca4a99b0ce570bab1c8c06f297">native_activity.h</a>
-</li>
-<li>ANativeActivity_setWindowFormat()
-: <a class="el" href="group___native_activity.html#gaec8b12decdf2b9841344e75c4c038c5a">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED
-: <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT
-: <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9">native_activity.h</a>
-</li>
-<li>ANativeActivity_showSoftInput()
-: <a class="el" href="group___native_activity.html#ga14eaeb6190f266369023b04d8ab9dba7">native_activity.h</a>
-</li>
-<li>ANativeActivityCallbacks
-: <a class="el" href="group___native_activity.html#ga28dca784e5ee939427135c72c0151c38">native_activity.h</a>
-</li>
-<li>ANativeWindow
-: <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">native_window.h</a>
-</li>
-<li>ANativeWindow_acquire()
-: <a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">native_window.h</a>
-</li>
-<li>ANativeWindow_Buffer
-: <a class="el" href="group___native_activity.html#gad0983ca473ce36293baf5e51a14c3357">native_window.h</a>
-</li>
-<li>ANativeWindow_fromSurface()
-: <a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">native_window_jni.h</a>
-</li>
-<li>ANativeWindow_getFormat()
-: <a class="el" href="group___native_activity.html#ga9e3a492a8300146b30d864f0ab22bb2e">native_window.h</a>
-</li>
-<li>ANativeWindow_getHeight()
-: <a class="el" href="group___native_activity.html#ga463ba99f6dee3edc1167a54e1ff7de15">native_window.h</a>
-</li>
-<li>ANativeWindow_getWidth()
-: <a class="el" href="group___native_activity.html#ga186f0040c5cb405a63d93889bb9a4ff1">native_window.h</a>
-</li>
-<li>ANativeWindow_lock()
-: <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">native_window.h</a>
-</li>
-<li>ANativeWindow_release()
-: <a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">native_window.h</a>
-</li>
-<li>ANativeWindow_setBuffersGeometry()
-: <a class="el" href="group___native_activity.html#ga7b0652533998d61e1a3b542485889113">native_window.h</a>
-</li>
-<li>ANativeWindow_unlockAndPost()
-: <a class="el" href="group___native_activity.html#ga4dc9b687ead9034fbc11bf2d90f203f9">native_window.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_A_8
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_NONE
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_RGB_565
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_RGBA_4444
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_RGBA_8888
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_ALLOCATION_FAILED
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_BAD_PARAMETER
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_JNI_EXCEPTION
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_SUCCESS
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESUT_SUCCESS
-: <a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">bitmap.h</a>
-</li>
-<li>AndroidBitmap_getInfo()
-: <a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">bitmap.h</a>
-</li>
-<li>AndroidBitmap_lockPixels()
-: <a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">bitmap.h</a>
-</li>
-<li>AndroidBitmap_unlockPixels()
-: <a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">bitmap.h</a>
-</li>
-<li>AndroidBitmapFormat
-: <a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">bitmap.h</a>
-</li>
-<li>AOBB_STATE_ERROR_ALREADY_MOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a8b074af151167a965a550b9829fafb37">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_COULD_NOT_MOUNT
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a324da2b8fea5875339d442d1f2d0b45b">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_COULD_NOT_UNMOUNT
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a1f2b51b53fc57b57a9967f6ce0c88dbe">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_INTERNAL
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a50642881107d6673aace1494a5d6fce2">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_NOT_MOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a3ce8539aa8b531c9de1d16041322d7a8">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_PERMISSION_DENIED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2467a4b6a634680e12c288a7790ff66c">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_MOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2a9c420e6008c108a7198fd861c042d5">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_UNMOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a6710bb5b68cfc115eedcde2aafd8a667">storage_manager.h</a>
-</li>
-<li>AObbInfo
-: <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">obb.h</a>
-</li>
-<li>AObbInfo_delete()
-: <a class="el" href="group___storage.html#gaec5a4428008f545e829486099298031a">obb.h</a>
-</li>
-<li>AObbInfo_getFlags()
-: <a class="el" href="group___storage.html#ga68d916570c756da9fd0d9096358300eb">obb.h</a>
-</li>
-<li>AObbInfo_getPackageName()
-: <a class="el" href="group___storage.html#ga1ec7eee61541fa5a9b578801a35b9cf3">obb.h</a>
-</li>
-<li>AObbInfo_getVersion()
-: <a class="el" href="group___storage.html#gacd8471c6d866cffe4a32f3b5997c782c">obb.h</a>
-</li>
-<li>AOBBINFO_OVERLAY
-: <a class="el" href="group___storage.html#ggae4d5251432e1a9e6803c0240cc492e18a33e2ae83b4c25d33a4335dccf1de1c3a">obb.h</a>
-</li>
-<li>AObbScanner_getObbInfo()
-: <a class="el" href="group___storage.html#ga7beb4f82e3bf9a4b8197917f92ac4d5e">obb.h</a>
-</li>
-<li>ARect
-: <a class="el" href="group___native_activity.html#gaa984a498f0e146ac57c6022a323423cf">rect.h</a>
-</li>
-<li>AREPORTING_MODE_CONTINUOUS
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c">sensor.h</a>
-</li>
-<li>AREPORTING_MODE_ON_CHANGE
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5">sensor.h</a>
-</li>
-<li>AREPORTING_MODE_ONE_SHOT
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb">sensor.h</a>
-</li>
-<li>AREPORTING_MODE_SPECIAL_TRIGGER
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7">sensor.h</a>
-</li>
-<li>ASensor
-: <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">sensor.h</a>
-</li>
-<li>ASensor_getFifoMaxEventCount()
-: <a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">sensor.h</a>
-</li>
-<li>ASensor_getFifoReservedEventCount()
-: <a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">sensor.h</a>
-</li>
-<li>ASensor_getMinDelay()
-: <a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">sensor.h</a>
-</li>
-<li>ASensor_getName()
-: <a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">sensor.h</a>
-</li>
-<li>ASensor_getReportingMode()
-: <a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">sensor.h</a>
-</li>
-<li>ASensor_getResolution()
-: <a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">sensor.h</a>
-</li>
-<li>ASensor_getStringType()
-: <a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">sensor.h</a>
-</li>
-<li>ASensor_getType()
-: <a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">sensor.h</a>
-</li>
-<li>ASensor_getVendor()
-: <a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">sensor.h</a>
-</li>
-<li>ASensor_isWakeUpSensor()
-: <a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">sensor.h</a>
-</li>
-<li>ASENSOR_MAGNETIC_FIELD_EARTH_MAX
-: <a class="el" href="group___sensor.html#gaf8b57b13c6432bc6136aac0ad3813d63">sensor.h</a>
-</li>
-<li>ASENSOR_MAGNETIC_FIELD_EARTH_MIN
-: <a class="el" href="group___sensor.html#ga4423a712e27b6d5a57d138796892886d">sensor.h</a>
-</li>
-<li>ASENSOR_STANDARD_GRAVITY
-: <a class="el" href="group___sensor.html#ga5129cb9e4091fc3474e246d5f950e52b">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_ACCURACY_HIGH
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_ACCURACY_LOW
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_ACCURACY_MEDIUM
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_NO_CONTACT
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_UNRELIABLE
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_ACCELEROMETER
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_GYROSCOPE
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_LIGHT
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_MAGNETIC_FIELD
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_PROXIMITY
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">sensor.h</a>
-</li>
-<li>ASensorEvent
-: <a class="el" href="group___sensor.html#ga6bb167c45f0ef0a94d8f178d227e781f">sensor.h</a>
-</li>
-<li>ASensorEventQueue
-: <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">sensor.h</a>
-</li>
-<li>ASensorEventQueue_disableSensor()
-: <a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">sensor.h</a>
-</li>
-<li>ASensorEventQueue_enableSensor()
-: <a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">sensor.h</a>
-</li>
-<li>ASensorEventQueue_getEvents()
-: <a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">sensor.h</a>
-</li>
-<li>ASensorEventQueue_hasEvents()
-: <a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">sensor.h</a>
-</li>
-<li>ASensorEventQueue_setEventRate()
-: <a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">sensor.h</a>
-</li>
-<li>ASensorList
-: <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">sensor.h</a>
-</li>
-<li>ASensorManager
-: <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">sensor.h</a>
-</li>
-<li>ASensorManager_createEventQueue()
-: <a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">sensor.h</a>
-</li>
-<li>ASensorManager_destroyEventQueue()
-: <a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">sensor.h</a>
-</li>
-<li>ASensorManager_getDefaultSensor()
-: <a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">sensor.h</a>
-</li>
-<li>ASensorManager_getDefaultSensorEx()
-: <a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">sensor.h</a>
-</li>
-<li>ASensorManager_getInstance()
-: <a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">sensor.h</a>
-</li>
-<li>ASensorManager_getSensorList()
-: <a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">sensor.h</a>
-</li>
-<li>ASensorRef
-: <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">sensor.h</a>
-</li>
-<li>ASensorVector
-: <a class="el" href="group___sensor.html#ga207e807f9e18271f6a763e57232b409f">sensor.h</a>
-</li>
-<li>AStorageManager
-: <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">storage_manager.h</a>
-</li>
-<li>AStorageManager_delete()
-: <a class="el" href="group___storage.html#ga184c06dd9cec0f21db138167d6b331ed">storage_manager.h</a>
-</li>
-<li>AStorageManager_getMountedObbPath()
-: <a class="el" href="group___storage.html#gad5c90305d627e0c768da37cb3e9f08c4">storage_manager.h</a>
-</li>
-<li>AStorageManager_isObbMounted()
-: <a class="el" href="group___storage.html#ga7572f2c650fc16cce1b0ab94e913a1ba">storage_manager.h</a>
-</li>
-<li>AStorageManager_mountObb()
-: <a class="el" href="group___storage.html#ga61bebaf43e57b4b7f57e7a24a62e9e3d">storage_manager.h</a>
-</li>
-<li>AStorageManager_new()
-: <a class="el" href="group___storage.html#ga1c21ed9e0848fcfc03547c95eeb48877">storage_manager.h</a>
-</li>
-<li>AStorageManager_obbCallbackFunc
-: <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">storage_manager.h</a>
-</li>
-<li>AStorageManager_unmountObb()
-: <a class="el" href="group___storage.html#ga4c32c8d2c780016fa36097d833b57809">storage_manager.h</a>
-</li>
-<li>AUncalibratedEvent
-: <a class="el" href="group___sensor.html#ga24acc545b908dd24cadc44c5e0760b3b">sensor.h</a>
-</li>
-<li>AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508">window.h</a>
-</li>
-<li>AWINDOW_FLAG_ALT_FOCUSABLE_IM
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">window.h</a>
-</li>
-<li>AWINDOW_FLAG_BLUR_BEHIND
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">window.h</a>
-</li>
-<li>AWINDOW_FLAG_DIM_BEHIND
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f">window.h</a>
-</li>
-<li>AWINDOW_FLAG_DISMISS_KEYGUARD
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">window.h</a>
-</li>
-<li>AWINDOW_FLAG_DITHER
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">window.h</a>
-</li>
-<li>AWINDOW_FLAG_FORCE_NOT_FULLSCREEN
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d">window.h</a>
-</li>
-<li>AWINDOW_FLAG_FULLSCREEN
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">window.h</a>
-</li>
-<li>AWINDOW_FLAG_IGNORE_CHEEK_PRESSES
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326">window.h</a>
-</li>
-<li>AWINDOW_FLAG_KEEP_SCREEN_ON
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">window.h</a>
-</li>
-<li>AWINDOW_FLAG_LAYOUT_IN_SCREEN
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">window.h</a>
-</li>
-<li>AWINDOW_FLAG_LAYOUT_INSET_DECOR
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563">window.h</a>
-</li>
-<li>AWINDOW_FLAG_LAYOUT_NO_LIMITS
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389">window.h</a>
-</li>
-<li>AWINDOW_FLAG_NOT_FOCUSABLE
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">window.h</a>
-</li>
-<li>AWINDOW_FLAG_NOT_TOUCH_MODAL
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">window.h</a>
-</li>
-<li>AWINDOW_FLAG_NOT_TOUCHABLE
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SCALED
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SECURE
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SHOW_WALLPAPER
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SHOW_WHEN_LOCKED
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">window.h</a>
-</li>
-<li>AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">window.h</a>
-</li>
-<li>AWINDOW_FLAG_TURN_SCREEN_ON
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01">window.h</a>
-</li>
-<li>AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6">window.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_defs.jd b/docs/html/ndk/reference/globals_defs.jd
deleted file mode 100644
index 8d04efb..0000000
--- a/docs/html/ndk/reference/globals_defs.jd
+++ /dev/null
@@ -1,24 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;<ul>
-<li>AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT
-: <a class="el" href="group___input.html#gaeb170c0fbeeed1d999160566f09f169e">input.h</a>
-</li>
-<li>ANDROID_BITMAP_RESUT_SUCCESS
-: <a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">bitmap.h</a>
-</li>
-<li>ASENSOR_MAGNETIC_FIELD_EARTH_MAX
-: <a class="el" href="group___sensor.html#gaf8b57b13c6432bc6136aac0ad3813d63">sensor.h</a>
-</li>
-<li>ASENSOR_MAGNETIC_FIELD_EARTH_MIN
-: <a class="el" href="group___sensor.html#ga4423a712e27b6d5a57d138796892886d">sensor.h</a>
-</li>
-<li>ASENSOR_STANDARD_GRAVITY
-: <a class="el" href="group___sensor.html#ga5129cb9e4091fc3474e246d5f950e52b">sensor.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_enum.jd b/docs/html/ndk/reference/globals_enum.jd
deleted file mode 100644
index 7fd396e..0000000
--- a/docs/html/ndk/reference/globals_enum.jd
+++ /dev/null
@@ -1,12 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;<ul>
-<li>AndroidBitmapFormat
-: <a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">bitmap.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_eval.jd b/docs/html/ndk/reference/globals_eval.jd
deleted file mode 100644
index e1399c7..0000000
--- a/docs/html/ndk/reference/globals_eval.jd
+++ /dev/null
@@ -1,1652 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;
-
-<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
-<li>AASSET_MODE_BUFFER
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_RANDOM
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_STREAMING
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">asset_manager.h</a>
-</li>
-<li>AASSET_MODE_UNKNOWN
-: <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">asset_manager.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace87b4f25e5fd6fe0f3316d21ecc66a1">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a966a3855351a97ae865264afd74c1534">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_DEFAULT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae628b2bf594733b7c19ae394616cec6c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_HIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5ef4a97dc058235cdfa9fcfe3300c7eb">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_LOW
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ddb34b2376422d2323720049eb57f3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_MEDIUM
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2511479d7cd574c4b293d535e4dc337e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_NONE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a7c1af92914155c418b99844c6aab33d7">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_TV
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10e6c3d636f3f6de75de9208913b0d8f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_XHIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a38a03b3b1c64725679605d8d479c85a0">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_XXHIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad6353daf63778a6ec6f2bd3815d7e6e4">configuration.h</a>
-</li>
-<li>ACONFIGURATION_DENSITY_XXXHIGH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2bd04af33e868a77bd4d83e7d70368ec">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0195de2a57f028a8171c42beff0b0e88">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_12KEY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1aaf1a887f146737030cce95c53066ea">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a593f722738682ae4500dab6427670f4a">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_HIDDEN
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a54e71234e32ed037e2d47472f80eb416">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_NOKEYS
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a40195a1a2d8e21c74d99606d8a1a9918">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYBOARD_QWERTY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a263ff8efb4d2c757e557adc0d0cdeedf">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a34d3a830bc2964000052f8486fd76b0c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5abfbfc3a10affed059263555b00429ab2">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_SOFT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1a56b72c730e40f22f3b8727e54c376c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_KEYSHIDDEN_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5e6a5a3f4175644886bde7d0ed4b1ebf">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65834be1230d1694e5ce8a6f407acab2">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4687ede31c438dd9f2701cab88de1dbe">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR_LTR
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a05242d8f2d254b43ff9414ff1aa38a83">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LAYOUTDIR_RTL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af98332983b787ab9355b527079636870">configuration.h</a>
-</li>
-<li>ACONFIGURATION_LOCALE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ecff796bd0690a9a8498c7de03e9b4">configuration.h</a>
-</li>
-<li>ACONFIGURATION_MCC
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4d40f2aef365c78a52f699b89439db28">configuration.h</a>
-</li>
-<li>ACONFIGURATION_MNC
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ade91a319638eede201579d15f86578a5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_MNC_ZERO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa6cda2f222580dbef27f1277d967d58c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVHIDDEN_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a6db7dd6a67196df88117dcdc904e0cb3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVHIDDEN_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae6ff9883e3e89f8d9ea5c0ebe077c9c5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVHIDDEN_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a79b3a5fe10e948bb79db47b516d46cf5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65e9d31615d2b4adf3738d9a12a1556b">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90e914b60d28c081b313f4b7b6600f47">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_DPAD
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace2e3ed21322100712992ca09f4b75b5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_NONAV
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a3d95e899305aeae366fb7f8d8b6c290a">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_TRACKBALL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad2807d00cb2f5dcb9f456045dd8443a4">configuration.h</a>
-</li>
-<li>ACONFIGURATION_NAVIGATION_WHEEL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a80b53370f65ad283a4fd025f36422bea">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a591461d864136d482fe06e01fd945786">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af44cee3290a23999b0358c5638747a5f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_LAND
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad5746872ff6871379fca93c60bfac8a3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_PORT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad9bf5c1fb90f9fdb20f984d0574592fe">configuration.h</a>
-</li>
-<li>ACONFIGURATION_ORIENTATION_SQUARE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_HEIGHT_DP_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab66ad42d0cf72fd7e8cd99b92b625432">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_LAYOUT
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a12d69ffef9135c1c55e1b8b5c2589e7c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_SIZE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a76ca1eb0e9346d93da592afbbf9a3b72">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREEN_WIDTH_DP_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aad653f0c960112177fdc387a4a0577fa">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENLONG_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a41e55e57da42fd09c378f59c1a63710f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENLONG_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a428bb8fcd8bc731b67b0773dc62781c5">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENLONG_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a91fc014d328507568d225d691b3babfd">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a9abcd34a6c549e048fc75a545081584e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_LARGE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af871d177fdceedb75612cfc1281d2c12">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_NORMAL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a019727e684f25ba921f3479abd62b9f2">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_SMALL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1163af972206a65a5d18bda12fdc511c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SCREENSIZE_XLARGE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0ca385ed504fc92f6ff3f0857e916c9c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SMALLEST_SCREEN_SIZE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5acce415252e0ad95117a05bbe910f06de">configuration.h</a>
-</li>
-<li>ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a227120217d8b6a9d5add3ccc4b283702">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a255cfb57ac18d460c5614565a84f5561">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa73bcf45261366840fea743372682fa6">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_FINGER
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4bf2a8323ec6d072aa48d5fc2cff645e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_NOTOUCH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5adfbeb370edd3b4372c9b0f86f152dde0">configuration.h</a>
-</li>
-<li>ACONFIGURATION_TOUCHSCREEN_STYLUS
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a43a324af59372efd08b34431825cf67e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_NIGHT_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a975087bbd4087b57a68ef3cdbfeb77a1">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_NIGHT_NO
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90ebe564e3a3e384d5b013100f81e4b7">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_NIGHT_YES
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a437af4527fac5407de256ec1ef055046">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_ANY
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10d0916da7fa88c945a9cda259407d4c">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_APPLIANCE
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad99004a7a1b2a97d29b639664947f8e3">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_CAR
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5d6575185e41d909469a1dcf5f81bf4f">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_DESK
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae10bb854f461f60cf399852f8f327077">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_NORMAL
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae7efe2713b6718311da76c828b5b444e">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_TELEVISION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4738dded616f028fbbedcbad764e7969">configuration.h</a>
-</li>
-<li>ACONFIGURATION_UI_MODE_TYPE_WATCH
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ac8c3e2207f2356bc6a1dffc6a615d131">configuration.h</a>
-</li>
-<li>ACONFIGURATION_VERSION
-: <a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1be62e4fc31cf3d3102c99f7c6b4c71b">configuration.h</a>
-</li>
-<li>AINPUT_EVENT_TYPE_KEY
-: <a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea696f0d7635f7a24c17d3f1e4ccdd44ba">input.h</a>
-</li>
-<li>AINPUT_EVENT_TYPE_MOTION
-: <a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea2182dfda2cceb5425dcc2823b9b6b56a">input.h</a>
-</li>
-<li>AINPUT_KEYBOARD_TYPE_ALPHABETIC
-: <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaba1f5ab6bc79749ba96a5d2a3af0e574">input.h</a>
-</li>
-<li>AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC
-: <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaf0226d750ea830eb557ae68bd4a1c82a">input.h</a>
-</li>
-<li>AINPUT_KEYBOARD_TYPE_NONE
-: <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fcea32cb7ce34cdce7095962f0766cc6c3ac">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_ORIENTATION
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaf9be9c04a41b610d994a3d1d7e90d06d">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_PRESSURE
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa79aca706b12b28d0ab14762902fed31a">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_SIZE
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa46f3a6cf859fb161cd29398d8448c688">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOOL_MAJOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaa860f54aa9e5a269dba6a54bbcf3c27c">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOOL_MINOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa19226f6cf713c1b4d0973a163daf6cf1">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOUCH_MAJOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa7ead43624c96e165fd8a25e77148aa67">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_TOUCH_MINOR
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa301181a0f20681135c15010b39bb575d">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_X
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa0e5816bc48cdb33f2b488a109596ffe1">input.h</a>
-</li>
-<li>AINPUT_MOTION_RANGE_Y
-: <a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaab48108c9450ea1b7cd021be7d8cbc332">input.h</a>
-</li>
-<li>AINPUT_SOURCE_ANY
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ab04317e7dd273ff5c87038df67d9796e">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_BUTTON
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dacf1bf3d7b3c6e59f907bdffc9b33370e">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_JOYSTICK
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daaaeffb6442807dd96ec62e9d8a696b57">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_MASK
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daae438f475d03ea60fd9fb356abd7fa01">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_NAVIGATION
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da078a18d85d078412721c336a879bcc1a">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_NONE
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dafd6d5e71f09f6452acf017559481444c">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_POINTER
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da7495274e98fb30dee3dfd903b878cf47">input.h</a>
-</li>
-<li>AINPUT_SOURCE_CLASS_POSITION
-: <a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da682f6982bb55ee809f6acd2deb550167">input.h</a>
-</li>
-<li>AINPUT_SOURCE_DPAD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ad0fbfeff9f8d57104bff14c70ce5e3ef">input.h</a>
-</li>
-<li>AINPUT_SOURCE_GAMEPAD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a6417cb50ecd6ade48c708268434a49d3">input.h</a>
-</li>
-<li>AINPUT_SOURCE_JOYSTICK
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25afb28f10dc074e7f7435f5904c513edb5">input.h</a>
-</li>
-<li>AINPUT_SOURCE_KEYBOARD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a9860918666dd8c0b9d00a8da7af51e6d">input.h</a>
-</li>
-<li>AINPUT_SOURCE_MOUSE
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae71d3dcbd004bccb6e00fde47097cd86">input.h</a>
-</li>
-<li>AINPUT_SOURCE_STYLUS
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a86d4983c71432b27634ba41a64bffdf9">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TOUCH_NAVIGATION
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a3712c4e4fb8ad7f6ae6e40d48e5c6ee7">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TOUCHPAD
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e0715d4b544653ab11893434172a2ef">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TOUCHSCREEN
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a55ea411f927aed8964fa72fec0da444f">input.h</a>
-</li>
-<li>AINPUT_SOURCE_TRACKBALL
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e49d9153c86f60f626d7f797f4e78b6">input.h</a>
-</li>
-<li>AINPUT_SOURCE_UNKNOWN
-: <a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae9348bc04cdaa88b5b010f77a4945454">input.h</a>
-</li>
-<li>AKEY_EVENT_ACTION_DOWN
-: <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a123c3bd18fd93b53d8aedbe7597f7b49">input.h</a>
-</li>
-<li>AKEY_EVENT_ACTION_MULTIPLE
-: <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a08e2d927e155478ee66ec46ebd845ab0">input.h</a>
-</li>
-<li>AKEY_EVENT_ACTION_UP
-: <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635abf18b7c5384c5de8657a0650f8da57c3">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_CANCELED
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da3198fad5ab75df614bb41f0f602a9e55">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_CANCELED_LONG_PRESS
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2daf09856f03f2fffee9a82cb8e508efb7a">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_EDITOR_ACTION
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dab9dbcf990d1e4405e32f847fdea52013">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_FALLBACK
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da14f574126d2544863fa8042ddd0f48c0">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_FROM_SYSTEM
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dae1e7ec188b2404fadd94cfba89afd5d6">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_KEEP_TOUCH_MODE
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dadc0a063ca412b0ea08474df422bf9b41">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_LONG_PRESS
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da39f9f7bdf2e256db0e2a8a5dfbfb7185">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_SOFT_KEYBOARD
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da7dbb272c7b28be9c084df3446a629f32">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_TRACKING
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da91e70ab527f27a1779f4550d457f1689">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dad4b5eba5b14e4076c69bc7185f2804f8">input.h</a>
-</li>
-<li>AKEY_EVENT_FLAG_WOKE_HERE
-: <a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da6473a1afc0cc39e029c2a217bc57cdba">input.h</a>
-</li>
-<li>AKEY_STATE_DOWN
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a286ec0a7aff5903a982be0cd6785b62c">input.h</a>
-</li>
-<li>AKEY_STATE_UNKNOWN
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a9506627d5377c67dbc7fc58804b2cdfd">input.h</a>
-</li>
-<li>AKEY_STATE_UP
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04afa14022f587487c24d401c87e71c8e28">input.h</a>
-</li>
-<li>AKEY_STATE_VIRTUAL
-: <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04ad09fd9fe458ca6c66ead9b9a75c56192">input.h</a>
-</li>
-<li>AKEYCODE_0
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23f585ea17aeceaad2111c51ab289e79">keycodes.h</a>
-</li>
-<li>AKEYCODE_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabcac88b54f8d764bc4573ecc5b9571b0">keycodes.h</a>
-</li>
-<li>AKEYCODE_11
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa22858c3c30d596ad60f355f75df86e1">keycodes.h</a>
-</li>
-<li>AKEYCODE_12
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa781c31195e55b2dcbdd772560dc61aa5">keycodes.h</a>
-</li>
-<li>AKEYCODE_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2079c6fb75141968b60ed79fe895d6db">keycodes.h</a>
-</li>
-<li>AKEYCODE_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa40ccc018c0637e4d938e66b789054551">keycodes.h</a>
-</li>
-<li>AKEYCODE_3D_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68d314a5ec06701205cd0097c5c7145c">keycodes.h</a>
-</li>
-<li>AKEYCODE_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c2d141c3906bd97cfec91443356f7b">keycodes.h</a>
-</li>
-<li>AKEYCODE_5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca99d2be4a3723ba3406944ad623f6e">keycodes.h</a>
-</li>
-<li>AKEYCODE_6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa72bc6560e24d08ff8f3116dac9179079">keycodes.h</a>
-</li>
-<li>AKEYCODE_7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa27070499acdb6c527a285b3840ec7bff">keycodes.h</a>
-</li>
-<li>AKEYCODE_8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93543b23683b33724ecf77ac5a8c19ab">keycodes.h</a>
-</li>
-<li>AKEYCODE_9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa31cd4d7c4e59cf7b057b6c248cff516d">keycodes.h</a>
-</li>
-<li>AKEYCODE_A
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa424a091c62d40f5d65908c9730ae9014">keycodes.h</a>
-</li>
-<li>AKEYCODE_ALT_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3dec175158abe8679bedd98ed1bc3e1a">keycodes.h</a>
-</li>
-<li>AKEYCODE_ALT_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd9b6b0846c6999f5df47d29e58ac95d">keycodes.h</a>
-</li>
-<li>AKEYCODE_APOSTROPHE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab5518a8502914ea5f87ef5d29b32b1b1">keycodes.h</a>
-</li>
-<li>AKEYCODE_APP_SWITCH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa53a59a262d6d523bdc2bd30a1e427bad">keycodes.h</a>
-</li>
-<li>AKEYCODE_ASSIST
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3f036adb654c7752890a283ecbf838">keycodes.h</a>
-</li>
-<li>AKEYCODE_AT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7284f79a266ede479b79726082642e16">keycodes.h</a>
-</li>
-<li>AKEYCODE_AVR_INPUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa57d42dbd8ea4219f76fb116f234e6504">keycodes.h</a>
-</li>
-<li>AKEYCODE_AVR_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa479d36f9814bd00c8986a252664b938b">keycodes.h</a>
-</li>
-<li>AKEYCODE_B
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa65d3bf8d6a8a6c2f7c1b08394f313758">keycodes.h</a>
-</li>
-<li>AKEYCODE_BACK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeb71c74bf556ba72e9c8f8dcbe5453d0">keycodes.h</a>
-</li>
-<li>AKEYCODE_BACKSLASH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac90eb064382e3c482ae86abb7b3f701">keycodes.h</a>
-</li>
-<li>AKEYCODE_BOOKMARK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa03ce46d177e020690aa9d26a0fa850ae">keycodes.h</a>
-</li>
-<li>AKEYCODE_BREAK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa047501f9cf9bce00e6048d8759ea3a23">keycodes.h</a>
-</li>
-<li>AKEYCODE_BRIGHTNESS_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7cf1bf3528b6d8a0e86998287fe00650">keycodes.h</a>
-</li>
-<li>AKEYCODE_BRIGHTNESS_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0af6ec416c09d160e364466faa955c36">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa28c72c33ab93d83539d0790b7e48336a">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_10
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7e6f8621909f3461032c33f9c8acaa7">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_11
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab413971c698b6e25d3955667c0142ac1">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_12
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafe4ee1e5446dd12bbb579b412048e79e">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_13
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaabde2ed26594b89d5769eef9f0d1fe6f">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_14
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f08dfd2c30ddedf1d2983680e89041b">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_15
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d8d0fb1a610fdb4e53f0fb675b7d7d0">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_16
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa224370cba99bda2db6a1c82fd2f7fa39">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab8089673fea303c7a299eefd2c327cc3">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa706a5ff492c80b4653e6fe0dcd278ca1">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c425a063bf6976e1ff8ae9f3cfcbe6">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47149f963528ec7abe55066abfb7caf5">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55057c8cda53a4c539d02ab1a93ca58b">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac09e0c0cbbf6449bf106e4199600db35">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaee64b3e0f30ed09e3c9f01b6c8877c3f">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac8e54092c8be5dc0e114ec35f40e00dc">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_A
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaef2d2ec912aaa9e7215aeab79f7fb086">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_B
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa721765c8f0bbcdb68af06817dbec8e53">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_C
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad622ad5df40d2fdf806abb2adda73b3d">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_L1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa32e159826404c7d76c2a433c24de82a2">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_L2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa36a38421637cfa5ebfd8a0296650cdf4">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa19839eebec939407d901a33b75cf2594">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_R1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7c614b3966583b0ad027e45f594ede46">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_R2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa46d487e9fe31855b7b46739bad58fe3e">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_SELECT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa598289bc85f647c237729126ea392a43">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_START
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3c818d106f4ec793a43749c4c26a8a4">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_THUMBL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68c5d8dcd8fe708ada8f4a4e17feb638">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_THUMBR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9759d817172d268ced1748909a5f5fbe">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_X
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa21174962f95e32cd0345ce657d03ebc7">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_Y
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6654a8b2c700f7783433c86fcdae7919">keycodes.h</a>
-</li>
-<li>AKEYCODE_BUTTON_Z
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06156b68e6de951b44fc662e1b16041f">keycodes.h</a>
-</li>
-<li>AKEYCODE_C
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeed584f454e508ce931bcb33d37adb04">keycodes.h</a>
-</li>
-<li>AKEYCODE_CALCULATOR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa293523c40bb9f1d793cd0b984f636573">keycodes.h</a>
-</li>
-<li>AKEYCODE_CALENDAR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa114be17d1853c77a7406c024d9e4f076">keycodes.h</a>
-</li>
-<li>AKEYCODE_CALL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8b5720ebdd3576c2b536ec9228273d8f">keycodes.h</a>
-</li>
-<li>AKEYCODE_CAMERA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8670880765756933d3d1a10186d39e26">keycodes.h</a>
-</li>
-<li>AKEYCODE_CAPS_LOCK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab9dcb68b35c85d380846c85f323868f1">keycodes.h</a>
-</li>
-<li>AKEYCODE_CAPTIONS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81ba8d5343362b841b8a62b8679ff994">keycodes.h</a>
-</li>
-<li>AKEYCODE_CHANNEL_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa18f1808c6a819e787c9a9941f78b910f">keycodes.h</a>
-</li>
-<li>AKEYCODE_CHANNEL_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa056914fd17ae539dca44f43745d8e05c">keycodes.h</a>
-</li>
-<li>AKEYCODE_CLEAR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95bd8c25adeaa570108c7403f08a2901">keycodes.h</a>
-</li>
-<li>AKEYCODE_COMMA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca0bfbdc67b2c6f76e8fcaaf782c227">keycodes.h</a>
-</li>
-<li>AKEYCODE_CONTACTS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0aa2cfca11b7cabf82341a9dbec83f10">keycodes.h</a>
-</li>
-<li>AKEYCODE_CTRL_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaca9d0df6cc18492209eb287e659aeb1">keycodes.h</a>
-</li>
-<li>AKEYCODE_CTRL_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa99b317cf2f1eb6b06d0226e05223e60c">keycodes.h</a>
-</li>
-<li>AKEYCODE_D
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7e4cb3ef66209a2779be2c8239b57b51">keycodes.h</a>
-</li>
-<li>AKEYCODE_DEL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd013221b457d98975dc47e49817e28a">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_CENTER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e9c93273fd39148f54167133aa5b9ae">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa84b721b13aae56c9f1d3c22b3d81627a">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa668dfb3ed79a37c2c07838c161c1b344">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac6f9d81b6239696a1836695bbfc6a975">keycodes.h</a>
-</li>
-<li>AKEYCODE_DPAD_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf2fd3133a88f3b6725834032bd74bd9e">keycodes.h</a>
-</li>
-<li>AKEYCODE_DVR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf2f03b925a02ba6de9fd98737546a60">keycodes.h</a>
-</li>
-<li>AKEYCODE_E
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae218af7ceb207227bb10f0525e68a8d0">keycodes.h</a>
-</li>
-<li>AKEYCODE_EISU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaadd69273b99eb0b848d98b2d6b3ad3234">keycodes.h</a>
-</li>
-<li>AKEYCODE_ENDCALL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaff971957ae3a4e272b21987854e18d9b">keycodes.h</a>
-</li>
-<li>AKEYCODE_ENTER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac784a7bbbfbdab05fab6c6a1f29c98ff">keycodes.h</a>
-</li>
-<li>AKEYCODE_ENVELOPE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaade96efe470f428bb5c4eaea6ffc3681c">keycodes.h</a>
-</li>
-<li>AKEYCODE_EQUALS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0a197df7ec719c95ddcd6836e76c8498">keycodes.h</a>
-</li>
-<li>AKEYCODE_ESCAPE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac52177e5508edacb8e9c6d3a25db4fb6">keycodes.h</a>
-</li>
-<li>AKEYCODE_EXPLORER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaded9ec81ae6dab451665317723b94083">keycodes.h</a>
-</li>
-<li>AKEYCODE_F
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa455f71ecfe59af0fbd901ac0d0a8d53a">keycodes.h</a>
-</li>
-<li>AKEYCODE_F1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3b84f2c503a9e839f3d36e10e3307fcf">keycodes.h</a>
-</li>
-<li>AKEYCODE_F10
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa60660b13acab39282d0558cdcc93474">keycodes.h</a>
-</li>
-<li>AKEYCODE_F11
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa64cc7b1d8e53d90ff57c39d0b5a4dd22">keycodes.h</a>
-</li>
-<li>AKEYCODE_F12
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa491000231e0ba221b6916b1d9d2c9fb7">keycodes.h</a>
-</li>
-<li>AKEYCODE_F2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1360f7ec66aa6421e240dae637262e84">keycodes.h</a>
-</li>
-<li>AKEYCODE_F3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a4ce6105e12a3a9071cae2f40515085">keycodes.h</a>
-</li>
-<li>AKEYCODE_F4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa882050e4d0f917470a5b91fbf6ae9ebf">keycodes.h</a>
-</li>
-<li>AKEYCODE_F5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab01807c72b46620bb50fcb6abe24d937">keycodes.h</a>
-</li>
-<li>AKEYCODE_F6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa04a12e81ed80bb42ef5c63cedf0dc60">keycodes.h</a>
-</li>
-<li>AKEYCODE_F7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9583b8e4b0d994b7e3a193b67cf6020c">keycodes.h</a>
-</li>
-<li>AKEYCODE_F8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55ca54d42d8df70de2ce9031db1344c8">keycodes.h</a>
-</li>
-<li>AKEYCODE_F9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0c8225c0ef98da730933ae914077dbc9">keycodes.h</a>
-</li>
-<li>AKEYCODE_FOCUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23be9506f92f6efe14d47306a39a2187">keycodes.h</a>
-</li>
-<li>AKEYCODE_FORWARD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafbf0a16c7746e5dee2fd3adbd50da88a">keycodes.h</a>
-</li>
-<li>AKEYCODE_FORWARD_DEL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9516bc190d37fea27e07ddab0c607b51">keycodes.h</a>
-</li>
-<li>AKEYCODE_FUNCTION
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1764b777aa56605f4029d3c71fe70722">keycodes.h</a>
-</li>
-<li>AKEYCODE_G
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa165067e10464019411f768bba9e533d9">keycodes.h</a>
-</li>
-<li>AKEYCODE_GRAVE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa929561086ae7b519fa962597bc85f171">keycodes.h</a>
-</li>
-<li>AKEYCODE_GUIDE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf33a5fa1f163245360aeed89d64b0233">keycodes.h</a>
-</li>
-<li>AKEYCODE_H
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad89a91a1500cb162f22962781ebfd9dc">keycodes.h</a>
-</li>
-<li>AKEYCODE_HEADSETHOOK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0d3d29515a4815fe8d6d8d3291507a33">keycodes.h</a>
-</li>
-<li>AKEYCODE_HELP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab062b403701292c9e2db96a1f88cc6d9">keycodes.h</a>
-</li>
-<li>AKEYCODE_HENKAN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab0686dd37c57d833d1158b7f1d85ee02">keycodes.h</a>
-</li>
-<li>AKEYCODE_HOME
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa526c2411b7476b7ae579f57a0378b2dd">keycodes.h</a>
-</li>
-<li>AKEYCODE_I
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4d44b5e4a19580540d8d77bf5755d74b">keycodes.h</a>
-</li>
-<li>AKEYCODE_INFO
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e76263257a5dc654a413c9dc2fd649">keycodes.h</a>
-</li>
-<li>AKEYCODE_INSERT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62f663d11e91af750a51ddd060b08644">keycodes.h</a>
-</li>
-<li>AKEYCODE_J
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa70c259612ccec117d70afaef947a6a7a">keycodes.h</a>
-</li>
-<li>AKEYCODE_K
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ce56cf50d3632c275c524bd78d0d932">keycodes.h</a>
-</li>
-<li>AKEYCODE_KANA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62d090ae5c95a04dacdff79817dad531">keycodes.h</a>
-</li>
-<li>AKEYCODE_KATAKANA_HIRAGANA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3be7db22b3c8aa046a46631e44863c28">keycodes.h</a>
-</li>
-<li>AKEYCODE_L
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab61c534fd0f4e56c4ba13861a2f5982b">keycodes.h</a>
-</li>
-<li>AKEYCODE_LANGUAGE_SWITCH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7b8e87b47c17c5f1e97fcb56faaa26ff">keycodes.h</a>
-</li>
-<li>AKEYCODE_LAST_CHANNEL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa187963dd6f74b96f132f23e01dea35e9">keycodes.h</a>
-</li>
-<li>AKEYCODE_LEFT_BRACKET
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabdeda0d373aa37ef2ded5ffdfc008708">keycodes.h</a>
-</li>
-<li>AKEYCODE_M
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa43b19e5e5234ce90c8e7ef67dd0cabd1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MANNER_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa380279768c5c50d92bef2a88394f967f">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_AUDIO_TRACK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3cdb53cdf8c576e272502da06daa52e1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_CLOSE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6788c6e1443140b0ec4d004d8293e998">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_EJECT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa317bffd44306b021c401d3a26b82a7f6">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_FAST_FORWARD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa69e648024402af688d490a2041f15bca">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_NEXT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5a6c3fc963e8163852b9a23e3a198b3">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PAUSE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f4e0178c2028b3042b0a5948e38e4e4">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PLAY
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa615cf6202b0ae0ed550f42f6c64b36a1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PLAY_PAUSE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa42f8fe71e8d45b5a83d83d80c3da40e1">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_PREVIOUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81432c31b00d47f768c29163eb276acb">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_RECORD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e1eae0b245176aaa024a53411441f9">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_REWIND
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaecd53183b84c23a2ca65670a23674319">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_STOP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac4faa33993d80db1326073ea15a38e7d">keycodes.h</a>
-</li>
-<li>AKEYCODE_MEDIA_TOP_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3ddf83cb2f701911b03c3a738e2e73a">keycodes.h</a>
-</li>
-<li>AKEYCODE_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa707b85e89923b0f760be795972a87d76">keycodes.h</a>
-</li>
-<li>AKEYCODE_META_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaadfb2d920bbe422c096120d39811c58">keycodes.h</a>
-</li>
-<li>AKEYCODE_META_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68038455e2b0846db51f9957e0df9cb8">keycodes.h</a>
-</li>
-<li>AKEYCODE_MINUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaca10bd34ad0abecfecace908b8cb92ca">keycodes.h</a>
-</li>
-<li>AKEYCODE_MOVE_END
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5605f49f5271430f5f150efb3cd0398a">keycodes.h</a>
-</li>
-<li>AKEYCODE_MOVE_HOME
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7544f3de2fb5f78bec62af94a32fdc58">keycodes.h</a>
-</li>
-<li>AKEYCODE_MUHENKAN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7321e5c6b3cbab142bd16957653b2ac7">keycodes.h</a>
-</li>
-<li>AKEYCODE_MUSIC
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14508751d70a0404b194d4b6df83ec72">keycodes.h</a>
-</li>
-<li>AKEYCODE_MUTE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f6675d38f50e3556a8531839fd83f02">keycodes.h</a>
-</li>
-<li>AKEYCODE_N
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c0b26804c89560a9e87c45f7f9fed36">keycodes.h</a>
-</li>
-<li>AKEYCODE_NOTIFICATION
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6115506352a5828532fc6a0b91683331">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUM
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe6e880f65bebbdd5246a4164c4ab37a">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUM_LOCK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad5e349eadd3255c6ad4982dc40ed23ef">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_0
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa343df35e6a0ad0599e19b8ef7174909b">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c0ec8e42917fa9ac53977db3e6aeb17">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4dfd17c2209908e1ec890e10a3211f89">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1efe1886a4b472b999215c0e81f7386">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1fdd16681c1441b934f679b94fd0e4f8">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_5
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5916003e7c737a8cc06e52d2ee76c3b">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_6
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa13b83389e0f5de129227af4b8d3f035d">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_7
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaed9468951ef2887c07c8095c2e7d4c93">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_8
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5f0a300566235720eb93fee9f2196642">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_9
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad0c490e3965df546e2d5a83edf423d95">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_ADD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9d2fefa9a3f6037f48b247e66dd28c35">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_COMMA
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa900e3bb0bc4ff70ba786f18ff4db0bd1">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_DIVIDE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac108b744e8f93af69158d146425236c">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_DOT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6aab6b5914e120b43b3a1a8269e9cee1">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_ENTER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa79432be5f7a44e99ddc3721fd9fd212e">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_EQUALS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c1007a59641499ee5e1508e747c5ed">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_LEFT_PAREN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacc903e9eb495cf6cef7c6bc825f82f54">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_MULTIPLY
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47ce00b838e7ee0a34066dc2595ac735">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_RIGHT_PAREN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7662e0f2a099239dc69f6a27c7daabf9">keycodes.h</a>
-</li>
-<li>AKEYCODE_NUMPAD_SUBTRACT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bee314dbbea0a349eb301d10256bbe">keycodes.h</a>
-</li>
-<li>AKEYCODE_O
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa249667bc4a59d99be1914535877329fb">keycodes.h</a>
-</li>
-<li>AKEYCODE_P
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac68ef56b78bd0c8626cc68bb6cb9156f">keycodes.h</a>
-</li>
-<li>AKEYCODE_PAGE_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0b7fe1c18f53e6328657858a88826393">keycodes.h</a>
-</li>
-<li>AKEYCODE_PAGE_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4fd0d4ea5b6898f4a40011b97a739a04">keycodes.h</a>
-</li>
-<li>AKEYCODE_PAIRING
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0ecddd3dce52cf60c96c5d430b1f553">keycodes.h</a>
-</li>
-<li>AKEYCODE_PERIOD
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9dd68c8ecebd4e274e8c357dcdfe8a04">keycodes.h</a>
-</li>
-<li>AKEYCODE_PICTSYMBOLS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacdc7c004da1594fa156de87befef5f41">keycodes.h</a>
-</li>
-<li>AKEYCODE_PLUS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7f72d867b311e0845aef732dcc66495">keycodes.h</a>
-</li>
-<li>AKEYCODE_POUND
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf448758c44899e41b67f76dfe3be51e9">keycodes.h</a>
-</li>
-<li>AKEYCODE_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_BLUE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e82219fdb937fee5a22426c607dd4e0">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_GREEN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad50c1e2136e47843a8dabca929f8ead1">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_RED
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2d9e3e82e69955f649b586f4518e074c">keycodes.h</a>
-</li>
-<li>AKEYCODE_PROG_YELLOW
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafa813640412bd41a181f0ec3a33dddc4">keycodes.h</a>
-</li>
-<li>AKEYCODE_Q
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa932cf6ea8d87e6d6d97af658dd0fa206">keycodes.h</a>
-</li>
-<li>AKEYCODE_R
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaba25ac2c15a8edbbbff16a9fe6e74532">keycodes.h</a>
-</li>
-<li>AKEYCODE_RIGHT_BRACKET
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa084dfa52626040a08d374f8aec066e6a">keycodes.h</a>
-</li>
-<li>AKEYCODE_RO
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae8b0af04dac5ea56fd55e577fd9e6be4">keycodes.h</a>
-</li>
-<li>AKEYCODE_S
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae1ed25c28a8fce578cddb17ca6888ff6">keycodes.h</a>
-</li>
-<li>AKEYCODE_SCROLL_LOCK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa78ff5c8316235635f76e3c3179e9a7fc">keycodes.h</a>
-</li>
-<li>AKEYCODE_SEARCH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac644fd307fd0ef0d3ed3d2e074c1a4b7">keycodes.h</a>
-</li>
-<li>AKEYCODE_SEMICOLON
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac0a2920161f4f2d97b0b060614b23391">keycodes.h</a>
-</li>
-<li>AKEYCODE_SETTINGS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bbd457230c3028df6b91d5bdda9159">keycodes.h</a>
-</li>
-<li>AKEYCODE_SHIFT_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafb9875645596928cec46368e74499dc4">keycodes.h</a>
-</li>
-<li>AKEYCODE_SHIFT_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf9eab1348ae1e8f18ad5bf3c77df4212">keycodes.h</a>
-</li>
-<li>AKEYCODE_SLASH
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa54c047be3811d637a33d9b3e39d16e1a">keycodes.h</a>
-</li>
-<li>AKEYCODE_SLEEP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafc077e5a6b447ea060c144f6e65bd207">keycodes.h</a>
-</li>
-<li>AKEYCODE_SOFT_LEFT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2dc78d3a93876b77402d2a7f02e4b899">keycodes.h</a>
-</li>
-<li>AKEYCODE_SOFT_RIGHT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8cadfbfcaaa83fef168de13639adfcae">keycodes.h</a>
-</li>
-<li>AKEYCODE_SPACE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa10389300ac5d70f8d9733564b3cab4e7">keycodes.h</a>
-</li>
-<li>AKEYCODE_STAR
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1461fbf54e3dcba96e5d6d0638c18305">keycodes.h</a>
-</li>
-<li>AKEYCODE_STB_INPUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa988b0372359b2bca7390878fdba9e1b5">keycodes.h</a>
-</li>
-<li>AKEYCODE_STB_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab28aea3a51b11c9f227ce8cd5ff55a3d">keycodes.h</a>
-</li>
-<li>AKEYCODE_SWITCH_CHARSET
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad6a1f88b2cc3b6ff8f1724eb01473ec3">keycodes.h</a>
-</li>
-<li>AKEYCODE_SYM
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c1c6752d5db5e02da51d8937e5e3c6f">keycodes.h</a>
-</li>
-<li>AKEYCODE_SYSRQ
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14e22c69bcd47ffb4445ee18a4332d84">keycodes.h</a>
-</li>
-<li>AKEYCODE_T
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2feac8b458ef8eb9c0a0dd73766927c2">keycodes.h</a>
-</li>
-<li>AKEYCODE_TAB
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1b1bfda850b2acd0b60e8456e2bfa958">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0776ffae512b4848e53fce762a3a5017">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_ANTENNA_CABLE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe33a80d6d3bf889af25cbd77fdb89f9">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_AUDIO_DESCRIPTION
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa419f0adac43cad104cd6cf83dc5f13f6">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5fca6a9ec1ce246bf3c53d859ac9f5eb">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaccc5900ca5dd399d5ce11dd8ca324678">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_CONTENTS_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4c18feeafff3c41081073c025ee017b8">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_DATA_SERVICE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa954c2251b2cb53f47637802cb66baf06">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1750b29e396bd1fd237ed4aadacc8f5">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPONENT_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa156e2dba81e7c73624ccf8c2ef8833ae">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPONENT_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8db9b6ee1457267abea03430781bb0ec">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPOSITE_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c3097f14c6582958ba1d14d70115ccd">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_COMPOSITE_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaada13cbb9d619bc610678ad66325647b9">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a50de965f50ab3aa42772aac0808445">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_2
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7ec65c008471d771bf879ec012f5c7f">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_3
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a0f267a2696d15bf16127121b1f1c7f">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_HDMI_4
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4437c1d8d2d33058cfa71ec7b2771ec5">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_INPUT_VGA_1
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa149b2c8a4817075c0a41e0adf11c8e85">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_MEDIA_CONTEXT_MENU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaadde70071f6a432f367079efa6e1a6fe">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_NETWORK
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec5e46a5afc57953d1772e086307aa42">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_NUMBER_ENTRY
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa630a08e07a3b4c6bcac9a1a72d176055">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_POWER
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafda3b0ea1b158831fc443bf4911a3930">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_RADIO_SERVICE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93dd3fd752701af5a5491e01cc15db72">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3707d4396417535a611e4548afe33936">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE_BS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8c52e7d06525c0ee5d943d63a0fa8ea5">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE_CS
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4eea1809a9ff679ed7773332d728c6b0">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_SATELLITE_SERVICE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17c0e68066b86610ff168c6367af36eb">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TELETEXT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3d7b89756df37f01d6d0f13beff1db">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TERRESTRIAL_ANALOG
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14f2b6fe8550832ef9e3f9aa53164073">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TERRESTRIAL_DIGITAL
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacad8c149251a78760a5fe4931b9cdf16">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_TIMER_PROGRAMMING
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0293c2a63e4d955080334bef6640840">keycodes.h</a>
-</li>
-<li>AKEYCODE_TV_ZOOM_MODE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8e79045045293070c8eb9e408f1335b4">keycodes.h</a>
-</li>
-<li>AKEYCODE_U
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac1a220314f986aae45d7fe3b35501595">keycodes.h</a>
-</li>
-<li>AKEYCODE_UNKNOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa593f8ae18990d627785719284a12a6f">keycodes.h</a>
-</li>
-<li>AKEYCODE_V
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4043bc48fa55cce7825176052d6e199a">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOICE_ASSIST
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95898663b7f74c93d0b860a43528c744">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOLUME_DOWN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a882dae17080d3b5f3329e79db60c66">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOLUME_MUTE
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa174a5c7c39753235109696e82870c575">keycodes.h</a>
-</li>
-<li>AKEYCODE_VOLUME_UP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5b81e325d9efd633eef7535a5b538882">keycodes.h</a>
-</li>
-<li>AKEYCODE_W
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0c80e98547c3daa01f3d9e7f4f00425">keycodes.h</a>
-</li>
-<li>AKEYCODE_WAKEUP
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa903c5152d26b3011ae521afa06759429">keycodes.h</a>
-</li>
-<li>AKEYCODE_WINDOW
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe7531c40ff4a31614ff6fd61802ebe8">keycodes.h</a>
-</li>
-<li>AKEYCODE_X
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec585cebac89004faffbdc28dc6d81c5">keycodes.h</a>
-</li>
-<li>AKEYCODE_Y
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06fc277ef25acdd89d64c18eed0daa9b">keycodes.h</a>
-</li>
-<li>AKEYCODE_YEN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ee19d21912056b902e283efa2d9d14b">keycodes.h</a>
-</li>
-<li>AKEYCODE_Z
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7439a09f219a0addc13c758ef7508cce">keycodes.h</a>
-</li>
-<li>AKEYCODE_ZENKAKU_HANKAKU
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf782be8df9a8ca5dc86c9bfeabac6f22">keycodes.h</a>
-</li>
-<li>AKEYCODE_ZOOM_IN
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacfce9bb78ef8106dce4868f81cca4fb4">keycodes.h</a>
-</li>
-<li>AKEYCODE_ZOOM_OUT
-: <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf035f5234c3df4589f35a50e99e0535">keycodes.h</a>
-</li>
-<li>ALOOPER_EVENT_ERROR
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_HANGUP
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_INPUT
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_INVALID
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff">looper.h</a>
-</li>
-<li>ALOOPER_EVENT_OUTPUT
-: <a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d">looper.h</a>
-</li>
-<li>ALOOPER_POLL_CALLBACK
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2">looper.h</a>
-</li>
-<li>ALOOPER_POLL_ERROR
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4">looper.h</a>
-</li>
-<li>ALOOPER_POLL_TIMEOUT
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443">looper.h</a>
-</li>
-<li>ALOOPER_POLL_WAKE
-: <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47">looper.h</a>
-</li>
-<li>ALOOPER_PREPARE_ALLOW_NON_CALLBACKS
-: <a class="el" href="group___looper.html#ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb">looper.h</a>
-</li>
-<li>AMETA_ALT_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca256c74b768ecee57e3218e81ae6945df">input.h</a>
-</li>
-<li>AMETA_ALT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caba44b1077427e4da1d202e0c8f772881">input.h</a>
-</li>
-<li>AMETA_ALT_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca985db074c0f44749ca86b5cc0454056a">input.h</a>
-</li>
-<li>AMETA_CAPS_LOCK_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafc467c98d509b0de28b298801a0c3e37">input.h</a>
-</li>
-<li>AMETA_CTRL_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca752c837afd5ff0fcf75ddee7b6808be6">input.h</a>
-</li>
-<li>AMETA_CTRL_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cabe927318a2a11a46be3e9d78dbd81ef5">input.h</a>
-</li>
-<li>AMETA_CTRL_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca0ab007e367ae136b873b3e6636747419">input.h</a>
-</li>
-<li>AMETA_FUNCTION_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca545b31b72b0454c22c170ff534ddfdf1">input.h</a>
-</li>
-<li>AMETA_META_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca6f923de8f2cd72e3ad86149c0747906f">input.h</a>
-</li>
-<li>AMETA_META_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca9c04e7c2ad1f0f41af60402188a29c4a">input.h</a>
-</li>
-<li>AMETA_META_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafdf56d1259ae16c97161c443d7949bdf">input.h</a>
-</li>
-<li>AMETA_NONE
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cae0a3cb26517b3f876beb37594494526d">input.h</a>
-</li>
-<li>AMETA_NUM_LOCK_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca15d234534a6870add5594f02b7333dc6">input.h</a>
-</li>
-<li>AMETA_SCROLL_LOCK_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafe8dacdc6566f655a3eab73ea4a9af5a">input.h</a>
-</li>
-<li>AMETA_SHIFT_LEFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa01fa027cdd8951530437bcbe04c3ed7">input.h</a>
-</li>
-<li>AMETA_SHIFT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa3d5f49c3a55b653a94c798a2c93b197">input.h</a>
-</li>
-<li>AMETA_SHIFT_RIGHT_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cac52930581c339216218a6f50c5b57aa1">input.h</a>
-</li>
-<li>AMETA_SYM_ON
-: <a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca8af1e90950a728baca807a83e50b22ea">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_CANCEL
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_DOWN
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a225e61c48ba334abc1b5811db02edcf1">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_HOVER_ENTER
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a247b2c60ad92f3130ad43c907986ffb3">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_HOVER_EXIT
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600ac00b1eacfbea779863abf3fcf02134aa">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_HOVER_MOVE
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a84bc9fb3c01ff7ca9ee452a510e7de60">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_MASK
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600abf84a22c84d4b7228102b80f3af92a4f">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_MOVE
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a41c56c4e772953fce60c93bc671639a3">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_OUTSIDE
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_DOWN
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a1618c641fd3f49fa7483f298d05b3cd2">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_INDEX_MASK
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a51384339fbb57c0087f7f50c45d9cff3">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_POINTER_UP
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600af2ef56aa7220eeb2073b9b028737bc1e">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_SCROLL
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a45ba62b1e6fab4e84d5782d7c35ced04">input.h</a>
-</li>
-<li>AMOTION_EVENT_ACTION_UP
-: <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a43798b2b7a6de4616d150b2438b8419e">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_BRAKE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae3a99764f3681dd9e094852bb2489ece">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_DISTANCE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae800909411a1e83173b0eef7aa458d0e">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GAS
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0223f235a6044815918af2abafcbf16">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_1
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadcc18afd3a7069412617df34db5a27bc">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_10
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da29ba08f4ddc658e0127ee5bc08d185f2">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_11
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafc64a4b307f62bb12b645918aa7edb57">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_12
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae5d32b3e9cec4936ae1e074f320c3063">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_13
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f19f5bc52e5eaec5ebd4f07aad12180">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_14
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadb866d826ecf25161d7c7f86166e149b">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_15
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da7e86befc8502b8df687284f3c40b2eca">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_16
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daaaa011ba929b18c6da71153638f92336">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_2
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac4addf06abfa6c76f0578ddde049aad5">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_3
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac7df57ef5082e10be83f66d7477bce9c">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_4
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da321873d126b7d545665096694cb7d9d9">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_5
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da9b47cef7060197e1b0302a8a718c3085">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_6
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daad7e47a1b5fb66864b6d988374f50a84">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_7
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da222c06f51a60e59504b635dbf89a025b">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_8
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab59a8a373a913e40b146ed762976d6fe">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_GENERIC_9
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da721fa0fbca8b22f1ecc8d3870f4e7443">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_HAT_X
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da04245c76cb9b32dcba920661f11ac9da">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_HAT_Y
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da98c323321d908db459e7cf86a7e8a482">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_HSCROLL
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da92955e6b0f3f82af66a505c854e9edff">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_LTRIGGER
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae4c65c3b1bd2946ff9e18c6041cdb591">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_ORIENTATION
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da114f2b3fc233ccf7a4470787c31457d2">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_PRESSURE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da3b4fd0f17cfdeb6a055babecd2b0ded8">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RTRIGGER
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da116e80c6be166290ca481fefa5de38c1">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RUDDER
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da318a0782f895949407fc192fc4280257">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RX
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da689b612864177d6b57d4181442e3e38e">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RY
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa20188da209300e1f80f6f5bd4058e13">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_RZ
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da381948b3321afd390ad164345eb9206b">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_SIZE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da4baba3ccaec881089a864ba6deaf8bd6">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_THROTTLE
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da6d1f5d64e607104964eb43d8fae07a4f">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TILT
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafca0a235f69c4b38bfc95e7a7b8d9ab1">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOOL_MAJOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa273d64c392f86ae789fd5e24661ba0a">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOOL_MINOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadebd200b37ffaf36b94e7e478c559142">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOUCH_MAJOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da792b9e01044a2e43e7f80e5559db20c2">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_TOUCH_MINOR
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa8b24b0f01f24898a36e5751c8eca63c">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_VSCROLL
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dad11be04b4b81715cad905ee9fa348e99">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_WHEEL
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0ae83ebd74e672bb35378b92a440b1d">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_X
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f4b5b009634039a1f361048a5fc6064">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_Y
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da64f7de8558265bd8179d206eb33eff6c">input.h</a>
-</li>
-<li>AMOTION_EVENT_AXIS_Z
-: <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5a689e572da9bc5feafcb6c011368305">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_BACK
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a1841d075a2992ff7fbefa3fd50189b86">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_FORWARD
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a4105edf43f7748c52c859cc5aa7dc438">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_PRIMARY
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ab388f65477b9dd4c51e6367111168d65">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_SECONDARY
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a08118700ecb4e147528a0e725afc9451">input.h</a>
-</li>
-<li>AMOTION_EVENT_BUTTON_TERTIARY
-: <a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ae6e2af1e7065e035e8a10a595827180f">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_BOTTOM
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388ad8b662839787e1c7dd2616f32c02aaeb">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_LEFT
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388afb70c13f16daade25ba8132a5ea3cf52">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_NONE
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a37dd7496968e6defbecc3c8d6ab2734d">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_RIGHT
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a7d45674e03f1876a43d4810508905078">input.h</a>
-</li>
-<li>AMOTION_EVENT_EDGE_FLAG_TOP
-: <a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a915e1ade9b600d11a3c70a17a88de757">input.h</a>
-</li>
-<li>AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED
-: <a class="el" href="group___input.html#ggab04a0655cd1e3bcac5e8f48c18df1a57a200623e1e4eee7797cad30917d289d7a">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_ERASER
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf9932f65b5b6b5800fb5873a60dbf0cb">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_FINGER
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eafd789262defb8a268fa80d26b0c30bcc">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_MOUSE
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7be0c750d7d6719e7c948914400ae0de">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_STYLUS
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf05dc95a74e560c89cec1f3100185fc7">input.h</a>
-</li>
-<li>AMOTION_EVENT_TOOL_TYPE_UNKNOWN
-: <a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7e1ea0c955ebbac1349866e8995e0208">input.h</a>
-</li>
-<li>ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY
-: <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS
-: <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED
-: <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">native_activity.h</a>
-</li>
-<li>ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT
-: <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9">native_activity.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_A_8
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_NONE
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_RGB_565
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_RGBA_4444
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_FORMAT_RGBA_8888
-: <a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_ALLOCATION_FAILED
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_BAD_PARAMETER
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_JNI_EXCEPTION
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d">bitmap.h</a>
-</li>
-<li>ANDROID_BITMAP_RESULT_SUCCESS
-: <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">bitmap.h</a>
-</li>
-<li>AOBB_STATE_ERROR_ALREADY_MOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a8b074af151167a965a550b9829fafb37">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_COULD_NOT_MOUNT
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a324da2b8fea5875339d442d1f2d0b45b">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_COULD_NOT_UNMOUNT
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a1f2b51b53fc57b57a9967f6ce0c88dbe">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_INTERNAL
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a50642881107d6673aace1494a5d6fce2">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_NOT_MOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a3ce8539aa8b531c9de1d16041322d7a8">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_ERROR_PERMISSION_DENIED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2467a4b6a634680e12c288a7790ff66c">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_MOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2a9c420e6008c108a7198fd861c042d5">storage_manager.h</a>
-</li>
-<li>AOBB_STATE_UNMOUNTED
-: <a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a6710bb5b68cfc115eedcde2aafd8a667">storage_manager.h</a>
-</li>
-<li>AOBBINFO_OVERLAY
-: <a class="el" href="group___storage.html#ggae4d5251432e1a9e6803c0240cc492e18a33e2ae83b4c25d33a4335dccf1de1c3a">obb.h</a>
-</li>
-<li>AREPORTING_MODE_CONTINUOUS
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c">sensor.h</a>
-</li>
-<li>AREPORTING_MODE_ON_CHANGE
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5">sensor.h</a>
-</li>
-<li>AREPORTING_MODE_ONE_SHOT
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb">sensor.h</a>
-</li>
-<li>AREPORTING_MODE_SPECIAL_TRIGGER
-: <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_ACCURACY_HIGH
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_ACCURACY_LOW
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_ACCURACY_MEDIUM
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_NO_CONTACT
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d">sensor.h</a>
-</li>
-<li>ASENSOR_STATUS_UNRELIABLE
-: <a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_ACCELEROMETER
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_GYROSCOPE
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_LIGHT
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_MAGNETIC_FIELD
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">sensor.h</a>
-</li>
-<li>ASENSOR_TYPE_PROXIMITY
-: <a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">sensor.h</a>
-</li>
-<li>AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508">window.h</a>
-</li>
-<li>AWINDOW_FLAG_ALT_FOCUSABLE_IM
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">window.h</a>
-</li>
-<li>AWINDOW_FLAG_BLUR_BEHIND
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">window.h</a>
-</li>
-<li>AWINDOW_FLAG_DIM_BEHIND
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f">window.h</a>
-</li>
-<li>AWINDOW_FLAG_DISMISS_KEYGUARD
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">window.h</a>
-</li>
-<li>AWINDOW_FLAG_DITHER
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">window.h</a>
-</li>
-<li>AWINDOW_FLAG_FORCE_NOT_FULLSCREEN
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d">window.h</a>
-</li>
-<li>AWINDOW_FLAG_FULLSCREEN
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">window.h</a>
-</li>
-<li>AWINDOW_FLAG_IGNORE_CHEEK_PRESSES
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326">window.h</a>
-</li>
-<li>AWINDOW_FLAG_KEEP_SCREEN_ON
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">window.h</a>
-</li>
-<li>AWINDOW_FLAG_LAYOUT_IN_SCREEN
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">window.h</a>
-</li>
-<li>AWINDOW_FLAG_LAYOUT_INSET_DECOR
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563">window.h</a>
-</li>
-<li>AWINDOW_FLAG_LAYOUT_NO_LIMITS
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389">window.h</a>
-</li>
-<li>AWINDOW_FLAG_NOT_FOCUSABLE
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">window.h</a>
-</li>
-<li>AWINDOW_FLAG_NOT_TOUCH_MODAL
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">window.h</a>
-</li>
-<li>AWINDOW_FLAG_NOT_TOUCHABLE
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SCALED
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SECURE
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SHOW_WALLPAPER
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824">window.h</a>
-</li>
-<li>AWINDOW_FLAG_SHOW_WHEN_LOCKED
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">window.h</a>
-</li>
-<li>AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">window.h</a>
-</li>
-<li>AWINDOW_FLAG_TURN_SCREEN_ON
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01">window.h</a>
-</li>
-<li>AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH
-: <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6">window.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_eval_w.jd b/docs/html/ndk/reference/globals_eval_w.jd
deleted file mode 100644
index c996d30..0000000
--- a/docs/html/ndk/reference/globals_eval_w.jd
+++ /dev/null
@@ -1,20 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;
-
-<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
-<li>WINDOW_FORMAT_RGB_565
-: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">native_window.h</a>
-</li>
-<li>WINDOW_FORMAT_RGBA_8888
-: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">native_window.h</a>
-</li>
-<li>WINDOW_FORMAT_RGBX_8888
-: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">native_window.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_func.jd b/docs/html/ndk/reference/globals_func.jd
deleted file mode 100644
index ae48353..0000000
--- a/docs/html/ndk/reference/globals_func.jd
+++ /dev/null
@@ -1,551 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;
-
-<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
-<li>AAsset_close()
-: <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">asset_manager.h</a>
-</li>
-<li>AAsset_getBuffer()
-: <a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">asset_manager.h</a>
-</li>
-<li>AAsset_getLength()
-: <a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">asset_manager.h</a>
-</li>
-<li>AAsset_getLength64()
-: <a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">asset_manager.h</a>
-</li>
-<li>AAsset_getRemainingLength()
-: <a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">asset_manager.h</a>
-</li>
-<li>AAsset_getRemainingLength64()
-: <a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">asset_manager.h</a>
-</li>
-<li>AAsset_isAllocated()
-: <a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">asset_manager.h</a>
-</li>
-<li>AAsset_openFileDescriptor()
-: <a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">asset_manager.h</a>
-</li>
-<li>AAsset_openFileDescriptor64()
-: <a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">asset_manager.h</a>
-</li>
-<li>AAsset_read()
-: <a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">asset_manager.h</a>
-</li>
-<li>AAsset_seek()
-: <a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">asset_manager.h</a>
-</li>
-<li>AAsset_seek64()
-: <a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">asset_manager.h</a>
-</li>
-<li>AAssetDir_close()
-: <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">asset_manager.h</a>
-</li>
-<li>AAssetDir_getNextFileName()
-: <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">asset_manager.h</a>
-</li>
-<li>AAssetDir_rewind()
-: <a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">asset_manager.h</a>
-</li>
-<li>AAssetManager_fromJava()
-: <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">asset_manager_jni.h</a>
-</li>
-<li>AAssetManager_open()
-: <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">asset_manager.h</a>
-</li>
-<li>AAssetManager_openDir()
-: <a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">asset_manager.h</a>
-</li>
-<li>AConfiguration_copy()
-: <a class="el" href="group___configuration.html#gaabff04218a0a76afb8d3ea551b001565">configuration.h</a>
-</li>
-<li>AConfiguration_delete()
-: <a class="el" href="group___configuration.html#ga60fe264b97da84d3370eb9e220159e6d">configuration.h</a>
-</li>
-<li>AConfiguration_diff()
-: <a class="el" href="group___configuration.html#gabfe69b0dccae425a16fe94d084f20402">configuration.h</a>
-</li>
-<li>AConfiguration_fromAssetManager()
-: <a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">configuration.h</a>
-</li>
-<li>AConfiguration_getCountry()
-: <a class="el" href="group___configuration.html#gad2b47f787012a82a67a20e5de5211d46">configuration.h</a>
-</li>
-<li>AConfiguration_getDensity()
-: <a class="el" href="group___configuration.html#ga4c994e0555947340582094c3da32a663">configuration.h</a>
-</li>
-<li>AConfiguration_getKeyboard()
-: <a class="el" href="group___configuration.html#gafd0f76ccd4fe4bda5172b8e0bc6675e4">configuration.h</a>
-</li>
-<li>AConfiguration_getKeysHidden()
-: <a class="el" href="group___configuration.html#ga7a8317ab975f621f3fe62ed1b44f2605">configuration.h</a>
-</li>
-<li>AConfiguration_getLanguage()
-: <a class="el" href="group___configuration.html#ga7b004c13448704afb0ea2040d69468c1">configuration.h</a>
-</li>
-<li>AConfiguration_getLayoutDirection()
-: <a class="el" href="group___configuration.html#ga13dbf2fc9a382c62b391e7de9cf9b468">configuration.h</a>
-</li>
-<li>AConfiguration_getMcc()
-: <a class="el" href="group___configuration.html#ga1e78004237a931086d2ae4bd8324bd30">configuration.h</a>
-</li>
-<li>AConfiguration_getMnc()
-: <a class="el" href="group___configuration.html#ga4783776a4fad4501898472375d781fb9">configuration.h</a>
-</li>
-<li>AConfiguration_getNavHidden()
-: <a class="el" href="group___configuration.html#gafe8d3a9c2f715ea76c8e4a99c2db9eaa">configuration.h</a>
-</li>
-<li>AConfiguration_getNavigation()
-: <a class="el" href="group___configuration.html#gae3ff1541b63f5b9256f7c0ebae372977">configuration.h</a>
-</li>
-<li>AConfiguration_getOrientation()
-: <a class="el" href="group___configuration.html#gaa7d8e3e9871dc925fef3e342a92e4e22">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenHeightDp()
-: <a class="el" href="group___configuration.html#ga9905a4765f8d0d921c476ebce01c7648">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenLong()
-: <a class="el" href="group___configuration.html#gab7d1f5aa59e8fa4db0a1b91bb322034c">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenSize()
-: <a class="el" href="group___configuration.html#ga9d2c1b8731795d8e74be7e23cbc77552">configuration.h</a>
-</li>
-<li>AConfiguration_getScreenWidthDp()
-: <a class="el" href="group___configuration.html#ga61e5fe9612c170c33e1c7e9fb92f2219">configuration.h</a>
-</li>
-<li>AConfiguration_getSdkVersion()
-: <a class="el" href="group___configuration.html#ga4aa7062198e5aacd9fabb04d0453dd91">configuration.h</a>
-</li>
-<li>AConfiguration_getSmallestScreenWidthDp()
-: <a class="el" href="group___configuration.html#ga7fc015e41fad342edba66a003d9848aa">configuration.h</a>
-</li>
-<li>AConfiguration_getTouchscreen()
-: <a class="el" href="group___configuration.html#gad305e6cf86fa915c24212e71bb2bf027">configuration.h</a>
-</li>
-<li>AConfiguration_getUiModeNight()
-: <a class="el" href="group___configuration.html#ga447f16a9e4f8400e5e0328900749ff16">configuration.h</a>
-</li>
-<li>AConfiguration_getUiModeType()
-: <a class="el" href="group___configuration.html#ga1d75777892f38208feb3d2a94a977fcf">configuration.h</a>
-</li>
-<li>AConfiguration_isBetterThan()
-: <a class="el" href="group___configuration.html#gafd2bb31057c8d57efcea7603458d2a8d">configuration.h</a>
-</li>
-<li>AConfiguration_match()
-: <a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">configuration.h</a>
-</li>
-<li>AConfiguration_new()
-: <a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">configuration.h</a>
-</li>
-<li>AConfiguration_setCountry()
-: <a class="el" href="group___configuration.html#gac2f5d414a6466634b1639b5c6f8879ac">configuration.h</a>
-</li>
-<li>AConfiguration_setDensity()
-: <a class="el" href="group___configuration.html#ga9217af9858a7166dcb9a877192779eac">configuration.h</a>
-</li>
-<li>AConfiguration_setKeyboard()
-: <a class="el" href="group___configuration.html#ga4ab3429c5505c108c09349f1ddef572f">configuration.h</a>
-</li>
-<li>AConfiguration_setKeysHidden()
-: <a class="el" href="group___configuration.html#ga5a80a02aa10cfa17de0795054e927183">configuration.h</a>
-</li>
-<li>AConfiguration_setLanguage()
-: <a class="el" href="group___configuration.html#ga1f3c6cf6667655f83777acda7387ddff">configuration.h</a>
-</li>
-<li>AConfiguration_setLayoutDirection()
-: <a class="el" href="group___configuration.html#gaaf47215cf551594f8c2a0594419b47e1">configuration.h</a>
-</li>
-<li>AConfiguration_setMcc()
-: <a class="el" href="group___configuration.html#gae6198b4eaf3e34168f4b13b8b5975d93">configuration.h</a>
-</li>
-<li>AConfiguration_setMnc()
-: <a class="el" href="group___configuration.html#gaaf060ef69c3636f62e90ae0b520eecb8">configuration.h</a>
-</li>
-<li>AConfiguration_setNavHidden()
-: <a class="el" href="group___configuration.html#ga67e86e0347596421771af841710308d5">configuration.h</a>
-</li>
-<li>AConfiguration_setNavigation()
-: <a class="el" href="group___configuration.html#gad21dd14fb823a6a80b66132a05ce8913">configuration.h</a>
-</li>
-<li>AConfiguration_setOrientation()
-: <a class="el" href="group___configuration.html#gadcaa8540bad4172a74032143bcaade04">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenHeightDp()
-: <a class="el" href="group___configuration.html#ga6ffac3b41415ec8a3031737ccdcd63b8">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenLong()
-: <a class="el" href="group___configuration.html#gaed853ab7e2bc915591d05997130bc448">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenSize()
-: <a class="el" href="group___configuration.html#ga7bcf05150933ead34a01061d05ad3245">configuration.h</a>
-</li>
-<li>AConfiguration_setScreenWidthDp()
-: <a class="el" href="group___configuration.html#gafc51d45679095965fe3ba1abd402f120">configuration.h</a>
-</li>
-<li>AConfiguration_setSdkVersion()
-: <a class="el" href="group___configuration.html#ga06c66072902ee455011120188ca4810b">configuration.h</a>
-</li>
-<li>AConfiguration_setSmallestScreenWidthDp()
-: <a class="el" href="group___configuration.html#ga6b004c9585671efc5cebd96c1d43c4f0">configuration.h</a>
-</li>
-<li>AConfiguration_setTouchscreen()
-: <a class="el" href="group___configuration.html#ga0d51dbe710c1afe31ece4dd6a8c188ff">configuration.h</a>
-</li>
-<li>AConfiguration_setUiModeNight()
-: <a class="el" href="group___configuration.html#ga08df1e801afbe4a12411e393b8141e42">configuration.h</a>
-</li>
-<li>AConfiguration_setUiModeType()
-: <a class="el" href="group___configuration.html#gaec61e3cf91cd79e8b76a35bbcb15789d">configuration.h</a>
-</li>
-<li>AInputEvent_getDeviceId()
-: <a class="el" href="group___input.html#ga9dd3fd81e51dbfde19ab861541242aa1">input.h</a>
-</li>
-<li>AInputEvent_getSource()
-: <a class="el" href="group___input.html#gac90d4b497669dbc709ec9650db4e49be">input.h</a>
-</li>
-<li>AInputEvent_getType()
-: <a class="el" href="group___input.html#ga8292ae06aa8120c52d7380d228600b9c">input.h</a>
-</li>
-<li>AInputQueue_attachLooper()
-: <a class="el" href="group___input.html#ga900711156bfb58d1a4b158da7874930f">input.h</a>
-</li>
-<li>AInputQueue_detachLooper()
-: <a class="el" href="group___input.html#gaeebe9f83392ac79b31ca40a6fd4dbeff">input.h</a>
-</li>
-<li>AInputQueue_finishEvent()
-: <a class="el" href="group___input.html#ga17e87e0f35d47d729eac31a0dfb1ac33">input.h</a>
-</li>
-<li>AInputQueue_getEvent()
-: <a class="el" href="group___input.html#ga88de12e2b39787ba7d3e4ce2ea46a48c">input.h</a>
-</li>
-<li>AInputQueue_hasEvents()
-: <a class="el" href="group___input.html#ga2b72ad6ab5ef656e8c41163aa7871c96">input.h</a>
-</li>
-<li>AInputQueue_preDispatchEvent()
-: <a class="el" href="group___input.html#gadecd32e6c7aefa4a508b355550d3eaa9">input.h</a>
-</li>
-<li>AKeyEvent_getAction()
-: <a class="el" href="group___input.html#ga36ec0b59f98f86a7ca263ba91279896d">input.h</a>
-</li>
-<li>AKeyEvent_getDownTime()
-: <a class="el" href="group___input.html#gaf475b6f0860bdfca4ceea7bc46eab1a9">input.h</a>
-</li>
-<li>AKeyEvent_getEventTime()
-: <a class="el" href="group___input.html#gae3eac7d68195d1767c947ca267842696">input.h</a>
-</li>
-<li>AKeyEvent_getFlags()
-: <a class="el" href="group___input.html#ga2a18e98efe0c4ccb6f39bb13c555010e">input.h</a>
-</li>
-<li>AKeyEvent_getKeyCode()
-: <a class="el" href="group___input.html#ga6b01ecd60018a5445f4917a861ca9466">input.h</a>
-</li>
-<li>AKeyEvent_getMetaState()
-: <a class="el" href="group___input.html#gabdda62b40b22727af2fb41740bf4787b">input.h</a>
-</li>
-<li>AKeyEvent_getRepeatCount()
-: <a class="el" href="group___input.html#ga5358fe3ebbd4b5b2f88a4ad2eba6f885">input.h</a>
-</li>
-<li>AKeyEvent_getScanCode()
-: <a class="el" href="group___input.html#ga4a0a846b7a195aeb290dfcd2250137d9">input.h</a>
-</li>
-<li>ALooper_acquire()
-: <a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">looper.h</a>
-</li>
-<li>ALooper_addFd()
-: <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">looper.h</a>
-</li>
-<li>ALooper_forThread()
-: <a class="el" href="group___looper.html#ga741ccd90a0eb9209c6bddf2326d89e4a">looper.h</a>
-</li>
-<li>ALooper_pollAll()
-: <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">looper.h</a>
-</li>
-<li>ALooper_pollOnce()
-: <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">looper.h</a>
-</li>
-<li>ALooper_prepare()
-: <a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">looper.h</a>
-</li>
-<li>ALooper_release()
-: <a class="el" href="group___looper.html#gab723c3c2ac2c66bc695913a194073727">looper.h</a>
-</li>
-<li>ALooper_removeFd()
-: <a class="el" href="group___looper.html#gaf7d68ed05698b251489b4f6c8e54daad">looper.h</a>
-</li>
-<li>ALooper_wake()
-: <a class="el" href="group___looper.html#gab2585652f8ae2e2444979194ebe32aaf">looper.h</a>
-</li>
-<li>AMotionEvent_getAction()
-: <a class="el" href="group___input.html#ga73ea2093cc2343675ac43dd08bef4247">input.h</a>
-</li>
-<li>AMotionEvent_getAxisValue()
-: <a class="el" href="group___input.html#ga9d364cdcebf85237f599b25861f38c21">input.h</a>
-</li>
-<li>AMotionEvent_getButtonState()
-: <a class="el" href="group___input.html#ga1aa7ebb749416491b6f0c55ae87ddf49">input.h</a>
-</li>
-<li>AMotionEvent_getDownTime()
-: <a class="el" href="group___input.html#gad44be7697e68891688cd7bcfaffec209">input.h</a>
-</li>
-<li>AMotionEvent_getEdgeFlags()
-: <a class="el" href="group___input.html#gad7e1f0caa4c27194d4a8756a18432299">input.h</a>
-</li>
-<li>AMotionEvent_getEventTime()
-: <a class="el" href="group___input.html#ga7e13fbf3cff0700b0b620284ebdd3a33">input.h</a>
-</li>
-<li>AMotionEvent_getFlags()
-: <a class="el" href="group___input.html#ga2891d19197c070207098fa48adeb35af">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalAxisValue()
-: <a class="el" href="group___input.html#ga7ca740e1324f3cdb934252dce0c982d0">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalEventTime()
-: <a class="el" href="group___input.html#ga523f1a760754206965b42b08d62f9346">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalOrientation()
-: <a class="el" href="group___input.html#gaab9cb8fa670175ecc73c75eed4e5cd3f">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalPressure()
-: <a class="el" href="group___input.html#gaa8e9352ee5b043b3e1b6e2062d491010">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalRawX()
-: <a class="el" href="group___input.html#ga5d36c2e7420001c86ae2aa1168fe6f83">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalRawY()
-: <a class="el" href="group___input.html#ga6deb0e7690a93aa53e5872c2691b69fe">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalSize()
-: <a class="el" href="group___input.html#ga0a04bb7ec12928db7e62645e7fad3a9e">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalToolMajor()
-: <a class="el" href="group___input.html#ga160a5830e791e8c42ae97f51b92233d2">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalToolMinor()
-: <a class="el" href="group___input.html#gafe01aa7576a6d1bce750fb8482355849">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalTouchMajor()
-: <a class="el" href="group___input.html#gaf437f223668b97f19ebdbad4b9cf4483">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalTouchMinor()
-: <a class="el" href="group___input.html#ga126715d966e989652aa1ae5d38e0e898">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalX()
-: <a class="el" href="group___input.html#ga49a8ca89ff377b5ed2355e8d7220ae07">input.h</a>
-</li>
-<li>AMotionEvent_getHistoricalY()
-: <a class="el" href="group___input.html#ga30fc4e5d3ce144955859f8c97b51b73d">input.h</a>
-</li>
-<li>AMotionEvent_getHistorySize()
-: <a class="el" href="group___input.html#ga0aef34c236db6d7a56a50bf590be7bcc">input.h</a>
-</li>
-<li>AMotionEvent_getMetaState()
-: <a class="el" href="group___input.html#ga5644f0d952e3dea57ba9f7ce51dff2bb">input.h</a>
-</li>
-<li>AMotionEvent_getOrientation()
-: <a class="el" href="group___input.html#gad28422998da15b789edcba6b8bc5d615">input.h</a>
-</li>
-<li>AMotionEvent_getPointerCount()
-: <a class="el" href="group___input.html#ga612e68d104adbc6d14d87510e8066bd8">input.h</a>
-</li>
-<li>AMotionEvent_getPointerId()
-: <a class="el" href="group___input.html#ga599e21a79c706807243a8ee31b116138">input.h</a>
-</li>
-<li>AMotionEvent_getPressure()
-: <a class="el" href="group___input.html#ga97fcaa6cd08c9d54b35711e482e06c8d">input.h</a>
-</li>
-<li>AMotionEvent_getRawX()
-: <a class="el" href="group___input.html#gafe45e29ef138cc30592237ce479837f0">input.h</a>
-</li>
-<li>AMotionEvent_getRawY()
-: <a class="el" href="group___input.html#ga5a09c3d742a93270861aa05f24257c23">input.h</a>
-</li>
-<li>AMotionEvent_getSize()
-: <a class="el" href="group___input.html#ga9b1f3c3df46b5269f9e74d2dd70c88a8">input.h</a>
-</li>
-<li>AMotionEvent_getToolMajor()
-: <a class="el" href="group___input.html#gac04099690f278a6a27191c2027b12a77">input.h</a>
-</li>
-<li>AMotionEvent_getToolMinor()
-: <a class="el" href="group___input.html#ga2222d459759ba4a8269647012d2718fb">input.h</a>
-</li>
-<li>AMotionEvent_getToolType()
-: <a class="el" href="group___input.html#ga2babe4e2e79952e004538f8f1878649c">input.h</a>
-</li>
-<li>AMotionEvent_getTouchMajor()
-: <a class="el" href="group___input.html#ga9ac18fe19534e07d80441582f489d471">input.h</a>
-</li>
-<li>AMotionEvent_getTouchMinor()
-: <a class="el" href="group___input.html#ga65f71e257b5fcb29dcbaaf59b3fcb3a7">input.h</a>
-</li>
-<li>AMotionEvent_getX()
-: <a class="el" href="group___input.html#ga22e255a5fa52761cd92ce78af91e9757">input.h</a>
-</li>
-<li>AMotionEvent_getXOffset()
-: <a class="el" href="group___input.html#ga7a94ce622eb78a17737fd8bddbf86e21">input.h</a>
-</li>
-<li>AMotionEvent_getXPrecision()
-: <a class="el" href="group___input.html#ga81a9be07673a01f43fd0241c7b4c254f">input.h</a>
-</li>
-<li>AMotionEvent_getY()
-: <a class="el" href="group___input.html#ga113f58a37e41f2a6c3007d68418edfa6">input.h</a>
-</li>
-<li>AMotionEvent_getYOffset()
-: <a class="el" href="group___input.html#ga7f6bd2c12d912f502c245b6ced6d3704">input.h</a>
-</li>
-<li>AMotionEvent_getYPrecision()
-: <a class="el" href="group___input.html#gae311e6e28bce4be905526f9ea71278ed">input.h</a>
-</li>
-<li>ANativeActivity_finish()
-: <a class="el" href="group___native_activity.html#ga4d872ae54a239704c06a0517e23cc0ad">native_activity.h</a>
-</li>
-<li>ANativeActivity_hideSoftInput()
-: <a class="el" href="group___native_activity.html#gaf673d6efea7ce517ef46ff2551b25944">native_activity.h</a>
-</li>
-<li>ANativeActivity_setWindowFlags()
-: <a class="el" href="group___native_activity.html#gaa1d091ca4a99b0ce570bab1c8c06f297">native_activity.h</a>
-</li>
-<li>ANativeActivity_setWindowFormat()
-: <a class="el" href="group___native_activity.html#gaec8b12decdf2b9841344e75c4c038c5a">native_activity.h</a>
-</li>
-<li>ANativeActivity_showSoftInput()
-: <a class="el" href="group___native_activity.html#ga14eaeb6190f266369023b04d8ab9dba7">native_activity.h</a>
-</li>
-<li>ANativeWindow_acquire()
-: <a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">native_window.h</a>
-</li>
-<li>ANativeWindow_fromSurface()
-: <a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">native_window_jni.h</a>
-</li>
-<li>ANativeWindow_getFormat()
-: <a class="el" href="group___native_activity.html#ga9e3a492a8300146b30d864f0ab22bb2e">native_window.h</a>
-</li>
-<li>ANativeWindow_getHeight()
-: <a class="el" href="group___native_activity.html#ga463ba99f6dee3edc1167a54e1ff7de15">native_window.h</a>
-</li>
-<li>ANativeWindow_getWidth()
-: <a class="el" href="group___native_activity.html#ga186f0040c5cb405a63d93889bb9a4ff1">native_window.h</a>
-</li>
-<li>ANativeWindow_lock()
-: <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">native_window.h</a>
-</li>
-<li>ANativeWindow_release()
-: <a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">native_window.h</a>
-</li>
-<li>ANativeWindow_setBuffersGeometry()
-: <a class="el" href="group___native_activity.html#ga7b0652533998d61e1a3b542485889113">native_window.h</a>
-</li>
-<li>ANativeWindow_unlockAndPost()
-: <a class="el" href="group___native_activity.html#ga4dc9b687ead9034fbc11bf2d90f203f9">native_window.h</a>
-</li>
-<li>AndroidBitmap_getInfo()
-: <a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">bitmap.h</a>
-</li>
-<li>AndroidBitmap_lockPixels()
-: <a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">bitmap.h</a>
-</li>
-<li>AndroidBitmap_unlockPixels()
-: <a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">bitmap.h</a>
-</li>
-<li>AObbInfo_delete()
-: <a class="el" href="group___storage.html#gaec5a4428008f545e829486099298031a">obb.h</a>
-</li>
-<li>AObbInfo_getFlags()
-: <a class="el" href="group___storage.html#ga68d916570c756da9fd0d9096358300eb">obb.h</a>
-</li>
-<li>AObbInfo_getPackageName()
-: <a class="el" href="group___storage.html#ga1ec7eee61541fa5a9b578801a35b9cf3">obb.h</a>
-</li>
-<li>AObbInfo_getVersion()
-: <a class="el" href="group___storage.html#gacd8471c6d866cffe4a32f3b5997c782c">obb.h</a>
-</li>
-<li>AObbScanner_getObbInfo()
-: <a class="el" href="group___storage.html#ga7beb4f82e3bf9a4b8197917f92ac4d5e">obb.h</a>
-</li>
-<li>ASensor_getFifoMaxEventCount()
-: <a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">sensor.h</a>
-</li>
-<li>ASensor_getFifoReservedEventCount()
-: <a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">sensor.h</a>
-</li>
-<li>ASensor_getMinDelay()
-: <a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">sensor.h</a>
-</li>
-<li>ASensor_getName()
-: <a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">sensor.h</a>
-</li>
-<li>ASensor_getReportingMode()
-: <a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">sensor.h</a>
-</li>
-<li>ASensor_getResolution()
-: <a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">sensor.h</a>
-</li>
-<li>ASensor_getStringType()
-: <a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">sensor.h</a>
-</li>
-<li>ASensor_getType()
-: <a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">sensor.h</a>
-</li>
-<li>ASensor_getVendor()
-: <a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">sensor.h</a>
-</li>
-<li>ASensor_isWakeUpSensor()
-: <a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">sensor.h</a>
-</li>
-<li>ASensorEventQueue_disableSensor()
-: <a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">sensor.h</a>
-</li>
-<li>ASensorEventQueue_enableSensor()
-: <a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">sensor.h</a>
-</li>
-<li>ASensorEventQueue_getEvents()
-: <a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">sensor.h</a>
-</li>
-<li>ASensorEventQueue_hasEvents()
-: <a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">sensor.h</a>
-</li>
-<li>ASensorEventQueue_setEventRate()
-: <a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">sensor.h</a>
-</li>
-<li>ASensorManager_createEventQueue()
-: <a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">sensor.h</a>
-</li>
-<li>ASensorManager_destroyEventQueue()
-: <a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">sensor.h</a>
-</li>
-<li>ASensorManager_getDefaultSensor()
-: <a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">sensor.h</a>
-</li>
-<li>ASensorManager_getDefaultSensorEx()
-: <a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">sensor.h</a>
-</li>
-<li>ASensorManager_getInstance()
-: <a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">sensor.h</a>
-</li>
-<li>ASensorManager_getSensorList()
-: <a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">sensor.h</a>
-</li>
-<li>AStorageManager_delete()
-: <a class="el" href="group___storage.html#ga184c06dd9cec0f21db138167d6b331ed">storage_manager.h</a>
-</li>
-<li>AStorageManager_getMountedObbPath()
-: <a class="el" href="group___storage.html#gad5c90305d627e0c768da37cb3e9f08c4">storage_manager.h</a>
-</li>
-<li>AStorageManager_isObbMounted()
-: <a class="el" href="group___storage.html#ga7572f2c650fc16cce1b0ab94e913a1ba">storage_manager.h</a>
-</li>
-<li>AStorageManager_mountObb()
-: <a class="el" href="group___storage.html#ga61bebaf43e57b4b7f57e7a24a62e9e3d">storage_manager.h</a>
-</li>
-<li>AStorageManager_new()
-: <a class="el" href="group___storage.html#ga1c21ed9e0848fcfc03547c95eeb48877">storage_manager.h</a>
-</li>
-<li>AStorageManager_unmountObb()
-: <a class="el" href="group___storage.html#ga4c32c8d2c780016fa36097d833b57809">storage_manager.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_type.jd b/docs/html/ndk/reference/globals_type.jd
deleted file mode 100644
index 99fa859..0000000
--- a/docs/html/ndk/reference/globals_type.jd
+++ /dev/null
@@ -1,90 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;<ul>
-<li>AAsset
-: <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">asset_manager.h</a>
-</li>
-<li>AAssetDir
-: <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">asset_manager.h</a>
-</li>
-<li>AAssetManager
-: <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">asset_manager.h</a>
-</li>
-<li>AConfiguration
-: <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">configuration.h</a>
-</li>
-<li>AHeartRateEvent
-: <a class="el" href="group___sensor.html#gae85b6eac76abe74e6e53d78bb3a4858c">sensor.h</a>
-</li>
-<li>AInputEvent
-: <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">input.h</a>
-</li>
-<li>AInputQueue
-: <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">input.h</a>
-</li>
-<li>ALooper
-: <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">looper.h</a>
-</li>
-<li>ALooper_callbackFunc
-: <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">looper.h</a>
-</li>
-<li>AMetaDataEvent
-: <a class="el" href="group___sensor.html#ga0378daec23b2d8a70438ef7c3912475f">sensor.h</a>
-</li>
-<li>ANativeActivity
-: <a class="el" href="group___native_activity.html#ga8abd07923f37feb1ce724d139cc2609d">native_activity.h</a>
-</li>
-<li>ANativeActivity_createFunc
-: <a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">native_activity.h</a>
-</li>
-<li>ANativeActivityCallbacks
-: <a class="el" href="group___native_activity.html#ga28dca784e5ee939427135c72c0151c38">native_activity.h</a>
-</li>
-<li>ANativeWindow
-: <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">native_window.h</a>
-</li>
-<li>ANativeWindow_Buffer
-: <a class="el" href="group___native_activity.html#gad0983ca473ce36293baf5e51a14c3357">native_window.h</a>
-</li>
-<li>AObbInfo
-: <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">obb.h</a>
-</li>
-<li>ARect
-: <a class="el" href="group___native_activity.html#gaa984a498f0e146ac57c6022a323423cf">rect.h</a>
-</li>
-<li>ASensor
-: <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">sensor.h</a>
-</li>
-<li>ASensorEvent
-: <a class="el" href="group___sensor.html#ga6bb167c45f0ef0a94d8f178d227e781f">sensor.h</a>
-</li>
-<li>ASensorEventQueue
-: <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">sensor.h</a>
-</li>
-<li>ASensorList
-: <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">sensor.h</a>
-</li>
-<li>ASensorManager
-: <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">sensor.h</a>
-</li>
-<li>ASensorRef
-: <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">sensor.h</a>
-</li>
-<li>ASensorVector
-: <a class="el" href="group___sensor.html#ga207e807f9e18271f6a763e57232b409f">sensor.h</a>
-</li>
-<li>AStorageManager
-: <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">storage_manager.h</a>
-</li>
-<li>AStorageManager_obbCallbackFunc
-: <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">storage_manager.h</a>
-</li>
-<li>AUncalibratedEvent
-: <a class="el" href="group___sensor.html#ga24acc545b908dd24cadc44c5e0760b3b">sensor.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_vars.jd b/docs/html/ndk/reference/globals_vars.jd
deleted file mode 100644
index e6bd2a4..0000000
--- a/docs/html/ndk/reference/globals_vars.jd
+++ /dev/null
@@ -1,12 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-&#160;<ul>
-<li>ANativeActivity_onCreate
-: <a class="el" href="group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">native_activity.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/globals_w.jd b/docs/html/ndk/reference/globals_w.jd
deleted file mode 100644
index b72e8c2..0000000
--- a/docs/html/ndk/reference/globals_w.jd
+++ /dev/null
@@ -1,20 +0,0 @@
-page.title=Globals
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="contents">
-<div class="textblock">Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:</div>
-
-<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
-<li>WINDOW_FORMAT_RGB_565
-: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">native_window.h</a>
-</li>
-<li>WINDOW_FORMAT_RGBA_8888
-: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">native_window.h</a>
-</li>
-<li>WINDOW_FORMAT_RGBX_8888
-: <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">native_window.h</a>
-</li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___asset.jd b/docs/html/ndk/reference/group___asset.jd
deleted file mode 100644
index c2f9067..0000000
--- a/docs/html/ndk/reference/group___asset.jd
+++ /dev/null
@@ -1,591 +0,0 @@
-page.title=Asset
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Asset</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:asset__manager_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager_8h.html">asset_manager.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:asset__manager__jni_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager__jni_8h.html">asset_manager_jni.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga90c459935e76acf809b9ec90d1872771"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td></tr>
-<tr class="separator:ga90c459935e76acf809b9ec90d1872771"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td></tr>
-<tr class="separator:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td></tr>
-<tr class="separator:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">AASSET_MODE_UNKNOWN</a> = 0, 
-<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">AASSET_MODE_RANDOM</a> = 1, 
-<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">AASSET_MODE_STREAMING</a> = 2, 
-<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">AASSET_MODE_BUFFER</a> = 3
- }</td></tr>
-<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">AAssetManager_openDir</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *dirName)</td></tr>
-<tr class="separator:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *filename, int mode)</td></tr>
-<tr class="separator:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
-<tr class="separator:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">AAssetDir_rewind</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
-<tr class="separator:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gace1c4d0da274d643c5b10ca218cc6088"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
-<tr class="separator:gace1c4d0da274d643c5b10ca218cc6088"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaadd86322c1fda5121b6d33745c317fb9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">AAsset_read</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, void *buf, size_t count)</td></tr>
-<tr class="separator:gaadd86322c1fda5121b6d33745c317fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">AAsset_seek</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t offset, int whence)</td></tr>
-<tr class="separator:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">AAsset_seek64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t offset, int whence)</td></tr>
-<tr class="separator:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1f241e49f691dafcada23bcb76155122"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga1f241e49f691dafcada23bcb76155122"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga553a14512a98542306238c3ce70d344f"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">AAsset_getBuffer</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga553a14512a98542306238c3ce70d344f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">AAsset_getLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">AAsset_getLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">AAsset_getRemainingLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga21e7221d88dcc44106843192b66755b5"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">AAsset_getRemainingLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga21e7221d88dcc44106843192b66755b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1af4ffd050016e99961e24f550981677"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">AAsset_openFileDescriptor</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t *outStart, off_t *outLength)</td></tr>
-<tr class="separator:ga1af4ffd050016e99961e24f550981677"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">AAsset_openFileDescriptor64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t *outStart, off64_t *outLength)</td></tr>
-<tr class="separator:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga20344cb952a77fa1004f592fb1b55124"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">AAsset_isAllocated</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
-<tr class="separator:ga20344cb952a77fa1004f592fb1b55124"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadfd6537af41577735bcaee52120127f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava</a> (JNIEnv *env, jobject assetManager)</td></tr>
-<tr class="separator:gadfd6537af41577735bcaee52120127f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="ga5630b1f1aa5cd363303018cb2f12f95c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> provides access to a read-only asset.</p>
-<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects are NOT thread-safe, and should not be shared across threads. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga001a6b9c36a06ee977b9f51ed7103cdb"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> provides access to a chunk of the asset hierarchy as if it were a single directory. The contents are populated by the <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>.</p>
-<p>The list of files will be sorted in ascending order by ASCII value. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga90c459935e76acf809b9ec90d1872771"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> provides access to an application's raw assets by creating <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects.</p>
-<p>AAssetManager is a wrapper to the low-level native implementation of the java <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>, a pointer can be obtained using <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava()</a>.</p>
-<p>The asset hierarchy may be examined like a filesystem, using <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> objects to peruse a single directory.</p>
-<p>A native <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> pointer may be shared across multiple threads. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="ga06fc87d81c62e9abb8790b6e5713c55b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Available access modes for opening assets with <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4"></a>AASSET_MODE_UNKNOWN</em>&#160;</td><td class="fielddoc">
-<p>No specific information about how data will be accessed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f"></a>AASSET_MODE_RANDOM</em>&#160;</td><td class="fielddoc">
-<p>Read chunks, and seek forward and backward. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74"></a>AASSET_MODE_STREAMING</em>&#160;</td><td class="fielddoc">
-<p>Read sequentially, with an occasional forward seek. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb"></a>AASSET_MODE_BUFFER</em>&#160;</td><td class="fielddoc">
-<p>Caller plans to ask for a read-only buffer with all data. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="ga1f241e49f691dafcada23bcb76155122"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AAsset_close </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Close the asset, freeing all associated resources. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga553a14512a98542306238c3ce70d344f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const void* AAsset_getBuffer </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get a pointer to a buffer holding the entire contents of the assset.</p>
-<p>Returns NULL on failure. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaad8ec42e28522ebc72d3a5c357f9a600"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">off_t AAsset_getLength </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Report the total size of the asset data. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga55c8bc459327d5d23089e6a4b453f3f1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">off64_t AAsset_getLength64 </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Report the total size of the asset data. Reports the size using a 64-bit number insted of 32-bit as AAsset_getLength. </p>
-
-</div>
-</div>
-<a class="anchor" id="gae806f55cbc4a93ca245f2adfd63d3eee"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">off_t AAsset_getRemainingLength </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Report the total amount of asset data that can be read from the current position. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga21e7221d88dcc44106843192b66755b5"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">off64_t AAsset_getRemainingLength64 </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Report the total amount of asset data that can be read from the current position.</p>
-<p>Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga20344cb952a77fa1004f592fb1b55124"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AAsset_isAllocated </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not mmapped). </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1af4ffd050016e99961e24f550981677"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AAsset_openFileDescriptor </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">off_t *&#160;</td>
-          <td class="paramname"><em>outStart</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">off_t *&#160;</td>
-          <td class="paramname"><em>outLength</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Open a new file descriptor that can be used to read the asset data. If the start or length cannot be represented by a 32-bit number, it will be truncated. If the file is large, use AAsset_openFileDescriptor64 instead.</p>
-<p>Returns &lt; 0 if direct fd access is not possible (for example, if the asset is compressed). </p>
-
-</div>
-</div>
-<a class="anchor" id="ga123a44a575f85d91a00a8456dab7bd0a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AAsset_openFileDescriptor64 </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">off64_t *&#160;</td>
-          <td class="paramname"><em>outStart</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">off64_t *&#160;</td>
-          <td class="paramname"><em>outLength</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Open a new file descriptor that can be used to read the asset data.</p>
-<p>Uses a 64-bit number for the offset and length instead of 32-bit instead of as AAsset_openFileDescriptor does.</p>
-<p>Returns &lt; 0 if direct fd access is not possible (for example, if the asset is compressed). </p>
-
-</div>
-</div>
-<a class="anchor" id="gaadd86322c1fda5121b6d33745c317fb9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AAsset_read </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&#160;</td>
-          <td class="paramname"><em>buf</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>count</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Attempt to read 'count' bytes of data from the current offset.</p>
-<p>Returns the number of bytes read, zero on EOF, or &lt; 0 on error. </p>
-
-</div>
-</div>
-<a class="anchor" id="gacc026a8bedeb1ef80bf12df3b72611a2"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">off_t AAsset_seek </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">off_t&#160;</td>
-          <td class="paramname"><em>offset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>whence</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
-<p>Returns the new position on success, or (off_t) -1 on error. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga81fbe4368de24a3296ef7a6eba0053c7"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">off64_t AAsset_seek64 </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
-          <td class="paramname"><em>asset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">off64_t&#160;</td>
-          <td class="paramname"><em>offset</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>whence</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
-<p>Uses 64-bit data type for large files as opposed to the 32-bit type used by AAsset_seek.</p>
-<p>Returns the new position on success, or (off64_t) -1 on error. </p>
-
-</div>
-</div>
-<a class="anchor" id="gace1c4d0da274d643c5b10ca218cc6088"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AAssetDir_close </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td>
-          <td class="paramname"><em>assetDir</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Close an opened AAssetDir, freeing any related resources. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4703b9f7baa3daeba248b6547de6b9b0"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* AAssetDir_getNextFileName </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td>
-          <td class="paramname"><em>assetDir</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Iterate over the files in an asset directory. A NULL string is returned when all the file names have been returned.</p>
-<p>The returned file name is suitable for passing to <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open()</a>.</p>
-<p>The string returned here is owned by the AssetDir implementation and is not guaranteed to remain valid if any other calls are made on this AAssetDir instance. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga45db6d19ad5e1c0f9b2e6b4059da14b3"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AAssetDir_rewind </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td>
-          <td class="paramname"><em>assetDir</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Reset the iteration state of <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName()</a> to the beginning. </p>
-
-</div>
-</div>
-<a class="anchor" id="gadfd6537af41577735bcaee52120127f4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>* AAssetManager_fromJava </td>
-          <td>(</td>
-          <td class="paramtype">JNIEnv *&#160;</td>
-          <td class="paramname"><em>env</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">jobject&#160;</td>
-          <td class="paramname"><em>assetManager</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager object. Note that the caller is responsible for obtaining and holding a VM reference to the jobject to prevent its being garbage collected while the native object is in use. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga0037ce3c10a591fe632f34c1aa62955c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>* AAssetManager_open </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>filename</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>mode</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Open an asset.</p>
-<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gab5b57ff012d6d1024d8bf5d30aedced4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>* AAssetManager_openDir </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>dirName</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Open the named directory within the asset hierarchy. The directory can then be inspected with the AAssetDir functions. To open the top-level directory, pass in "" as the dirName.</p>
-<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close()</a>. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___bitmap.jd b/docs/html/ndk/reference/group___bitmap.jd
deleted file mode 100644
index 2f2b199..0000000
--- a/docs/html/ndk/reference/group___bitmap.jd
+++ /dev/null
@@ -1,230 +0,0 @@
-page.title=Bitmap
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#define-members">Macros</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Bitmap</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:bitmap_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html">bitmap.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
-Macros</h2></td></tr>
-<tr class="memitem:gafb665ac9fefad34ac5c035f5d1314080"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gafb665ac9fefad34ac5c035f5d1314080">ANDROID_BITMAP_RESUT_SUCCESS</a>&#160;&#160;&#160;<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a></td></tr>
-<tr class="separator:gafb665ac9fefad34ac5c035f5d1314080"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a> = 0, 
-<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374">ANDROID_BITMAP_RESULT_BAD_PARAMETER</a> = -1, 
-<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d">ANDROID_BITMAP_RESULT_JNI_EXCEPTION</a> = -2, 
-<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990">ANDROID_BITMAP_RESULT_ALLOCATION_FAILED</a> = -3
- }</td></tr>
-<tr class="separator:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaea286a2d4c61ae2abb02b51500499f13"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a> { <br/>
-&#160;&#160;<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021">ANDROID_BITMAP_FORMAT_NONE</a> = 0, 
-<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057">ANDROID_BITMAP_FORMAT_RGBA_8888</a> = 1, 
-<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91">ANDROID_BITMAP_FORMAT_RGB_565</a> = 4, 
-<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528">ANDROID_BITMAP_FORMAT_RGBA_4444</a> = 7, 
-<br/>
-&#160;&#160;<a class="el" href="group___bitmap.html#ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca">ANDROID_BITMAP_FORMAT_A_8</a> = 8
-<br/>
- }</td></tr>
-<tr class="separator:gaea286a2d4c61ae2abb02b51500499f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga80292ee39d8a675928e38849742b54bf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">AndroidBitmap_getInfo</a> (JNIEnv *env, jobject jbitmap, <a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> *info)</td></tr>
-<tr class="separator:ga80292ee39d8a675928e38849742b54bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga2908d42fa4db286c34b7f8c11f29206f">AndroidBitmap_lockPixels</a> (JNIEnv *env, jobject jbitmap, void **addrPtr)</td></tr>
-<tr class="separator:ga2908d42fa4db286c34b7f8c11f29206f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___bitmap.html#ga4aca91f37baddd42d0051dca8179d4ed">AndroidBitmap_unlockPixels</a> (JNIEnv *env, jobject jbitmap)</td></tr>
-<tr class="separator:ga4aca91f37baddd42d0051dca8179d4ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Macro Definition Documentation</h2>
-<a class="anchor" id="gafb665ac9fefad34ac5c035f5d1314080"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">#define ANDROID_BITMAP_RESUT_SUCCESS&#160;&#160;&#160;<a class="el" href="group___bitmap.html#ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076">ANDROID_BITMAP_RESULT_SUCCESS</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Backward compatibility: this macro used to be misspelled. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="gadf764cbdea00d65edcd07bb9953ad2b7"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>AndroidBitmap functions result code. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7a07f71cf5c5d4950ac9813ae4bbf6d076"></a>ANDROID_BITMAP_RESULT_SUCCESS</em>&#160;</td><td class="fielddoc">
-<p>Operation was successful. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7acf7205d1a348d867c63ac2885ce01374"></a>ANDROID_BITMAP_RESULT_BAD_PARAMETER</em>&#160;</td><td class="fielddoc">
-<p>Bad parameter. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7a6b099b9533c38729a6c305f2fe93f98d"></a>ANDROID_BITMAP_RESULT_JNI_EXCEPTION</em>&#160;</td><td class="fielddoc">
-<p>JNI exception occured. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadf764cbdea00d65edcd07bb9953ad2b7a512f5b95b6b57e78d65502c06391f990"></a>ANDROID_BITMAP_RESULT_ALLOCATION_FAILED</em>&#160;</td><td class="fielddoc">
-<p>Allocation failed. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaea286a2d4c61ae2abb02b51500499f13"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">enum <a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Bitmap pixel format. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13ac6f0378ea5cfefd9abee2596af5a9021"></a>ANDROID_BITMAP_FORMAT_NONE</em>&#160;</td><td class="fielddoc">
-<p>No format. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13ab92ae96ceea06aa534583beadba84057"></a>ANDROID_BITMAP_FORMAT_RGBA_8888</em>&#160;</td><td class="fielddoc">
-<p>Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13a11b32e10d6db28fae70ec3590cb9ee91"></a>ANDROID_BITMAP_FORMAT_RGB_565</em>&#160;</td><td class="fielddoc">
-<p>Red: 5 bits, Green: 6 bits, Blue: 5 bits. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13adc2ede06eafe20439271cb8137dc7528"></a>ANDROID_BITMAP_FORMAT_RGBA_4444</em>&#160;</td><td class="fielddoc">
-<p>Red: 4 bits, Green: 4 bits, Blue: 4 bits, Alpha: 4 bits. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaea286a2d4c61ae2abb02b51500499f13ad29996be25f8f88c96e016a1da5c4bca"></a>ANDROID_BITMAP_FORMAT_A_8</em>&#160;</td><td class="fielddoc">
-<p>Deprecated. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="ga80292ee39d8a675928e38849742b54bf"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AndroidBitmap_getInfo </td>
-          <td>(</td>
-          <td class="paramtype">JNIEnv *&#160;</td>
-          <td class="paramname"><em>env</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">jobject&#160;</td>
-          <td class="paramname"><em>jbitmap</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> *&#160;</td>
-          <td class="paramname"><em>info</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Given a java bitmap object, fill out the <a class="el" href="struct_android_bitmap_info.html">AndroidBitmapInfo</a> struct for it. If the call fails, the info parameter will be ignored. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2908d42fa4db286c34b7f8c11f29206f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AndroidBitmap_lockPixels </td>
-          <td>(</td>
-          <td class="paramtype">JNIEnv *&#160;</td>
-          <td class="paramname"><em>env</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">jobject&#160;</td>
-          <td class="paramname"><em>jbitmap</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void **&#160;</td>
-          <td class="paramname"><em>addrPtr</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Given a java bitmap object, attempt to lock the pixel address. Locking will ensure that the memory for the pixels will not move until the unlockPixels call, and ensure that, if the pixels had been previously purged, they will have been restored.</p>
-<p>If this call succeeds, it must be balanced by a call to AndroidBitmap_unlockPixels, after which time the address of the pixels should no longer be used.</p>
-<p>If this succeeds, *addrPtr will be set to the pixel address. If the call fails, addrPtr will be ignored. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4aca91f37baddd42d0051dca8179d4ed"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AndroidBitmap_unlockPixels </td>
-          <td>(</td>
-          <td class="paramtype">JNIEnv *&#160;</td>
-          <td class="paramname"><em>env</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">jobject&#160;</td>
-          <td class="paramname"><em>jbitmap</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Call this to balance a successful call to AndroidBitmap_lockPixels. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___configuration.jd b/docs/html/ndk/reference/group___configuration.jd
deleted file mode 100644
index 708722e..0000000
--- a/docs/html/ndk/reference/group___configuration.jd
+++ /dev/null
@@ -1,1557 +0,0 @@
-page.title=Configuration
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Configuration</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:configuration_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="configuration_8h.html">configuration.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga6709434d0f99b8367d0df2dfdfbef45a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a></td></tr>
-<tr class="separator:ga6709434d0f99b8367d0df2dfdfbef45a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga99fb83031ce9923c84392b4e92f956b5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af44cee3290a23999b0358c5638747a5f">ACONFIGURATION_ORIENTATION_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad9bf5c1fb90f9fdb20f984d0574592fe">ACONFIGURATION_ORIENTATION_PORT</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad5746872ff6871379fca93c60bfac8a3">ACONFIGURATION_ORIENTATION_LAND</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f">ACONFIGURATION_ORIENTATION_SQUARE</a> = 0x0003, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa73bcf45261366840fea743372682fa6">ACONFIGURATION_TOUCHSCREEN_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5adfbeb370edd3b4372c9b0f86f152dde0">ACONFIGURATION_TOUCHSCREEN_NOTOUCH</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f">ACONFIGURATION_TOUCHSCREEN_STYLUS</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4bf2a8323ec6d072aa48d5fc2cff645e">ACONFIGURATION_TOUCHSCREEN_FINGER</a> = 0x0003, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae628b2bf594733b7c19ae394616cec6c">ACONFIGURATION_DENSITY_DEFAULT</a> = 0, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ddb34b2376422d2323720049eb57f3">ACONFIGURATION_DENSITY_LOW</a> = 120, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2511479d7cd574c4b293d535e4dc337e">ACONFIGURATION_DENSITY_MEDIUM</a> = 160, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10e6c3d636f3f6de75de9208913b0d8f">ACONFIGURATION_DENSITY_TV</a> = 213, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5ef4a97dc058235cdfa9fcfe3300c7eb">ACONFIGURATION_DENSITY_HIGH</a> = 240, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a38a03b3b1c64725679605d8d479c85a0">ACONFIGURATION_DENSITY_XHIGH</a> = 320, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad6353daf63778a6ec6f2bd3815d7e6e4">ACONFIGURATION_DENSITY_XXHIGH</a> = 480, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a2bd04af33e868a77bd4d83e7d70368ec">ACONFIGURATION_DENSITY_XXXHIGH</a> = 640, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a966a3855351a97ae865264afd74c1534">ACONFIGURATION_DENSITY_ANY</a> = 0xfffe, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a7c1af92914155c418b99844c6aab33d7">ACONFIGURATION_DENSITY_NONE</a> = 0xffff, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a593f722738682ae4500dab6427670f4a">ACONFIGURATION_KEYBOARD_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a40195a1a2d8e21c74d99606d8a1a9918">ACONFIGURATION_KEYBOARD_NOKEYS</a> = 0x0001, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a263ff8efb4d2c757e557adc0d0cdeedf">ACONFIGURATION_KEYBOARD_QWERTY</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1aaf1a887f146737030cce95c53066ea">ACONFIGURATION_KEYBOARD_12KEY</a> = 0x0003, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90e914b60d28c081b313f4b7b6600f47">ACONFIGURATION_NAVIGATION_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a3d95e899305aeae366fb7f8d8b6c290a">ACONFIGURATION_NAVIGATION_NONAV</a> = 0x0001, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace2e3ed21322100712992ca09f4b75b5">ACONFIGURATION_NAVIGATION_DPAD</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad2807d00cb2f5dcb9f456045dd8443a4">ACONFIGURATION_NAVIGATION_TRACKBALL</a> = 0x0003, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a80b53370f65ad283a4fd025f36422bea">ACONFIGURATION_NAVIGATION_WHEEL</a> = 0x0004, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a34d3a830bc2964000052f8486fd76b0c">ACONFIGURATION_KEYSHIDDEN_ANY</a> = 0x0000, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5abfbfc3a10affed059263555b00429ab2">ACONFIGURATION_KEYSHIDDEN_NO</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5e6a5a3f4175644886bde7d0ed4b1ebf">ACONFIGURATION_KEYSHIDDEN_YES</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1a56b72c730e40f22f3b8727e54c376c">ACONFIGURATION_KEYSHIDDEN_SOFT</a> = 0x0003, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a6db7dd6a67196df88117dcdc904e0cb3">ACONFIGURATION_NAVHIDDEN_ANY</a> = 0x0000, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae6ff9883e3e89f8d9ea5c0ebe077c9c5">ACONFIGURATION_NAVHIDDEN_NO</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a79b3a5fe10e948bb79db47b516d46cf5">ACONFIGURATION_NAVHIDDEN_YES</a> = 0x0002, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a9abcd34a6c549e048fc75a545081584e">ACONFIGURATION_SCREENSIZE_ANY</a> = 0x00, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1163af972206a65a5d18bda12fdc511c">ACONFIGURATION_SCREENSIZE_SMALL</a> = 0x01, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a019727e684f25ba921f3479abd62b9f2">ACONFIGURATION_SCREENSIZE_NORMAL</a> = 0x02, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af871d177fdceedb75612cfc1281d2c12">ACONFIGURATION_SCREENSIZE_LARGE</a> = 0x03, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0ca385ed504fc92f6ff3f0857e916c9c">ACONFIGURATION_SCREENSIZE_XLARGE</a> = 0x04, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a41e55e57da42fd09c378f59c1a63710f">ACONFIGURATION_SCREENLONG_ANY</a> = 0x00, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a428bb8fcd8bc731b67b0773dc62781c5">ACONFIGURATION_SCREENLONG_NO</a> = 0x1, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a91fc014d328507568d225d691b3babfd">ACONFIGURATION_SCREENLONG_YES</a> = 0x2, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a10d0916da7fa88c945a9cda259407d4c">ACONFIGURATION_UI_MODE_TYPE_ANY</a> = 0x00, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae7efe2713b6718311da76c828b5b444e">ACONFIGURATION_UI_MODE_TYPE_NORMAL</a> = 0x01, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ae10bb854f461f60cf399852f8f327077">ACONFIGURATION_UI_MODE_TYPE_DESK</a> = 0x02, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a5d6575185e41d909469a1dcf5f81bf4f">ACONFIGURATION_UI_MODE_TYPE_CAR</a> = 0x03, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4738dded616f028fbbedcbad764e7969">ACONFIGURATION_UI_MODE_TYPE_TELEVISION</a> = 0x04, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ad99004a7a1b2a97d29b639664947f8e3">ACONFIGURATION_UI_MODE_TYPE_APPLIANCE</a> = 0x05, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ac8c3e2207f2356bc6a1dffc6a615d131">ACONFIGURATION_UI_MODE_TYPE_WATCH</a> = 0x06, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a975087bbd4087b57a68ef3cdbfeb77a1">ACONFIGURATION_UI_MODE_NIGHT_ANY</a> = 0x00, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a90ebe564e3a3e384d5b013100f81e4b7">ACONFIGURATION_UI_MODE_NIGHT_NO</a> = 0x1, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a437af4527fac5407de256ec1ef055046">ACONFIGURATION_UI_MODE_NIGHT_YES</a> = 0x2, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aad653f0c960112177fdc387a4a0577fa">ACONFIGURATION_SCREEN_WIDTH_DP_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ab66ad42d0cf72fd7e8cd99b92b625432">ACONFIGURATION_SCREEN_HEIGHT_DP_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a227120217d8b6a9d5add3ccc4b283702">ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY</a> = 0x0000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4687ede31c438dd9f2701cab88de1dbe">ACONFIGURATION_LAYOUTDIR_ANY</a> = 0x00, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a05242d8f2d254b43ff9414ff1aa38a83">ACONFIGURATION_LAYOUTDIR_LTR</a> = 0x01, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5af98332983b787ab9355b527079636870">ACONFIGURATION_LAYOUTDIR_RTL</a> = 0x02, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a4d40f2aef365c78a52f699b89439db28">ACONFIGURATION_MCC</a> = 0x0001, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ade91a319638eede201579d15f86578a5">ACONFIGURATION_MNC</a> = 0x0002, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a01ecff796bd0690a9a8498c7de03e9b4">ACONFIGURATION_LOCALE</a> = 0x0004, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a255cfb57ac18d460c5614565a84f5561">ACONFIGURATION_TOUCHSCREEN</a> = 0x0008, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a0195de2a57f028a8171c42beff0b0e88">ACONFIGURATION_KEYBOARD</a> = 0x0010, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a54e71234e32ed037e2d47472f80eb416">ACONFIGURATION_KEYBOARD_HIDDEN</a> = 0x0020, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65e9d31615d2b4adf3738d9a12a1556b">ACONFIGURATION_NAVIGATION</a> = 0x0040, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a591461d864136d482fe06e01fd945786">ACONFIGURATION_ORIENTATION</a> = 0x0080, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5ace87b4f25e5fd6fe0f3316d21ecc66a1">ACONFIGURATION_DENSITY</a> = 0x0100, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a76ca1eb0e9346d93da592afbbf9a3b72">ACONFIGURATION_SCREEN_SIZE</a> = 0x0200, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a1be62e4fc31cf3d3102c99f7c6b4c71b">ACONFIGURATION_VERSION</a> = 0x0400, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a12d69ffef9135c1c55e1b8b5c2589e7c">ACONFIGURATION_SCREEN_LAYOUT</a> = 0x0800, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a43a324af59372efd08b34431825cf67e">ACONFIGURATION_UI_MODE</a> = 0x1000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5acce415252e0ad95117a05bbe910f06de">ACONFIGURATION_SMALLEST_SCREEN_SIZE</a> = 0x2000, 
-<br/>
-&#160;&#160;<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5a65834be1230d1694e5ce8a6f407acab2">ACONFIGURATION_LAYOUTDIR</a> = 0x4000, 
-<a class="el" href="group___configuration.html#gga99fb83031ce9923c84392b4e92f956b5aa6cda2f222580dbef27f1277d967d58c">ACONFIGURATION_MNC_ZERO</a> = 0xffff
-<br/>
- }</td></tr>
-<tr class="separator:ga99fb83031ce9923c84392b4e92f956b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga9543655922980466eb05c7be94a0a567"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">AConfiguration_new</a> ()</td></tr>
-<tr class="separator:ga9543655922980466eb05c7be94a0a567"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga60fe264b97da84d3370eb9e220159e6d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga60fe264b97da84d3370eb9e220159e6d">AConfiguration_delete</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga60fe264b97da84d3370eb9e220159e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga75e061fd0b4f761e08e43af36508c4f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">AConfiguration_fromAssetManager</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *out, <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *am)</td></tr>
-<tr class="separator:ga75e061fd0b4f761e08e43af36508c4f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaabff04218a0a76afb8d3ea551b001565"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaabff04218a0a76afb8d3ea551b001565">AConfiguration_copy</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *dest, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *src)</td></tr>
-<tr class="separator:gaabff04218a0a76afb8d3ea551b001565"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1e78004237a931086d2ae4bd8324bd30"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1e78004237a931086d2ae4bd8324bd30">AConfiguration_getMcc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga1e78004237a931086d2ae4bd8324bd30"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae6198b4eaf3e34168f4b13b8b5975d93"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gae6198b4eaf3e34168f4b13b8b5975d93">AConfiguration_setMcc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t mcc)</td></tr>
-<tr class="separator:gae6198b4eaf3e34168f4b13b8b5975d93"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4783776a4fad4501898472375d781fb9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4783776a4fad4501898472375d781fb9">AConfiguration_getMnc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga4783776a4fad4501898472375d781fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf060ef69c3636f62e90ae0b520eecb8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaaf060ef69c3636f62e90ae0b520eecb8">AConfiguration_setMnc</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t mnc)</td></tr>
-<tr class="separator:gaaf060ef69c3636f62e90ae0b520eecb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7b004c13448704afb0ea2040d69468c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7b004c13448704afb0ea2040d69468c1">AConfiguration_getLanguage</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, char *outLanguage)</td></tr>
-<tr class="separator:ga7b004c13448704afb0ea2040d69468c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1f3c6cf6667655f83777acda7387ddff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1f3c6cf6667655f83777acda7387ddff">AConfiguration_setLanguage</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, const char *language)</td></tr>
-<tr class="separator:ga1f3c6cf6667655f83777acda7387ddff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad2b47f787012a82a67a20e5de5211d46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad2b47f787012a82a67a20e5de5211d46">AConfiguration_getCountry</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, char *outCountry)</td></tr>
-<tr class="separator:gad2b47f787012a82a67a20e5de5211d46"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac2f5d414a6466634b1639b5c6f8879ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gac2f5d414a6466634b1639b5c6f8879ac">AConfiguration_setCountry</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, const char *country)</td></tr>
-<tr class="separator:gac2f5d414a6466634b1639b5c6f8879ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa7d8e3e9871dc925fef3e342a92e4e22"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaa7d8e3e9871dc925fef3e342a92e4e22">AConfiguration_getOrientation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gaa7d8e3e9871dc925fef3e342a92e4e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadcaa8540bad4172a74032143bcaade04"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gadcaa8540bad4172a74032143bcaade04">AConfiguration_setOrientation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t orientation)</td></tr>
-<tr class="separator:gadcaa8540bad4172a74032143bcaade04"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad305e6cf86fa915c24212e71bb2bf027"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad305e6cf86fa915c24212e71bb2bf027">AConfiguration_getTouchscreen</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gad305e6cf86fa915c24212e71bb2bf027"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0d51dbe710c1afe31ece4dd6a8c188ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga0d51dbe710c1afe31ece4dd6a8c188ff">AConfiguration_setTouchscreen</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t touchscreen)</td></tr>
-<tr class="separator:ga0d51dbe710c1afe31ece4dd6a8c188ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4c994e0555947340582094c3da32a663"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4c994e0555947340582094c3da32a663">AConfiguration_getDensity</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga4c994e0555947340582094c3da32a663"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9217af9858a7166dcb9a877192779eac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9217af9858a7166dcb9a877192779eac">AConfiguration_setDensity</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t density)</td></tr>
-<tr class="separator:ga9217af9858a7166dcb9a877192779eac"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafd0f76ccd4fe4bda5172b8e0bc6675e4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafd0f76ccd4fe4bda5172b8e0bc6675e4">AConfiguration_getKeyboard</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gafd0f76ccd4fe4bda5172b8e0bc6675e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4ab3429c5505c108c09349f1ddef572f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4ab3429c5505c108c09349f1ddef572f">AConfiguration_setKeyboard</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t keyboard)</td></tr>
-<tr class="separator:ga4ab3429c5505c108c09349f1ddef572f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae3ff1541b63f5b9256f7c0ebae372977"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gae3ff1541b63f5b9256f7c0ebae372977">AConfiguration_getNavigation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gae3ff1541b63f5b9256f7c0ebae372977"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad21dd14fb823a6a80b66132a05ce8913"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gad21dd14fb823a6a80b66132a05ce8913">AConfiguration_setNavigation</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t navigation)</td></tr>
-<tr class="separator:gad21dd14fb823a6a80b66132a05ce8913"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7a8317ab975f621f3fe62ed1b44f2605"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7a8317ab975f621f3fe62ed1b44f2605">AConfiguration_getKeysHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga7a8317ab975f621f3fe62ed1b44f2605"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5a80a02aa10cfa17de0795054e927183"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga5a80a02aa10cfa17de0795054e927183">AConfiguration_setKeysHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t keysHidden)</td></tr>
-<tr class="separator:ga5a80a02aa10cfa17de0795054e927183"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafe8d3a9c2f715ea76c8e4a99c2db9eaa"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafe8d3a9c2f715ea76c8e4a99c2db9eaa">AConfiguration_getNavHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gafe8d3a9c2f715ea76c8e4a99c2db9eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga67e86e0347596421771af841710308d5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga67e86e0347596421771af841710308d5">AConfiguration_setNavHidden</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t navHidden)</td></tr>
-<tr class="separator:ga67e86e0347596421771af841710308d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4aa7062198e5aacd9fabb04d0453dd91"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga4aa7062198e5aacd9fabb04d0453dd91">AConfiguration_getSdkVersion</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga4aa7062198e5aacd9fabb04d0453dd91"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga06c66072902ee455011120188ca4810b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga06c66072902ee455011120188ca4810b">AConfiguration_setSdkVersion</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t sdkVersion)</td></tr>
-<tr class="separator:ga06c66072902ee455011120188ca4810b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9d2c1b8731795d8e74be7e23cbc77552"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9d2c1b8731795d8e74be7e23cbc77552">AConfiguration_getScreenSize</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga9d2c1b8731795d8e74be7e23cbc77552"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7bcf05150933ead34a01061d05ad3245"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7bcf05150933ead34a01061d05ad3245">AConfiguration_setScreenSize</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t screenSize)</td></tr>
-<tr class="separator:ga7bcf05150933ead34a01061d05ad3245"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab7d1f5aa59e8fa4db0a1b91bb322034c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gab7d1f5aa59e8fa4db0a1b91bb322034c">AConfiguration_getScreenLong</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:gab7d1f5aa59e8fa4db0a1b91bb322034c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaed853ab7e2bc915591d05997130bc448"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaed853ab7e2bc915591d05997130bc448">AConfiguration_setScreenLong</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t screenLong)</td></tr>
-<tr class="separator:gaed853ab7e2bc915591d05997130bc448"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1d75777892f38208feb3d2a94a977fcf"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga1d75777892f38208feb3d2a94a977fcf">AConfiguration_getUiModeType</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga1d75777892f38208feb3d2a94a977fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec61e3cf91cd79e8b76a35bbcb15789d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaec61e3cf91cd79e8b76a35bbcb15789d">AConfiguration_setUiModeType</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t uiModeType)</td></tr>
-<tr class="separator:gaec61e3cf91cd79e8b76a35bbcb15789d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga447f16a9e4f8400e5e0328900749ff16"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga447f16a9e4f8400e5e0328900749ff16">AConfiguration_getUiModeNight</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga447f16a9e4f8400e5e0328900749ff16"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga08df1e801afbe4a12411e393b8141e42"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga08df1e801afbe4a12411e393b8141e42">AConfiguration_setUiModeNight</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t uiModeNight)</td></tr>
-<tr class="separator:ga08df1e801afbe4a12411e393b8141e42"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga61e5fe9612c170c33e1c7e9fb92f2219"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga61e5fe9612c170c33e1c7e9fb92f2219">AConfiguration_getScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga61e5fe9612c170c33e1c7e9fb92f2219"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafc51d45679095965fe3ba1abd402f120"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafc51d45679095965fe3ba1abd402f120">AConfiguration_setScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:gafc51d45679095965fe3ba1abd402f120"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9905a4765f8d0d921c476ebce01c7648"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga9905a4765f8d0d921c476ebce01c7648">AConfiguration_getScreenHeightDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga9905a4765f8d0d921c476ebce01c7648"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6ffac3b41415ec8a3031737ccdcd63b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6ffac3b41415ec8a3031737ccdcd63b8">AConfiguration_setScreenHeightDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:ga6ffac3b41415ec8a3031737ccdcd63b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7fc015e41fad342edba66a003d9848aa"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga7fc015e41fad342edba66a003d9848aa">AConfiguration_getSmallestScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga7fc015e41fad342edba66a003d9848aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6b004c9585671efc5cebd96c1d43c4f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga6b004c9585671efc5cebd96c1d43c4f0">AConfiguration_setSmallestScreenWidthDp</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:ga6b004c9585671efc5cebd96c1d43c4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga13dbf2fc9a382c62b391e7de9cf9b468"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#ga13dbf2fc9a382c62b391e7de9cf9b468">AConfiguration_getLayoutDirection</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config)</td></tr>
-<tr class="separator:ga13dbf2fc9a382c62b391e7de9cf9b468"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf47215cf551594f8c2a0594419b47e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gaaf47215cf551594f8c2a0594419b47e1">AConfiguration_setLayoutDirection</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config, int32_t value)</td></tr>
-<tr class="separator:gaaf47215cf551594f8c2a0594419b47e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabfe69b0dccae425a16fe94d084f20402"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gabfe69b0dccae425a16fe94d084f20402">AConfiguration_diff</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config1, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *config2)</td></tr>
-<tr class="separator:gabfe69b0dccae425a16fe94d084f20402"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafb27b901a1d7d44ed866608fb8399a18"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">AConfiguration_match</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *base, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *requested)</td></tr>
-<tr class="separator:gafb27b901a1d7d44ed866608fb8399a18"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafd2bb31057c8d57efcea7603458d2a8d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___configuration.html#gafd2bb31057c8d57efcea7603458d2a8d">AConfiguration_isBetterThan</a> (<a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *base, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *test, <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *requested)</td></tr>
-<tr class="separator:gafd2bb31057c8d57efcea7603458d2a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="ga6709434d0f99b8367d0df2dfdfbef45a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> is an opaque type used to get and set various subsystem configurations.</p>
-<p>A <a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> pointer can be obtained using:</p>
-<ul>
-<li><a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">AConfiguration_new()</a></li>
-<li><a class="el" href="group___configuration.html#ga75e061fd0b4f761e08e43af36508c4f3">AConfiguration_fromAssetManager()</a> </li>
-</ul>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="ga99fb83031ce9923c84392b4e92f956b5"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Define flags and constants for various subsystem configurations. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5af44cee3290a23999b0358c5638747a5f"></a>ACONFIGURATION_ORIENTATION_ANY</em>&#160;</td><td class="fielddoc">
-<p>Orientation: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ad9bf5c1fb90f9fdb20f984d0574592fe"></a>ACONFIGURATION_ORIENTATION_PORT</em>&#160;</td><td class="fielddoc">
-<p>Orientation: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">port</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ad5746872ff6871379fca93c60bfac8a3"></a>ACONFIGURATION_ORIENTATION_LAND</em>&#160;</td><td class="fielddoc">
-<p>Orientation: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">land</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ab0ca4fce673baf58447bfeb154d9a03f"></a>ACONFIGURATION_ORIENTATION_SQUARE</em>&#160;</td><td class="fielddoc">
-<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Not currently supported or used. </dd></dl>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5aa73bcf45261366840fea743372682fa6"></a>ACONFIGURATION_TOUCHSCREEN_ANY</em>&#160;</td><td class="fielddoc">
-<p>Touchscreen: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5adfbeb370edd3b4372c9b0f86f152dde0"></a>ACONFIGURATION_TOUCHSCREEN_NOTOUCH</em>&#160;</td><td class="fielddoc">
-<p>Touchscreen: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">notouch</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a8316a15b06353f883f2aef8bd194f79f"></a>ACONFIGURATION_TOUCHSCREEN_STYLUS</em>&#160;</td><td class="fielddoc">
-<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>Not currently supported or used. </dd></dl>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a4bf2a8323ec6d072aa48d5fc2cff645e"></a>ACONFIGURATION_TOUCHSCREEN_FINGER</em>&#160;</td><td class="fielddoc">
-<p>Touchscreen: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">finger</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ae628b2bf594733b7c19ae394616cec6c"></a>ACONFIGURATION_DENSITY_DEFAULT</em>&#160;</td><td class="fielddoc">
-<p>Density: default density. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a01ddb34b2376422d2323720049eb57f3"></a>ACONFIGURATION_DENSITY_LOW</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">ldpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a2511479d7cd574c4b293d535e4dc337e"></a>ACONFIGURATION_DENSITY_MEDIUM</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">mdpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a10e6c3d636f3f6de75de9208913b0d8f"></a>ACONFIGURATION_DENSITY_TV</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">tvdpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a5ef4a97dc058235cdfa9fcfe3300c7eb"></a>ACONFIGURATION_DENSITY_HIGH</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">hdpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a38a03b3b1c64725679605d8d479c85a0"></a>ACONFIGURATION_DENSITY_XHIGH</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xhdpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ad6353daf63778a6ec6f2bd3815d7e6e4"></a>ACONFIGURATION_DENSITY_XXHIGH</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xxhdpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a2bd04af33e868a77bd4d83e7d70368ec"></a>ACONFIGURATION_DENSITY_XXXHIGH</em>&#160;</td><td class="fielddoc">
-<p>Density: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xxxhdpi</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a966a3855351a97ae865264afd74c1534"></a>ACONFIGURATION_DENSITY_ANY</em>&#160;</td><td class="fielddoc">
-<p>Density: any density. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a7c1af92914155c418b99844c6aab33d7"></a>ACONFIGURATION_DENSITY_NONE</em>&#160;</td><td class="fielddoc">
-<p>Density: no density specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a593f722738682ae4500dab6427670f4a"></a>ACONFIGURATION_KEYBOARD_ANY</em>&#160;</td><td class="fielddoc">
-<p>Keyboard: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a40195a1a2d8e21c74d99606d8a1a9918"></a>ACONFIGURATION_KEYBOARD_NOKEYS</em>&#160;</td><td class="fielddoc">
-<p>Keyboard: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">nokeys</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a263ff8efb4d2c757e557adc0d0cdeedf"></a>ACONFIGURATION_KEYBOARD_QWERTY</em>&#160;</td><td class="fielddoc">
-<p>Keyboard: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">qwerty</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a1aaf1a887f146737030cce95c53066ea"></a>ACONFIGURATION_KEYBOARD_12KEY</em>&#160;</td><td class="fielddoc">
-<p>Keyboard: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">12key</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a90e914b60d28c081b313f4b7b6600f47"></a>ACONFIGURATION_NAVIGATION_ANY</em>&#160;</td><td class="fielddoc">
-<p>Navigation: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a3d95e899305aeae366fb7f8d8b6c290a"></a>ACONFIGURATION_NAVIGATION_NONAV</em>&#160;</td><td class="fielddoc">
-<p>Navigation: value corresponding to the <a href="@@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">nonav</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ace2e3ed21322100712992ca09f4b75b5"></a>ACONFIGURATION_NAVIGATION_DPAD</em>&#160;</td><td class="fielddoc">
-<p>Navigation: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">dpad</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ad2807d00cb2f5dcb9f456045dd8443a4"></a>ACONFIGURATION_NAVIGATION_TRACKBALL</em>&#160;</td><td class="fielddoc">
-<p>Navigation: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">trackball</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a80b53370f65ad283a4fd025f36422bea"></a>ACONFIGURATION_NAVIGATION_WHEEL</em>&#160;</td><td class="fielddoc">
-<p>Navigation: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">wheel</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a34d3a830bc2964000052f8486fd76b0c"></a>ACONFIGURATION_KEYSHIDDEN_ANY</em>&#160;</td><td class="fielddoc">
-<p>Keyboard availability: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5abfbfc3a10affed059263555b00429ab2"></a>ACONFIGURATION_KEYSHIDDEN_NO</em>&#160;</td><td class="fielddoc">
-<p>Keyboard availability: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keysexposed</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a5e6a5a3f4175644886bde7d0ed4b1ebf"></a>ACONFIGURATION_KEYSHIDDEN_YES</em>&#160;</td><td class="fielddoc">
-<p>Keyboard availability: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyshidden</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a1a56b72c730e40f22f3b8727e54c376c"></a>ACONFIGURATION_KEYSHIDDEN_SOFT</em>&#160;</td><td class="fielddoc">
-<p>Keyboard availability: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyssoft</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a6db7dd6a67196df88117dcdc904e0cb3"></a>ACONFIGURATION_NAVHIDDEN_ANY</em>&#160;</td><td class="fielddoc">
-<p>Navigation availability: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ae6ff9883e3e89f8d9ea5c0ebe077c9c5"></a>ACONFIGURATION_NAVHIDDEN_NO</em>&#160;</td><td class="fielddoc">
-<p>Navigation availability: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavAvailQualifier">navexposed</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a79b3a5fe10e948bb79db47b516d46cf5"></a>ACONFIGURATION_NAVHIDDEN_YES</em>&#160;</td><td class="fielddoc">
-<p>Navigation availability: value corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavAvailQualifier">navhidden</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a9abcd34a6c549e048fc75a545081584e"></a>ACONFIGURATION_SCREENSIZE_ANY</em>&#160;</td><td class="fielddoc">
-<p>Screen size: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a1163af972206a65a5d18bda12fdc511c"></a>ACONFIGURATION_SCREENSIZE_SMALL</em>&#160;</td><td class="fielddoc">
-<p>Screen size: value indicating the screen is at least approximately 320x426 dp units, corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">small</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a019727e684f25ba921f3479abd62b9f2"></a>ACONFIGURATION_SCREENSIZE_NORMAL</em>&#160;</td><td class="fielddoc">
-<p>Screen size: value indicating the screen is at least approximately 320x470 dp units, corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">normal</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5af871d177fdceedb75612cfc1281d2c12"></a>ACONFIGURATION_SCREENSIZE_LARGE</em>&#160;</td><td class="fielddoc">
-<p>Screen size: value indicating the screen is at least approximately 480x640 dp units, corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">large</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a0ca385ed504fc92f6ff3f0857e916c9c"></a>ACONFIGURATION_SCREENSIZE_XLARGE</em>&#160;</td><td class="fielddoc">
-<p>Screen size: value indicating the screen is at least approximately 720x960 dp units, corresponding to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">xlarge</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a41e55e57da42fd09c378f59c1a63710f"></a>ACONFIGURATION_SCREENLONG_ANY</em>&#160;</td><td class="fielddoc">
-<p>Screen layout: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a428bb8fcd8bc731b67b0773dc62781c5"></a>ACONFIGURATION_SCREENLONG_NO</em>&#160;</td><td class="fielddoc">
-<p>Screen layout: value that corresponds to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">notlong</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a91fc014d328507568d225d691b3babfd"></a>ACONFIGURATION_SCREENLONG_YES</em>&#160;</td><td class="fielddoc">
-<p>Screen layout: value that corresponds to the <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">long</a> resource qualifier. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a10d0916da7fa88c945a9cda259407d4c"></a>ACONFIGURATION_UI_MODE_TYPE_ANY</em>&#160;</td><td class="fielddoc">
-<p>UI mode: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ae7efe2713b6718311da76c828b5b444e"></a>ACONFIGURATION_UI_MODE_TYPE_NORMAL</em>&#160;</td><td class="fielddoc">
-<p>UI mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">no UI mode type</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ae10bb854f461f60cf399852f8f327077"></a>ACONFIGURATION_UI_MODE_TYPE_DESK</em>&#160;</td><td class="fielddoc">
-<p>UI mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">desk</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a5d6575185e41d909469a1dcf5f81bf4f"></a>ACONFIGURATION_UI_MODE_TYPE_CAR</em>&#160;</td><td class="fielddoc">
-<p>UI mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">car</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a4738dded616f028fbbedcbad764e7969"></a>ACONFIGURATION_UI_MODE_TYPE_TELEVISION</em>&#160;</td><td class="fielddoc">
-<p>UI mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">television</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ad99004a7a1b2a97d29b639664947f8e3"></a>ACONFIGURATION_UI_MODE_TYPE_APPLIANCE</em>&#160;</td><td class="fielddoc">
-<p>UI mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">appliance</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ac8c3e2207f2356bc6a1dffc6a615d131"></a>ACONFIGURATION_UI_MODE_TYPE_WATCH</em>&#160;</td><td class="fielddoc">
-<p>UI mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">watch</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a975087bbd4087b57a68ef3cdbfeb77a1"></a>ACONFIGURATION_UI_MODE_NIGHT_ANY</em>&#160;</td><td class="fielddoc">
-<p>UI night mode: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a90ebe564e3a3e384d5b013100f81e4b7"></a>ACONFIGURATION_UI_MODE_NIGHT_NO</em>&#160;</td><td class="fielddoc">
-<p>UI night mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#NightQualifier">notnight</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a437af4527fac5407de256ec1ef055046"></a>ACONFIGURATION_UI_MODE_NIGHT_YES</em>&#160;</td><td class="fielddoc">
-<p>UI night mode: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#NightQualifier">night</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5aad653f0c960112177fdc387a4a0577fa"></a>ACONFIGURATION_SCREEN_WIDTH_DP_ANY</em>&#160;</td><td class="fielddoc">
-<p>Screen width DPI: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ab66ad42d0cf72fd7e8cd99b92b625432"></a>ACONFIGURATION_SCREEN_HEIGHT_DP_ANY</em>&#160;</td><td class="fielddoc">
-<p>Screen height DPI: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a227120217d8b6a9d5add3ccc4b283702"></a>ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY</em>&#160;</td><td class="fielddoc">
-<p>Smallest screen width DPI: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a4687ede31c438dd9f2701cab88de1dbe"></a>ACONFIGURATION_LAYOUTDIR_ANY</em>&#160;</td><td class="fielddoc">
-<p>Layout direction: not specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a05242d8f2d254b43ff9414ff1aa38a83"></a>ACONFIGURATION_LAYOUTDIR_LTR</em>&#160;</td><td class="fielddoc">
-<p>Layout direction: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldltr</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5af98332983b787ab9355b527079636870"></a>ACONFIGURATION_LAYOUTDIR_RTL</em>&#160;</td><td class="fielddoc">
-<p>Layout direction: value that corresponds to <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldrtl</a> resource qualifier specified. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a4d40f2aef365c78a52f699b89439db28"></a>ACONFIGURATION_MCC</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#MccQualifier">mcc</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ade91a319638eede201579d15f86578a5"></a>ACONFIGURATION_MNC</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#MccQualifier">mnc</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a01ecff796bd0690a9a8498c7de03e9b4"></a>ACONFIGURATION_LOCALE</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="{@docRoot}guide/topics/resources/providing-resources.html#LocaleQualifier">locale</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a255cfb57ac18d460c5614565a84f5561"></a>ACONFIGURATION_TOUCHSCREEN</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">touchscreen</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a0195de2a57f028a8171c42beff0b0e88"></a>ACONFIGURATION_KEYBOARD</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">keyboard</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a54e71234e32ed037e2d47472f80eb416"></a>ACONFIGURATION_KEYBOARD_HIDDEN</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyboardHidden</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a65e9d31615d2b4adf3738d9a12a1556b"></a>ACONFIGURATION_NAVIGATION</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">navigation</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a591461d864136d482fe06e01fd945786"></a>ACONFIGURATION_ORIENTATION</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">orientation</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5ace87b4f25e5fd6fe0f3316d21ecc66a1"></a>ACONFIGURATION_DENSITY</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">density</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a76ca1eb0e9346d93da592afbbf9a3b72"></a>ACONFIGURATION_SCREEN_SIZE</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">screen size</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a1be62e4fc31cf3d3102c99f7c6b4c71b"></a>ACONFIGURATION_VERSION</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#VersionQualifier">platform version</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a12d69ffef9135c1c55e1b8b5c2589e7c"></a>ACONFIGURATION_SCREEN_LAYOUT</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for screen layout configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a43a324af59372efd08b34431825cf67e"></a>ACONFIGURATION_UI_MODE</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">ui mode</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5acce415252e0ad95117a05bbe910f06de"></a>ACONFIGURATION_SMALLEST_SCREEN_SIZE</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">smallest screen width</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5a65834be1230d1694e5ce8a6f407acab2"></a>ACONFIGURATION_LAYOUTDIR</em>&#160;</td><td class="fielddoc">
-<p>Bit mask for <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">layout direction</a> configuration. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga99fb83031ce9923c84392b4e92f956b5aa6cda2f222580dbef27f1277d967d58c"></a>ACONFIGURATION_MNC_ZERO</em>&#160;</td><td class="fielddoc">
-<p>Constant used to to represent MNC (Mobile Network Code) zero. 0 cannot be used, since it is used to represent an undefined MNC. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="gaabff04218a0a76afb8d3ea551b001565"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_copy </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>dest</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>src</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Copy the contents of 'src' to 'dest'. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga60fe264b97da84d3370eb9e220159e6d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_delete </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Free an AConfiguration that was previously created with <a class="el" href="group___configuration.html#ga9543655922980466eb05c7be94a0a567">AConfiguration_new()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gabfe69b0dccae425a16fe94d084f20402"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_diff </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config1</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config2</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Perform a diff between two configurations. Returns a bit mask of ACONFIGURATION_* constants, each bit set meaning that configuration element is different between them. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga75e061fd0b4f761e08e43af36508c4f3"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_fromAssetManager </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>out</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td>
-          <td class="paramname"><em>am</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Create and return a new AConfiguration based on the current configuration in use in the given <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad2b47f787012a82a67a20e5de5211d46"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_getCountry </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">char *&#160;</td>
-          <td class="paramname"><em>outCountry</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current country code set in the configuration. The output will be filled with an array of two characters. They are not 0-terminated. If a country is not set, they will be 0. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4c994e0555947340582094c3da32a663"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getDensity </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_DENSITY_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafd0f76ccd4fe4bda5172b8e0bc6675e4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getKeyboard </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_KEYBOARD_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7a8317ab975f621f3fe62ed1b44f2605"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getKeysHidden </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_KEYSHIDDEN_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7b004c13448704afb0ea2040d69468c1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_getLanguage </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">char *&#160;</td>
-          <td class="paramname"><em>outLanguage</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current language code set in the configuration. The output will be filled with an array of two characters. They are not 0-terminated. If a language is not set, they will be 0. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga13dbf2fc9a382c62b391e7de9cf9b468"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getLayoutDirection </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the configuration's layout direction, or ACONFIGURATION_LAYOUTDIR_ANY if not set. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1e78004237a931086d2ae4bd8324bd30"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getMcc </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current MCC set in the configuration. 0 if not set. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4783776a4fad4501898472375d781fb9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getMnc </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current MNC set in the configuration. 0 if not set. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafe8d3a9c2f715ea76c8e4a99c2db9eaa"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getNavHidden </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_NAVHIDDEN_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gae3ff1541b63f5b9256f7c0ebae372977"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getNavigation </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_NAVIGATION_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa7d8e3e9871dc925fef3e342a92e4e22"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getOrientation </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_ORIENTATION_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9905a4765f8d0d921c476ebce01c7648"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getScreenHeightDp </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current configuration screen height in dp units, or ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set. </p>
-
-</div>
-</div>
-<a class="anchor" id="gab7d1f5aa59e8fa4db0a1b91bb322034c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getScreenLong </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_SCREENLONG_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9d2c1b8731795d8e74be7e23cbc77552"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getScreenSize </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_SCREENSIZE_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga61e5fe9612c170c33e1c7e9fb92f2219"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getScreenWidthDp </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current configuration screen width in dp units, or ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4aa7062198e5aacd9fabb04d0453dd91"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getSdkVersion </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current SDK (API) version set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7fc015e41fad342edba66a003d9848aa"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getSmallestScreenWidthDp </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the configuration's smallest screen width in dp units, or ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad305e6cf86fa915c24212e71bb2bf027"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getTouchscreen </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_TOUCHSCREEN_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga447f16a9e4f8400e5e0328900749ff16"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getUiModeNight </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_UI_MODE_NIGHT_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1d75777892f38208feb3d2a94a977fcf"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_getUiModeType </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafd2bb31057c8d57efcea7603458d2a8d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_isBetterThan </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>base</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>test</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>requested</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Determine whether the configuration in 'test' is better than the existing configuration in 'base'. If 'requested' is non-NULL, this decision is based on the overall configuration given there. If it is NULL, this decision is simply based on which configuration is more specific. Returns non-0 if 'test' is better than 'base'.</p>
-<p>This assumes you have already filtered the configurations with <a class="el" href="group___configuration.html#gafb27b901a1d7d44ed866608fb8399a18">AConfiguration_match()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafb27b901a1d7d44ed866608fb8399a18"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AConfiguration_match </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>base</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>requested</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Determine whether 'base' is a valid configuration for use within the environment 'requested'. Returns 0 if there are any values in 'base' that conflict with 'requested'. Returns 1 if it does not conflict. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9543655922980466eb05c7be94a0a567"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a>* AConfiguration_new </td>
-          <td>(</td>
-          <td class="paramname"></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Create a new AConfiguration, initialized with no values set. </p>
-
-</div>
-</div>
-<a class="anchor" id="gac2f5d414a6466634b1639b5c6f8879ac"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setCountry </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>country</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current country code in the configuration, from the first two characters in the string. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9217af9858a7166dcb9a877192779eac"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setDensity </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>density</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current density in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4ab3429c5505c108c09349f1ddef572f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setKeyboard </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>keyboard</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current keyboard in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga5a80a02aa10cfa17de0795054e927183"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setKeysHidden </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>keysHidden</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current keys hidden in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1f3c6cf6667655f83777acda7387ddff"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setLanguage </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>language</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current language code in the configuration, from the first two characters in the string. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaaf47215cf551594f8c2a0594419b47e1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setLayoutDirection </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>value</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the configuration's layout direction. </p>
-
-</div>
-</div>
-<a class="anchor" id="gae6198b4eaf3e34168f4b13b8b5975d93"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setMcc </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>mcc</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current MCC in the configuration. 0 to clear. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaaf060ef69c3636f62e90ae0b520eecb8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setMnc </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>mnc</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current MNC in the configuration. 0 to clear. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga67e86e0347596421771af841710308d5"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setNavHidden </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>navHidden</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current nav hidden in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad21dd14fb823a6a80b66132a05ce8913"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setNavigation </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>navigation</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current navigation in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gadcaa8540bad4172a74032143bcaade04"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setOrientation </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>orientation</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current orientation in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga6ffac3b41415ec8a3031737ccdcd63b8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setScreenHeightDp </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>value</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the configuration's current screen width in dp units. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaed853ab7e2bc915591d05997130bc448"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setScreenLong </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>screenLong</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current screen long in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7bcf05150933ead34a01061d05ad3245"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setScreenSize </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>screenSize</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current screen size in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafc51d45679095965fe3ba1abd402f120"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setScreenWidthDp </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>value</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the configuration's current screen width in dp units. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga06c66072902ee455011120188ca4810b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setSdkVersion </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>sdkVersion</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current SDK version in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga6b004c9585671efc5cebd96c1d43c4f0"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setSmallestScreenWidthDp </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>value</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the configuration's smallest screen width in dp units. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga0d51dbe710c1afe31ece4dd6a8c188ff"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setTouchscreen </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>touchscreen</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current touchscreen in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga08df1e801afbe4a12411e393b8141e42"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setUiModeNight </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>uiModeNight</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current UI mode night in the configuration. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaec61e3cf91cd79e8b76a35bbcb15789d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AConfiguration_setUiModeType </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___configuration.html#ga6709434d0f99b8367d0df2dfdfbef45a">AConfiguration</a> *&#160;</td>
-          <td class="paramname"><em>config</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>uiModeType</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Set the current UI mode type in the configuration. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___input.jd b/docs/html/ndk/reference/group___input.jd
deleted file mode 100644
index 55db956..0000000
--- a/docs/html/ndk/reference/group___input.jd
+++ /dev/null
@@ -1,3682 +0,0 @@
-page.title=Input
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#define-members">Macros</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Input</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:input_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="input_8h.html">input.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:keycodes_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="keycodes_8h.html">keycodes.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
-Macros</h2></td></tr>
-<tr class="memitem:gaeb170c0fbeeed1d999160566f09f169e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaeb170c0fbeeed1d999160566f09f169e">AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT</a>&#160;&#160;&#160;8</td></tr>
-<tr class="separator:gaeb170c0fbeeed1d999160566f09f169e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gac35dbbc035371e799d8badabc981e8fa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a></td></tr>
-<tr class="separator:gac35dbbc035371e799d8badabc981e8fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga21d8182651f4b61ae558560023e8339c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a></td></tr>
-<tr class="separator:ga21d8182651f4b61ae558560023e8339c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gabc6126af1d45847bc59afa0aa3216b04"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a9506627d5377c67dbc7fc58804b2cdfd">AKEY_STATE_UNKNOWN</a> = -1, 
-<a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04afa14022f587487c24d401c87e71c8e28">AKEY_STATE_UP</a> = 0, 
-<a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a286ec0a7aff5903a982be0cd6785b62c">AKEY_STATE_DOWN</a> = 1, 
-<a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04ad09fd9fe458ca6c66ead9b9a75c56192">AKEY_STATE_VIRTUAL</a> = 2
- }</td></tr>
-<tr class="separator:gabc6126af1d45847bc59afa0aa3216b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadc29c2ff13d900c2f185ee95427fb06c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cae0a3cb26517b3f876beb37594494526d">AMETA_NONE</a> = 0, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caba44b1077427e4da1d202e0c8f772881">AMETA_ALT_ON</a> = 0x02, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca256c74b768ecee57e3218e81ae6945df">AMETA_ALT_LEFT_ON</a> = 0x10, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca985db074c0f44749ca86b5cc0454056a">AMETA_ALT_RIGHT_ON</a> = 0x20, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa3d5f49c3a55b653a94c798a2c93b197">AMETA_SHIFT_ON</a> = 0x01, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa01fa027cdd8951530437bcbe04c3ed7">AMETA_SHIFT_LEFT_ON</a> = 0x40, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cac52930581c339216218a6f50c5b57aa1">AMETA_SHIFT_RIGHT_ON</a> = 0x80, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca8af1e90950a728baca807a83e50b22ea">AMETA_SYM_ON</a> = 0x04, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca545b31b72b0454c22c170ff534ddfdf1">AMETA_FUNCTION_ON</a> = 0x08, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cabe927318a2a11a46be3e9d78dbd81ef5">AMETA_CTRL_ON</a> = 0x1000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca752c837afd5ff0fcf75ddee7b6808be6">AMETA_CTRL_LEFT_ON</a> = 0x2000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca0ab007e367ae136b873b3e6636747419">AMETA_CTRL_RIGHT_ON</a> = 0x4000, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca9c04e7c2ad1f0f41af60402188a29c4a">AMETA_META_ON</a> = 0x10000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca6f923de8f2cd72e3ad86149c0747906f">AMETA_META_LEFT_ON</a> = 0x20000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafdf56d1259ae16c97161c443d7949bdf">AMETA_META_RIGHT_ON</a> = 0x40000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafc467c98d509b0de28b298801a0c3e37">AMETA_CAPS_LOCK_ON</a> = 0x100000, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca15d234534a6870add5594f02b7333dc6">AMETA_NUM_LOCK_ON</a> = 0x200000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafe8dacdc6566f655a3eab73ea4a9af5a">AMETA_SCROLL_LOCK_ON</a> = 0x400000
-<br/>
- }</td></tr>
-<tr class="separator:gadc29c2ff13d900c2f185ee95427fb06c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga61dadd085c1777f559549e05962b2c9e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea696f0d7635f7a24c17d3f1e4ccdd44ba">AINPUT_EVENT_TYPE_KEY</a> = 1, 
-<a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea2182dfda2cceb5425dcc2823b9b6b56a">AINPUT_EVENT_TYPE_MOTION</a> = 2
- }</td></tr>
-<tr class="separator:ga61dadd085c1777f559549e05962b2c9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga726ca809ffd3d67ab4b8476646f26635"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a123c3bd18fd93b53d8aedbe7597f7b49">AKEY_EVENT_ACTION_DOWN</a> = 0, 
-<a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635abf18b7c5384c5de8657a0650f8da57c3">AKEY_EVENT_ACTION_UP</a> = 1, 
-<a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a08e2d927e155478ee66ec46ebd845ab0">AKEY_EVENT_ACTION_MULTIPLE</a> = 2
- }</td></tr>
-<tr class="separator:ga726ca809ffd3d67ab4b8476646f26635"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0411cd49bb5b71852cecd93bcbf0ca2d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da6473a1afc0cc39e029c2a217bc57cdba">AKEY_EVENT_FLAG_WOKE_HERE</a> = 0x1, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da7dbb272c7b28be9c084df3446a629f32">AKEY_EVENT_FLAG_SOFT_KEYBOARD</a> = 0x2, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dadc0a063ca412b0ea08474df422bf9b41">AKEY_EVENT_FLAG_KEEP_TOUCH_MODE</a> = 0x4, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dae1e7ec188b2404fadd94cfba89afd5d6">AKEY_EVENT_FLAG_FROM_SYSTEM</a> = 0x8, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dab9dbcf990d1e4405e32f847fdea52013">AKEY_EVENT_FLAG_EDITOR_ACTION</a> = 0x10, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da3198fad5ab75df614bb41f0f602a9e55">AKEY_EVENT_FLAG_CANCELED</a> = 0x20, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dad4b5eba5b14e4076c69bc7185f2804f8">AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY</a> = 0x40, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da39f9f7bdf2e256db0e2a8a5dfbfb7185">AKEY_EVENT_FLAG_LONG_PRESS</a> = 0x80, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2daf09856f03f2fffee9a82cb8e508efb7a">AKEY_EVENT_FLAG_CANCELED_LONG_PRESS</a> = 0x100, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da91e70ab527f27a1779f4550d457f1689">AKEY_EVENT_FLAG_TRACKING</a> = 0x200, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da14f574126d2544863fa8042ddd0f48c0">AKEY_EVENT_FLAG_FALLBACK</a> = 0x400
-<br/>
- }</td></tr>
-<tr class="separator:ga0411cd49bb5b71852cecd93bcbf0ca2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabed82baf7f470b522273a3e37c24c600"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600abf84a22c84d4b7228102b80f3af92a4f">AMOTION_EVENT_ACTION_MASK</a> = 0xff, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a51384339fbb57c0087f7f50c45d9cff3">AMOTION_EVENT_ACTION_POINTER_INDEX_MASK</a> = 0xff00, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a225e61c48ba334abc1b5811db02edcf1">AMOTION_EVENT_ACTION_DOWN</a> = 0, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a43798b2b7a6de4616d150b2438b8419e">AMOTION_EVENT_ACTION_UP</a> = 1, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a41c56c4e772953fce60c93bc671639a3">AMOTION_EVENT_ACTION_MOVE</a> = 2, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e">AMOTION_EVENT_ACTION_CANCEL</a> = 3, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">AMOTION_EVENT_ACTION_OUTSIDE</a> = 4, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a1618c641fd3f49fa7483f298d05b3cd2">AMOTION_EVENT_ACTION_POINTER_DOWN</a> = 5, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600af2ef56aa7220eeb2073b9b028737bc1e">AMOTION_EVENT_ACTION_POINTER_UP</a> = 6, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a84bc9fb3c01ff7ca9ee452a510e7de60">AMOTION_EVENT_ACTION_HOVER_MOVE</a> = 7, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a45ba62b1e6fab4e84d5782d7c35ced04">AMOTION_EVENT_ACTION_SCROLL</a> = 8, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a247b2c60ad92f3130ad43c907986ffb3">AMOTION_EVENT_ACTION_HOVER_ENTER</a> = 9, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600ac00b1eacfbea779863abf3fcf02134aa">AMOTION_EVENT_ACTION_HOVER_EXIT</a> = 10
-<br/>
- }</td></tr>
-<tr class="separator:gabed82baf7f470b522273a3e37c24c600"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab04a0655cd1e3bcac5e8f48c18df1a57"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#ggab04a0655cd1e3bcac5e8f48c18df1a57a200623e1e4eee7797cad30917d289d7a">AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED</a> = 0x1
- }</td></tr>
-<tr class="separator:gab04a0655cd1e3bcac5e8f48c18df1a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga385c44f6fb256e5716a2302a5b940388"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a37dd7496968e6defbecc3c8d6ab2734d">AMOTION_EVENT_EDGE_FLAG_NONE</a> = 0, 
-<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a915e1ade9b600d11a3c70a17a88de757">AMOTION_EVENT_EDGE_FLAG_TOP</a> = 0x01, 
-<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388ad8b662839787e1c7dd2616f32c02aaeb">AMOTION_EVENT_EDGE_FLAG_BOTTOM</a> = 0x02, 
-<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388afb70c13f16daade25ba8132a5ea3cf52">AMOTION_EVENT_EDGE_FLAG_LEFT</a> = 0x04, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a7d45674e03f1876a43d4810508905078">AMOTION_EVENT_EDGE_FLAG_RIGHT</a> = 0x08
-<br/>
- }</td></tr>
-<tr class="separator:ga385c44f6fb256e5716a2302a5b940388"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabc5c98fcc1211af2b80116dd6e0a035d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f4b5b009634039a1f361048a5fc6064">AMOTION_EVENT_AXIS_X</a> = 0, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da64f7de8558265bd8179d206eb33eff6c">AMOTION_EVENT_AXIS_Y</a> = 1, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da3b4fd0f17cfdeb6a055babecd2b0ded8">AMOTION_EVENT_AXIS_PRESSURE</a> = 2, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da4baba3ccaec881089a864ba6deaf8bd6">AMOTION_EVENT_AXIS_SIZE</a> = 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da792b9e01044a2e43e7f80e5559db20c2">AMOTION_EVENT_AXIS_TOUCH_MAJOR</a> = 4, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa8b24b0f01f24898a36e5751c8eca63c">AMOTION_EVENT_AXIS_TOUCH_MINOR</a> = 5, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa273d64c392f86ae789fd5e24661ba0a">AMOTION_EVENT_AXIS_TOOL_MAJOR</a> = 6, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadebd200b37ffaf36b94e7e478c559142">AMOTION_EVENT_AXIS_TOOL_MINOR</a> = 7, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da114f2b3fc233ccf7a4470787c31457d2">AMOTION_EVENT_AXIS_ORIENTATION</a> = 8, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dad11be04b4b81715cad905ee9fa348e99">AMOTION_EVENT_AXIS_VSCROLL</a> = 9, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da92955e6b0f3f82af66a505c854e9edff">AMOTION_EVENT_AXIS_HSCROLL</a> = 10, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5a689e572da9bc5feafcb6c011368305">AMOTION_EVENT_AXIS_Z</a> = 11, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da689b612864177d6b57d4181442e3e38e">AMOTION_EVENT_AXIS_RX</a> = 12, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa20188da209300e1f80f6f5bd4058e13">AMOTION_EVENT_AXIS_RY</a> = 13, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da381948b3321afd390ad164345eb9206b">AMOTION_EVENT_AXIS_RZ</a> = 14, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da04245c76cb9b32dcba920661f11ac9da">AMOTION_EVENT_AXIS_HAT_X</a> = 15, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da98c323321d908db459e7cf86a7e8a482">AMOTION_EVENT_AXIS_HAT_Y</a> = 16, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae4c65c3b1bd2946ff9e18c6041cdb591">AMOTION_EVENT_AXIS_LTRIGGER</a> = 17, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da116e80c6be166290ca481fefa5de38c1">AMOTION_EVENT_AXIS_RTRIGGER</a> = 18, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da6d1f5d64e607104964eb43d8fae07a4f">AMOTION_EVENT_AXIS_THROTTLE</a> = 19, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da318a0782f895949407fc192fc4280257">AMOTION_EVENT_AXIS_RUDDER</a> = 20, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0ae83ebd74e672bb35378b92a440b1d">AMOTION_EVENT_AXIS_WHEEL</a> = 21, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0223f235a6044815918af2abafcbf16">AMOTION_EVENT_AXIS_GAS</a> = 22, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae3a99764f3681dd9e094852bb2489ece">AMOTION_EVENT_AXIS_BRAKE</a> = 23, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae800909411a1e83173b0eef7aa458d0e">AMOTION_EVENT_AXIS_DISTANCE</a> = 24, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafca0a235f69c4b38bfc95e7a7b8d9ab1">AMOTION_EVENT_AXIS_TILT</a> = 25, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadcc18afd3a7069412617df34db5a27bc">AMOTION_EVENT_AXIS_GENERIC_1</a> = 32, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac4addf06abfa6c76f0578ddde049aad5">AMOTION_EVENT_AXIS_GENERIC_2</a> = 33, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac7df57ef5082e10be83f66d7477bce9c">AMOTION_EVENT_AXIS_GENERIC_3</a> = 34, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da321873d126b7d545665096694cb7d9d9">AMOTION_EVENT_AXIS_GENERIC_4</a> = 35, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da9b47cef7060197e1b0302a8a718c3085">AMOTION_EVENT_AXIS_GENERIC_5</a> = 36, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daad7e47a1b5fb66864b6d988374f50a84">AMOTION_EVENT_AXIS_GENERIC_6</a> = 37, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da222c06f51a60e59504b635dbf89a025b">AMOTION_EVENT_AXIS_GENERIC_7</a> = 38, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab59a8a373a913e40b146ed762976d6fe">AMOTION_EVENT_AXIS_GENERIC_8</a> = 39, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da721fa0fbca8b22f1ecc8d3870f4e7443">AMOTION_EVENT_AXIS_GENERIC_9</a> = 40, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da29ba08f4ddc658e0127ee5bc08d185f2">AMOTION_EVENT_AXIS_GENERIC_10</a> = 41, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafc64a4b307f62bb12b645918aa7edb57">AMOTION_EVENT_AXIS_GENERIC_11</a> = 42, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae5d32b3e9cec4936ae1e074f320c3063">AMOTION_EVENT_AXIS_GENERIC_12</a> = 43, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f19f5bc52e5eaec5ebd4f07aad12180">AMOTION_EVENT_AXIS_GENERIC_13</a> = 44, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadb866d826ecf25161d7c7f86166e149b">AMOTION_EVENT_AXIS_GENERIC_14</a> = 45, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da7e86befc8502b8df687284f3c40b2eca">AMOTION_EVENT_AXIS_GENERIC_15</a> = 46, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daaaa011ba929b18c6da71153638f92336">AMOTION_EVENT_AXIS_GENERIC_16</a> = 47
-<br/>
- }</td></tr>
-<tr class="separator:gabc5c98fcc1211af2b80116dd6e0a035d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac36f475ca5b446f4fde4c9b90bec77c8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ab388f65477b9dd4c51e6367111168d65">AMOTION_EVENT_BUTTON_PRIMARY</a> = 1 &lt;&lt; 0, 
-<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a08118700ecb4e147528a0e725afc9451">AMOTION_EVENT_BUTTON_SECONDARY</a> = 1 &lt;&lt; 1, 
-<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ae6e2af1e7065e035e8a10a595827180f">AMOTION_EVENT_BUTTON_TERTIARY</a> = 1 &lt;&lt; 2, 
-<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a1841d075a2992ff7fbefa3fd50189b86">AMOTION_EVENT_BUTTON_BACK</a> = 1 &lt;&lt; 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a4105edf43f7748c52c859cc5aa7dc438">AMOTION_EVENT_BUTTON_FORWARD</a> = 1 &lt;&lt; 4
-<br/>
- }</td></tr>
-<tr class="separator:gac36f475ca5b446f4fde4c9b90bec77c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7e1ea0c955ebbac1349866e8995e0208">AMOTION_EVENT_TOOL_TYPE_UNKNOWN</a> = 0, 
-<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eafd789262defb8a268fa80d26b0c30bcc">AMOTION_EVENT_TOOL_TYPE_FINGER</a> = 1, 
-<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf05dc95a74e560c89cec1f3100185fc7">AMOTION_EVENT_TOOL_TYPE_STYLUS</a> = 2, 
-<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7be0c750d7d6719e7c948914400ae0de">AMOTION_EVENT_TOOL_TYPE_MOUSE</a> = 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf9932f65b5b6b5800fb5873a60dbf0cb">AMOTION_EVENT_TOOL_TYPE_ERASER</a> = 4
-<br/>
- }</td></tr>
-<tr class="separator:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga16af7b253440dadd46a80a4b9fddba4d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daae438f475d03ea60fd9fb356abd7fa01">AINPUT_SOURCE_CLASS_MASK</a> = 0x000000ff, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dafd6d5e71f09f6452acf017559481444c">AINPUT_SOURCE_CLASS_NONE</a> = 0x00000000, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dacf1bf3d7b3c6e59f907bdffc9b33370e">AINPUT_SOURCE_CLASS_BUTTON</a> = 0x00000001, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da7495274e98fb30dee3dfd903b878cf47">AINPUT_SOURCE_CLASS_POINTER</a> = 0x00000002, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da078a18d85d078412721c336a879bcc1a">AINPUT_SOURCE_CLASS_NAVIGATION</a> = 0x00000004, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da682f6982bb55ee809f6acd2deb550167">AINPUT_SOURCE_CLASS_POSITION</a> = 0x00000008, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daaaeffb6442807dd96ec62e9d8a696b57">AINPUT_SOURCE_CLASS_JOYSTICK</a> = 0x00000010
-<br/>
- }</td></tr>
-<tr class="separator:ga16af7b253440dadd46a80a4b9fddba4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaba01db17f4a2bfbc3db60dc172972a25"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae9348bc04cdaa88b5b010f77a4945454">AINPUT_SOURCE_UNKNOWN</a> = 0x00000000, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a9860918666dd8c0b9d00a8da7af51e6d">AINPUT_SOURCE_KEYBOARD</a> = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ad0fbfeff9f8d57104bff14c70ce5e3ef">AINPUT_SOURCE_DPAD</a> = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a6417cb50ecd6ade48c708268434a49d3">AINPUT_SOURCE_GAMEPAD</a> = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a55ea411f927aed8964fa72fec0da444f">AINPUT_SOURCE_TOUCHSCREEN</a> = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae71d3dcbd004bccb6e00fde47097cd86">AINPUT_SOURCE_MOUSE</a> = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a86d4983c71432b27634ba41a64bffdf9">AINPUT_SOURCE_STYLUS</a> = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e49d9153c86f60f626d7f797f4e78b6">AINPUT_SOURCE_TRACKBALL</a> = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e0715d4b544653ab11893434172a2ef">AINPUT_SOURCE_TOUCHPAD</a> = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a3712c4e4fb8ad7f6ae6e40d48e5c6ee7">AINPUT_SOURCE_TOUCH_NAVIGATION</a> = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25afb28f10dc074e7f7435f5904c513edb5">AINPUT_SOURCE_JOYSTICK</a> = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ab04317e7dd273ff5c87038df67d9796e">AINPUT_SOURCE_ANY</a> = 0xffffff00
-<br/>
- }</td></tr>
-<tr class="separator:gaba01db17f4a2bfbc3db60dc172972a25"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf105ae5beaca1dee30ae54530691fce"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fcea32cb7ce34cdce7095962f0766cc6c3ac">AINPUT_KEYBOARD_TYPE_NONE</a> = 0, 
-<a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaf0226d750ea830eb557ae68bd4a1c82a">AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC</a> = 1, 
-<a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaba1f5ab6bc79749ba96a5d2a3af0e574">AINPUT_KEYBOARD_TYPE_ALPHABETIC</a> = 2
- }</td></tr>
-<tr class="separator:gaaf105ae5beaca1dee30ae54530691fce"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga80155586fa275b28773c9b203f52caba"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa0e5816bc48cdb33f2b488a109596ffe1">AINPUT_MOTION_RANGE_X</a> = AMOTION_EVENT_AXIS_X, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaab48108c9450ea1b7cd021be7d8cbc332">AINPUT_MOTION_RANGE_Y</a> = AMOTION_EVENT_AXIS_Y, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa79aca706b12b28d0ab14762902fed31a">AINPUT_MOTION_RANGE_PRESSURE</a> = AMOTION_EVENT_AXIS_PRESSURE, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa46f3a6cf859fb161cd29398d8448c688">AINPUT_MOTION_RANGE_SIZE</a> = AMOTION_EVENT_AXIS_SIZE, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa7ead43624c96e165fd8a25e77148aa67">AINPUT_MOTION_RANGE_TOUCH_MAJOR</a> = AMOTION_EVENT_AXIS_TOUCH_MAJOR, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa301181a0f20681135c15010b39bb575d">AINPUT_MOTION_RANGE_TOUCH_MINOR</a> = AMOTION_EVENT_AXIS_TOUCH_MINOR, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaa860f54aa9e5a269dba6a54bbcf3c27c">AINPUT_MOTION_RANGE_TOOL_MAJOR</a> = AMOTION_EVENT_AXIS_TOOL_MAJOR, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa19226f6cf713c1b4d0973a163daf6cf1">AINPUT_MOTION_RANGE_TOOL_MINOR</a> = AMOTION_EVENT_AXIS_TOOL_MINOR, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaf9be9c04a41b610d994a3d1d7e90d06d">AINPUT_MOTION_RANGE_ORIENTATION</a> = AMOTION_EVENT_AXIS_ORIENTATION
-<br/>
- }</td></tr>
-<tr class="separator:ga80155586fa275b28773c9b203f52caba"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6b7b47dd702d9e331586d485013fd1ea"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa593f8ae18990d627785719284a12a6f">AKEYCODE_UNKNOWN</a> = 0, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2dc78d3a93876b77402d2a7f02e4b899">AKEYCODE_SOFT_LEFT</a> = 1, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8cadfbfcaaa83fef168de13639adfcae">AKEYCODE_SOFT_RIGHT</a> = 2, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa526c2411b7476b7ae579f57a0378b2dd">AKEYCODE_HOME</a> = 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeb71c74bf556ba72e9c8f8dcbe5453d0">AKEYCODE_BACK</a> = 4, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8b5720ebdd3576c2b536ec9228273d8f">AKEYCODE_CALL</a> = 5, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaff971957ae3a4e272b21987854e18d9b">AKEYCODE_ENDCALL</a> = 6, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23f585ea17aeceaad2111c51ab289e79">AKEYCODE_0</a> = 7, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabcac88b54f8d764bc4573ecc5b9571b0">AKEYCODE_1</a> = 8, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2079c6fb75141968b60ed79fe895d6db">AKEYCODE_2</a> = 9, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa40ccc018c0637e4d938e66b789054551">AKEYCODE_3</a> = 10, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c2d141c3906bd97cfec91443356f7b">AKEYCODE_4</a> = 11, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca99d2be4a3723ba3406944ad623f6e">AKEYCODE_5</a> = 12, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa72bc6560e24d08ff8f3116dac9179079">AKEYCODE_6</a> = 13, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa27070499acdb6c527a285b3840ec7bff">AKEYCODE_7</a> = 14, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93543b23683b33724ecf77ac5a8c19ab">AKEYCODE_8</a> = 15, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa31cd4d7c4e59cf7b057b6c248cff516d">AKEYCODE_9</a> = 16, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1461fbf54e3dcba96e5d6d0638c18305">AKEYCODE_STAR</a> = 17, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf448758c44899e41b67f76dfe3be51e9">AKEYCODE_POUND</a> = 18, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf2fd3133a88f3b6725834032bd74bd9e">AKEYCODE_DPAD_UP</a> = 19, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa84b721b13aae56c9f1d3c22b3d81627a">AKEYCODE_DPAD_DOWN</a> = 20, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa668dfb3ed79a37c2c07838c161c1b344">AKEYCODE_DPAD_LEFT</a> = 21, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac6f9d81b6239696a1836695bbfc6a975">AKEYCODE_DPAD_RIGHT</a> = 22, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e9c93273fd39148f54167133aa5b9ae">AKEYCODE_DPAD_CENTER</a> = 23, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5b81e325d9efd633eef7535a5b538882">AKEYCODE_VOLUME_UP</a> = 24, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a882dae17080d3b5f3329e79db60c66">AKEYCODE_VOLUME_DOWN</a> = 25, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6">AKEYCODE_POWER</a> = 26, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8670880765756933d3d1a10186d39e26">AKEYCODE_CAMERA</a> = 27, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95bd8c25adeaa570108c7403f08a2901">AKEYCODE_CLEAR</a> = 28, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa424a091c62d40f5d65908c9730ae9014">AKEYCODE_A</a> = 29, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa65d3bf8d6a8a6c2f7c1b08394f313758">AKEYCODE_B</a> = 30, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeed584f454e508ce931bcb33d37adb04">AKEYCODE_C</a> = 31, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7e4cb3ef66209a2779be2c8239b57b51">AKEYCODE_D</a> = 32, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae218af7ceb207227bb10f0525e68a8d0">AKEYCODE_E</a> = 33, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa455f71ecfe59af0fbd901ac0d0a8d53a">AKEYCODE_F</a> = 34, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa165067e10464019411f768bba9e533d9">AKEYCODE_G</a> = 35, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad89a91a1500cb162f22962781ebfd9dc">AKEYCODE_H</a> = 36, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4d44b5e4a19580540d8d77bf5755d74b">AKEYCODE_I</a> = 37, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa70c259612ccec117d70afaef947a6a7a">AKEYCODE_J</a> = 38, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ce56cf50d3632c275c524bd78d0d932">AKEYCODE_K</a> = 39, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab61c534fd0f4e56c4ba13861a2f5982b">AKEYCODE_L</a> = 40, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa43b19e5e5234ce90c8e7ef67dd0cabd1">AKEYCODE_M</a> = 41, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c0b26804c89560a9e87c45f7f9fed36">AKEYCODE_N</a> = 42, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa249667bc4a59d99be1914535877329fb">AKEYCODE_O</a> = 43, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac68ef56b78bd0c8626cc68bb6cb9156f">AKEYCODE_P</a> = 44, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa932cf6ea8d87e6d6d97af658dd0fa206">AKEYCODE_Q</a> = 45, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaba25ac2c15a8edbbbff16a9fe6e74532">AKEYCODE_R</a> = 46, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae1ed25c28a8fce578cddb17ca6888ff6">AKEYCODE_S</a> = 47, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2feac8b458ef8eb9c0a0dd73766927c2">AKEYCODE_T</a> = 48, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac1a220314f986aae45d7fe3b35501595">AKEYCODE_U</a> = 49, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4043bc48fa55cce7825176052d6e199a">AKEYCODE_V</a> = 50, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0c80e98547c3daa01f3d9e7f4f00425">AKEYCODE_W</a> = 51, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec585cebac89004faffbdc28dc6d81c5">AKEYCODE_X</a> = 52, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06fc277ef25acdd89d64c18eed0daa9b">AKEYCODE_Y</a> = 53, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7439a09f219a0addc13c758ef7508cce">AKEYCODE_Z</a> = 54, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca0bfbdc67b2c6f76e8fcaaf782c227">AKEYCODE_COMMA</a> = 55, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9dd68c8ecebd4e274e8c357dcdfe8a04">AKEYCODE_PERIOD</a> = 56, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3dec175158abe8679bedd98ed1bc3e1a">AKEYCODE_ALT_LEFT</a> = 57, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd9b6b0846c6999f5df47d29e58ac95d">AKEYCODE_ALT_RIGHT</a> = 58, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafb9875645596928cec46368e74499dc4">AKEYCODE_SHIFT_LEFT</a> = 59, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf9eab1348ae1e8f18ad5bf3c77df4212">AKEYCODE_SHIFT_RIGHT</a> = 60, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1b1bfda850b2acd0b60e8456e2bfa958">AKEYCODE_TAB</a> = 61, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa10389300ac5d70f8d9733564b3cab4e7">AKEYCODE_SPACE</a> = 62, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c1c6752d5db5e02da51d8937e5e3c6f">AKEYCODE_SYM</a> = 63, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaded9ec81ae6dab451665317723b94083">AKEYCODE_EXPLORER</a> = 64, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaade96efe470f428bb5c4eaea6ffc3681c">AKEYCODE_ENVELOPE</a> = 65, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac784a7bbbfbdab05fab6c6a1f29c98ff">AKEYCODE_ENTER</a> = 66, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd013221b457d98975dc47e49817e28a">AKEYCODE_DEL</a> = 67, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa929561086ae7b519fa962597bc85f171">AKEYCODE_GRAVE</a> = 68, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaca10bd34ad0abecfecace908b8cb92ca">AKEYCODE_MINUS</a> = 69, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0a197df7ec719c95ddcd6836e76c8498">AKEYCODE_EQUALS</a> = 70, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabdeda0d373aa37ef2ded5ffdfc008708">AKEYCODE_LEFT_BRACKET</a> = 71, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa084dfa52626040a08d374f8aec066e6a">AKEYCODE_RIGHT_BRACKET</a> = 72, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac90eb064382e3c482ae86abb7b3f701">AKEYCODE_BACKSLASH</a> = 73, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac0a2920161f4f2d97b0b060614b23391">AKEYCODE_SEMICOLON</a> = 74, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab5518a8502914ea5f87ef5d29b32b1b1">AKEYCODE_APOSTROPHE</a> = 75, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa54c047be3811d637a33d9b3e39d16e1a">AKEYCODE_SLASH</a> = 76, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7284f79a266ede479b79726082642e16">AKEYCODE_AT</a> = 77, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe6e880f65bebbdd5246a4164c4ab37a">AKEYCODE_NUM</a> = 78, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0d3d29515a4815fe8d6d8d3291507a33">AKEYCODE_HEADSETHOOK</a> = 79, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23be9506f92f6efe14d47306a39a2187">AKEYCODE_FOCUS</a> = 80, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7f72d867b311e0845aef732dcc66495">AKEYCODE_PLUS</a> = 81, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa707b85e89923b0f760be795972a87d76">AKEYCODE_MENU</a> = 82, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6115506352a5828532fc6a0b91683331">AKEYCODE_NOTIFICATION</a> = 83, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac644fd307fd0ef0d3ed3d2e074c1a4b7">AKEYCODE_SEARCH</a> = 84, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa42f8fe71e8d45b5a83d83d80c3da40e1">AKEYCODE_MEDIA_PLAY_PAUSE</a> = 85, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac4faa33993d80db1326073ea15a38e7d">AKEYCODE_MEDIA_STOP</a> = 86, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5a6c3fc963e8163852b9a23e3a198b3">AKEYCODE_MEDIA_NEXT</a> = 87, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81432c31b00d47f768c29163eb276acb">AKEYCODE_MEDIA_PREVIOUS</a> = 88, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaecd53183b84c23a2ca65670a23674319">AKEYCODE_MEDIA_REWIND</a> = 89, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa69e648024402af688d490a2041f15bca">AKEYCODE_MEDIA_FAST_FORWARD</a> = 90, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f6675d38f50e3556a8531839fd83f02">AKEYCODE_MUTE</a> = 91, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4fd0d4ea5b6898f4a40011b97a739a04">AKEYCODE_PAGE_UP</a> = 92, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0b7fe1c18f53e6328657858a88826393">AKEYCODE_PAGE_DOWN</a> = 93, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacdc7c004da1594fa156de87befef5f41">AKEYCODE_PICTSYMBOLS</a> = 94, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad6a1f88b2cc3b6ff8f1724eb01473ec3">AKEYCODE_SWITCH_CHARSET</a> = 95, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaef2d2ec912aaa9e7215aeab79f7fb086">AKEYCODE_BUTTON_A</a> = 96, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa721765c8f0bbcdb68af06817dbec8e53">AKEYCODE_BUTTON_B</a> = 97, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad622ad5df40d2fdf806abb2adda73b3d">AKEYCODE_BUTTON_C</a> = 98, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa21174962f95e32cd0345ce657d03ebc7">AKEYCODE_BUTTON_X</a> = 99, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6654a8b2c700f7783433c86fcdae7919">AKEYCODE_BUTTON_Y</a> = 100, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06156b68e6de951b44fc662e1b16041f">AKEYCODE_BUTTON_Z</a> = 101, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa32e159826404c7d76c2a433c24de82a2">AKEYCODE_BUTTON_L1</a> = 102, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7c614b3966583b0ad027e45f594ede46">AKEYCODE_BUTTON_R1</a> = 103, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa36a38421637cfa5ebfd8a0296650cdf4">AKEYCODE_BUTTON_L2</a> = 104, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa46d487e9fe31855b7b46739bad58fe3e">AKEYCODE_BUTTON_R2</a> = 105, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68c5d8dcd8fe708ada8f4a4e17feb638">AKEYCODE_BUTTON_THUMBL</a> = 106, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9759d817172d268ced1748909a5f5fbe">AKEYCODE_BUTTON_THUMBR</a> = 107, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3c818d106f4ec793a43749c4c26a8a4">AKEYCODE_BUTTON_START</a> = 108, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa598289bc85f647c237729126ea392a43">AKEYCODE_BUTTON_SELECT</a> = 109, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa19839eebec939407d901a33b75cf2594">AKEYCODE_BUTTON_MODE</a> = 110, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac52177e5508edacb8e9c6d3a25db4fb6">AKEYCODE_ESCAPE</a> = 111, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9516bc190d37fea27e07ddab0c607b51">AKEYCODE_FORWARD_DEL</a> = 112, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaca9d0df6cc18492209eb287e659aeb1">AKEYCODE_CTRL_LEFT</a> = 113, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa99b317cf2f1eb6b06d0226e05223e60c">AKEYCODE_CTRL_RIGHT</a> = 114, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab9dcb68b35c85d380846c85f323868f1">AKEYCODE_CAPS_LOCK</a> = 115, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa78ff5c8316235635f76e3c3179e9a7fc">AKEYCODE_SCROLL_LOCK</a> = 116, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaadfb2d920bbe422c096120d39811c58">AKEYCODE_META_LEFT</a> = 117, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68038455e2b0846db51f9957e0df9cb8">AKEYCODE_META_RIGHT</a> = 118, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1764b777aa56605f4029d3c71fe70722">AKEYCODE_FUNCTION</a> = 119, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14e22c69bcd47ffb4445ee18a4332d84">AKEYCODE_SYSRQ</a> = 120, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa047501f9cf9bce00e6048d8759ea3a23">AKEYCODE_BREAK</a> = 121, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7544f3de2fb5f78bec62af94a32fdc58">AKEYCODE_MOVE_HOME</a> = 122, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5605f49f5271430f5f150efb3cd0398a">AKEYCODE_MOVE_END</a> = 123, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62f663d11e91af750a51ddd060b08644">AKEYCODE_INSERT</a> = 124, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafbf0a16c7746e5dee2fd3adbd50da88a">AKEYCODE_FORWARD</a> = 125, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa615cf6202b0ae0ed550f42f6c64b36a1">AKEYCODE_MEDIA_PLAY</a> = 126, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f4e0178c2028b3042b0a5948e38e4e4">AKEYCODE_MEDIA_PAUSE</a> = 127, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6788c6e1443140b0ec4d004d8293e998">AKEYCODE_MEDIA_CLOSE</a> = 128, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa317bffd44306b021c401d3a26b82a7f6">AKEYCODE_MEDIA_EJECT</a> = 129, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e1eae0b245176aaa024a53411441f9">AKEYCODE_MEDIA_RECORD</a> = 130, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3b84f2c503a9e839f3d36e10e3307fcf">AKEYCODE_F1</a> = 131, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1360f7ec66aa6421e240dae637262e84">AKEYCODE_F2</a> = 132, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a4ce6105e12a3a9071cae2f40515085">AKEYCODE_F3</a> = 133, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa882050e4d0f917470a5b91fbf6ae9ebf">AKEYCODE_F4</a> = 134, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab01807c72b46620bb50fcb6abe24d937">AKEYCODE_F5</a> = 135, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa04a12e81ed80bb42ef5c63cedf0dc60">AKEYCODE_F6</a> = 136, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9583b8e4b0d994b7e3a193b67cf6020c">AKEYCODE_F7</a> = 137, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55ca54d42d8df70de2ce9031db1344c8">AKEYCODE_F8</a> = 138, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0c8225c0ef98da730933ae914077dbc9">AKEYCODE_F9</a> = 139, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa60660b13acab39282d0558cdcc93474">AKEYCODE_F10</a> = 140, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa64cc7b1d8e53d90ff57c39d0b5a4dd22">AKEYCODE_F11</a> = 141, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa491000231e0ba221b6916b1d9d2c9fb7">AKEYCODE_F12</a> = 142, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad5e349eadd3255c6ad4982dc40ed23ef">AKEYCODE_NUM_LOCK</a> = 143, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa343df35e6a0ad0599e19b8ef7174909b">AKEYCODE_NUMPAD_0</a> = 144, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c0ec8e42917fa9ac53977db3e6aeb17">AKEYCODE_NUMPAD_1</a> = 145, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4dfd17c2209908e1ec890e10a3211f89">AKEYCODE_NUMPAD_2</a> = 146, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1efe1886a4b472b999215c0e81f7386">AKEYCODE_NUMPAD_3</a> = 147, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1fdd16681c1441b934f679b94fd0e4f8">AKEYCODE_NUMPAD_4</a> = 148, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5916003e7c737a8cc06e52d2ee76c3b">AKEYCODE_NUMPAD_5</a> = 149, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa13b83389e0f5de129227af4b8d3f035d">AKEYCODE_NUMPAD_6</a> = 150, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaed9468951ef2887c07c8095c2e7d4c93">AKEYCODE_NUMPAD_7</a> = 151, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5f0a300566235720eb93fee9f2196642">AKEYCODE_NUMPAD_8</a> = 152, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad0c490e3965df546e2d5a83edf423d95">AKEYCODE_NUMPAD_9</a> = 153, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac108b744e8f93af69158d146425236c">AKEYCODE_NUMPAD_DIVIDE</a> = 154, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47ce00b838e7ee0a34066dc2595ac735">AKEYCODE_NUMPAD_MULTIPLY</a> = 155, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bee314dbbea0a349eb301d10256bbe">AKEYCODE_NUMPAD_SUBTRACT</a> = 156, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9d2fefa9a3f6037f48b247e66dd28c35">AKEYCODE_NUMPAD_ADD</a> = 157, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6aab6b5914e120b43b3a1a8269e9cee1">AKEYCODE_NUMPAD_DOT</a> = 158, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa900e3bb0bc4ff70ba786f18ff4db0bd1">AKEYCODE_NUMPAD_COMMA</a> = 159, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa79432be5f7a44e99ddc3721fd9fd212e">AKEYCODE_NUMPAD_ENTER</a> = 160, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c1007a59641499ee5e1508e747c5ed">AKEYCODE_NUMPAD_EQUALS</a> = 161, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacc903e9eb495cf6cef7c6bc825f82f54">AKEYCODE_NUMPAD_LEFT_PAREN</a> = 162, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7662e0f2a099239dc69f6a27c7daabf9">AKEYCODE_NUMPAD_RIGHT_PAREN</a> = 163, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa174a5c7c39753235109696e82870c575">AKEYCODE_VOLUME_MUTE</a> = 164, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e76263257a5dc654a413c9dc2fd649">AKEYCODE_INFO</a> = 165, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa056914fd17ae539dca44f43745d8e05c">AKEYCODE_CHANNEL_UP</a> = 166, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa18f1808c6a819e787c9a9941f78b910f">AKEYCODE_CHANNEL_DOWN</a> = 167, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacfce9bb78ef8106dce4868f81cca4fb4">AKEYCODE_ZOOM_IN</a> = 168, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf035f5234c3df4589f35a50e99e0535">AKEYCODE_ZOOM_OUT</a> = 169, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0776ffae512b4848e53fce762a3a5017">AKEYCODE_TV</a> = 170, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe7531c40ff4a31614ff6fd61802ebe8">AKEYCODE_WINDOW</a> = 171, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf33a5fa1f163245360aeed89d64b0233">AKEYCODE_GUIDE</a> = 172, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf2f03b925a02ba6de9fd98737546a60">AKEYCODE_DVR</a> = 173, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa03ce46d177e020690aa9d26a0fa850ae">AKEYCODE_BOOKMARK</a> = 174, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81ba8d5343362b841b8a62b8679ff994">AKEYCODE_CAPTIONS</a> = 175, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bbd457230c3028df6b91d5bdda9159">AKEYCODE_SETTINGS</a> = 176, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafda3b0ea1b158831fc443bf4911a3930">AKEYCODE_TV_POWER</a> = 177, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1750b29e396bd1fd237ed4aadacc8f5">AKEYCODE_TV_INPUT</a> = 178, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab28aea3a51b11c9f227ce8cd5ff55a3d">AKEYCODE_STB_POWER</a> = 179, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa988b0372359b2bca7390878fdba9e1b5">AKEYCODE_STB_INPUT</a> = 180, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa479d36f9814bd00c8986a252664b938b">AKEYCODE_AVR_POWER</a> = 181, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa57d42dbd8ea4219f76fb116f234e6504">AKEYCODE_AVR_INPUT</a> = 182, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2d9e3e82e69955f649b586f4518e074c">AKEYCODE_PROG_RED</a> = 183, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad50c1e2136e47843a8dabca929f8ead1">AKEYCODE_PROG_GREEN</a> = 184, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafa813640412bd41a181f0ec3a33dddc4">AKEYCODE_PROG_YELLOW</a> = 185, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e82219fdb937fee5a22426c607dd4e0">AKEYCODE_PROG_BLUE</a> = 186, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa53a59a262d6d523bdc2bd30a1e427bad">AKEYCODE_APP_SWITCH</a> = 187, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa28c72c33ab93d83539d0790b7e48336a">AKEYCODE_BUTTON_1</a> = 188, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab8089673fea303c7a299eefd2c327cc3">AKEYCODE_BUTTON_2</a> = 189, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa706a5ff492c80b4653e6fe0dcd278ca1">AKEYCODE_BUTTON_3</a> = 190, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c425a063bf6976e1ff8ae9f3cfcbe6">AKEYCODE_BUTTON_4</a> = 191, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47149f963528ec7abe55066abfb7caf5">AKEYCODE_BUTTON_5</a> = 192, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55057c8cda53a4c539d02ab1a93ca58b">AKEYCODE_BUTTON_6</a> = 193, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac09e0c0cbbf6449bf106e4199600db35">AKEYCODE_BUTTON_7</a> = 194, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaee64b3e0f30ed09e3c9f01b6c8877c3f">AKEYCODE_BUTTON_8</a> = 195, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac8e54092c8be5dc0e114ec35f40e00dc">AKEYCODE_BUTTON_9</a> = 196, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7e6f8621909f3461032c33f9c8acaa7">AKEYCODE_BUTTON_10</a> = 197, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab413971c698b6e25d3955667c0142ac1">AKEYCODE_BUTTON_11</a> = 198, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafe4ee1e5446dd12bbb579b412048e79e">AKEYCODE_BUTTON_12</a> = 199, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaabde2ed26594b89d5769eef9f0d1fe6f">AKEYCODE_BUTTON_13</a> = 200, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f08dfd2c30ddedf1d2983680e89041b">AKEYCODE_BUTTON_14</a> = 201, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d8d0fb1a610fdb4e53f0fb675b7d7d0">AKEYCODE_BUTTON_15</a> = 202, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa224370cba99bda2db6a1c82fd2f7fa39">AKEYCODE_BUTTON_16</a> = 203, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7b8e87b47c17c5f1e97fcb56faaa26ff">AKEYCODE_LANGUAGE_SWITCH</a> = 204, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa380279768c5c50d92bef2a88394f967f">AKEYCODE_MANNER_MODE</a> = 205, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68d314a5ec06701205cd0097c5c7145c">AKEYCODE_3D_MODE</a> = 206, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0aa2cfca11b7cabf82341a9dbec83f10">AKEYCODE_CONTACTS</a> = 207, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa114be17d1853c77a7406c024d9e4f076">AKEYCODE_CALENDAR</a> = 208, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14508751d70a0404b194d4b6df83ec72">AKEYCODE_MUSIC</a> = 209, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa293523c40bb9f1d793cd0b984f636573">AKEYCODE_CALCULATOR</a> = 210, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf782be8df9a8ca5dc86c9bfeabac6f22">AKEYCODE_ZENKAKU_HANKAKU</a> = 211, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaadd69273b99eb0b848d98b2d6b3ad3234">AKEYCODE_EISU</a> = 212, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7321e5c6b3cbab142bd16957653b2ac7">AKEYCODE_MUHENKAN</a> = 213, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab0686dd37c57d833d1158b7f1d85ee02">AKEYCODE_HENKAN</a> = 214, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3be7db22b3c8aa046a46631e44863c28">AKEYCODE_KATAKANA_HIRAGANA</a> = 215, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ee19d21912056b902e283efa2d9d14b">AKEYCODE_YEN</a> = 216, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae8b0af04dac5ea56fd55e577fd9e6be4">AKEYCODE_RO</a> = 217, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62d090ae5c95a04dacdff79817dad531">AKEYCODE_KANA</a> = 218, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3f036adb654c7752890a283ecbf838">AKEYCODE_ASSIST</a> = 219, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7cf1bf3528b6d8a0e86998287fe00650">AKEYCODE_BRIGHTNESS_DOWN</a> = 220, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0af6ec416c09d160e364466faa955c36">AKEYCODE_BRIGHTNESS_UP</a> = 221, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3cdb53cdf8c576e272502da06daa52e1">AKEYCODE_MEDIA_AUDIO_TRACK</a> = 222, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafc077e5a6b447ea060c144f6e65bd207">AKEYCODE_SLEEP</a> = 223, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa903c5152d26b3011ae521afa06759429">AKEYCODE_WAKEUP</a> = 224, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0ecddd3dce52cf60c96c5d430b1f553">AKEYCODE_PAIRING</a> = 225, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3ddf83cb2f701911b03c3a738e2e73a">AKEYCODE_MEDIA_TOP_MENU</a> = 226, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa22858c3c30d596ad60f355f75df86e1">AKEYCODE_11</a> = 227, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa781c31195e55b2dcbdd772560dc61aa5">AKEYCODE_12</a> = 228, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa187963dd6f74b96f132f23e01dea35e9">AKEYCODE_LAST_CHANNEL</a> = 229, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa954c2251b2cb53f47637802cb66baf06">AKEYCODE_TV_DATA_SERVICE</a> = 230, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95898663b7f74c93d0b860a43528c744">AKEYCODE_VOICE_ASSIST</a> = 231, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93dd3fd752701af5a5491e01cc15db72">AKEYCODE_TV_RADIO_SERVICE</a> = 232, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3d7b89756df37f01d6d0f13beff1db">AKEYCODE_TV_TELETEXT</a> = 233, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa630a08e07a3b4c6bcac9a1a72d176055">AKEYCODE_TV_NUMBER_ENTRY</a> = 234, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14f2b6fe8550832ef9e3f9aa53164073">AKEYCODE_TV_TERRESTRIAL_ANALOG</a> = 235, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacad8c149251a78760a5fe4931b9cdf16">AKEYCODE_TV_TERRESTRIAL_DIGITAL</a> = 236, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3707d4396417535a611e4548afe33936">AKEYCODE_TV_SATELLITE</a> = 237, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8c52e7d06525c0ee5d943d63a0fa8ea5">AKEYCODE_TV_SATELLITE_BS</a> = 238, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4eea1809a9ff679ed7773332d728c6b0">AKEYCODE_TV_SATELLITE_CS</a> = 239, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17c0e68066b86610ff168c6367af36eb">AKEYCODE_TV_SATELLITE_SERVICE</a> = 240, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec5e46a5afc57953d1772e086307aa42">AKEYCODE_TV_NETWORK</a> = 241, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe33a80d6d3bf889af25cbd77fdb89f9">AKEYCODE_TV_ANTENNA_CABLE</a> = 242, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a50de965f50ab3aa42772aac0808445">AKEYCODE_TV_INPUT_HDMI_1</a> = 243, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7ec65c008471d771bf879ec012f5c7f">AKEYCODE_TV_INPUT_HDMI_2</a> = 244, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a0f267a2696d15bf16127121b1f1c7f">AKEYCODE_TV_INPUT_HDMI_3</a> = 245, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4437c1d8d2d33058cfa71ec7b2771ec5">AKEYCODE_TV_INPUT_HDMI_4</a> = 246, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c3097f14c6582958ba1d14d70115ccd">AKEYCODE_TV_INPUT_COMPOSITE_1</a> = 247, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaada13cbb9d619bc610678ad66325647b9">AKEYCODE_TV_INPUT_COMPOSITE_2</a> = 248, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa156e2dba81e7c73624ccf8c2ef8833ae">AKEYCODE_TV_INPUT_COMPONENT_1</a> = 249, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8db9b6ee1457267abea03430781bb0ec">AKEYCODE_TV_INPUT_COMPONENT_2</a> = 250, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa149b2c8a4817075c0a41e0adf11c8e85">AKEYCODE_TV_INPUT_VGA_1</a> = 251, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa419f0adac43cad104cd6cf83dc5f13f6">AKEYCODE_TV_AUDIO_DESCRIPTION</a> = 252, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaccc5900ca5dd399d5ce11dd8ca324678">AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP</a> = 253, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5fca6a9ec1ce246bf3c53d859ac9f5eb">AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN</a> = 254, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8e79045045293070c8eb9e408f1335b4">AKEYCODE_TV_ZOOM_MODE</a> = 255, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4c18feeafff3c41081073c025ee017b8">AKEYCODE_TV_CONTENTS_MENU</a> = 256, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaadde70071f6a432f367079efa6e1a6fe">AKEYCODE_TV_MEDIA_CONTEXT_MENU</a> = 257, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0293c2a63e4d955080334bef6640840">AKEYCODE_TV_TIMER_PROGRAMMING</a> = 258, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab062b403701292c9e2db96a1f88cc6d9">AKEYCODE_HELP</a> = 259
-<br/>
- }</td></tr>
-<tr class="separator:ga6b7b47dd702d9e331586d485013fd1ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga8292ae06aa8120c52d7380d228600b9c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga8292ae06aa8120c52d7380d228600b9c">AInputEvent_getType</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:ga8292ae06aa8120c52d7380d228600b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9dd3fd81e51dbfde19ab861541242aa1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9dd3fd81e51dbfde19ab861541242aa1">AInputEvent_getDeviceId</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:ga9dd3fd81e51dbfde19ab861541242aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac90d4b497669dbc709ec9650db4e49be"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gac90d4b497669dbc709ec9650db4e49be">AInputEvent_getSource</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:gac90d4b497669dbc709ec9650db4e49be"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga36ec0b59f98f86a7ca263ba91279896d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga36ec0b59f98f86a7ca263ba91279896d">AKeyEvent_getAction</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga36ec0b59f98f86a7ca263ba91279896d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2a18e98efe0c4ccb6f39bb13c555010e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2a18e98efe0c4ccb6f39bb13c555010e">AKeyEvent_getFlags</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga2a18e98efe0c4ccb6f39bb13c555010e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6b01ecd60018a5445f4917a861ca9466"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga6b01ecd60018a5445f4917a861ca9466">AKeyEvent_getKeyCode</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga6b01ecd60018a5445f4917a861ca9466"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4a0a846b7a195aeb290dfcd2250137d9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga4a0a846b7a195aeb290dfcd2250137d9">AKeyEvent_getScanCode</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga4a0a846b7a195aeb290dfcd2250137d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabdda62b40b22727af2fb41740bf4787b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gabdda62b40b22727af2fb41740bf4787b">AKeyEvent_getMetaState</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:gabdda62b40b22727af2fb41740bf4787b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5358fe3ebbd4b5b2f88a4ad2eba6f885"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5358fe3ebbd4b5b2f88a4ad2eba6f885">AKeyEvent_getRepeatCount</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga5358fe3ebbd4b5b2f88a4ad2eba6f885"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf475b6f0860bdfca4ceea7bc46eab1a9"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaf475b6f0860bdfca4ceea7bc46eab1a9">AKeyEvent_getDownTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:gaf475b6f0860bdfca4ceea7bc46eab1a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae3eac7d68195d1767c947ca267842696"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gae3eac7d68195d1767c947ca267842696">AKeyEvent_getEventTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:gae3eac7d68195d1767c947ca267842696"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga73ea2093cc2343675ac43dd08bef4247"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga73ea2093cc2343675ac43dd08bef4247">AMotionEvent_getAction</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga73ea2093cc2343675ac43dd08bef4247"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2891d19197c070207098fa48adeb35af"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2891d19197c070207098fa48adeb35af">AMotionEvent_getFlags</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga2891d19197c070207098fa48adeb35af"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5644f0d952e3dea57ba9f7ce51dff2bb"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5644f0d952e3dea57ba9f7ce51dff2bb">AMotionEvent_getMetaState</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga5644f0d952e3dea57ba9f7ce51dff2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1aa7ebb749416491b6f0c55ae87ddf49"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga1aa7ebb749416491b6f0c55ae87ddf49">AMotionEvent_getButtonState</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga1aa7ebb749416491b6f0c55ae87ddf49"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad7e1f0caa4c27194d4a8756a18432299"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gad7e1f0caa4c27194d4a8756a18432299">AMotionEvent_getEdgeFlags</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:gad7e1f0caa4c27194d4a8756a18432299"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad44be7697e68891688cd7bcfaffec209"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gad44be7697e68891688cd7bcfaffec209">AMotionEvent_getDownTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:gad44be7697e68891688cd7bcfaffec209"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7e13fbf3cff0700b0b620284ebdd3a33"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7e13fbf3cff0700b0b620284ebdd3a33">AMotionEvent_getEventTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga7e13fbf3cff0700b0b620284ebdd3a33"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7a94ce622eb78a17737fd8bddbf86e21"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7a94ce622eb78a17737fd8bddbf86e21">AMotionEvent_getXOffset</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga7a94ce622eb78a17737fd8bddbf86e21"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7f6bd2c12d912f502c245b6ced6d3704"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7f6bd2c12d912f502c245b6ced6d3704">AMotionEvent_getYOffset</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga7f6bd2c12d912f502c245b6ced6d3704"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga81a9be07673a01f43fd0241c7b4c254f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga81a9be07673a01f43fd0241c7b4c254f">AMotionEvent_getXPrecision</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga81a9be07673a01f43fd0241c7b4c254f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae311e6e28bce4be905526f9ea71278ed"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gae311e6e28bce4be905526f9ea71278ed">AMotionEvent_getYPrecision</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:gae311e6e28bce4be905526f9ea71278ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga612e68d104adbc6d14d87510e8066bd8"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga612e68d104adbc6d14d87510e8066bd8">AMotionEvent_getPointerCount</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga612e68d104adbc6d14d87510e8066bd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga599e21a79c706807243a8ee31b116138"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga599e21a79c706807243a8ee31b116138">AMotionEvent_getPointerId</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga599e21a79c706807243a8ee31b116138"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2babe4e2e79952e004538f8f1878649c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2babe4e2e79952e004538f8f1878649c">AMotionEvent_getToolType</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga2babe4e2e79952e004538f8f1878649c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafe45e29ef138cc30592237ce479837f0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gafe45e29ef138cc30592237ce479837f0">AMotionEvent_getRawX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:gafe45e29ef138cc30592237ce479837f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5a09c3d742a93270861aa05f24257c23"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5a09c3d742a93270861aa05f24257c23">AMotionEvent_getRawY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga5a09c3d742a93270861aa05f24257c23"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga22e255a5fa52761cd92ce78af91e9757"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga22e255a5fa52761cd92ce78af91e9757">AMotionEvent_getX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga22e255a5fa52761cd92ce78af91e9757"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga113f58a37e41f2a6c3007d68418edfa6"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga113f58a37e41f2a6c3007d68418edfa6">AMotionEvent_getY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga113f58a37e41f2a6c3007d68418edfa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga97fcaa6cd08c9d54b35711e482e06c8d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga97fcaa6cd08c9d54b35711e482e06c8d">AMotionEvent_getPressure</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga97fcaa6cd08c9d54b35711e482e06c8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9b1f3c3df46b5269f9e74d2dd70c88a8"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9b1f3c3df46b5269f9e74d2dd70c88a8">AMotionEvent_getSize</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga9b1f3c3df46b5269f9e74d2dd70c88a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9ac18fe19534e07d80441582f489d471"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9ac18fe19534e07d80441582f489d471">AMotionEvent_getTouchMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga9ac18fe19534e07d80441582f489d471"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga65f71e257b5fcb29dcbaaf59b3fcb3a7"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga65f71e257b5fcb29dcbaaf59b3fcb3a7">AMotionEvent_getTouchMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga65f71e257b5fcb29dcbaaf59b3fcb3a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac04099690f278a6a27191c2027b12a77"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gac04099690f278a6a27191c2027b12a77">AMotionEvent_getToolMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:gac04099690f278a6a27191c2027b12a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2222d459759ba4a8269647012d2718fb"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2222d459759ba4a8269647012d2718fb">AMotionEvent_getToolMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga2222d459759ba4a8269647012d2718fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad28422998da15b789edcba6b8bc5d615"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gad28422998da15b789edcba6b8bc5d615">AMotionEvent_getOrientation</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:gad28422998da15b789edcba6b8bc5d615"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9d364cdcebf85237f599b25861f38c21"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9d364cdcebf85237f599b25861f38c21">AMotionEvent_getAxisValue</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, int32_t axis, size_t pointer_index)</td></tr>
-<tr class="separator:ga9d364cdcebf85237f599b25861f38c21"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0aef34c236db6d7a56a50bf590be7bcc"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga0aef34c236db6d7a56a50bf590be7bcc">AMotionEvent_getHistorySize</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga0aef34c236db6d7a56a50bf590be7bcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga523f1a760754206965b42b08d62f9346"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga523f1a760754206965b42b08d62f9346">AMotionEvent_getHistoricalEventTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t history_index)</td></tr>
-<tr class="separator:ga523f1a760754206965b42b08d62f9346"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5d36c2e7420001c86ae2aa1168fe6f83"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5d36c2e7420001c86ae2aa1168fe6f83">AMotionEvent_getHistoricalRawX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga5d36c2e7420001c86ae2aa1168fe6f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6deb0e7690a93aa53e5872c2691b69fe"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga6deb0e7690a93aa53e5872c2691b69fe">AMotionEvent_getHistoricalRawY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga6deb0e7690a93aa53e5872c2691b69fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga49a8ca89ff377b5ed2355e8d7220ae07"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga49a8ca89ff377b5ed2355e8d7220ae07">AMotionEvent_getHistoricalX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga49a8ca89ff377b5ed2355e8d7220ae07"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga30fc4e5d3ce144955859f8c97b51b73d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga30fc4e5d3ce144955859f8c97b51b73d">AMotionEvent_getHistoricalY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga30fc4e5d3ce144955859f8c97b51b73d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa8e9352ee5b043b3e1b6e2062d491010"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaa8e9352ee5b043b3e1b6e2062d491010">AMotionEvent_getHistoricalPressure</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gaa8e9352ee5b043b3e1b6e2062d491010"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0a04bb7ec12928db7e62645e7fad3a9e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga0a04bb7ec12928db7e62645e7fad3a9e">AMotionEvent_getHistoricalSize</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga0a04bb7ec12928db7e62645e7fad3a9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf437f223668b97f19ebdbad4b9cf4483"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaf437f223668b97f19ebdbad4b9cf4483">AMotionEvent_getHistoricalTouchMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gaf437f223668b97f19ebdbad4b9cf4483"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga126715d966e989652aa1ae5d38e0e898"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga126715d966e989652aa1ae5d38e0e898">AMotionEvent_getHistoricalTouchMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga126715d966e989652aa1ae5d38e0e898"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga160a5830e791e8c42ae97f51b92233d2"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga160a5830e791e8c42ae97f51b92233d2">AMotionEvent_getHistoricalToolMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga160a5830e791e8c42ae97f51b92233d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafe01aa7576a6d1bce750fb8482355849"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gafe01aa7576a6d1bce750fb8482355849">AMotionEvent_getHistoricalToolMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gafe01aa7576a6d1bce750fb8482355849"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaab9cb8fa670175ecc73c75eed4e5cd3f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaab9cb8fa670175ecc73c75eed4e5cd3f">AMotionEvent_getHistoricalOrientation</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gaab9cb8fa670175ecc73c75eed4e5cd3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7ca740e1324f3cdb934252dce0c982d0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7ca740e1324f3cdb934252dce0c982d0">AMotionEvent_getHistoricalAxisValue</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, int32_t axis, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga7ca740e1324f3cdb934252dce0c982d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga900711156bfb58d1a4b158da7874930f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga900711156bfb58d1a4b158da7874930f">AInputQueue_attachLooper</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int ident, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
-<tr class="separator:ga900711156bfb58d1a4b158da7874930f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaeebe9f83392ac79b31ca40a6fd4dbeff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaeebe9f83392ac79b31ca40a6fd4dbeff">AInputQueue_detachLooper</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td></tr>
-<tr class="separator:gaeebe9f83392ac79b31ca40a6fd4dbeff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2b72ad6ab5ef656e8c41163aa7871c96"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2b72ad6ab5ef656e8c41163aa7871c96">AInputQueue_hasEvents</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td></tr>
-<tr class="separator:ga2b72ad6ab5ef656e8c41163aa7871c96"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga88de12e2b39787ba7d3e4ce2ea46a48c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga88de12e2b39787ba7d3e4ce2ea46a48c">AInputQueue_getEvent</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> **outEvent)</td></tr>
-<tr class="separator:ga88de12e2b39787ba7d3e4ce2ea46a48c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadecd32e6c7aefa4a508b355550d3eaa9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gadecd32e6c7aefa4a508b355550d3eaa9">AInputQueue_preDispatchEvent</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:gadecd32e6c7aefa4a508b355550d3eaa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga17e87e0f35d47d729eac31a0dfb1ac33"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga17e87e0f35d47d729eac31a0dfb1ac33">AInputQueue_finishEvent</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event, int handled)</td></tr>
-<tr class="separator:ga17e87e0f35d47d729eac31a0dfb1ac33"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Macro Definition Documentation</h2>
-<a class="anchor" id="gaeb170c0fbeeed1d999160566f09f169e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT&#160;&#160;&#160;8</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Bit shift for the action bits holding the pointer index as defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="gac35dbbc035371e799d8badabc981e8fa"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Input events.</p>
-<p>Input events are opaque structures. Use the provided accessors functions to read their properties. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga21d8182651f4b61ae558560023e8339c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Input queue</p>
-<p>An input queue is the facility through which you retrieve input events. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="ga385c44f6fb256e5716a2302a5b940388"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Motion event edge touch flags. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga385c44f6fb256e5716a2302a5b940388a37dd7496968e6defbecc3c8d6ab2734d"></a>AMOTION_EVENT_EDGE_FLAG_NONE</em>&#160;</td><td class="fielddoc">
-<p>No edges intersected. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga385c44f6fb256e5716a2302a5b940388a915e1ade9b600d11a3c70a17a88de757"></a>AMOTION_EVENT_EDGE_FLAG_TOP</em>&#160;</td><td class="fielddoc">
-<p>Flag indicating the motion event intersected the top edge of the screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga385c44f6fb256e5716a2302a5b940388ad8b662839787e1c7dd2616f32c02aaeb"></a>AMOTION_EVENT_EDGE_FLAG_BOTTOM</em>&#160;</td><td class="fielddoc">
-<p>Flag indicating the motion event intersected the bottom edge of the screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga385c44f6fb256e5716a2302a5b940388afb70c13f16daade25ba8132a5ea3cf52"></a>AMOTION_EVENT_EDGE_FLAG_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Flag indicating the motion event intersected the left edge of the screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga385c44f6fb256e5716a2302a5b940388a7d45674e03f1876a43d4810508905078"></a>AMOTION_EVENT_EDGE_FLAG_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Flag indicating the motion event intersected the right edge of the screen. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gabc5c98fcc1211af2b80116dd6e0a035d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Constants that identify each individual axis of a motion event. <a class="anchor" id="AMOTION_EVENT_AXIS"></a></p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da5f4b5b009634039a1f361048a5fc6064"></a>AMOTION_EVENT_AXIS_X</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: X axis of a motion event.</p>
-<ul>
-<li>For a touch screen, reports the absolute X screen position of the center of the touch contact area. The units are display pixels.</li>
-<li>For a touch pad, reports the absolute X surface position of the center of the touch contact area. The units are device-dependent.</li>
-<li>For a mouse, reports the absolute X screen position of the mouse pointer. The units are display pixels.</li>
-<li>For a trackball, reports the relative horizontal displacement of the trackball. The value is normalized to a range from -1.0 (left) to 1.0 (right).</li>
-<li>For a joystick, reports the absolute X position of the joystick. The value is normalized to a range from -1.0 (left) to 1.0 (right). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da64f7de8558265bd8179d206eb33eff6c"></a>AMOTION_EVENT_AXIS_Y</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Y axis of a motion event.</p>
-<ul>
-<li>For a touch screen, reports the absolute Y screen position of the center of the touch contact area. The units are display pixels.</li>
-<li>For a touch pad, reports the absolute Y surface position of the center of the touch contact area. The units are device-dependent.</li>
-<li>For a mouse, reports the absolute Y screen position of the mouse pointer. The units are display pixels.</li>
-<li>For a trackball, reports the relative vertical displacement of the trackball. The value is normalized to a range from -1.0 (up) to 1.0 (down).</li>
-<li>For a joystick, reports the absolute Y position of the joystick. The value is normalized to a range from -1.0 (up or far) to 1.0 (down or near). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da3b4fd0f17cfdeb6a055babecd2b0ded8"></a>AMOTION_EVENT_AXIS_PRESSURE</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Pressure axis of a motion event.</p>
-<ul>
-<li>For a touch screen or touch pad, reports the approximate pressure applied to the surface by a finger or other tool. The value is normalized to a range from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.</li>
-<li>For a trackball, the value is set to 1 if the trackball button is pressed or 0 otherwise.</li>
-<li>For a mouse, the value is set to 1 if the primary mouse button is pressed or 0 otherwise. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da4baba3ccaec881089a864ba6deaf8bd6"></a>AMOTION_EVENT_AXIS_SIZE</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Size axis of a motion event.</p>
-<ul>
-<li>For a touch screen or touch pad, reports the approximate size of the contact area in relation to the maximum detectable size for the device. The value is normalized to a range from 0 (smallest detectable size) to 1 (largest detectable size), although it is not a linear scale. This value is of limited use. To obtain calibrated size information, see <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da792b9e01044a2e43e7f80e5559db20c2">AMOTION_EVENT_AXIS_TOUCH_MAJOR</a> or <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa273d64c392f86ae789fd5e24661ba0a">AMOTION_EVENT_AXIS_TOOL_MAJOR</a>. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da792b9e01044a2e43e7f80e5559db20c2"></a>AMOTION_EVENT_AXIS_TOUCH_MAJOR</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: TouchMajor axis of a motion event.</p>
-<ul>
-<li>For a touch screen, reports the length of the major axis of an ellipse that represents the touch area at the point of contact. The units are display pixels.</li>
-<li>For a touch pad, reports the length of the major axis of an ellipse that represents the touch area at the point of contact. The units are device-dependent. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035daa8b24b0f01f24898a36e5751c8eca63c"></a>AMOTION_EVENT_AXIS_TOUCH_MINOR</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: TouchMinor axis of a motion event.</p>
-<ul>
-<li>For a touch screen, reports the length of the minor axis of an ellipse that represents the touch area at the point of contact. The units are display pixels.</li>
-<li>For a touch pad, reports the length of the minor axis of an ellipse that represents the touch area at the point of contact. The units are device-dependent.</li>
-</ul>
-<p>When the touch is circular, the major and minor axis lengths will be equal to one another. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035daa273d64c392f86ae789fd5e24661ba0a"></a>AMOTION_EVENT_AXIS_TOOL_MAJOR</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: ToolMajor axis of a motion event.</p>
-<ul>
-<li>For a touch screen, reports the length of the major axis of an ellipse that represents the size of the approaching finger or tool used to make contact.</li>
-<li>For a touch pad, reports the length of the major axis of an ellipse that represents the size of the approaching finger or tool used to make contact. The units are device-dependent.</li>
-</ul>
-<p>When the touch is circular, the major and minor axis lengths will be equal to one another.</p>
-<p>The tool size may be larger than the touch size since the tool may not be fully in contact with the touch sensor. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dadebd200b37ffaf36b94e7e478c559142"></a>AMOTION_EVENT_AXIS_TOOL_MINOR</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: ToolMinor axis of a motion event.</p>
-<ul>
-<li>For a touch screen, reports the length of the minor axis of an ellipse that represents the size of the approaching finger or tool used to make contact.</li>
-<li>For a touch pad, reports the length of the minor axis of an ellipse that represents the size of the approaching finger or tool used to make contact. The units are device-dependent.</li>
-</ul>
-<p>When the touch is circular, the major and minor axis lengths will be equal to one another.</p>
-<p>The tool size may be larger than the touch size since the tool may not be fully in contact with the touch sensor. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da114f2b3fc233ccf7a4470787c31457d2"></a>AMOTION_EVENT_AXIS_ORIENTATION</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Orientation axis of a motion event.</p>
-<ul>
-<li>For a touch screen or touch pad, reports the orientation of the finger or tool in radians relative to the vertical plane of the device. An angle of 0 radians indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).</li>
-<li>For a stylus, the orientation indicates the direction in which the stylus is pointing in relation to the vertical axis of the current orientation of the screen. The range is from -PI radians to PI radians, where 0 is pointing up, -PI/2 radians is pointing left, -PI or PI radians is pointing down, and PI/2 radians is pointing right. See also <a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafca0a235f69c4b38bfc95e7a7b8d9ab1">AMOTION_EVENT_AXIS_TILT</a>. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dad11be04b4b81715cad905ee9fa348e99"></a>AMOTION_EVENT_AXIS_VSCROLL</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Vertical Scroll axis of a motion event.</p>
-<ul>
-<li>For a mouse, reports the relative movement of the vertical scroll wheel. The value is normalized to a range from -1.0 (down) to 1.0 (up).</li>
-</ul>
-<p>This axis should be used to scroll views vertically. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da92955e6b0f3f82af66a505c854e9edff"></a>AMOTION_EVENT_AXIS_HSCROLL</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Horizontal Scroll axis of a motion event.</p>
-<ul>
-<li>For a mouse, reports the relative movement of the horizontal scroll wheel. The value is normalized to a range from -1.0 (left) to 1.0 (right).</li>
-</ul>
-<p>This axis should be used to scroll views horizontally. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da5a689e572da9bc5feafcb6c011368305"></a>AMOTION_EVENT_AXIS_Z</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Z axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute Z position of the joystick. The value is normalized to a range from -1.0 (high) to 1.0 (low). <em>On game pads with two analog joysticks, this axis is often reinterpreted to report the absolute X position of the second joystick instead.</em> </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da689b612864177d6b57d4181442e3e38e"></a>AMOTION_EVENT_AXIS_RX</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: X Rotation axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute rotation angle about the X axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035daa20188da209300e1f80f6f5bd4058e13"></a>AMOTION_EVENT_AXIS_RY</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Y Rotation axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute rotation angle about the Y axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da381948b3321afd390ad164345eb9206b"></a>AMOTION_EVENT_AXIS_RZ</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Z Rotation axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute rotation angle about the Z axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise). On game pads with two analog joysticks, this axis is often reinterpreted to report the absolute Y position of the second joystick instead. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da04245c76cb9b32dcba920661f11ac9da"></a>AMOTION_EVENT_AXIS_HAT_X</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Hat X axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute X position of the directional hat control. The value is normalized to a range from -1.0 (left) to 1.0 (right). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da98c323321d908db459e7cf86a7e8a482"></a>AMOTION_EVENT_AXIS_HAT_Y</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Hat Y axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute Y position of the directional hat control. The value is normalized to a range from -1.0 (up) to 1.0 (down). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dae4c65c3b1bd2946ff9e18c6041cdb591"></a>AMOTION_EVENT_AXIS_LTRIGGER</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Left Trigger axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the left trigger control. The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da116e80c6be166290ca481fefa5de38c1"></a>AMOTION_EVENT_AXIS_RTRIGGER</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Right Trigger axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the right trigger control. The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da6d1f5d64e607104964eb43d8fae07a4f"></a>AMOTION_EVENT_AXIS_THROTTLE</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Throttle axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the throttle control. The value is normalized to a range from 0.0 (fully open) to 1.0 (fully closed). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da318a0782f895949407fc192fc4280257"></a>AMOTION_EVENT_AXIS_RUDDER</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Rudder axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the rudder control. The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dab0ae83ebd74e672bb35378b92a440b1d"></a>AMOTION_EVENT_AXIS_WHEEL</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Wheel axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the steering wheel control. The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dab0223f235a6044815918af2abafcbf16"></a>AMOTION_EVENT_AXIS_GAS</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Gas axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the gas (accelerator) control. The value is normalized to a range from 0.0 (no acceleration) to 1.0 (maximum acceleration). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dae3a99764f3681dd9e094852bb2489ece"></a>AMOTION_EVENT_AXIS_BRAKE</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Brake axis of a motion event.</p>
-<ul>
-<li>For a joystick, reports the absolute position of the brake control. The value is normalized to a range from 0.0 (no braking) to 1.0 (maximum braking). </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dae800909411a1e83173b0eef7aa458d0e"></a>AMOTION_EVENT_AXIS_DISTANCE</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Distance axis of a motion event.</p>
-<ul>
-<li>For a stylus, reports the distance of the stylus from the screen. A value of 0.0 indicates direct contact and larger values indicate increasing distance from the surface. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dafca0a235f69c4b38bfc95e7a7b8d9ab1"></a>AMOTION_EVENT_AXIS_TILT</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Tilt axis of a motion event.</p>
-<ul>
-<li>For a stylus, reports the tilt angle of the stylus in radians where 0 radians indicates that the stylus is being held perpendicular to the surface, and PI/2 radians indicates that the stylus is being held flat against the surface. </li>
-</ul>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dadcc18afd3a7069412617df34db5a27bc"></a>AMOTION_EVENT_AXIS_GENERIC_1</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 1 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dac4addf06abfa6c76f0578ddde049aad5"></a>AMOTION_EVENT_AXIS_GENERIC_2</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 2 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dac7df57ef5082e10be83f66d7477bce9c"></a>AMOTION_EVENT_AXIS_GENERIC_3</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 3 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da321873d126b7d545665096694cb7d9d9"></a>AMOTION_EVENT_AXIS_GENERIC_4</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 4 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da9b47cef7060197e1b0302a8a718c3085"></a>AMOTION_EVENT_AXIS_GENERIC_5</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 5 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035daad7e47a1b5fb66864b6d988374f50a84"></a>AMOTION_EVENT_AXIS_GENERIC_6</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 6 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da222c06f51a60e59504b635dbf89a025b"></a>AMOTION_EVENT_AXIS_GENERIC_7</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 7 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dab59a8a373a913e40b146ed762976d6fe"></a>AMOTION_EVENT_AXIS_GENERIC_8</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 8 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da721fa0fbca8b22f1ecc8d3870f4e7443"></a>AMOTION_EVENT_AXIS_GENERIC_9</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 9 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da29ba08f4ddc658e0127ee5bc08d185f2"></a>AMOTION_EVENT_AXIS_GENERIC_10</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 10 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dafc64a4b307f62bb12b645918aa7edb57"></a>AMOTION_EVENT_AXIS_GENERIC_11</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 11 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dae5d32b3e9cec4936ae1e074f320c3063"></a>AMOTION_EVENT_AXIS_GENERIC_12</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 12 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da5f19f5bc52e5eaec5ebd4f07aad12180"></a>AMOTION_EVENT_AXIS_GENERIC_13</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 13 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035dadb866d826ecf25161d7c7f86166e149b"></a>AMOTION_EVENT_AXIS_GENERIC_14</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 14 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035da7e86befc8502b8df687284f3c40b2eca"></a>AMOTION_EVENT_AXIS_GENERIC_15</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 15 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc5c98fcc1211af2b80116dd6e0a035daaaa011ba929b18c6da71153638f92336"></a>AMOTION_EVENT_AXIS_GENERIC_16</em>&#160;</td><td class="fielddoc">
-<p>Axis constant: Generic 16 axis of a motion event. The interpretation of a generic axis is device-specific. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gac36f475ca5b446f4fde4c9b90bec77c8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Constants that identify buttons that are associated with motion events. Refer to the documentation on the MotionEvent class for descriptions of each button. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggac36f475ca5b446f4fde4c9b90bec77c8ab388f65477b9dd4c51e6367111168d65"></a>AMOTION_EVENT_BUTTON_PRIMARY</em>&#160;</td><td class="fielddoc">
-<p>primary </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggac36f475ca5b446f4fde4c9b90bec77c8a08118700ecb4e147528a0e725afc9451"></a>AMOTION_EVENT_BUTTON_SECONDARY</em>&#160;</td><td class="fielddoc">
-<p>secondary </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggac36f475ca5b446f4fde4c9b90bec77c8ae6e2af1e7065e035e8a10a595827180f"></a>AMOTION_EVENT_BUTTON_TERTIARY</em>&#160;</td><td class="fielddoc">
-<p>tertiary </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggac36f475ca5b446f4fde4c9b90bec77c8a1841d075a2992ff7fbefa3fd50189b86"></a>AMOTION_EVENT_BUTTON_BACK</em>&#160;</td><td class="fielddoc">
-<p>back </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggac36f475ca5b446f4fde4c9b90bec77c8a4105edf43f7748c52c859cc5aa7dc438"></a>AMOTION_EVENT_BUTTON_FORWARD</em>&#160;</td><td class="fielddoc">
-<p>forward </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga05589fbab0657f08285ebdfe93f5ec9e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Constants that identify tool types. Refer to the documentation on the MotionEvent class for descriptions of each tool type. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9ea7e1ea0c955ebbac1349866e8995e0208"></a>AMOTION_EVENT_TOOL_TYPE_UNKNOWN</em>&#160;</td><td class="fielddoc">
-<p>unknown </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9eafd789262defb8a268fa80d26b0c30bcc"></a>AMOTION_EVENT_TOOL_TYPE_FINGER</em>&#160;</td><td class="fielddoc">
-<p>finger </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9eaf05dc95a74e560c89cec1f3100185fc7"></a>AMOTION_EVENT_TOOL_TYPE_STYLUS</em>&#160;</td><td class="fielddoc">
-<p>stylus </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9ea7be0c750d7d6719e7c948914400ae0de"></a>AMOTION_EVENT_TOOL_TYPE_MOUSE</em>&#160;</td><td class="fielddoc">
-<p>mouse </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9eaf9932f65b5b6b5800fb5873a60dbf0cb"></a>AMOTION_EVENT_TOOL_TYPE_ERASER</em>&#160;</td><td class="fielddoc">
-<p>eraser </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga16af7b253440dadd46a80a4b9fddba4d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Input source masks.</p>
-<p>Refer to the documentation on android.view.InputDevice for more details about input sources and their correct interpretation. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4daae438f475d03ea60fd9fb356abd7fa01"></a>AINPUT_SOURCE_CLASS_MASK</em>&#160;</td><td class="fielddoc">
-<p>mask </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4dafd6d5e71f09f6452acf017559481444c"></a>AINPUT_SOURCE_CLASS_NONE</em>&#160;</td><td class="fielddoc">
-<p>none </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4dacf1bf3d7b3c6e59f907bdffc9b33370e"></a>AINPUT_SOURCE_CLASS_BUTTON</em>&#160;</td><td class="fielddoc">
-<p>button </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4da7495274e98fb30dee3dfd903b878cf47"></a>AINPUT_SOURCE_CLASS_POINTER</em>&#160;</td><td class="fielddoc">
-<p>pointer </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4da078a18d85d078412721c336a879bcc1a"></a>AINPUT_SOURCE_CLASS_NAVIGATION</em>&#160;</td><td class="fielddoc">
-<p>navigation </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4da682f6982bb55ee809f6acd2deb550167"></a>AINPUT_SOURCE_CLASS_POSITION</em>&#160;</td><td class="fielddoc">
-<p>position </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga16af7b253440dadd46a80a4b9fddba4daaaeffb6442807dd96ec62e9d8a696b57"></a>AINPUT_SOURCE_CLASS_JOYSTICK</em>&#160;</td><td class="fielddoc">
-<p>joystick </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaba01db17f4a2bfbc3db60dc172972a25"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Input sources. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25ae9348bc04cdaa88b5b010f77a4945454"></a>AINPUT_SOURCE_UNKNOWN</em>&#160;</td><td class="fielddoc">
-<p>unknown </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a9860918666dd8c0b9d00a8da7af51e6d"></a>AINPUT_SOURCE_KEYBOARD</em>&#160;</td><td class="fielddoc">
-<p>keyboard </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25ad0fbfeff9f8d57104bff14c70ce5e3ef"></a>AINPUT_SOURCE_DPAD</em>&#160;</td><td class="fielddoc">
-<p>dpad </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a6417cb50ecd6ade48c708268434a49d3"></a>AINPUT_SOURCE_GAMEPAD</em>&#160;</td><td class="fielddoc">
-<p>gamepad </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a55ea411f927aed8964fa72fec0da444f"></a>AINPUT_SOURCE_TOUCHSCREEN</em>&#160;</td><td class="fielddoc">
-<p>touchscreen </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25ae71d3dcbd004bccb6e00fde47097cd86"></a>AINPUT_SOURCE_MOUSE</em>&#160;</td><td class="fielddoc">
-<p>mouse </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a86d4983c71432b27634ba41a64bffdf9"></a>AINPUT_SOURCE_STYLUS</em>&#160;</td><td class="fielddoc">
-<p>stylus </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a7e49d9153c86f60f626d7f797f4e78b6"></a>AINPUT_SOURCE_TRACKBALL</em>&#160;</td><td class="fielddoc">
-<p>trackball </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a7e0715d4b544653ab11893434172a2ef"></a>AINPUT_SOURCE_TOUCHPAD</em>&#160;</td><td class="fielddoc">
-<p>touchpad </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25a3712c4e4fb8ad7f6ae6e40d48e5c6ee7"></a>AINPUT_SOURCE_TOUCH_NAVIGATION</em>&#160;</td><td class="fielddoc">
-<p>navigation </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25afb28f10dc074e7f7435f5904c513edb5"></a>AINPUT_SOURCE_JOYSTICK</em>&#160;</td><td class="fielddoc">
-<p>joystick </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaba01db17f4a2bfbc3db60dc172972a25ab04317e7dd273ff5c87038df67d9796e"></a>AINPUT_SOURCE_ANY</em>&#160;</td><td class="fielddoc">
-<p>any </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaaf105ae5beaca1dee30ae54530691fce"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Keyboard types.</p>
-<p>Refer to the documentation on android.view.InputDevice for more details. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fcea32cb7ce34cdce7095962f0766cc6c3ac"></a>AINPUT_KEYBOARD_TYPE_NONE</em>&#160;</td><td class="fielddoc">
-<p>none </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fceaf0226d750ea830eb557ae68bd4a1c82a"></a>AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC</em>&#160;</td><td class="fielddoc">
-<p>non alphabetic </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaaf105ae5beaca1dee30ae54530691fceaba1f5ab6bc79749ba96a5d2a3af0e574"></a>AINPUT_KEYBOARD_TYPE_ALPHABETIC</em>&#160;</td><td class="fielddoc">
-<p>alphabetic </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga80155586fa275b28773c9b203f52caba"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Constants used to retrieve information about the range of motion for a particular coordinate of a motion event.</p>
-<p>Refer to the documentation on android.view.InputDevice for more details about input sources and their correct interpretation.</p>
-<dl class="deprecated"><dt><b>Deprecated:</b></dt><dd>These constants are deprecated. Use <a class="el" href="#AMOTION_EVENT_AXIS">AMOTION_EVENT_AXIS_*</a> constants instead. </dd></dl>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa0e5816bc48cdb33f2b488a109596ffe1"></a>AINPUT_MOTION_RANGE_X</em>&#160;</td><td class="fielddoc">
-<p>x </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaab48108c9450ea1b7cd021be7d8cbc332"></a>AINPUT_MOTION_RANGE_Y</em>&#160;</td><td class="fielddoc">
-<p>y </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa79aca706b12b28d0ab14762902fed31a"></a>AINPUT_MOTION_RANGE_PRESSURE</em>&#160;</td><td class="fielddoc">
-<p>pressure </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa46f3a6cf859fb161cd29398d8448c688"></a>AINPUT_MOTION_RANGE_SIZE</em>&#160;</td><td class="fielddoc">
-<p>size </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa7ead43624c96e165fd8a25e77148aa67"></a>AINPUT_MOTION_RANGE_TOUCH_MAJOR</em>&#160;</td><td class="fielddoc">
-<p>touch major </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa301181a0f20681135c15010b39bb575d"></a>AINPUT_MOTION_RANGE_TOUCH_MINOR</em>&#160;</td><td class="fielddoc">
-<p>touch minor </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaaa860f54aa9e5a269dba6a54bbcf3c27c"></a>AINPUT_MOTION_RANGE_TOOL_MAJOR</em>&#160;</td><td class="fielddoc">
-<p>tool major </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaa19226f6cf713c1b4d0973a163daf6cf1"></a>AINPUT_MOTION_RANGE_TOOL_MINOR</em>&#160;</td><td class="fielddoc">
-<p>tool minor </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga80155586fa275b28773c9b203f52cabaaf9be9c04a41b610d994a3d1d7e90d06d"></a>AINPUT_MOTION_RANGE_ORIENTATION</em>&#160;</td><td class="fielddoc">
-<p>orientation </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga6b7b47dd702d9e331586d485013fd1ea"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Key codes. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa593f8ae18990d627785719284a12a6f"></a>AKEYCODE_UNKNOWN</em>&#160;</td><td class="fielddoc">
-<p>Unknown key code. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa2dc78d3a93876b77402d2a7f02e4b899"></a>AKEYCODE_SOFT_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Soft Left key. Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa8cadfbfcaaa83fef168de13639adfcae"></a>AKEYCODE_SOFT_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Soft Right key. Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa526c2411b7476b7ae579f57a0378b2dd"></a>AKEYCODE_HOME</em>&#160;</td><td class="fielddoc">
-<p>Home key. This key is handled by the framework and is never delivered to applications. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaeb71c74bf556ba72e9c8f8dcbe5453d0"></a>AKEYCODE_BACK</em>&#160;</td><td class="fielddoc">
-<p>Back key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa8b5720ebdd3576c2b536ec9228273d8f"></a>AKEYCODE_CALL</em>&#160;</td><td class="fielddoc">
-<p>Call key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaff971957ae3a4e272b21987854e18d9b"></a>AKEYCODE_ENDCALL</em>&#160;</td><td class="fielddoc">
-<p>End Call key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa23f585ea17aeceaad2111c51ab289e79"></a>AKEYCODE_0</em>&#160;</td><td class="fielddoc">
-<p>'0' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaabcac88b54f8d764bc4573ecc5b9571b0"></a>AKEYCODE_1</em>&#160;</td><td class="fielddoc">
-<p>'1' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa2079c6fb75141968b60ed79fe895d6db"></a>AKEYCODE_2</em>&#160;</td><td class="fielddoc">
-<p>'2' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa40ccc018c0637e4d938e66b789054551"></a>AKEYCODE_3</em>&#160;</td><td class="fielddoc">
-<p>'3' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa73c2d141c3906bd97cfec91443356f7b"></a>AKEYCODE_4</em>&#160;</td><td class="fielddoc">
-<p>'4' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0ca99d2be4a3723ba3406944ad623f6e"></a>AKEYCODE_5</em>&#160;</td><td class="fielddoc">
-<p>'5' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa72bc6560e24d08ff8f3116dac9179079"></a>AKEYCODE_6</em>&#160;</td><td class="fielddoc">
-<p>'6' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa27070499acdb6c527a285b3840ec7bff"></a>AKEYCODE_7</em>&#160;</td><td class="fielddoc">
-<p>'7' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa93543b23683b33724ecf77ac5a8c19ab"></a>AKEYCODE_8</em>&#160;</td><td class="fielddoc">
-<p>'8' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa31cd4d7c4e59cf7b057b6c248cff516d"></a>AKEYCODE_9</em>&#160;</td><td class="fielddoc">
-<p>'9' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1461fbf54e3dcba96e5d6d0638c18305"></a>AKEYCODE_STAR</em>&#160;</td><td class="fielddoc">
-<p>'*' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf448758c44899e41b67f76dfe3be51e9"></a>AKEYCODE_POUND</em>&#160;</td><td class="fielddoc">
-<p>'#' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf2fd3133a88f3b6725834032bd74bd9e"></a>AKEYCODE_DPAD_UP</em>&#160;</td><td class="fielddoc">
-<p>Directional Pad Up key. May also be synthesized from trackball motions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa84b721b13aae56c9f1d3c22b3d81627a"></a>AKEYCODE_DPAD_DOWN</em>&#160;</td><td class="fielddoc">
-<p>Directional Pad Down key. May also be synthesized from trackball motions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa668dfb3ed79a37c2c07838c161c1b344"></a>AKEYCODE_DPAD_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Directional Pad Left key. May also be synthesized from trackball motions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac6f9d81b6239696a1836695bbfc6a975"></a>AKEYCODE_DPAD_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Directional Pad Right key. May also be synthesized from trackball motions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5e9c93273fd39148f54167133aa5b9ae"></a>AKEYCODE_DPAD_CENTER</em>&#160;</td><td class="fielddoc">
-<p>Directional Pad Center key. May also be synthesized from trackball motions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5b81e325d9efd633eef7535a5b538882"></a>AKEYCODE_VOLUME_UP</em>&#160;</td><td class="fielddoc">
-<p>Volume Up key. Adjusts the speaker volume up. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6a882dae17080d3b5f3329e79db60c66"></a>AKEYCODE_VOLUME_DOWN</em>&#160;</td><td class="fielddoc">
-<p>Volume Down key. Adjusts the speaker volume down. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6"></a>AKEYCODE_POWER</em>&#160;</td><td class="fielddoc">
-<p>Power key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa8670880765756933d3d1a10186d39e26"></a>AKEYCODE_CAMERA</em>&#160;</td><td class="fielddoc">
-<p>Camera key. Used to launch a camera application or take pictures. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa95bd8c25adeaa570108c7403f08a2901"></a>AKEYCODE_CLEAR</em>&#160;</td><td class="fielddoc">
-<p>Clear key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa424a091c62d40f5d65908c9730ae9014"></a>AKEYCODE_A</em>&#160;</td><td class="fielddoc">
-<p>'A' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa65d3bf8d6a8a6c2f7c1b08394f313758"></a>AKEYCODE_B</em>&#160;</td><td class="fielddoc">
-<p>'B' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaeed584f454e508ce931bcb33d37adb04"></a>AKEYCODE_C</em>&#160;</td><td class="fielddoc">
-<p>'C' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7e4cb3ef66209a2779be2c8239b57b51"></a>AKEYCODE_D</em>&#160;</td><td class="fielddoc">
-<p>'D' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaae218af7ceb207227bb10f0525e68a8d0"></a>AKEYCODE_E</em>&#160;</td><td class="fielddoc">
-<p>'E' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa455f71ecfe59af0fbd901ac0d0a8d53a"></a>AKEYCODE_F</em>&#160;</td><td class="fielddoc">
-<p>'F' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa165067e10464019411f768bba9e533d9"></a>AKEYCODE_G</em>&#160;</td><td class="fielddoc">
-<p>'G' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaad89a91a1500cb162f22962781ebfd9dc"></a>AKEYCODE_H</em>&#160;</td><td class="fielddoc">
-<p>'H' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4d44b5e4a19580540d8d77bf5755d74b"></a>AKEYCODE_I</em>&#160;</td><td class="fielddoc">
-<p>'I' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa70c259612ccec117d70afaef947a6a7a"></a>AKEYCODE_J</em>&#160;</td><td class="fielddoc">
-<p>'J' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5ce56cf50d3632c275c524bd78d0d932"></a>AKEYCODE_K</em>&#160;</td><td class="fielddoc">
-<p>'K' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab61c534fd0f4e56c4ba13861a2f5982b"></a>AKEYCODE_L</em>&#160;</td><td class="fielddoc">
-<p>'L' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa43b19e5e5234ce90c8e7ef67dd0cabd1"></a>AKEYCODE_M</em>&#160;</td><td class="fielddoc">
-<p>'M' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6c0b26804c89560a9e87c45f7f9fed36"></a>AKEYCODE_N</em>&#160;</td><td class="fielddoc">
-<p>'N' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa249667bc4a59d99be1914535877329fb"></a>AKEYCODE_O</em>&#160;</td><td class="fielddoc">
-<p>'O' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac68ef56b78bd0c8626cc68bb6cb9156f"></a>AKEYCODE_P</em>&#160;</td><td class="fielddoc">
-<p>'P' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa932cf6ea8d87e6d6d97af658dd0fa206"></a>AKEYCODE_Q</em>&#160;</td><td class="fielddoc">
-<p>'Q' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaba25ac2c15a8edbbbff16a9fe6e74532"></a>AKEYCODE_R</em>&#160;</td><td class="fielddoc">
-<p>'R' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaae1ed25c28a8fce578cddb17ca6888ff6"></a>AKEYCODE_S</em>&#160;</td><td class="fielddoc">
-<p>'S' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa2feac8b458ef8eb9c0a0dd73766927c2"></a>AKEYCODE_T</em>&#160;</td><td class="fielddoc">
-<p>'T' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac1a220314f986aae45d7fe3b35501595"></a>AKEYCODE_U</em>&#160;</td><td class="fielddoc">
-<p>'U' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4043bc48fa55cce7825176052d6e199a"></a>AKEYCODE_V</em>&#160;</td><td class="fielddoc">
-<p>'V' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf0c80e98547c3daa01f3d9e7f4f00425"></a>AKEYCODE_W</em>&#160;</td><td class="fielddoc">
-<p>'W' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaec585cebac89004faffbdc28dc6d81c5"></a>AKEYCODE_X</em>&#160;</td><td class="fielddoc">
-<p>'X' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa06fc277ef25acdd89d64c18eed0daa9b"></a>AKEYCODE_Y</em>&#160;</td><td class="fielddoc">
-<p>'Y' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7439a09f219a0addc13c758ef7508cce"></a>AKEYCODE_Z</em>&#160;</td><td class="fielddoc">
-<p>'Z' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0ca0bfbdc67b2c6f76e8fcaaf782c227"></a>AKEYCODE_COMMA</em>&#160;</td><td class="fielddoc">
-<p>',' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa9dd68c8ecebd4e274e8c357dcdfe8a04"></a>AKEYCODE_PERIOD</em>&#160;</td><td class="fielddoc">
-<p>'.' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa3dec175158abe8679bedd98ed1bc3e1a"></a>AKEYCODE_ALT_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Left Alt modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacd9b6b0846c6999f5df47d29e58ac95d"></a>AKEYCODE_ALT_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Right Alt modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaafb9875645596928cec46368e74499dc4"></a>AKEYCODE_SHIFT_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Left Shift modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf9eab1348ae1e8f18ad5bf3c77df4212"></a>AKEYCODE_SHIFT_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Right Shift modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1b1bfda850b2acd0b60e8456e2bfa958"></a>AKEYCODE_TAB</em>&#160;</td><td class="fielddoc">
-<p>Tab key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa10389300ac5d70f8d9733564b3cab4e7"></a>AKEYCODE_SPACE</em>&#160;</td><td class="fielddoc">
-<p>Space key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6c1c6752d5db5e02da51d8937e5e3c6f"></a>AKEYCODE_SYM</em>&#160;</td><td class="fielddoc">
-<p>Symbol modifier key. Used to enter alternate symbols. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaded9ec81ae6dab451665317723b94083"></a>AKEYCODE_EXPLORER</em>&#160;</td><td class="fielddoc">
-<p>Explorer special function key. Used to launch a browser application. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaade96efe470f428bb5c4eaea6ffc3681c"></a>AKEYCODE_ENVELOPE</em>&#160;</td><td class="fielddoc">
-<p>Envelope special function key. Used to launch a mail application. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac784a7bbbfbdab05fab6c6a1f29c98ff"></a>AKEYCODE_ENTER</em>&#160;</td><td class="fielddoc">
-<p>Enter key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacd013221b457d98975dc47e49817e28a"></a>AKEYCODE_DEL</em>&#160;</td><td class="fielddoc">
-<p>Backspace key. Deletes characters before the insertion point, unlike <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9516bc190d37fea27e07ddab0c607b51">AKEYCODE_FORWARD_DEL</a>. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa929561086ae7b519fa962597bc85f171"></a>AKEYCODE_GRAVE</em>&#160;</td><td class="fielddoc">
-<p>'`' (backtick) key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaca10bd34ad0abecfecace908b8cb92ca"></a>AKEYCODE_MINUS</em>&#160;</td><td class="fielddoc">
-<p>'-'. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0a197df7ec719c95ddcd6836e76c8498"></a>AKEYCODE_EQUALS</em>&#160;</td><td class="fielddoc">
-<p>'=' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaabdeda0d373aa37ef2ded5ffdfc008708"></a>AKEYCODE_LEFT_BRACKET</em>&#160;</td><td class="fielddoc">
-<p>'[' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa084dfa52626040a08d374f8aec066e6a"></a>AKEYCODE_RIGHT_BRACKET</em>&#160;</td><td class="fielddoc">
-<p>']' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaac90eb064382e3c482ae86abb7b3f701"></a>AKEYCODE_BACKSLASH</em>&#160;</td><td class="fielddoc">
-<p>'\' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac0a2920161f4f2d97b0b060614b23391"></a>AKEYCODE_SEMICOLON</em>&#160;</td><td class="fielddoc">
-<p>';' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab5518a8502914ea5f87ef5d29b32b1b1"></a>AKEYCODE_APOSTROPHE</em>&#160;</td><td class="fielddoc">
-<p>''' (apostrophe) key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa54c047be3811d637a33d9b3e39d16e1a"></a>AKEYCODE_SLASH</em>&#160;</td><td class="fielddoc">
-<p>'/' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7284f79a266ede479b79726082642e16"></a>AKEYCODE_AT</em>&#160;</td><td class="fielddoc">
-<p>'@' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaabe6e880f65bebbdd5246a4164c4ab37a"></a>AKEYCODE_NUM</em>&#160;</td><td class="fielddoc">
-<p>Number modifier key. Used to enter numeric symbols. This key is not <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad5e349eadd3255c6ad4982dc40ed23ef">AKEYCODE_NUM_LOCK</a>; it is more like <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3dec175158abe8679bedd98ed1bc3e1a">AKEYCODE_ALT_LEFT</a>. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0d3d29515a4815fe8d6d8d3291507a33"></a>AKEYCODE_HEADSETHOOK</em>&#160;</td><td class="fielddoc">
-<p>Headset Hook key. Used to hang up calls and stop media. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa23be9506f92f6efe14d47306a39a2187"></a>AKEYCODE_FOCUS</em>&#160;</td><td class="fielddoc">
-<p>Camera Focus key. Used to focus the camera. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab7f72d867b311e0845aef732dcc66495"></a>AKEYCODE_PLUS</em>&#160;</td><td class="fielddoc">
-<p>'+' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa707b85e89923b0f760be795972a87d76"></a>AKEYCODE_MENU</em>&#160;</td><td class="fielddoc">
-<p>Menu key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6115506352a5828532fc6a0b91683331"></a>AKEYCODE_NOTIFICATION</em>&#160;</td><td class="fielddoc">
-<p>Notification key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac644fd307fd0ef0d3ed3d2e074c1a4b7"></a>AKEYCODE_SEARCH</em>&#160;</td><td class="fielddoc">
-<p>Search key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa42f8fe71e8d45b5a83d83d80c3da40e1"></a>AKEYCODE_MEDIA_PLAY_PAUSE</em>&#160;</td><td class="fielddoc">
-<p>Play/Pause media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac4faa33993d80db1326073ea15a38e7d"></a>AKEYCODE_MEDIA_STOP</em>&#160;</td><td class="fielddoc">
-<p>Stop media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf5a6c3fc963e8163852b9a23e3a198b3"></a>AKEYCODE_MEDIA_NEXT</em>&#160;</td><td class="fielddoc">
-<p>Play Next media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa81432c31b00d47f768c29163eb276acb"></a>AKEYCODE_MEDIA_PREVIOUS</em>&#160;</td><td class="fielddoc">
-<p>Play Previous media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaecd53183b84c23a2ca65670a23674319"></a>AKEYCODE_MEDIA_REWIND</em>&#160;</td><td class="fielddoc">
-<p>Rewind media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa69e648024402af688d490a2041f15bca"></a>AKEYCODE_MEDIA_FAST_FORWARD</em>&#160;</td><td class="fielddoc">
-<p>Fast Forward media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1f6675d38f50e3556a8531839fd83f02"></a>AKEYCODE_MUTE</em>&#160;</td><td class="fielddoc">
-<p>Mute key. Mutes the microphone, unlike <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa174a5c7c39753235109696e82870c575">AKEYCODE_VOLUME_MUTE</a>. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4fd0d4ea5b6898f4a40011b97a739a04"></a>AKEYCODE_PAGE_UP</em>&#160;</td><td class="fielddoc">
-<p>Page Up key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0b7fe1c18f53e6328657858a88826393"></a>AKEYCODE_PAGE_DOWN</em>&#160;</td><td class="fielddoc">
-<p>Page Down key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacdc7c004da1594fa156de87befef5f41"></a>AKEYCODE_PICTSYMBOLS</em>&#160;</td><td class="fielddoc">
-<p>Picture Symbols modifier key. Used to switch symbol sets (Emoji, Kao-moji). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaad6a1f88b2cc3b6ff8f1724eb01473ec3"></a>AKEYCODE_SWITCH_CHARSET</em>&#160;</td><td class="fielddoc">
-<p>Switch Charset modifier key. Used to switch character sets (Kanji, Katakana). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaef2d2ec912aaa9e7215aeab79f7fb086"></a>AKEYCODE_BUTTON_A</em>&#160;</td><td class="fielddoc">
-<p>A Button key. On a game controller, the A button should be either the button labeled A or the first button on the bottom row of controller buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa721765c8f0bbcdb68af06817dbec8e53"></a>AKEYCODE_BUTTON_B</em>&#160;</td><td class="fielddoc">
-<p>B Button key. On a game controller, the B button should be either the button labeled B or the second button on the bottom row of controller buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaad622ad5df40d2fdf806abb2adda73b3d"></a>AKEYCODE_BUTTON_C</em>&#160;</td><td class="fielddoc">
-<p>C Button key. On a game controller, the C button should be either the button labeled C or the third button on the bottom row of controller buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa21174962f95e32cd0345ce657d03ebc7"></a>AKEYCODE_BUTTON_X</em>&#160;</td><td class="fielddoc">
-<p>X Button key. On a game controller, the X button should be either the button labeled X or the first button on the upper row of controller buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6654a8b2c700f7783433c86fcdae7919"></a>AKEYCODE_BUTTON_Y</em>&#160;</td><td class="fielddoc">
-<p>Y Button key. On a game controller, the Y button should be either the button labeled Y or the second button on the upper row of controller buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa06156b68e6de951b44fc662e1b16041f"></a>AKEYCODE_BUTTON_Z</em>&#160;</td><td class="fielddoc">
-<p>Z Button key. On a game controller, the Z button should be either the button labeled Z or the third button on the upper row of controller buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa32e159826404c7d76c2a433c24de82a2"></a>AKEYCODE_BUTTON_L1</em>&#160;</td><td class="fielddoc">
-<p>L1 Button key. On a game controller, the L1 button should be either the button labeled L1 (or L) or the top left trigger button. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7c614b3966583b0ad027e45f594ede46"></a>AKEYCODE_BUTTON_R1</em>&#160;</td><td class="fielddoc">
-<p>R1 Button key. On a game controller, the R1 button should be either the button labeled R1 (or R) or the top right trigger button. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa36a38421637cfa5ebfd8a0296650cdf4"></a>AKEYCODE_BUTTON_L2</em>&#160;</td><td class="fielddoc">
-<p>L2 Button key. On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa46d487e9fe31855b7b46739bad58fe3e"></a>AKEYCODE_BUTTON_R2</em>&#160;</td><td class="fielddoc">
-<p>R2 Button key. On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa68c5d8dcd8fe708ada8f4a4e17feb638"></a>AKEYCODE_BUTTON_THUMBL</em>&#160;</td><td class="fielddoc">
-<p>Left Thumb Button key. On a game controller, the left thumb button indicates that the left (or only) joystick is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa9759d817172d268ced1748909a5f5fbe"></a>AKEYCODE_BUTTON_THUMBR</em>&#160;</td><td class="fielddoc">
-<p>Right Thumb Button key. On a game controller, the right thumb button indicates that the right joystick is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf3c818d106f4ec793a43749c4c26a8a4"></a>AKEYCODE_BUTTON_START</em>&#160;</td><td class="fielddoc">
-<p>Start Button key. On a game controller, the button labeled Start. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa598289bc85f647c237729126ea392a43"></a>AKEYCODE_BUTTON_SELECT</em>&#160;</td><td class="fielddoc">
-<p>Select Button key. On a game controller, the button labeled Select. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa19839eebec939407d901a33b75cf2594"></a>AKEYCODE_BUTTON_MODE</em>&#160;</td><td class="fielddoc">
-<p>Mode Button key. On a game controller, the button labeled Mode. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac52177e5508edacb8e9c6d3a25db4fb6"></a>AKEYCODE_ESCAPE</em>&#160;</td><td class="fielddoc">
-<p>Escape key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa9516bc190d37fea27e07ddab0c607b51"></a>AKEYCODE_FORWARD_DEL</em>&#160;</td><td class="fielddoc">
-<p>Forward Delete key. Deletes characters ahead of the insertion point, unlike <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd013221b457d98975dc47e49817e28a">AKEYCODE_DEL</a>. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaaca9d0df6cc18492209eb287e659aeb1"></a>AKEYCODE_CTRL_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Left Control modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa99b317cf2f1eb6b06d0226e05223e60c"></a>AKEYCODE_CTRL_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Right Control modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab9dcb68b35c85d380846c85f323868f1"></a>AKEYCODE_CAPS_LOCK</em>&#160;</td><td class="fielddoc">
-<p>Caps Lock key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa78ff5c8316235635f76e3c3179e9a7fc"></a>AKEYCODE_SCROLL_LOCK</em>&#160;</td><td class="fielddoc">
-<p>Scroll Lock key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaaadfb2d920bbe422c096120d39811c58"></a>AKEYCODE_META_LEFT</em>&#160;</td><td class="fielddoc">
-<p>Left Meta modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa68038455e2b0846db51f9957e0df9cb8"></a>AKEYCODE_META_RIGHT</em>&#160;</td><td class="fielddoc">
-<p>Right Meta modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1764b777aa56605f4029d3c71fe70722"></a>AKEYCODE_FUNCTION</em>&#160;</td><td class="fielddoc">
-<p>Function modifier key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa14e22c69bcd47ffb4445ee18a4332d84"></a>AKEYCODE_SYSRQ</em>&#160;</td><td class="fielddoc">
-<p>System Request / Print Screen key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa047501f9cf9bce00e6048d8759ea3a23"></a>AKEYCODE_BREAK</em>&#160;</td><td class="fielddoc">
-<p>Break / Pause key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7544f3de2fb5f78bec62af94a32fdc58"></a>AKEYCODE_MOVE_HOME</em>&#160;</td><td class="fielddoc">
-<p>Home Movement key. Used for scrolling or moving the cursor around to the start of a line or to the top of a list. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5605f49f5271430f5f150efb3cd0398a"></a>AKEYCODE_MOVE_END</em>&#160;</td><td class="fielddoc">
-<p>End Movement key. Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa62f663d11e91af750a51ddd060b08644"></a>AKEYCODE_INSERT</em>&#160;</td><td class="fielddoc">
-<p>Insert key. Toggles insert / overwrite edit mode. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaafbf0a16c7746e5dee2fd3adbd50da88a"></a>AKEYCODE_FORWARD</em>&#160;</td><td class="fielddoc">
-<p>Forward key. Navigates forward in the history stack. Complement of <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeb71c74bf556ba72e9c8f8dcbe5453d0">AKEYCODE_BACK</a>. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa615cf6202b0ae0ed550f42f6c64b36a1"></a>AKEYCODE_MEDIA_PLAY</em>&#160;</td><td class="fielddoc">
-<p>Play media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1f4e0178c2028b3042b0a5948e38e4e4"></a>AKEYCODE_MEDIA_PAUSE</em>&#160;</td><td class="fielddoc">
-<p>Pause media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6788c6e1443140b0ec4d004d8293e998"></a>AKEYCODE_MEDIA_CLOSE</em>&#160;</td><td class="fielddoc">
-<p>Close media key. May be used to close a CD tray, for example. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa317bffd44306b021c401d3a26b82a7f6"></a>AKEYCODE_MEDIA_EJECT</em>&#160;</td><td class="fielddoc">
-<p>Eject media key. May be used to eject a CD tray, for example. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa17e1eae0b245176aaa024a53411441f9"></a>AKEYCODE_MEDIA_RECORD</em>&#160;</td><td class="fielddoc">
-<p>Record media key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa3b84f2c503a9e839f3d36e10e3307fcf"></a>AKEYCODE_F1</em>&#160;</td><td class="fielddoc">
-<p>F1 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1360f7ec66aa6421e240dae637262e84"></a>AKEYCODE_F2</em>&#160;</td><td class="fielddoc">
-<p>F2 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6a4ce6105e12a3a9071cae2f40515085"></a>AKEYCODE_F3</em>&#160;</td><td class="fielddoc">
-<p>F3 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa882050e4d0f917470a5b91fbf6ae9ebf"></a>AKEYCODE_F4</em>&#160;</td><td class="fielddoc">
-<p>F4 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab01807c72b46620bb50fcb6abe24d937"></a>AKEYCODE_F5</em>&#160;</td><td class="fielddoc">
-<p>F5 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa04a12e81ed80bb42ef5c63cedf0dc60"></a>AKEYCODE_F6</em>&#160;</td><td class="fielddoc">
-<p>F6 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa9583b8e4b0d994b7e3a193b67cf6020c"></a>AKEYCODE_F7</em>&#160;</td><td class="fielddoc">
-<p>F7 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa55ca54d42d8df70de2ce9031db1344c8"></a>AKEYCODE_F8</em>&#160;</td><td class="fielddoc">
-<p>F8 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0c8225c0ef98da730933ae914077dbc9"></a>AKEYCODE_F9</em>&#160;</td><td class="fielddoc">
-<p>F9 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa60660b13acab39282d0558cdcc93474"></a>AKEYCODE_F10</em>&#160;</td><td class="fielddoc">
-<p>F10 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa64cc7b1d8e53d90ff57c39d0b5a4dd22"></a>AKEYCODE_F11</em>&#160;</td><td class="fielddoc">
-<p>F11 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa491000231e0ba221b6916b1d9d2c9fb7"></a>AKEYCODE_F12</em>&#160;</td><td class="fielddoc">
-<p>F12 key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaad5e349eadd3255c6ad4982dc40ed23ef"></a>AKEYCODE_NUM_LOCK</em>&#160;</td><td class="fielddoc">
-<p>Num Lock key. This is the Num Lock key; it is different from <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe6e880f65bebbdd5246a4164c4ab37a">AKEYCODE_NUM</a>. This key alters the behavior of other keys on the numeric keypad. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa343df35e6a0ad0599e19b8ef7174909b"></a>AKEYCODE_NUMPAD_0</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '0' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5c0ec8e42917fa9ac53977db3e6aeb17"></a>AKEYCODE_NUMPAD_1</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '1' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4dfd17c2209908e1ec890e10a3211f89"></a>AKEYCODE_NUMPAD_2</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '2' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa1efe1886a4b472b999215c0e81f7386"></a>AKEYCODE_NUMPAD_3</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '3' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1fdd16681c1441b934f679b94fd0e4f8"></a>AKEYCODE_NUMPAD_4</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '4' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf5916003e7c737a8cc06e52d2ee76c3b"></a>AKEYCODE_NUMPAD_5</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '5' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa13b83389e0f5de129227af4b8d3f035d"></a>AKEYCODE_NUMPAD_6</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '6' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaed9468951ef2887c07c8095c2e7d4c93"></a>AKEYCODE_NUMPAD_7</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '7' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5f0a300566235720eb93fee9f2196642"></a>AKEYCODE_NUMPAD_8</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '8' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaad0c490e3965df546e2d5a83edf423d95"></a>AKEYCODE_NUMPAD_9</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '9' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaac108b744e8f93af69158d146425236c"></a>AKEYCODE_NUMPAD_DIVIDE</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '/' key (for division). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa47ce00b838e7ee0a34066dc2595ac735"></a>AKEYCODE_NUMPAD_MULTIPLY</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '*' key (for multiplication). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa2bee314dbbea0a349eb301d10256bbe"></a>AKEYCODE_NUMPAD_SUBTRACT</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '-' key (for subtraction). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa9d2fefa9a3f6037f48b247e66dd28c35"></a>AKEYCODE_NUMPAD_ADD</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '+' key (for addition). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6aab6b5914e120b43b3a1a8269e9cee1"></a>AKEYCODE_NUMPAD_DOT</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '.' key (for decimals or digit grouping). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa900e3bb0bc4ff70ba786f18ff4db0bd1"></a>AKEYCODE_NUMPAD_COMMA</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad ',' key (for decimals or digit grouping). </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa79432be5f7a44e99ddc3721fd9fd212e"></a>AKEYCODE_NUMPAD_ENTER</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad Enter key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa73c1007a59641499ee5e1508e747c5ed"></a>AKEYCODE_NUMPAD_EQUALS</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '=' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacc903e9eb495cf6cef7c6bc825f82f54"></a>AKEYCODE_NUMPAD_LEFT_PAREN</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad '(' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7662e0f2a099239dc69f6a27c7daabf9"></a>AKEYCODE_NUMPAD_RIGHT_PAREN</em>&#160;</td><td class="fielddoc">
-<p>Numeric keypad ')' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa174a5c7c39753235109696e82870c575"></a>AKEYCODE_VOLUME_MUTE</em>&#160;</td><td class="fielddoc">
-<p>Volume Mute key. Mutes the speaker, unlike <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f6675d38f50e3556a8531839fd83f02">AKEYCODE_MUTE</a>. This key should normally be implemented as a toggle such that the first press mutes the speaker and the second press restores the original volume. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa17e76263257a5dc654a413c9dc2fd649"></a>AKEYCODE_INFO</em>&#160;</td><td class="fielddoc">
-<p>Info key. Common on TV remotes to show additional information related to what is currently being viewed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa056914fd17ae539dca44f43745d8e05c"></a>AKEYCODE_CHANNEL_UP</em>&#160;</td><td class="fielddoc">
-<p>Channel up key. On TV remotes, increments the television channel. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa18f1808c6a819e787c9a9941f78b910f"></a>AKEYCODE_CHANNEL_DOWN</em>&#160;</td><td class="fielddoc">
-<p>Channel down key. On TV remotes, decrements the television channel. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacfce9bb78ef8106dce4868f81cca4fb4"></a>AKEYCODE_ZOOM_IN</em>&#160;</td><td class="fielddoc">
-<p>Zoom in key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacf035f5234c3df4589f35a50e99e0535"></a>AKEYCODE_ZOOM_OUT</em>&#160;</td><td class="fielddoc">
-<p>Zoom out key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0776ffae512b4848e53fce762a3a5017"></a>AKEYCODE_TV</em>&#160;</td><td class="fielddoc">
-<p>TV key. On TV remotes, switches to viewing live TV. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaabe7531c40ff4a31614ff6fd61802ebe8"></a>AKEYCODE_WINDOW</em>&#160;</td><td class="fielddoc">
-<p>Window key. On TV remotes, toggles picture-in-picture mode or other windowing functions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf33a5fa1f163245360aeed89d64b0233"></a>AKEYCODE_GUIDE</em>&#160;</td><td class="fielddoc">
-<p>Guide key. On TV remotes, shows a programming guide. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacf2f03b925a02ba6de9fd98737546a60"></a>AKEYCODE_DVR</em>&#160;</td><td class="fielddoc">
-<p>DVR key. On some TV remotes, switches to a DVR mode for recorded shows. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa03ce46d177e020690aa9d26a0fa850ae"></a>AKEYCODE_BOOKMARK</em>&#160;</td><td class="fielddoc">
-<p>Bookmark key. On some TV remotes, bookmarks content or web pages. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa81ba8d5343362b841b8a62b8679ff994"></a>AKEYCODE_CAPTIONS</em>&#160;</td><td class="fielddoc">
-<p>Toggle captions key. Switches the mode for closed-captioning text, for example during television shows. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa2bbd457230c3028df6b91d5bdda9159"></a>AKEYCODE_SETTINGS</em>&#160;</td><td class="fielddoc">
-<p>Settings key. Starts the system settings activity. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaafda3b0ea1b158831fc443bf4911a3930"></a>AKEYCODE_TV_POWER</em>&#160;</td><td class="fielddoc">
-<p>TV power key. On TV remotes, toggles the power on a television screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa1750b29e396bd1fd237ed4aadacc8f5"></a>AKEYCODE_TV_INPUT</em>&#160;</td><td class="fielddoc">
-<p>TV input key. On TV remotes, switches the input on a television screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab28aea3a51b11c9f227ce8cd5ff55a3d"></a>AKEYCODE_STB_POWER</em>&#160;</td><td class="fielddoc">
-<p>Set-top-box power key. On TV remotes, toggles the power on an external Set-top-box. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa988b0372359b2bca7390878fdba9e1b5"></a>AKEYCODE_STB_INPUT</em>&#160;</td><td class="fielddoc">
-<p>Set-top-box input key. On TV remotes, switches the input mode on an external Set-top-box. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa479d36f9814bd00c8986a252664b938b"></a>AKEYCODE_AVR_POWER</em>&#160;</td><td class="fielddoc">
-<p>A/V Receiver power key. On TV remotes, toggles the power on an external A/V Receiver. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa57d42dbd8ea4219f76fb116f234e6504"></a>AKEYCODE_AVR_INPUT</em>&#160;</td><td class="fielddoc">
-<p>A/V Receiver input key. On TV remotes, switches the input mode on an external A/V Receiver. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa2d9e3e82e69955f649b586f4518e074c"></a>AKEYCODE_PROG_RED</em>&#160;</td><td class="fielddoc">
-<p>Red "programmable" key. On TV remotes, acts as a contextual/programmable key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaad50c1e2136e47843a8dabca929f8ead1"></a>AKEYCODE_PROG_GREEN</em>&#160;</td><td class="fielddoc">
-<p>Green "programmable" key. On TV remotes, actsas a contextual/programmable key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaafa813640412bd41a181f0ec3a33dddc4"></a>AKEYCODE_PROG_YELLOW</em>&#160;</td><td class="fielddoc">
-<p>Yellow "programmable" key. On TV remotes, acts as a contextual/programmable key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5e82219fdb937fee5a22426c607dd4e0"></a>AKEYCODE_PROG_BLUE</em>&#160;</td><td class="fielddoc">
-<p>Blue "programmable" key. On TV remotes, acts as a contextual/programmable key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa53a59a262d6d523bdc2bd30a1e427bad"></a>AKEYCODE_APP_SWITCH</em>&#160;</td><td class="fielddoc">
-<p>App switch key. Should bring up the application switcher dialog. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa28c72c33ab93d83539d0790b7e48336a"></a>AKEYCODE_BUTTON_1</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #1. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab8089673fea303c7a299eefd2c327cc3"></a>AKEYCODE_BUTTON_2</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #2. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa706a5ff492c80b4653e6fe0dcd278ca1"></a>AKEYCODE_BUTTON_3</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #3. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa73c425a063bf6976e1ff8ae9f3cfcbe6"></a>AKEYCODE_BUTTON_4</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #4. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa47149f963528ec7abe55066abfb7caf5"></a>AKEYCODE_BUTTON_5</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #5. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa55057c8cda53a4c539d02ab1a93ca58b"></a>AKEYCODE_BUTTON_6</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #6. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac09e0c0cbbf6449bf106e4199600db35"></a>AKEYCODE_BUTTON_7</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #7. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaee64b3e0f30ed09e3c9f01b6c8877c3f"></a>AKEYCODE_BUTTON_8</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #8. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaac8e54092c8be5dc0e114ec35f40e00dc"></a>AKEYCODE_BUTTON_9</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #9. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab7e6f8621909f3461032c33f9c8acaa7"></a>AKEYCODE_BUTTON_10</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #10. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab413971c698b6e25d3955667c0142ac1"></a>AKEYCODE_BUTTON_11</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #11. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaafe4ee1e5446dd12bbb579b412048e79e"></a>AKEYCODE_BUTTON_12</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #12. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaabde2ed26594b89d5769eef9f0d1fe6f"></a>AKEYCODE_BUTTON_13</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #13. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa1f08dfd2c30ddedf1d2983680e89041b"></a>AKEYCODE_BUTTON_14</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #14. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7d8d0fb1a610fdb4e53f0fb675b7d7d0"></a>AKEYCODE_BUTTON_15</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #15. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa224370cba99bda2db6a1c82fd2f7fa39"></a>AKEYCODE_BUTTON_16</em>&#160;</td><td class="fielddoc">
-<p>Generic Game Pad Button #16. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7b8e87b47c17c5f1e97fcb56faaa26ff"></a>AKEYCODE_LANGUAGE_SWITCH</em>&#160;</td><td class="fielddoc">
-<p>Language Switch key. Toggles the current input language such as switching between English and Japanese on a QWERTY keyboard. On some devices, the same function may be performed by pressing Shift+Spacebar. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa380279768c5c50d92bef2a88394f967f"></a>AKEYCODE_MANNER_MODE</em>&#160;</td><td class="fielddoc">
-<p>Manner Mode key. Toggles silent or vibrate mode on and off to make the device behave more politely in certain settings such as on a crowded train. On some devices, the key may only operate when long-pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa68d314a5ec06701205cd0097c5c7145c"></a>AKEYCODE_3D_MODE</em>&#160;</td><td class="fielddoc">
-<p>3D Mode key. Toggles the display between 2D and 3D mode. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0aa2cfca11b7cabf82341a9dbec83f10"></a>AKEYCODE_CONTACTS</em>&#160;</td><td class="fielddoc">
-<p>Contacts special function key. Used to launch an address book application. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa114be17d1853c77a7406c024d9e4f076"></a>AKEYCODE_CALENDAR</em>&#160;</td><td class="fielddoc">
-<p>Calendar special function key. Used to launch a calendar application. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa14508751d70a0404b194d4b6df83ec72"></a>AKEYCODE_MUSIC</em>&#160;</td><td class="fielddoc">
-<p>Music special function key. Used to launch a music player application. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa293523c40bb9f1d793cd0b984f636573"></a>AKEYCODE_CALCULATOR</em>&#160;</td><td class="fielddoc">
-<p>Calculator special function key. Used to launch a calculator application. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf782be8df9a8ca5dc86c9bfeabac6f22"></a>AKEYCODE_ZENKAKU_HANKAKU</em>&#160;</td><td class="fielddoc">
-<p>Japanese full-width / half-width key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaadd69273b99eb0b848d98b2d6b3ad3234"></a>AKEYCODE_EISU</em>&#160;</td><td class="fielddoc">
-<p>Japanese alphanumeric key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7321e5c6b3cbab142bd16957653b2ac7"></a>AKEYCODE_MUHENKAN</em>&#160;</td><td class="fielddoc">
-<p>Japanese non-conversion key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab0686dd37c57d833d1158b7f1d85ee02"></a>AKEYCODE_HENKAN</em>&#160;</td><td class="fielddoc">
-<p>Japanese conversion key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa3be7db22b3c8aa046a46631e44863c28"></a>AKEYCODE_KATAKANA_HIRAGANA</em>&#160;</td><td class="fielddoc">
-<p>Japanese katakana / hiragana key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5ee19d21912056b902e283efa2d9d14b"></a>AKEYCODE_YEN</em>&#160;</td><td class="fielddoc">
-<p>Japanese Yen key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaae8b0af04dac5ea56fd55e577fd9e6be4"></a>AKEYCODE_RO</em>&#160;</td><td class="fielddoc">
-<p>Japanese Ro key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa62d090ae5c95a04dacdff79817dad531"></a>AKEYCODE_KANA</em>&#160;</td><td class="fielddoc">
-<p>Japanese kana key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7d3f036adb654c7752890a283ecbf838"></a>AKEYCODE_ASSIST</em>&#160;</td><td class="fielddoc">
-<p>Assist key. Launches the global assist activity. Not delivered to applications. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7cf1bf3528b6d8a0e86998287fe00650"></a>AKEYCODE_BRIGHTNESS_DOWN</em>&#160;</td><td class="fielddoc">
-<p>Brightness Down key. Adjusts the screen brightness down. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa0af6ec416c09d160e364466faa955c36"></a>AKEYCODE_BRIGHTNESS_UP</em>&#160;</td><td class="fielddoc">
-<p>Brightness Up key. Adjusts the screen brightness up. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa3cdb53cdf8c576e272502da06daa52e1"></a>AKEYCODE_MEDIA_AUDIO_TRACK</em>&#160;</td><td class="fielddoc">
-<p>Audio Track key. Switches the audio tracks. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaafc077e5a6b447ea060c144f6e65bd207"></a>AKEYCODE_SLEEP</em>&#160;</td><td class="fielddoc">
-<p>Sleep key. Puts the device to sleep. Behaves somewhat like <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6">AKEYCODE_POWER</a> but it has no effect if the device is already asleep. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa903c5152d26b3011ae521afa06759429"></a>AKEYCODE_WAKEUP</em>&#160;</td><td class="fielddoc">
-<p>Wakeup key. Wakes up the device. Behaves somewhat like <a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6">AKEYCODE_POWER</a> but it has no effect if the device is already awake. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf0ecddd3dce52cf60c96c5d430b1f553"></a>AKEYCODE_PAIRING</em>&#160;</td><td class="fielddoc">
-<p>Pairing key. Initiates peripheral pairing mode. Useful for pairing remote control devices or game controllers, especially if no other input mode is available. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf3ddf83cb2f701911b03c3a738e2e73a"></a>AKEYCODE_MEDIA_TOP_MENU</em>&#160;</td><td class="fielddoc">
-<p>Media Top Menu key. Goes to the top of media menu. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaa22858c3c30d596ad60f355f75df86e1"></a>AKEYCODE_11</em>&#160;</td><td class="fielddoc">
-<p>'11' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa781c31195e55b2dcbdd772560dc61aa5"></a>AKEYCODE_12</em>&#160;</td><td class="fielddoc">
-<p>'12' key. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa187963dd6f74b96f132f23e01dea35e9"></a>AKEYCODE_LAST_CHANNEL</em>&#160;</td><td class="fielddoc">
-<p>Last Channel key. Goes to the last viewed channel. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa954c2251b2cb53f47637802cb66baf06"></a>AKEYCODE_TV_DATA_SERVICE</em>&#160;</td><td class="fielddoc">
-<p>TV data service key. Displays data services like weather, sports. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa95898663b7f74c93d0b860a43528c744"></a>AKEYCODE_VOICE_ASSIST</em>&#160;</td><td class="fielddoc">
-<p>Voice Assist key. Launches the global voice assist activity. Not delivered to applications. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa93dd3fd752701af5a5491e01cc15db72"></a>AKEYCODE_TV_RADIO_SERVICE</em>&#160;</td><td class="fielddoc">
-<p>Radio key. Toggles TV service / Radio service. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa7d3d7b89756df37f01d6d0f13beff1db"></a>AKEYCODE_TV_TELETEXT</em>&#160;</td><td class="fielddoc">
-<p>Teletext key. Displays Teletext service. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa630a08e07a3b4c6bcac9a1a72d176055"></a>AKEYCODE_TV_NUMBER_ENTRY</em>&#160;</td><td class="fielddoc">
-<p>Number entry key. Initiates to enter multi-digit channel nubmber when each digit key is assigned for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC User Control Code. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa14f2b6fe8550832ef9e3f9aa53164073"></a>AKEYCODE_TV_TERRESTRIAL_ANALOG</em>&#160;</td><td class="fielddoc">
-<p>Analog Terrestrial key. Switches to analog terrestrial broadcast service. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaacad8c149251a78760a5fe4931b9cdf16"></a>AKEYCODE_TV_TERRESTRIAL_DIGITAL</em>&#160;</td><td class="fielddoc">
-<p>Digital Terrestrial key. Switches to digital terrestrial broadcast service. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa3707d4396417535a611e4548afe33936"></a>AKEYCODE_TV_SATELLITE</em>&#160;</td><td class="fielddoc">
-<p>Satellite key. Switches to digital satellite broadcast service. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa8c52e7d06525c0ee5d943d63a0fa8ea5"></a>AKEYCODE_TV_SATELLITE_BS</em>&#160;</td><td class="fielddoc">
-<p>BS key. Switches to BS digital satellite broadcasting service available in Japan. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4eea1809a9ff679ed7773332d728c6b0"></a>AKEYCODE_TV_SATELLITE_CS</em>&#160;</td><td class="fielddoc">
-<p>CS key. Switches to CS digital satellite broadcasting service available in Japan. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa17c0e68066b86610ff168c6367af36eb"></a>AKEYCODE_TV_SATELLITE_SERVICE</em>&#160;</td><td class="fielddoc">
-<p>BS/CS key. Toggles between BS and CS digital satellite services. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaec5e46a5afc57953d1772e086307aa42"></a>AKEYCODE_TV_NETWORK</em>&#160;</td><td class="fielddoc">
-<p>Toggle Network key. Toggles selecting broacast services. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaabe33a80d6d3bf889af25cbd77fdb89f9"></a>AKEYCODE_TV_ANTENNA_CABLE</em>&#160;</td><td class="fielddoc">
-<p>Antenna/Cable key. Toggles broadcast input source between antenna and cable. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6a50de965f50ab3aa42772aac0808445"></a>AKEYCODE_TV_INPUT_HDMI_1</em>&#160;</td><td class="fielddoc">
-<p>HDMI #1 key. Switches to HDMI input #1. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab7ec65c008471d771bf879ec012f5c7f"></a>AKEYCODE_TV_INPUT_HDMI_2</em>&#160;</td><td class="fielddoc">
-<p>HDMI #2 key. Switches to HDMI input #2. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa6a0f267a2696d15bf16127121b1f1c7f"></a>AKEYCODE_TV_INPUT_HDMI_3</em>&#160;</td><td class="fielddoc">
-<p>HDMI #3 key. Switches to HDMI input #3. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4437c1d8d2d33058cfa71ec7b2771ec5"></a>AKEYCODE_TV_INPUT_HDMI_4</em>&#160;</td><td class="fielddoc">
-<p>HDMI #4 key. Switches to HDMI input #4. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5c3097f14c6582958ba1d14d70115ccd"></a>AKEYCODE_TV_INPUT_COMPOSITE_1</em>&#160;</td><td class="fielddoc">
-<p>Composite #1 key. Switches to composite video input #1. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaada13cbb9d619bc610678ad66325647b9"></a>AKEYCODE_TV_INPUT_COMPOSITE_2</em>&#160;</td><td class="fielddoc">
-<p>Composite #2 key. Switches to composite video input #2. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa156e2dba81e7c73624ccf8c2ef8833ae"></a>AKEYCODE_TV_INPUT_COMPONENT_1</em>&#160;</td><td class="fielddoc">
-<p>Component #1 key. Switches to component video input #1. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa8db9b6ee1457267abea03430781bb0ec"></a>AKEYCODE_TV_INPUT_COMPONENT_2</em>&#160;</td><td class="fielddoc">
-<p>Component #2 key. Switches to component video input #2. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa149b2c8a4817075c0a41e0adf11c8e85"></a>AKEYCODE_TV_INPUT_VGA_1</em>&#160;</td><td class="fielddoc">
-<p>VGA #1 key. Switches to VGA (analog RGB) input #1. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa419f0adac43cad104cd6cf83dc5f13f6"></a>AKEYCODE_TV_AUDIO_DESCRIPTION</em>&#160;</td><td class="fielddoc">
-<p>Audio description key. Toggles audio description off / on. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaccc5900ca5dd399d5ce11dd8ca324678"></a>AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP</em>&#160;</td><td class="fielddoc">
-<p>Audio description mixing volume up key. Louden audio description volume as compared with normal audio volume. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa5fca6a9ec1ce246bf3c53d859ac9f5eb"></a>AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN</em>&#160;</td><td class="fielddoc">
-<p>Audio description mixing volume down key. Lessen audio description volume as compared with normal audio volume. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa8e79045045293070c8eb9e408f1335b4"></a>AKEYCODE_TV_ZOOM_MODE</em>&#160;</td><td class="fielddoc">
-<p>Zoom mode key. Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.) </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaa4c18feeafff3c41081073c025ee017b8"></a>AKEYCODE_TV_CONTENTS_MENU</em>&#160;</td><td class="fielddoc">
-<p>Contents menu key. Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control Code </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaadde70071f6a432f367079efa6e1a6fe"></a>AKEYCODE_TV_MEDIA_CONTEXT_MENU</em>&#160;</td><td class="fielddoc">
-<p>Media context menu key. Goes to the context menu of media contents. Corresponds to Media Context-sensitive Menu (0x11) of CEC User Control Code. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaaf0293c2a63e4d955080334bef6640840"></a>AKEYCODE_TV_TIMER_PROGRAMMING</em>&#160;</td><td class="fielddoc">
-<p>Timer programming key. Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of CEC User Control Code. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga6b7b47dd702d9e331586d485013fd1eaab062b403701292c9e2db96a1f88cc6d9"></a>AKEYCODE_HELP</em>&#160;</td><td class="fielddoc">
-<p>Help key. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gabc6126af1d45847bc59afa0aa3216b04"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Key states (may be returned by queries about the current state of a particular key code, scan code or switch). </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggabc6126af1d45847bc59afa0aa3216b04a9506627d5377c67dbc7fc58804b2cdfd"></a>AKEY_STATE_UNKNOWN</em>&#160;</td><td class="fielddoc">
-<p>The key state is unknown or the requested key itself is not supported. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc6126af1d45847bc59afa0aa3216b04afa14022f587487c24d401c87e71c8e28"></a>AKEY_STATE_UP</em>&#160;</td><td class="fielddoc">
-<p>The key is up. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc6126af1d45847bc59afa0aa3216b04a286ec0a7aff5903a982be0cd6785b62c"></a>AKEY_STATE_DOWN</em>&#160;</td><td class="fielddoc">
-<p>The key is down. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabc6126af1d45847bc59afa0aa3216b04ad09fd9fe458ca6c66ead9b9a75c56192"></a>AKEY_STATE_VIRTUAL</em>&#160;</td><td class="fielddoc">
-<p>The key is down but is a virtual key press that is being emulated by the system. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gadc29c2ff13d900c2f185ee95427fb06c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Meta key / modifer state. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06cae0a3cb26517b3f876beb37594494526d"></a>AMETA_NONE</em>&#160;</td><td class="fielddoc">
-<p>No meta keys are pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06caba44b1077427e4da1d202e0c8f772881"></a>AMETA_ALT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether one of the ALT meta keys is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca256c74b768ecee57e3218e81ae6945df"></a>AMETA_ALT_LEFT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the left ALT meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca985db074c0f44749ca86b5cc0454056a"></a>AMETA_ALT_RIGHT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the right ALT meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06caa3d5f49c3a55b653a94c798a2c93b197"></a>AMETA_SHIFT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether one of the SHIFT meta keys is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06caa01fa027cdd8951530437bcbe04c3ed7"></a>AMETA_SHIFT_LEFT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the left SHIFT meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06cac52930581c339216218a6f50c5b57aa1"></a>AMETA_SHIFT_RIGHT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the right SHIFT meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca8af1e90950a728baca807a83e50b22ea"></a>AMETA_SYM_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the SYM meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca545b31b72b0454c22c170ff534ddfdf1"></a>AMETA_FUNCTION_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the FUNCTION meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06cabe927318a2a11a46be3e9d78dbd81ef5"></a>AMETA_CTRL_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether one of the CTRL meta keys is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca752c837afd5ff0fcf75ddee7b6808be6"></a>AMETA_CTRL_LEFT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the left CTRL meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca0ab007e367ae136b873b3e6636747419"></a>AMETA_CTRL_RIGHT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the right CTRL meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca9c04e7c2ad1f0f41af60402188a29c4a"></a>AMETA_META_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether one of the META meta keys is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca6f923de8f2cd72e3ad86149c0747906f"></a>AMETA_META_LEFT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the left META meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06cafdf56d1259ae16c97161c443d7949bdf"></a>AMETA_META_RIGHT_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the right META meta key is pressed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06cafc467c98d509b0de28b298801a0c3e37"></a>AMETA_CAPS_LOCK_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the CAPS LOCK meta key is on. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06ca15d234534a6870add5594f02b7333dc6"></a>AMETA_NUM_LOCK_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the NUM LOCK meta key is on. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadc29c2ff13d900c2f185ee95427fb06cafe8dacdc6566f655a3eab73ea4a9af5a"></a>AMETA_SCROLL_LOCK_ON</em>&#160;</td><td class="fielddoc">
-<p>This mask is used to check whether the SCROLL LOCK meta key is on. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga61dadd085c1777f559549e05962b2c9e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Input event types. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga61dadd085c1777f559549e05962b2c9ea696f0d7635f7a24c17d3f1e4ccdd44ba"></a>AINPUT_EVENT_TYPE_KEY</em>&#160;</td><td class="fielddoc">
-<p>Indicates that the input event is a key event. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga61dadd085c1777f559549e05962b2c9ea2182dfda2cceb5425dcc2823b9b6b56a"></a>AINPUT_EVENT_TYPE_MOTION</em>&#160;</td><td class="fielddoc">
-<p>Indicates that the input event is a motion event. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga726ca809ffd3d67ab4b8476646f26635"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Key event actions. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635a123c3bd18fd93b53d8aedbe7597f7b49"></a>AKEY_EVENT_ACTION_DOWN</em>&#160;</td><td class="fielddoc">
-<p>The key has been pressed down. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635abf18b7c5384c5de8657a0650f8da57c3"></a>AKEY_EVENT_ACTION_UP</em>&#160;</td><td class="fielddoc">
-<p>The key has been released. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga726ca809ffd3d67ab4b8476646f26635a08e2d927e155478ee66ec46ebd845ab0"></a>AKEY_EVENT_ACTION_MULTIPLE</em>&#160;</td><td class="fielddoc">
-<p>Multiple duplicate key events have occurred in a row, or a complex string is being delivered. The repeat_count property of the key event contains the number of times the given key code should be executed. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga0411cd49bb5b71852cecd93bcbf0ca2d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Key event flags. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da6473a1afc0cc39e029c2a217bc57cdba"></a>AKEY_EVENT_FLAG_WOKE_HERE</em>&#160;</td><td class="fielddoc">
-<p>This mask is set if the device woke because of this key event. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da7dbb272c7b28be9c084df3446a629f32"></a>AKEY_EVENT_FLAG_SOFT_KEYBOARD</em>&#160;</td><td class="fielddoc">
-<p>This mask is set if the key event was generated by a software keyboard. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2dadc0a063ca412b0ea08474df422bf9b41"></a>AKEY_EVENT_FLAG_KEEP_TOUCH_MODE</em>&#160;</td><td class="fielddoc">
-<p>This mask is set if we don't want the key event to cause us to leave touch mode. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2dae1e7ec188b2404fadd94cfba89afd5d6"></a>AKEY_EVENT_FLAG_FROM_SYSTEM</em>&#160;</td><td class="fielddoc">
-<p>This mask is set if an event was known to come from a trusted part of the system. That is, the event is known to come from the user, and could not have been spoofed by a third party component. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2dab9dbcf990d1e4405e32f847fdea52013"></a>AKEY_EVENT_FLAG_EDITOR_ACTION</em>&#160;</td><td class="fielddoc">
-<p>This mask is used for compatibility, to identify enter keys that are coming from an IME whose enter key has been auto-labelled "next" or "done". This allows TextView to dispatch these as normal enter keys for old applications, but still do the appropriate action when receiving them. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da3198fad5ab75df614bb41f0f602a9e55"></a>AKEY_EVENT_FLAG_CANCELED</em>&#160;</td><td class="fielddoc">
-<p>When associated with up key events, this indicates that the key press has been canceled. Typically this is used with virtual touch screen keys, where the user can slide from the virtual key area on to the display: in that case, the application will receive a canceled up event and should not perform the action normally associated with the key. Note that for this to work, the application can not perform an action for a key until it receives an up or the long press timeout has expired. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2dad4b5eba5b14e4076c69bc7185f2804f8"></a>AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY</em>&#160;</td><td class="fielddoc">
-<p>This key event was generated by a virtual (on-screen) hard key area. Typically this is an area of the touchscreen, outside of the regular display, dedicated to "hardware" buttons. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da39f9f7bdf2e256db0e2a8a5dfbfb7185"></a>AKEY_EVENT_FLAG_LONG_PRESS</em>&#160;</td><td class="fielddoc">
-<p>This flag is set for the first key repeat that occurs after the long press timeout. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2daf09856f03f2fffee9a82cb8e508efb7a"></a>AKEY_EVENT_FLAG_CANCELED_LONG_PRESS</em>&#160;</td><td class="fielddoc">
-<p>Set when a key event has AKEY_EVENT_FLAG_CANCELED set because a long press action was executed while it was down. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da91e70ab527f27a1779f4550d457f1689"></a>AKEY_EVENT_FLAG_TRACKING</em>&#160;</td><td class="fielddoc">
-<p>Set for AKEY_EVENT_ACTION_UP when this event's key code is still being tracked from its initial down. That is, somebody requested that tracking started on the key down and a long press has not caused the tracking to be canceled. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga0411cd49bb5b71852cecd93bcbf0ca2da14f574126d2544863fa8042ddd0f48c0"></a>AKEY_EVENT_FLAG_FALLBACK</em>&#160;</td><td class="fielddoc">
-<p>Set when a key event has been synthesized to implement default behavior for an event that the application did not handle. Fallback key events are generated by unhandled trackball motions (to emulate a directional keypad) and by certain unhandled key presses that are declared in the key map (such as special function numeric keypad keys when numlock is off). </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gabed82baf7f470b522273a3e37c24c600"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Motion event actions </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600abf84a22c84d4b7228102b80f3af92a4f"></a>AMOTION_EVENT_ACTION_MASK</em>&#160;</td><td class="fielddoc">
-<p>Bit mask of the parts of the action code that are the action itself. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a51384339fbb57c0087f7f50c45d9cff3"></a>AMOTION_EVENT_ACTION_POINTER_INDEX_MASK</em>&#160;</td><td class="fielddoc">
-<p>Bits in the action code that represent a pointer index, used with AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer index where the data for the pointer going up or down can be found. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a225e61c48ba334abc1b5811db02edcf1"></a>AMOTION_EVENT_ACTION_DOWN</em>&#160;</td><td class="fielddoc">
-<p>A pressed gesture has started, the motion contains the initial starting location. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a43798b2b7a6de4616d150b2438b8419e"></a>AMOTION_EVENT_ACTION_UP</em>&#160;</td><td class="fielddoc">
-<p>A pressed gesture has finished, the motion contains the final release location as well as any intermediate points since the last down or move event. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a41c56c4e772953fce60c93bc671639a3"></a>AMOTION_EVENT_ACTION_MOVE</em>&#160;</td><td class="fielddoc">
-<p>A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and AMOTION_EVENT_ACTION_UP). The motion contains the most recent point, as well as any intermediate points since the last down or move event. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e"></a>AMOTION_EVENT_ACTION_CANCEL</em>&#160;</td><td class="fielddoc">
-<p>The current gesture has been aborted. You will not receive any more points in it. You should treat this as an up event, but not perform any action that you normally would. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517"></a>AMOTION_EVENT_ACTION_OUTSIDE</em>&#160;</td><td class="fielddoc">
-<p>A movement has happened outside of the normal bounds of the UI element. This does not provide a full gesture, but only the initial location of the movement/touch. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a1618c641fd3f49fa7483f298d05b3cd2"></a>AMOTION_EVENT_ACTION_POINTER_DOWN</em>&#160;</td><td class="fielddoc">
-<p>A non-primary pointer has gone down. The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600af2ef56aa7220eeb2073b9b028737bc1e"></a>AMOTION_EVENT_ACTION_POINTER_UP</em>&#160;</td><td class="fielddoc">
-<p>A non-primary pointer has gone up. The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a84bc9fb3c01ff7ca9ee452a510e7de60"></a>AMOTION_EVENT_ACTION_HOVER_MOVE</em>&#160;</td><td class="fielddoc">
-<p>A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE). The motion contains the most recent point, as well as any intermediate points since the last hover move event. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a45ba62b1e6fab4e84d5782d7c35ced04"></a>AMOTION_EVENT_ACTION_SCROLL</em>&#160;</td><td class="fielddoc">
-<p>The motion event contains relative vertical and/or horizontal scroll offsets. Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL and AMOTION_EVENT_AXIS_HSCROLL. The pointer may or may not be down when this event is dispatched. This action is always delivered to the winder under the pointer, which may not be the window currently touched. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600a247b2c60ad92f3130ad43c907986ffb3"></a>AMOTION_EVENT_ACTION_HOVER_ENTER</em>&#160;</td><td class="fielddoc">
-<p>The pointer is not down but has entered the boundaries of a window or view. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggabed82baf7f470b522273a3e37c24c600ac00b1eacfbea779863abf3fcf02134aa"></a>AMOTION_EVENT_ACTION_HOVER_EXIT</em>&#160;</td><td class="fielddoc">
-<p>The pointer is not down but has exited the boundaries of a window or view. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gab04a0655cd1e3bcac5e8f48c18df1a57"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Motion event flags. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggab04a0655cd1e3bcac5e8f48c18df1a57a200623e1e4eee7797cad30917d289d7a"></a>AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED</em>&#160;</td><td class="fielddoc">
-<p>This flag indicates that the window that received this motion event is partly or wholly obscured by another visible window above it. This flag is set to true even if the event did not directly pass through the obscured area. A security sensitive application can check this flag to identify situations in which a malicious application may have covered up part of its content for the purpose of misleading the user or hijacking touches. An appropriate response might be to drop the suspect touches or to take additional precautions to confirm the user's actual intent. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="ga9dd3fd81e51dbfde19ab861541242aa1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AInputEvent_getDeviceId </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the id for the device that an input event came from.</p>
-<p>Input events can be generated by multiple different input devices. Use the input device id to obtain information about the input device that was responsible for generating a particular event.</p>
-<p>An input device id of 0 indicates that the event didn't come from a physical device; other numbers are arbitrary and you shouldn't depend on the values. Use the provided input device query API to obtain information about input devices. </p>
-
-</div>
-</div>
-<a class="anchor" id="gac90d4b497669dbc709ec9650db4e49be"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AInputEvent_getSource </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the input event source. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga8292ae06aa8120c52d7380d228600b9c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AInputEvent_getType </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Input event accessors.</p>
-<p>Note that most functions can only be used on input events that are of a given type. Calling these functions on input events of other types will yield undefined behavior.Get the input event type. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga900711156bfb58d1a4b158da7874930f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AInputQueue_attachLooper </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>ident</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a>&#160;</td>
-          <td class="paramname"><em>callback</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&#160;</td>
-          <td class="paramname"><em>data</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Add this input queue to a looper for processing. See <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd()</a> for information on the ident, callback, and data params. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaeebe9f83392ac79b31ca40a6fd4dbeff"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AInputQueue_detachLooper </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Remove the input queue from the looper it is currently attached to. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga17e87e0f35d47d729eac31a0dfb1ac33"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AInputQueue_finishEvent </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>handled</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Report that dispatching has finished with the given event. This must be called after receiving an event with AInputQueue_get_event(). </p>
-
-</div>
-</div>
-<a class="anchor" id="ga88de12e2b39787ba7d3e4ce2ea46a48c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AInputQueue_getEvent </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> **&#160;</td>
-          <td class="paramname"><em>outEvent</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the next available event from the queue. Returns a negative value if no events are available or an error has occurred. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2b72ad6ab5ef656e8c41163aa7871c96"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AInputQueue_hasEvents </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns true if there are one or more events available in the input queue. Returns 1 if the queue has events; 0 if it does not have events; and a negative value if there is an error. </p>
-
-</div>
-</div>
-<a class="anchor" id="gadecd32e6c7aefa4a508b355550d3eaa9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AInputQueue_preDispatchEvent </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>event</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Sends the key for standard pre-dispatching &ndash; that is, possibly deliver it to the current IME to be consumed before the app. Returns 0 if it was not pre-dispatched, meaning you can process it right now. If non-zero is returned, you must abandon the current event processing and allow the event to appear again in the event queue (if it does not get consumed during pre-dispatching). </p>
-
-</div>
-</div>
-<a class="anchor" id="ga36ec0b59f98f86a7ca263ba91279896d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AKeyEvent_getAction </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the key event action. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf475b6f0860bdfca4ceea7bc46eab1a9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int64_t AKeyEvent_getDownTime </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the time of the most recent key down event, in the java.lang.System.nanoTime() time base. If this is a down event, this will be the same as eventTime. Note that when chording keys, this value is the down time of the most recently pressed key, which may not be the same physical key of this event. </p>
-
-</div>
-</div>
-<a class="anchor" id="gae3eac7d68195d1767c947ca267842696"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int64_t AKeyEvent_getEventTime </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the time this event occurred, in the java.lang.System.nanoTime() time base. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2a18e98efe0c4ccb6f39bb13c555010e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AKeyEvent_getFlags </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the key event flags. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga6b01ecd60018a5445f4917a861ca9466"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AKeyEvent_getKeyCode </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the key code of the key event. This is the physical key that was pressed, not the Unicode character. </p>
-
-</div>
-</div>
-<a class="anchor" id="gabdda62b40b22727af2fb41740bf4787b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AKeyEvent_getMetaState </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the meta key state. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga5358fe3ebbd4b5b2f88a4ad2eba6f885"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AKeyEvent_getRepeatCount </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the repeat count of the event. For both key up an key down events, this is the number of times the key has repeated with the first down starting at 0 and counting up from there. For multiple key events, this is the number of down/up pairs that have occurred. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4a0a846b7a195aeb290dfcd2250137d9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AKeyEvent_getScanCode </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>key_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the hardware key id of this key event. These values are not reliable and vary from device to device. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga73ea2093cc2343675ac43dd08bef4247"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getAction </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the combined motion event action code and pointer index. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9d364cdcebf85237f599b25861f38c21"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getAxisValue </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>axis</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the value of the request axis for the given pointer index. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1aa7ebb749416491b6f0c55ae87ddf49"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getButtonState </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the button state of all buttons that are pressed. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad44be7697e68891688cd7bcfaffec209"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int64_t AMotionEvent_getDownTime </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the time when the user originally pressed down to start a stream of position events, in the java.lang.System.nanoTime() time base. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad7e1f0caa4c27194d4a8756a18432299"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getEdgeFlags </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get a bitfield indicating which edges, if any, were touched by this motion event. For touch events, clients can use this to determine if the user's finger was touching the edge of the display. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7e13fbf3cff0700b0b620284ebdd3a33"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int64_t AMotionEvent_getEventTime </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the time when this specific event was generated, in the java.lang.System.nanoTime() time base. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2891d19197c070207098fa48adeb35af"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getFlags </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the motion event flags. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7ca740e1324f3cdb934252dce0c982d0"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalAxisValue </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>axis</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical value of the request axis for the given pointer index that occurred between this event and the previous motion event. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga523f1a760754206965b42b08d62f9346"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int64_t AMotionEvent_getHistoricalEventTime </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the time that a historical movement occurred between this event and the previous event, in the java.lang.System.nanoTime() time base. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaab9cb8fa670175ecc73c75eed4e5cd3f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalOrientation </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index that occurred between this event and the previous motion event. An angle of 0 degrees indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right). </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa8e9352ee5b043b3e1b6e2062d491010"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalPressure </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical pressure of this event for the given pointer index that occurred between this event and the previous motion event. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga5d36c2e7420001c86ae2aa1168fe6f83"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalRawX </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical raw X coordinate of this event for the given pointer index that occurred between this event and the previous motion event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga6deb0e7690a93aa53e5872c2691b69fe"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalRawY </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical raw Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga0a04bb7ec12928db7e62645e7fad3a9e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalSize </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current scaled value of the approximate size for the given pointer index that occurred between this event and the previous motion event. This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga160a5830e791e8c42ae97f51b92233d2"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalToolMajor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafe01aa7576a6d1bce750fb8482355849"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalToolMinor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf437f223668b97f19ebdbad4b9cf4483"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalTouchMajor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga126715d966e989652aa1ae5d38e0e898"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalTouchMinor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga49a8ca89ff377b5ed2355e8d7220ae07"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalX </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical X coordinate of this event for the given pointer index that occurred between this event and the previous motion event. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga30fc4e5d3ce144955859f8c97b51b73d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getHistoricalY </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>history_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the historical Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga0aef34c236db6d7a56a50bf590be7bcc"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">size_t AMotionEvent_getHistorySize </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the number of historical points in this event. These are movements that have occurred between this event and the previous event. This only applies to AMOTION_EVENT_ACTION_MOVE events &ndash; all other actions will have a size of 0. Historical samples are indexed from oldest to newest. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga5644f0d952e3dea57ba9f7ce51dff2bb"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getMetaState </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the state of any meta / modifier keys that were in effect when the event was generated. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad28422998da15b789edcba6b8bc5d615"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getOrientation </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index. An angle of 0 degrees indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right). </p>
-
-</div>
-</div>
-<a class="anchor" id="ga612e68d104adbc6d14d87510e8066bd8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">size_t AMotionEvent_getPointerCount </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the number of pointers of data contained in this event. Always &gt;= 1. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga599e21a79c706807243a8ee31b116138"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getPointerId </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the pointer identifier associated with a particular pointer data index in this event. The identifier tells you the actual pointer number associated with the data, accounting for individual pointers going up and down since the start of the current gesture. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga97fcaa6cd08c9d54b35711e482e06c8d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getPressure </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current pressure of this event for the given pointer index. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device. </p>
-
-</div>
-</div>
-<a class="anchor" id="gafe45e29ef138cc30592237ce479837f0"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getRawX </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the original raw X coordinate of this event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga5a09c3d742a93270861aa05f24257c23"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getRawY </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the original raw X coordinate of this event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9b1f3c3df46b5269f9e74d2dd70c88a8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getSize </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current scaled value of the approximate size for the given pointer index. This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events. </p>
-
-</div>
-</div>
-<a class="anchor" id="gac04099690f278a6a27191c2027b12a77"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getToolMajor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2222d459759ba4a8269647012d2718fb"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getToolMinor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2babe4e2e79952e004538f8f1878649c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AMotionEvent_getToolType </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the tool type of a pointer for the given pointer index. The tool type indicates the type of tool used to make contact such as a finger or stylus, if known. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9ac18fe19534e07d80441582f489d471"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getTouchMajor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga65f71e257b5fcb29dcbaaf59b3fcb3a7"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getTouchMinor </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga22e255a5fa52761cd92ce78af91e9757"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getX </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current X coordinate of this event for the given pointer index. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7a94ce622eb78a17737fd8bddbf86e21"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getXOffset </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the X coordinate offset. For touch events on the screen, this is the delta that was added to the raw screen coordinates to adjust for the absolute position of the containing windows and views. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga81a9be07673a01f43fd0241c7b4c254f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getXPrecision </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the precision of the X coordinates being reported. You can multiply this number with an X coordinate sample to find the actual hardware value of the X coordinate. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga113f58a37e41f2a6c3007d68418edfa6"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getY </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>pointer_index</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the current Y coordinate of this event for the given pointer index. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7f6bd2c12d912f502c245b6ced6d3704"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getYOffset </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the Y coordinate offset. For touch events on the screen, this is the delta that was added to the raw screen coordinates to adjust for the absolute position of the containing windows and views. </p>
-
-</div>
-</div>
-<a class="anchor" id="gae311e6e28bce4be905526f9ea71278ed"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float AMotionEvent_getYPrecision </td>
-          <td>(</td>
-          <td class="paramtype">const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *&#160;</td>
-          <td class="paramname"><em>motion_event</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the precision of the Y coordinates being reported. You can multiply this number with a Y coordinate sample to find the actual hardware value of the Y coordinate. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___looper.jd b/docs/html/ndk/reference/group___looper.jd
deleted file mode 100644
index bc845f8..0000000
--- a/docs/html/ndk/reference/group___looper.jd
+++ /dev/null
@@ -1,442 +0,0 @@
-page.title=Looper
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Looper</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:looper_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="looper_8h.html">looper.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gadb10521a80138b777ba1bc2ca74d4af5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a></td></tr>
-<tr class="separator:gadb10521a80138b777ba1bc2ca74d4af5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga410b184b4e48302c439e36c8ce0a7a89"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> )(int fd, int events, void *data)</td></tr>
-<tr class="separator:ga410b184b4e48302c439e36c8ce0a7a89"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gaf9bdc3014f3d54c426b6d2df10de4960"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___looper.html#ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb">ALOOPER_PREPARE_ALLOW_NON_CALLBACKS</a> = 1&lt;&lt;0
- }</td></tr>
-<tr class="separator:gaf9bdc3014f3d54c426b6d2df10de4960"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadb49720dc49f7d4e4cf9adbf2948e409"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47">ALOOPER_POLL_WAKE</a> = -1, 
-<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2">ALOOPER_POLL_CALLBACK</a> = -2, 
-<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443">ALOOPER_POLL_TIMEOUT</a> = -3, 
-<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4">ALOOPER_POLL_ERROR</a> = -4
- }</td></tr>
-<tr class="separator:gadb49720dc49f7d4e4cf9adbf2948e409"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaae05225933a42f81e7c4a9fb286596f9"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc">ALOOPER_EVENT_INPUT</a> = 1 &lt;&lt; 0, 
-<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d">ALOOPER_EVENT_OUTPUT</a> = 1 &lt;&lt; 1, 
-<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6">ALOOPER_EVENT_ERROR</a> = 1 &lt;&lt; 2, 
-<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab">ALOOPER_EVENT_HANGUP</a> = 1 &lt;&lt; 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff">ALOOPER_EVENT_INVALID</a> = 1 &lt;&lt; 4
-<br/>
- }</td></tr>
-<tr class="separator:gaae05225933a42f81e7c4a9fb286596f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga741ccd90a0eb9209c6bddf2326d89e4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga741ccd90a0eb9209c6bddf2326d89e4a">ALooper_forThread</a> ()</td></tr>
-<tr class="separator:ga741ccd90a0eb9209c6bddf2326d89e4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1a070b904dd957cc65af9eb5ef6dfa25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">ALooper_prepare</a> (int opts)</td></tr>
-<tr class="separator:ga1a070b904dd957cc65af9eb5ef6dfa25"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae1ad7ac48ab01a34bfd25840c92ff07b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">ALooper_acquire</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
-<tr class="separator:gae1ad7ac48ab01a34bfd25840c92ff07b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab723c3c2ac2c66bc695913a194073727"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gab723c3c2ac2c66bc695913a194073727">ALooper_release</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
-<tr class="separator:gab723c3c2ac2c66bc695913a194073727"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2a9044602b76fef7f47c7e11a801561c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce</a> (int timeoutMillis, int *outFd, int *outEvents, void **outData)</td></tr>
-<tr class="separator:ga2a9044602b76fef7f47c7e11a801561c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa7cd0636edc4ed227aadc585360ebefa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll</a> (int timeoutMillis, int *outFd, int *outEvents, void **outData)</td></tr>
-<tr class="separator:gaa7cd0636edc4ed227aadc585360ebefa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab2585652f8ae2e2444979194ebe32aaf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gab2585652f8ae2e2444979194ebe32aaf">ALooper_wake</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
-<tr class="separator:gab2585652f8ae2e2444979194ebe32aaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2668285bfadcf21ef4d371568a30be33"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int fd, int ident, int events, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
-<tr class="separator:ga2668285bfadcf21ef4d371568a30be33"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf7d68ed05698b251489b4f6c8e54daad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gaf7d68ed05698b251489b4f6c8e54daad">ALooper_removeFd</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int fd)</td></tr>
-<tr class="separator:gaf7d68ed05698b251489b4f6c8e54daad"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="gadb10521a80138b777ba1bc2ca74d4af5"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>ALooper</p>
-<p>A looper is the state tracking an event loop for a thread. Loopers do not define event structures or other such things; rather they are a lower-level facility to attach one or more discrete objects listening for an event. An "event" here is simply data available on a file descriptor: each attached object has an associated file descriptor, and waiting for "events" means (internally) polling on all of these file descriptors until one or more of them have data available.</p>
-<p>A thread can have only one ALooper associated with it. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga410b184b4e48302c439e36c8ce0a7a89"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef int(* ALooper_callbackFunc)(int fd, int events, void *data)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>For callback-based event loops, this is the prototype of the function that is called when a file descriptor event occurs. It is given the file descriptor it is associated with, a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT), and the data pointer that was originally supplied.</p>
-<p>Implementations should return 1 to continue receiving callbacks, or 0 to have this file descriptor and callback unregistered from the looper. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="gaf9bdc3014f3d54c426b6d2df10de4960"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Option for for <a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">ALooper_prepare()</a>. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb"></a>ALOOPER_PREPARE_ALLOW_NON_CALLBACKS</em>&#160;</td><td class="fielddoc">
-<p>This looper will accept calls to <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd()</a> that do not have a callback (that is provide NULL for the callback). In this case the caller of <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> or <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a> MUST check the return from these functions to discover when data is available on such fds and process it. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gadb49720dc49f7d4e4cf9adbf2948e409"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47"></a>ALOOPER_POLL_WAKE</em>&#160;</td><td class="fielddoc">
-<p>The poll was awoken using wake() before the timeout expired and no callbacks were executed and no other file descriptors were ready. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2"></a>ALOOPER_POLL_CALLBACK</em>&#160;</td><td class="fielddoc">
-<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>: One or more callbacks were executed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443"></a>ALOOPER_POLL_TIMEOUT</em>&#160;</td><td class="fielddoc">
-<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>: The timeout expired. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4"></a>ALOOPER_POLL_ERROR</em>&#160;</td><td class="fielddoc">
-<p>Result from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a> and <a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll()</a>: An error occurred. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaae05225933a42f81e7c4a9fb286596f9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Flags for file descriptor events that a looper can monitor.</p>
-<p>These flag bits can be combined to monitor multiple events at once. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc"></a>ALOOPER_EVENT_INPUT</em>&#160;</td><td class="fielddoc">
-<p>The file descriptor is available for read operations. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d"></a>ALOOPER_EVENT_OUTPUT</em>&#160;</td><td class="fielddoc">
-<p>The file descriptor is available for write operations. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6"></a>ALOOPER_EVENT_ERROR</em>&#160;</td><td class="fielddoc">
-<p>The file descriptor has encountered an error condition.</p>
-<p>The looper always sends notifications about errors; it is not necessary to specify this event flag in the requested event set. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab"></a>ALOOPER_EVENT_HANGUP</em>&#160;</td><td class="fielddoc">
-<p>The file descriptor was hung up. For example, indicates that the remote end of a pipe or socket was closed.</p>
-<p>The looper always sends notifications about hangups; it is not necessary to specify this event flag in the requested event set. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff"></a>ALOOPER_EVENT_INVALID</em>&#160;</td><td class="fielddoc">
-<p>The file descriptor is invalid. For example, the file descriptor was closed prematurely.</p>
-<p>The looper always sends notifications about invalid file descriptors; it is not necessary to specify this event flag in the requested event set. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="gae1ad7ac48ab01a34bfd25840c92ff07b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ALooper_acquire </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Acquire a reference on the given ALooper object. This prevents the object from being deleted until the reference is removed. This is only needed to safely hand an ALooper from one thread to another. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2668285bfadcf21ef4d371568a30be33"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ALooper_addFd </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>fd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>ident</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>events</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a>&#160;</td>
-          <td class="paramname"><em>callback</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&#160;</td>
-          <td class="paramname"><em>data</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Adds a new file descriptor to be polled by the looper. If the same file descriptor was previously added, it is replaced.</p>
-<p>"fd" is the file descriptor to be added. "ident" is an identifier for this event, which is returned from <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a>. The identifier must be &gt;= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback. "events" are the poll events to wake up on. Typically this is ALOOPER_EVENT_INPUT. "callback" is the function to call when there is an event on the file descriptor. "data" is a private data pointer to supply to the callback.</p>
-<p>There are two main uses of this function:</p>
-<p>(1) If "callback" is non-NULL, then this function will be called when there is data on the file descriptor. It should execute any events it has pending, appropriately reading from the file descriptor. The 'ident' is ignored in this case.</p>
-<p>(2) If "callback" is NULL, the 'ident' will be returned by ALooper_pollOnce when its file descriptor has data available, requiring the caller to take care of processing it.</p>
-<p>Returns 1 if the file descriptor was added or -1 if an error occurred.</p>
-<p>This method can be called on any thread. This method may block briefly if it needs to wake the poll. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga741ccd90a0eb9209c6bddf2326d89e4a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a>* ALooper_forThread </td>
-          <td>(</td>
-          <td class="paramname"></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the looper associated with the calling thread, or NULL if there is not one. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa7cd0636edc4ed227aadc585360ebefa"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ALooper_pollAll </td>
-          <td>(</td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>timeoutMillis</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&#160;</td>
-          <td class="paramname"><em>outFd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&#160;</td>
-          <td class="paramname"><em>outEvents</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void **&#160;</td>
-          <td class="paramname"><em>outData</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Like <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a>, but performs all pending callbacks until all data has been consumed or a file descriptor is available with no callback. This function will never return ALOOPER_POLL_CALLBACK. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga2a9044602b76fef7f47c7e11a801561c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ALooper_pollOnce </td>
-          <td>(</td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>timeoutMillis</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&#160;</td>
-          <td class="paramname"><em>outFd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&#160;</td>
-          <td class="paramname"><em>outEvents</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void **&#160;</td>
-          <td class="paramname"><em>outData</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Waits for events to be available, with optional timeout in milliseconds. Invokes callbacks for all file descriptors on which an event occurred.</p>
-<p>If the timeout is zero, returns immediately without blocking. If the timeout is negative, waits indefinitely until an event appears.</p>
-<p>Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before the timeout expired and no callbacks were invoked and no other file descriptors were ready.</p>
-<p>Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.</p>
-<p>Returns ALOOPER_POLL_TIMEOUT if there was no data before the given timeout expired.</p>
-<p>Returns ALOOPER_POLL_ERROR if an error occurred.</p>
-<p>Returns a value &gt;= 0 containing an identifier (the same identifier <code>ident</code> passed to <a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd()</a>) if its file descriptor has data and it has no callback function (requiring the caller here to handle it). In this (and only this) case outFd, outEvents and outData will contain the poll events and data associated with the fd, otherwise they will be set to NULL.</p>
-<p>This method does not return until it has finished invoking the appropriate callbacks for all file descriptors that were signalled. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1a070b904dd957cc65af9eb5ef6dfa25"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a>* ALooper_prepare </td>
-          <td>(</td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>opts</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Prepares a looper associated with the calling thread, and returns it. If the thread already has a looper, it is returned. Otherwise, a new one is created, associated with the thread, and returned.</p>
-<p>The opts may be ALOOPER_PREPARE_ALLOW_NON_CALLBACKS or 0. </p>
-
-</div>
-</div>
-<a class="anchor" id="gab723c3c2ac2c66bc695913a194073727"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ALooper_release </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Remove a reference that was previously acquired with <a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">ALooper_acquire()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf7d68ed05698b251489b4f6c8e54daad"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ALooper_removeFd </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>fd</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Removes a previously added file descriptor from the looper.</p>
-<p>When this method returns, it is safe to close the file descriptor since the looper will no longer have a reference to it. However, it is possible for the callback to already be running or for it to run one last time if the file descriptor was already signalled. Calling code is responsible for ensuring that this case is safely handled. For example, if the callback takes care of removing itself during its own execution either by returning 0 or by calling this method, then it can be guaranteed to not be invoked again at any later time unless registered anew.</p>
-<p>Returns 1 if the file descriptor was removed, 0 if none was previously registered or -1 if an error occurred.</p>
-<p>This method can be called on any thread. This method may block briefly if it needs to wake the poll. </p>
-
-</div>
-</div>
-<a class="anchor" id="gab2585652f8ae2e2444979194ebe32aaf"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ALooper_wake </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Wakes the poll asynchronously.</p>
-<p>This method can be called on any thread. This method returns immediately. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___native_activity.jd b/docs/html/ndk/reference/group___native_activity.jd
deleted file mode 100644
index d0b2178..0000000
--- a/docs/html/ndk/reference/group___native_activity.jd
+++ /dev/null
@@ -1,731 +0,0 @@
-page.title=Native Activity
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a> &#124;
-<a href="#var-members">Variables</a>  </div>
-  <div class="headertitle">
-<div class="title">Native Activity</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:native__activity_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="native__activity_8h.html">native_activity.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:native__window_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="native__window_8h.html">native_window.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:native__window__jni_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="native__window__jni_8h.html">native_window_jni.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:rect_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rect_8h.html">rect.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:window_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="window_8h.html">window.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html">ARect</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga8abd07923f37feb1ce724d139cc2609d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_native_activity.html">ANativeActivity</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga8abd07923f37feb1ce724d139cc2609d">ANativeActivity</a></td></tr>
-<tr class="separator:ga8abd07923f37feb1ce724d139cc2609d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga28dca784e5ee939427135c72c0151c38"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
-<a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga28dca784e5ee939427135c72c0151c38">ANativeActivityCallbacks</a></td></tr>
-<tr class="separator:ga28dca784e5ee939427135c72c0151c38"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga569a53bcac3fcedb0189b7c412ebcb22"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, void *savedState, size_t savedStateSize)</td></tr>
-<tr class="separator:ga569a53bcac3fcedb0189b7c412ebcb22"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga66956d540c2e3709e12156d195e64726"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a></td></tr>
-<tr class="separator:ga66956d540c2e3709e12156d195e64726"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad0983ca473ce36293baf5e51a14c3357"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gad0983ca473ce36293baf5e51a14c3357">ANativeWindow_Buffer</a></td></tr>
-<tr class="separator:gad0983ca473ce36293baf5e51a14c3357"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa984a498f0e146ac57c6022a323423cf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_rect.html">ARect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaa984a498f0e146ac57c6022a323423cf">ARect</a></td></tr>
-<tr class="separator:gaa984a498f0e146ac57c6022a323423cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga39fca1837c5ce7715cbf571669660c13"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9">ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT</a> = 0x0001, 
-<a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</a> = 0x0002
- }</td></tr>
-<tr class="separator:ga39fca1837c5ce7715cbf571669660c13"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf8fd5f0e57d456151c951e0f3715fc4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807">ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY</a> = 0x0001, 
-<a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f">ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS</a> = 0x0002
- }</td></tr>
-<tr class="separator:gaaf8fd5f0e57d456151c951e0f3715fc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga94798fdadfbf49a7c658ace669a1d310"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">WINDOW_FORMAT_RGBA_8888</a> = 1, 
-<a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">WINDOW_FORMAT_RGBX_8888</a> = 2, 
-<a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">WINDOW_FORMAT_RGB_565</a> = 4
- }</td></tr>
-<tr class="separator:ga94798fdadfbf49a7c658ace669a1d310"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf715e26dfffd1f8de1c18449e2770cff"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508">AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON</a> = 0x00000001, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f">AWINDOW_FLAG_DIM_BEHIND</a> = 0x00000002, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">AWINDOW_FLAG_BLUR_BEHIND</a> = 0x00000004, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> = 0x00000008, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450">AWINDOW_FLAG_NOT_TOUCHABLE</a> = 0x00000010, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a> = 0x00000020, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</a> = 0x00000040, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> = 0x00000080, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">AWINDOW_FLAG_LAYOUT_IN_SCREEN</a> = 0x00000100, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389">AWINDOW_FLAG_LAYOUT_NO_LIMITS</a> = 0x00000200, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">AWINDOW_FLAG_FULLSCREEN</a> = 0x00000400, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d">AWINDOW_FLAG_FORCE_NOT_FULLSCREEN</a> = 0x00000800, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">AWINDOW_FLAG_DITHER</a> = 0x00001000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0">AWINDOW_FLAG_SECURE</a> = 0x00002000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a">AWINDOW_FLAG_SCALED</a> = 0x00004000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326">AWINDOW_FLAG_IGNORE_CHEEK_PRESSES</a> = 0x00008000, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563">AWINDOW_FLAG_LAYOUT_INSET_DECOR</a> = 0x00010000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">AWINDOW_FLAG_ALT_FOCUSABLE_IM</a> = 0x00020000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6">AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH</a> = 0x00040000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> = 0x00080000, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824">AWINDOW_FLAG_SHOW_WALLPAPER</a> = 0x00100000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01">AWINDOW_FLAG_TURN_SCREEN_ON</a> = 0x00200000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">AWINDOW_FLAG_DISMISS_KEYGUARD</a> = 0x00400000
-<br/>
- }</td></tr>
-<tr class="separator:gaf715e26dfffd1f8de1c18449e2770cff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga4d872ae54a239704c06a0517e23cc0ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga4d872ae54a239704c06a0517e23cc0ad">ANativeActivity_finish</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:ga4d872ae54a239704c06a0517e23cc0ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec8b12decdf2b9841344e75c4c038c5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaec8b12decdf2b9841344e75c4c038c5a">ANativeActivity_setWindowFormat</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, int32_t format)</td></tr>
-<tr class="separator:gaec8b12decdf2b9841344e75c4c038c5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa1d091ca4a99b0ce570bab1c8c06f297"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaa1d091ca4a99b0ce570bab1c8c06f297">ANativeActivity_setWindowFlags</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t addFlags, uint32_t removeFlags)</td></tr>
-<tr class="separator:gaa1d091ca4a99b0ce570bab1c8c06f297"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga14eaeb6190f266369023b04d8ab9dba7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga14eaeb6190f266369023b04d8ab9dba7">ANativeActivity_showSoftInput</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t flags)</td></tr>
-<tr class="separator:ga14eaeb6190f266369023b04d8ab9dba7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf673d6efea7ce517ef46ff2551b25944"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaf673d6efea7ce517ef46ff2551b25944">ANativeActivity_hideSoftInput</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t flags)</td></tr>
-<tr class="separator:gaf673d6efea7ce517ef46ff2551b25944"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga533876b57909243b238927344a6592db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">ANativeWindow_acquire</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga533876b57909243b238927344a6592db"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae944e98865b902bd924663785d7b0258"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">ANativeWindow_release</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:gae944e98865b902bd924663785d7b0258"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga186f0040c5cb405a63d93889bb9a4ff1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga186f0040c5cb405a63d93889bb9a4ff1">ANativeWindow_getWidth</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga186f0040c5cb405a63d93889bb9a4ff1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga463ba99f6dee3edc1167a54e1ff7de15"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga463ba99f6dee3edc1167a54e1ff7de15">ANativeWindow_getHeight</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga463ba99f6dee3edc1167a54e1ff7de15"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9e3a492a8300146b30d864f0ab22bb2e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga9e3a492a8300146b30d864f0ab22bb2e">ANativeWindow_getFormat</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga9e3a492a8300146b30d864f0ab22bb2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7b0652533998d61e1a3b542485889113"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga7b0652533998d61e1a3b542485889113">ANativeWindow_setBuffersGeometry</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window, int32_t width, int32_t height, int32_t format)</td></tr>
-<tr class="separator:ga7b0652533998d61e1a3b542485889113"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0b0e3b7d442dee83e1a1b42e5b0caee6"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window, <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> *outBuffer, <a class="el" href="struct_a_rect.html">ARect</a> *inOutDirtyBounds)</td></tr>
-<tr class="separator:ga0b0e3b7d442dee83e1a1b42e5b0caee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4dc9b687ead9034fbc11bf2d90f203f9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga4dc9b687ead9034fbc11bf2d90f203f9">ANativeWindow_unlockAndPost</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga4dc9b687ead9034fbc11bf2d90f203f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga774d0a87ec496b3940fcddccbc31fd9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">ANativeWindow_fromSurface</a> (JNIEnv *env, jobject surface)</td></tr>
-<tr class="separator:ga774d0a87ec496b3940fcddccbc31fd9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
-Variables</h2></td></tr>
-<tr class="memitem:ga02791d0d490839055169f39fdc905c5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">ANativeActivity_onCreate</a></td></tr>
-<tr class="separator:ga02791d0d490839055169f39fdc905c5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="ga8abd07923f37feb1ce724d139cc2609d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_native_activity.html">ANativeActivity</a>  <a class="el" href="struct_a_native_activity.html">ANativeActivity</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>This structure defines the native side of an android.app.NativeActivity. It is created by the framework, and handed to the application's native code as it is being launched. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga569a53bcac3fcedb0189b7c412ebcb22"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void ANativeActivity_createFunc(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, void *savedState, size_t savedStateSize)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>This is the function that must be in the native code to instantiate the application's native activity. It is called with the activity instance (see above); if the code is being instantiated from a previously saved instance, the savedState will be non-NULL and point to the saved data. You must make any copy of this data you need &ndash; it will be released after you return from this function. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga28dca784e5ee939427135c72c0151c38"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>  <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>These are the callbacks the framework makes into a native application. All of these callbacks happen on the main thread of the application. By default, all callbacks are NULL; set to a pointer to your own function to have it called. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga66956d540c2e3709e12156d195e64726"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> is opaque type that provides access to a native window.</p>
-<p>A pointer can be obtained using <a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">ANativeWindow_fromSurface()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad0983ca473ce36293baf5e51a14c3357"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a>  <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> is a struct that represents a windows buffer.</p>
-<p>A pointer can be obtained using <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa984a498f0e146ac57c6022a323423cf"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_rect.html">ARect</a>  <a class="el" href="struct_a_rect.html">ARect</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="struct_a_rect.html">ARect</a> is a struct that represents a rectangular window area.</p>
-<p>It is used with <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks::onContentRectChanged</a> event callback and <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock()</a> function. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="ga39fca1837c5ce7715cbf571669660c13"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager API for documentation. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9"></a>ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT</em>&#160;</td><td class="fielddoc">
-<p>Implicit request to show the input window, not as the result of a direct request by the user. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5"></a>ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</em>&#160;</td><td class="fielddoc">
-<p>The user has forced the input method open (such as by long-pressing menu) so it should not be closed until they explicitly do so. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaaf8fd5f0e57d456151c951e0f3715fc4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager API for documentation. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807"></a>ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY</em>&#160;</td><td class="fielddoc">
-<p>The soft input window should only be hidden if it was not explicitly shown by the user. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f"></a>ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS</em>&#160;</td><td class="fielddoc">
-<p>The soft input window should normally be hidden, unless it was originally shown with <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</a>. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga94798fdadfbf49a7c658ace669a1d310"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Pixel formats that a window can use. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01"></a>WINDOW_FORMAT_RGBA_8888</em>&#160;</td><td class="fielddoc">
-<p>Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30"></a>WINDOW_FORMAT_RGBX_8888</em>&#160;</td><td class="fielddoc">
-<p>Red: 8 bits, Green: 8 bits, Blue: 8 bits, Unused: 8 bits. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259"></a>WINDOW_FORMAT_RGB_565</em>&#160;</td><td class="fielddoc">
-<p>Red: 5 bits, Green: 6 bits, Blue: 5 bits. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaf715e26dfffd1f8de1c18449e2770cff"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Window flags, as per the Java API at android.view.WindowManager.LayoutParams. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508"></a>AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON</em>&#160;</td><td class="fielddoc">
-<p>As long as this window is visible to the user, allow the lock screen to activate while the screen is on. This can be used independently, or in combination with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> and/or <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f"></a>AWINDOW_FLAG_DIM_BEHIND</em>&#160;</td><td class="fielddoc">
-<p>Everything behind this window will be dimmed. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7"></a>AWINDOW_FLAG_BLUR_BEHIND</em>&#160;</td><td class="fielddoc">
-<p>Blur everything behind this window. </p>
-<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Blurring is no longer supported. </dd></dl>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f"></a>AWINDOW_FLAG_NOT_FOCUSABLE</em>&#160;</td><td class="fielddoc">
-<p>This window won't ever get key input focus, so the user can not send key or other button events to it. Those will instead go to whatever focusable window is behind it. This flag will also enable <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a> whether or not that is explicitly set.</p>
-<p>Setting this flag also implies that the window will not need to interact with a soft input method, so it will be Z-ordered and positioned independently of any active input method (typically this means it gets Z-ordered on top of the input method, so it can use the full screen for its content and cover the input method if needed. You can use <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">AWINDOW_FLAG_ALT_FOCUSABLE_IM</a> to modify this behavior. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450"></a>AWINDOW_FLAG_NOT_TOUCHABLE</em>&#160;</td><td class="fielddoc">
-<p>this window can never receive touch events. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09"></a>AWINDOW_FLAG_NOT_TOUCH_MODAL</em>&#160;</td><td class="fielddoc">
-<p>Even when this window is focusable (its <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> is not set), allow any pointer events outside of the window to be sent to the windows behind it. Otherwise it will consume all pointer events itself, regardless of whether they are inside of the window. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773"></a>AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</em>&#160;</td><td class="fielddoc">
-<p>When set, if the device is asleep when the touch screen is pressed, you will receive this first touch event. Usually the first touch event is consumed by the system since the user can not see what they are pressing on.</p>
-<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd>This flag has no effect. </dd></dl>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8"></a>AWINDOW_FLAG_KEEP_SCREEN_ON</em>&#160;</td><td class="fielddoc">
-<p>As long as this window is visible to the user, keep the device's screen turned on and bright. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a"></a>AWINDOW_FLAG_LAYOUT_IN_SCREEN</em>&#160;</td><td class="fielddoc">
-<p>Place the window within the entire screen, ignoring decorations around the border (such as the status bar). The window must correctly position its contents to take the screen decoration into account. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389"></a>AWINDOW_FLAG_LAYOUT_NO_LIMITS</em>&#160;</td><td class="fielddoc">
-<p>allow window to extend outside of the screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71"></a>AWINDOW_FLAG_FULLSCREEN</em>&#160;</td><td class="fielddoc">
-<p>Hide all screen decorations (such as the status bar) while this window is displayed. This allows the window to use the entire display space for itself &ndash; the status bar will be hidden when an app window with this flag set is on the top layer. A fullscreen window will ignore a value of <a class="el" href="">AWINDOW_SOFT_INPUT_ADJUST_RESIZE</a>; the window will stay fullscreen and will not resize. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d"></a>AWINDOW_FLAG_FORCE_NOT_FULLSCREEN</em>&#160;</td><td class="fielddoc">
-<p>Override <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">AWINDOW_FLAG_FULLSCREEN</a> and force the screen decorations (such as the status bar) to be shown. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d"></a>AWINDOW_FLAG_DITHER</em>&#160;</td><td class="fielddoc">
-<p>Turn on dithering when compositing this window to the screen. </p>
-<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>This flag is no longer used. </dd></dl>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0"></a>AWINDOW_FLAG_SECURE</em>&#160;</td><td class="fielddoc">
-<p>Treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a"></a>AWINDOW_FLAG_SCALED</em>&#160;</td><td class="fielddoc">
-<p>A special mode where the layout parameters are used to perform scaling of the surface when it is composited to the screen. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326"></a>AWINDOW_FLAG_IGNORE_CHEEK_PRESSES</em>&#160;</td><td class="fielddoc">
-<p>Intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e">AMOTION_EVENT_ACTION_CANCEL</a> to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563"></a>AWINDOW_FLAG_LAYOUT_INSET_DECOR</em>&#160;</td><td class="fielddoc">
-<p>A special option only for use in combination with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">AWINDOW_FLAG_LAYOUT_IN_SCREEN</a>. When requesting layout in the screen your window may appear on top of or behind screen decorations such as the status bar. By also including this flag, the window manager will report the inset rectangle needed to ensure your content is not covered by screen decorations. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659"></a>AWINDOW_FLAG_ALT_FOCUSABLE_IM</em>&#160;</td><td class="fielddoc">
-<p>Invert the state of <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> with respect to how this window interacts with the current method. That is, if FLAG_NOT_FOCUSABLE is set and this flag is set, then the window will behave as if it needs to interact with the input method and thus be placed behind/away from it; if <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> is not set and this flag is set, then the window will behave as if it doesn't need to interact with the input method and can be placed to use more space and cover the input method. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6"></a>AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH</em>&#160;</td><td class="fielddoc">
-<p>If you have set <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a>, you can set this flag to receive a single special MotionEvent with the action <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">AMOTION_EVENT_ACTION_OUTSIDE</a> for touches that occur outside of your window. Note that you will not receive the full down/move/up gesture, only the location of the first down as an <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">AMOTION_EVENT_ACTION_OUTSIDE</a>. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b"></a>AWINDOW_FLAG_SHOW_WHEN_LOCKED</em>&#160;</td><td class="fielddoc">
-<p>Special flag to let windows be shown when the screen is locked. This will let application windows take precedence over key guard or any other lock screens. Can be used with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> to turn screen on and display windows directly before showing the key guard window. Can be used with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">AWINDOW_FLAG_DISMISS_KEYGUARD</a> to automatically fully dismisss non-secure keyguards. This flag only applies to the top-most full-screen window. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824"></a>AWINDOW_FLAG_SHOW_WALLPAPER</em>&#160;</td><td class="fielddoc">
-<p>Ask that the system wallpaper be shown behind your window. The window surface must be translucent to be able to actually see the wallpaper behind it; this flag just ensures that the wallpaper surface will be there if this window actually has translucent regions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01"></a>AWINDOW_FLAG_TURN_SCREEN_ON</em>&#160;</td><td class="fielddoc">
-<p>When set as a window is being added or made visible, once the window has been shown then the system will poke the power manager's user activity (as if the user had woken up the device) to turn the screen on. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a"></a>AWINDOW_FLAG_DISMISS_KEYGUARD</em>&#160;</td><td class="fielddoc">
-<p>When set the window will cause the keyguard to be dismissed, only if it is not a secure lock keyguard. Because such a keyguard is not needed for security, it will never re-appear if the user navigates to another window (in contrast to <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a>, which will only temporarily hide both secure and non-secure keyguards but ensure they reappear when the user moves to another UI that doesn't hide them). If the keyguard is currently active and is secure (requires an unlock pattern) than the user will still need to confirm it before seeing this window, unless <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> has also been set. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="ga4d872ae54a239704c06a0517e23cc0ad"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeActivity_finish </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *&#160;</td>
-          <td class="paramname"><em>activity</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Finish the given activity. Its finish() method will be called, causing it to be stopped and destroyed. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf673d6efea7ce517ef46ff2551b25944"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeActivity_hideSoftInput </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *&#160;</td>
-          <td class="paramname"><em>activity</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&#160;</td>
-          <td class="paramname"><em>flags</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput() for the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa1d091ca4a99b0ce570bab1c8c06f297"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeActivity_setWindowFlags </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *&#160;</td>
-          <td class="paramname"><em>activity</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&#160;</td>
-          <td class="paramname"><em>addFlags</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&#160;</td>
-          <td class="paramname"><em>removeFlags</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Change the window flags of the given activity. Calls getWindow().setFlags() of the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. See <a class="el" href="window_8h.html">window.h</a> for flag constants. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaec8b12decdf2b9841344e75c4c038c5a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeActivity_setWindowFormat </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *&#160;</td>
-          <td class="paramname"><em>activity</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>format</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Change the window format of the given activity. Calls getWindow().setFormat() of the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga14eaeb6190f266369023b04d8ab9dba7"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeActivity_showSoftInput </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *&#160;</td>
-          <td class="paramname"><em>activity</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&#160;</td>
-          <td class="paramname"><em>flags</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Show the IME while in the given activity. Calls InputMethodManager.showSoftInput() for the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga533876b57909243b238927344a6592db"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeWindow_acquire </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Acquire a reference on the given ANativeWindow object. This prevents the object from being deleted until the reference is removed. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga774d0a87ec496b3940fcddccbc31fd9d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a>* ANativeWindow_fromSurface </td>
-          <td>(</td>
-          <td class="paramtype">JNIEnv *&#160;</td>
-          <td class="paramname"><em>env</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">jobject&#160;</td>
-          <td class="paramname"><em>surface</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the ANativeWindow associated with a Java Surface object, for interacting with it through native code. This acquires a reference on the ANativeWindow that is returned; be sure to use <a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">ANativeWindow_release()</a> when done with it so that it doesn't leak. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga9e3a492a8300146b30d864f0ab22bb2e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t ANativeWindow_getFormat </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current pixel format of the window surface. Returns a negative value on error. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga463ba99f6dee3edc1167a54e1ff7de15"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t ANativeWindow_getHeight </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current height in pixels of the window surface. Returns a negative value on error. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga186f0040c5cb405a63d93889bb9a4ff1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t ANativeWindow_getWidth </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return the current width in pixels of the window surface. Returns a negative value on error. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga0b0e3b7d442dee83e1a1b42e5b0caee6"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t ANativeWindow_lock </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> *&#160;</td>
-          <td class="paramname"><em>outBuffer</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="struct_a_rect.html">ARect</a> *&#160;</td>
-          <td class="paramname"><em>inOutDirtyBounds</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Lock the window's next drawing surface for writing. inOutDirtyBounds is used as an in/out parameter, upon entering the function, it contains the dirty region, that is, the region the caller intends to redraw. When the function returns, inOutDirtyBounds is updated with the actual area the caller needs to redraw &ndash; this region is often extended by ANativeWindow_lock. </p>
-
-</div>
-</div>
-<a class="anchor" id="gae944e98865b902bd924663785d7b0258"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void ANativeWindow_release </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Remove a reference that was previously acquired with <a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">ANativeWindow_acquire()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7b0652533998d61e1a3b542485889113"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t ANativeWindow_setBuffersGeometry </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>width</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>height</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>format</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Change the format and size of the window buffers.</p>
-<p>The width and height control the number of pixels in the buffers, not the dimensions of the window on screen. If these are different than the window's physical size, then it buffer will be scaled to match that size when compositing it to the screen.</p>
-<p>For all of these parameters, if 0 is supplied then the window's base value will come back in force.</p>
-<p>width and height must be either both zero or both non-zero. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4dc9b687ead9034fbc11bf2d90f203f9"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t ANativeWindow_unlockAndPost </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td>
-          <td class="paramname"><em>window</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Unlock the window's drawing surface after previously locking it, posting the new buffer to the display. </p>
-
-</div>
-</div>
-<h2 class="groupheader">Variable Documentation</h2>
-<a class="anchor" id="ga02791d0d490839055169f39fdc905c5e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a> ANativeActivity_onCreate</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The name of the function that NativeInstance looks for when launching its native code. This is the default function that is used, you can specify "android.app.func_name" string meta-data in your manifest to use a different function. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___sensor.jd b/docs/html/ndk/reference/group___sensor.jd
deleted file mode 100644
index 41a0aec..0000000
--- a/docs/html/ndk/reference/group___sensor.jd
+++ /dev/null
@@ -1,925 +0,0 @@
-page.title=Sensor
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#define-members">Macros</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Sensor</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:sensor_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sensor_8h.html">sensor.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
-Macros</h2></td></tr>
-<tr class="memitem:ga5129cb9e4091fc3474e246d5f950e52b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga5129cb9e4091fc3474e246d5f950e52b">ASENSOR_STANDARD_GRAVITY</a>&#160;&#160;&#160;(9.80665f)</td></tr>
-<tr class="separator:ga5129cb9e4091fc3474e246d5f950e52b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf8b57b13c6432bc6136aac0ad3813d63"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf8b57b13c6432bc6136aac0ad3813d63">ASENSOR_MAGNETIC_FIELD_EARTH_MAX</a>&#160;&#160;&#160;(60.0f)</td></tr>
-<tr class="separator:gaf8b57b13c6432bc6136aac0ad3813d63"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4423a712e27b6d5a57d138796892886d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga4423a712e27b6d5a57d138796892886d">ASENSOR_MAGNETIC_FIELD_EARTH_MIN</a>&#160;&#160;&#160;(30.0f)</td></tr>
-<tr class="separator:ga4423a712e27b6d5a57d138796892886d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga207e807f9e18271f6a763e57232b409f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga207e807f9e18271f6a763e57232b409f">ASensorVector</a></td></tr>
-<tr class="separator:ga207e807f9e18271f6a763e57232b409f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0378daec23b2d8a70438ef7c3912475f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga0378daec23b2d8a70438ef7c3912475f">AMetaDataEvent</a></td></tr>
-<tr class="separator:ga0378daec23b2d8a70438ef7c3912475f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga24acc545b908dd24cadc44c5e0760b3b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga24acc545b908dd24cadc44c5e0760b3b">AUncalibratedEvent</a></td></tr>
-<tr class="separator:ga24acc545b908dd24cadc44c5e0760b3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae85b6eac76abe74e6e53d78bb3a4858c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gae85b6eac76abe74e6e53d78bb3a4858c">AHeartRateEvent</a></td></tr>
-<tr class="separator:gae85b6eac76abe74e6e53d78bb3a4858c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6bb167c45f0ef0a94d8f178d227e781f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga6bb167c45f0ef0a94d8f178d227e781f">ASensorEvent</a></td></tr>
-<tr class="separator:ga6bb167c45f0ef0a94d8f178d227e781f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaef620baab9b276ab8f914ae77babc349"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a></td></tr>
-<tr class="separator:gaef620baab9b276ab8f914ae77babc349"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa9448106d6d463f4cc5dded7c914e7ae"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a></td></tr>
-<tr class="separator:gaa9448106d6d463f4cc5dded7c914e7ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga93b28b7ce5e9b6d2ebc5b574cd5f4710"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a></td></tr>
-<tr class="separator:ga93b28b7ce5e9b6d2ebc5b574cd5f4710"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafec8dd682458c750a5f0f913a0f162ce"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a></td></tr>
-<tr class="separator:gafec8dd682458c750a5f0f913a0f162ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga26ff51817e8b320a631b3bf4ed378d58"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a></td></tr>
-<tr class="separator:ga26ff51817e8b320a631b3bf4ed378d58"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga7ff5f2dff38e7639981794c43dc9167b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">ASENSOR_TYPE_ACCELEROMETER</a> = 1, 
-<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">ASENSOR_TYPE_MAGNETIC_FIELD</a> = 2, 
-<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">ASENSOR_TYPE_GYROSCOPE</a> = 4, 
-<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">ASENSOR_TYPE_LIGHT</a> = 5, 
-<br/>
-&#160;&#160;<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">ASENSOR_TYPE_PROXIMITY</a> = 8
-<br/>
- }</td></tr>
-<tr class="separator:ga7ff5f2dff38e7639981794c43dc9167b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaabfcbcb5ac86a1edac4035264bc7d2b8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d">ASENSOR_STATUS_NO_CONTACT</a> = -1, 
-<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e">ASENSOR_STATUS_UNRELIABLE</a> = 0, 
-<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0">ASENSOR_STATUS_ACCURACY_LOW</a> = 1, 
-<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d">ASENSOR_STATUS_ACCURACY_MEDIUM</a> = 2, 
-<br/>
-&#160;&#160;<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13">ASENSOR_STATUS_ACCURACY_HIGH</a> = 3
-<br/>
- }</td></tr>
-<tr class="separator:gaabfcbcb5ac86a1edac4035264bc7d2b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5d76b81b0ad4c19007a781d4edb8181f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c">AREPORTING_MODE_CONTINUOUS</a> = 0, 
-<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5">AREPORTING_MODE_ON_CHANGE</a> = 1, 
-<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb">AREPORTING_MODE_ONE_SHOT</a> = 2, 
-<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7">AREPORTING_MODE_SPECIAL_TRIGGER</a> = 3
- }</td></tr>
-<tr class="separator:ga5d76b81b0ad4c19007a781d4edb8181f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:gaa438fdaf34783a89d139f0a56d2692cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">ASensorManager_getInstance</a> ()</td></tr>
-<tr class="separator:gaa438fdaf34783a89d139f0a56d2692cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga645be938627498ab2b60d94c562204bd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> *list)</td></tr>
-<tr class="separator:ga645be938627498ab2b60d94c562204bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf4880d87e01f5e2d4a9b8403e4047445"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, int type)</td></tr>
-<tr class="separator:gaf4880d87e01f5e2d4a9b8403e4047445"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4313457c0e82f4afa77ef13860629633"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, int type, bool wakeUp)</td></tr>
-<tr class="separator:ga4313457c0e82f4afa77ef13860629633"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac46f8b28bcc7a846dea9d841cab0a67b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int ident, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
-<tr class="separator:gac46f8b28bcc7a846dea9d841cab0a67b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf35624037785cdea1e7fe9e0a73fc5e1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">ASensorManager_destroyEventQueue</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue)</td></tr>
-<tr class="separator:gaf35624037785cdea1e7fe9e0a73fc5e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga48a8379cf9de9b09a71a00f8a3699499"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">ASensorEventQueue_enableSensor</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga48a8379cf9de9b09a71a00f8a3699499"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga03852b813887ec236a34c4aef0df4b68"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">ASensorEventQueue_disableSensor</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga03852b813887ec236a34c4aef0df4b68"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa6e89b6d69dc3e07f2d7e72e81ec7937"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">ASensorEventQueue_setEventRate</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor, int32_t usec)</td></tr>
-<tr class="separator:gaa6e89b6d69dc3e07f2d7e72e81ec7937"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga79c9d6264fe81d4e30800f826db72913"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">ASensorEventQueue_hasEvents</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue)</td></tr>
-<tr class="separator:ga79c9d6264fe81d4e30800f826db72913"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab3d4354fd0d3ceb5fa97c129b024a18a"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">ASensorEventQueue_getEvents</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> *events, size_t count)</td></tr>
-<tr class="separator:gab3d4354fd0d3ceb5fa97c129b024a18a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga52f4b22990c70df0784b9ccf23314fae"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">ASensor_getName</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga52f4b22990c70df0784b9ccf23314fae"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafaf467fc71f7adba537a90f166e3320d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">ASensor_getVendor</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gafaf467fc71f7adba537a90f166e3320d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga93962747ab3c7d2b609f97af26fc0230"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">ASensor_getType</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga93962747ab3c7d2b609f97af26fc0230"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga3da2930dd866cf1f76da6bc39e578a46"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">ASensor_getResolution</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga3da2930dd866cf1f76da6bc39e578a46"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gacb6e021757c07344b58742611eaf68e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gacb6e021757c07344b58742611eaf68e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae9969580eda319926a677a6937c7afb1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">ASensor_getFifoMaxEventCount</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gae9969580eda319926a677a6937c7afb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec7084c6a9d4d85f87c95a70511c5f53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">ASensor_getFifoReservedEventCount</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gaec7084c6a9d4d85f87c95a70511c5f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabee3eb65390fc75a639c59d653af3591"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">ASensor_getStringType</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gabee3eb65390fc75a639c59d653af3591"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga99e56b84cf421788c27998da8eab7e39"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">ASensor_getReportingMode</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga99e56b84cf421788c27998da8eab7e39"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0ff4118e400bedac62be6b79e9e0f924"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">ASensor_isWakeUpSensor</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga0ff4118e400bedac62be6b79e9e0f924"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Macro Definition Documentation</h2>
-<a class="anchor" id="gaf8b57b13c6432bc6136aac0ad3813d63"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX&#160;&#160;&#160;(60.0f)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Maximum magnetic field on Earth's surface in uT </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4423a712e27b6d5a57d138796892886d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN&#160;&#160;&#160;(30.0f)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Minimum magnetic field on Earth's surface in uT </p>
-
-</div>
-</div>
-<a class="anchor" id="ga5129cb9e4091fc3474e246d5f950e52b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">#define ASENSOR_STANDARD_GRAVITY&#160;&#160;&#160;(9.80665f)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Earth's gravity in m/s^2 </p>
-
-</div>
-</div>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="gae85b6eac76abe74e6e53d78bb3a4858c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a>  <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ga0378daec23b2d8a70438ef7c3912475f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a>  <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ga93b28b7ce5e9b6d2ebc5b574cd5f4710"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> is an opaque type that provides information about an hardware sensors.</p>
-<p>A <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> pointer can be obtained using <a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor()</a>, <a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx()</a> or from a <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a>.</p>
-<p>This file provides a set of functions to access properties of a <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>:</p>
-<ul>
-<li><a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">ASensor_getName()</a></li>
-<li><a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">ASensor_getVendor()</a></li>
-<li><a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">ASensor_getType()</a></li>
-<li><a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">ASensor_getResolution()</a></li>
-<li><a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay()</a></li>
-<li><a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">ASensor_getFifoMaxEventCount()</a></li>
-<li><a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">ASensor_getFifoReservedEventCount()</a></li>
-<li><a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">ASensor_getStringType()</a></li>
-<li><a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">ASensor_getReportingMode()</a></li>
-<li><a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">ASensor_isWakeUpSensor()</a> </li>
-</ul>
-
-</div>
-</div>
-<a class="anchor" id="ga6bb167c45f0ef0a94d8f178d227e781f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a>  <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="gaa9448106d6d463f4cc5dded7c914e7ae"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> is an opaque type that provides access to <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> from hardware sensors.</p>
-<p>A new <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> can be obtained using <a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue()</a>.</p>
-<p>This file provides a set of functions to enable and disable sensors, check and get events, and set event rates on a <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a>.</p>
-<ul>
-<li><a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">ASensorEventQueue_enableSensor()</a></li>
-<li><a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">ASensorEventQueue_disableSensor()</a></li>
-<li><a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">ASensorEventQueue_hasEvents()</a></li>
-<li><a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">ASensorEventQueue_getEvents()</a></li>
-<li><a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">ASensorEventQueue_setEventRate()</a> </li>
-</ul>
-
-</div>
-</div>
-<a class="anchor" id="ga26ff51817e8b320a631b3bf4ed378d58"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> const* <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> is an array of reference to <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>.</p>
-<p>A <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> can be initialized using <a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaef620baab9b276ab8f914ae77babc349"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> is an opaque type to manage sensors and events queues.</p>
-<p><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> is a singleton that can be obtained using <a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">ASensorManager_getInstance()</a>.</p>
-<p>This file provides a set of functions that uses <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> to access and list hardware sensors, and create and destroy event queues:</p>
-<ul>
-<li><a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList()</a></li>
-<li><a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor()</a></li>
-<li><a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx()</a></li>
-<li><a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue()</a></li>
-<li><a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">ASensorManager_destroyEventQueue()</a> </li>
-</ul>
-
-</div>
-</div>
-<a class="anchor" id="gafec8dd682458c750a5f0f913a0f162ce"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const* <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> is a type for constant pointers to <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>.</p>
-<p>This is used to define entry in <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> arrays. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga207e807f9e18271f6a763e57232b409f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>  <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>A sensor event. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga24acc545b908dd24cadc44c5e0760b3b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>  <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="ga7ff5f2dff38e7639981794c43dc9167b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Structures and functions to receive and process sensor events in native code. Sensor types. (keep in sync with hardware/sensor.h) </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df"></a>ASENSOR_TYPE_ACCELEROMETER</em>&#160;</td><td class="fielddoc">
-<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">ASENSOR_TYPE_ACCELEROMETER</a> reporting-mode: continuous</p>
-<p>All values are in SI units (m/s^2) and measure the acceleration of the device minus the force of gravity. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8"></a>ASENSOR_TYPE_MAGNETIC_FIELD</em>&#160;</td><td class="fielddoc">
-<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">ASENSOR_TYPE_MAGNETIC_FIELD</a> reporting-mode: continuous</p>
-<p>All values are in micro-Tesla (uT) and measure the geomagnetic field in the X, Y and Z axis. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68"></a>ASENSOR_TYPE_GYROSCOPE</em>&#160;</td><td class="fielddoc">
-<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">ASENSOR_TYPE_GYROSCOPE</a> reporting-mode: continuous</p>
-<p>All values are in radians/second and measure the rate of rotation around the X, Y and Z axis. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174"></a>ASENSOR_TYPE_LIGHT</em>&#160;</td><td class="fielddoc">
-<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">ASENSOR_TYPE_LIGHT</a> reporting-mode: on-change</p>
-<p>The light sensor value is returned in SI lux units. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932"></a>ASENSOR_TYPE_PROXIMITY</em>&#160;</td><td class="fielddoc">
-<p><a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">ASENSOR_TYPE_PROXIMITY</a> reporting-mode: on-change</p>
-<p>The proximity sensor which turns the screen off and back on during calls is the wake-up proximity sensor. Implement wake-up proximity sensor before implementing a non wake-up proximity sensor. For the wake-up proximity sensor set the flag SENSOR_FLAG_WAKE_UP. The value corresponds to the distance to the nearest object in centimeters. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gaabfcbcb5ac86a1edac4035264bc7d2b8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Sensor accuracy measure. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d"></a>ASENSOR_STATUS_NO_CONTACT</em>&#160;</td><td class="fielddoc">
-<p>no contact </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e"></a>ASENSOR_STATUS_UNRELIABLE</em>&#160;</td><td class="fielddoc">
-<p>unreliable </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0"></a>ASENSOR_STATUS_ACCURACY_LOW</em>&#160;</td><td class="fielddoc">
-<p>low accuracy </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d"></a>ASENSOR_STATUS_ACCURACY_MEDIUM</em>&#160;</td><td class="fielddoc">
-<p>medium accuracy </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13"></a>ASENSOR_STATUS_ACCURACY_HIGH</em>&#160;</td><td class="fielddoc">
-<p>high accuracy </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="ga5d76b81b0ad4c19007a781d4edb8181f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Sensor Reporting Modes. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c"></a>AREPORTING_MODE_CONTINUOUS</em>&#160;</td><td class="fielddoc">
-<p>continuous reporting </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5"></a>AREPORTING_MODE_ON_CHANGE</em>&#160;</td><td class="fielddoc">
-<p>reporting on change </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb"></a>AREPORTING_MODE_ONE_SHOT</em>&#160;</td><td class="fielddoc">
-<p>on shot reporting </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7"></a>AREPORTING_MODE_SPECIAL_TRIGGER</em>&#160;</td><td class="fielddoc">
-<p>special trigger reporting </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="gae9969580eda319926a677a6937c7afb1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensor_getFifoMaxEventCount </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the maximum size of batches for this sensor. Batches will often be smaller, as the hardware fifo might be used for other sensors. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaec7084c6a9d4d85f87c95a70511c5f53"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensor_getFifoReservedEventCount </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the hardware batch fifo size reserved to this sensor. </p>
-
-</div>
-</div>
-<a class="anchor" id="gacb6e021757c07344b58742611eaf68e7"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensor_getMinDelay </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the minimum delay allowed between events in microseconds. A value of zero means that this sensor doesn't report events at a constant rate, but rather only when a new data is available. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga52f4b22990c70df0784b9ccf23314fae"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* ASensor_getName </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns this sensor's name (non localized) </p>
-
-</div>
-</div>
-<a class="anchor" id="ga99e56b84cf421788c27998da8eab7e39"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensor_getReportingMode </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga3da2930dd866cf1f76da6bc39e578a46"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float ASensor_getResolution </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns this sensors's resolution </p>
-
-</div>
-</div>
-<a class="anchor" id="gabee3eb65390fc75a639c59d653af3591"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* ASensor_getStringType </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns this sensor's string type. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga93962747ab3c7d2b609f97af26fc0230"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensor_getType </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Return this sensor's type </p>
-
-</div>
-</div>
-<a class="anchor" id="gafaf467fc71f7adba537a90f166e3320d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* ASensor_getVendor </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns this sensor's vendor's name (non localized) </p>
-
-</div>
-</div>
-<a class="anchor" id="ga0ff4118e400bedac62be6b79e9e0f924"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">bool ASensor_isWakeUpSensor </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns true if this is a wake up sensor, false otherwise. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga03852b813887ec236a34c4aef0df4b68"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensorEventQueue_disableSensor </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Disable the selected sensor. Returns a negative error code on failure. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga48a8379cf9de9b09a71a00f8a3699499"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensorEventQueue_enableSensor </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Enable the selected sensor. Returns a negative error code on failure. </p>
-
-</div>
-</div>
-<a class="anchor" id="gab3d4354fd0d3ceb5fa97c129b024a18a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">ssize_t ASensorEventQueue_getEvents </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> *&#160;</td>
-          <td class="paramname"><em>events</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&#160;</td>
-          <td class="paramname"><em>count</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the next available events from the queue. Returns a negative value if no events are available or an error has occurred, otherwise the number of events returned.</p>
-<p>Examples: <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> event; ssize_t numEvent = ASensorEventQueue_getEvents(queue, &amp;event, 1);</p>
-<p><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> eventBuffer[8]; ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8); </p>
-
-</div>
-</div>
-<a class="anchor" id="ga79c9d6264fe81d4e30800f826db72913"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensorEventQueue_hasEvents </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns true if there are one or more events available in the sensor queue. Returns 1 if the queue has events; 0 if it does not have events; and a negative value if there is an error. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa6e89b6d69dc3e07f2d7e72e81ec7937"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensorEventQueue_setEventRate </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td>
-          <td class="paramname"><em>sensor</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int32_t&#160;</td>
-          <td class="paramname"><em>usec</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Sets the delivery rate of events in microseconds for the given sensor. Note that this is a hint only, generally event will arrive at a higher rate. It is an error to set a rate inferior to the value returned by <a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay()</a>. Returns a negative error code on failure. </p>
-
-</div>
-</div>
-<a class="anchor" id="gac46f8b28bcc7a846dea9d841cab0a67b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a>* ASensorManager_createEventQueue </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td>
-          <td class="paramname"><em>manager</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td>
-          <td class="paramname"><em>looper</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>ident</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a>&#160;</td>
-          <td class="paramname"><em>callback</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&#160;</td>
-          <td class="paramname"><em>data</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Creates a new sensor event queue and associate it with a looper.</p>
-<p>"ident" is a identifier for the events that will be returned when calling <a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce()</a>. The identifier must be &gt;= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf35624037785cdea1e7fe9e0a73fc5e1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensorManager_destroyEventQueue </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td>
-          <td class="paramname"><em>manager</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td>
-          <td class="paramname"><em>queue</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Destroys the event queue and free all resources associated to it. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf4880d87e01f5e2d4a9b8403e4047445"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const* ASensorManager_getDefaultSensor </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td>
-          <td class="paramname"><em>manager</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>type</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the default sensor for the given type, or NULL if no sensor of that type exists. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4313457c0e82f4afa77ef13860629633"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const* ASensorManager_getDefaultSensorEx </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td>
-          <td class="paramname"><em>manager</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&#160;</td>
-          <td class="paramname"><em>type</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">bool&#160;</td>
-          <td class="paramname"><em>wakeUp</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the default sensor with the given type and wakeUp properties or NULL if no sensor of this type and wakeUp properties exists. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaa438fdaf34783a89d139f0a56d2692cd"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a>* ASensorManager_getInstance </td>
-          <td>(</td>
-          <td class="paramname"></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get a reference to the sensor manager. ASensorManager is a singleton.</p>
-<p>Example: </p>
-<pre class="fragment">ASensorManager* sensorManager = ASensorManager_getInstance();</pre> 
-</div>
-</div>
-<a class="anchor" id="ga645be938627498ab2b60d94c562204bd"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int ASensorManager_getSensorList </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td>
-          <td class="paramname"><em>manager</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> *&#160;</td>
-          <td class="paramname"><em>list</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Returns the list of available sensors. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/group___storage.jd b/docs/html/ndk/reference/group___storage.jd
deleted file mode 100644
index e29303a..0000000
--- a/docs/html/ndk/reference/group___storage.jd
+++ /dev/null
@@ -1,450 +0,0 @@
-page.title=Storage
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#files">Files</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">Storage</div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
-Files</h2></td></tr>
-<tr class="memitem:obb_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="obb_8h.html">obb.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:storage__manager_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="storage__manager_8h.html">storage_manager.h</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gaa5037fe4c0d785a50fc62ac2de9844c3"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a></td></tr>
-<tr class="separator:gaa5037fe4c0d785a50fc62ac2de9844c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga419f40803228bca62e32beb911ab28e2"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a></td></tr>
-<tr class="separator:ga419f40803228bca62e32beb911ab28e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf077d06586fa4c0212baa2fe458b9617"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a> )(const char *filename, const int32_t state, void *data)</td></tr>
-<tr class="separator:gaf077d06586fa4c0212baa2fe458b9617"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gae4d5251432e1a9e6803c0240cc492e18"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___storage.html#ggae4d5251432e1a9e6803c0240cc492e18a33e2ae83b4c25d33a4335dccf1de1c3a">AOBBINFO_OVERLAY</a> = 0x0001
- }</td></tr>
-<tr class="separator:gae4d5251432e1a9e6803c0240cc492e18"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae8a3b6a5d0d3244ed73924ab2421a0d0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2a9c420e6008c108a7198fd861c042d5">AOBB_STATE_MOUNTED</a> = 1, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a6710bb5b68cfc115eedcde2aafd8a667">AOBB_STATE_UNMOUNTED</a> = 2, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a50642881107d6673aace1494a5d6fce2">AOBB_STATE_ERROR_INTERNAL</a> = 20, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a324da2b8fea5875339d442d1f2d0b45b">AOBB_STATE_ERROR_COULD_NOT_MOUNT</a> = 21, 
-<br/>
-&#160;&#160;<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a1f2b51b53fc57b57a9967f6ce0c88dbe">AOBB_STATE_ERROR_COULD_NOT_UNMOUNT</a> = 22, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a3ce8539aa8b531c9de1d16041322d7a8">AOBB_STATE_ERROR_NOT_MOUNTED</a> = 23, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a8b074af151167a965a550b9829fafb37">AOBB_STATE_ERROR_ALREADY_MOUNTED</a> = 24, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2467a4b6a634680e12c288a7790ff66c">AOBB_STATE_ERROR_PERMISSION_DENIED</a> = 25
-<br/>
- }</td></tr>
-<tr class="separator:gae8a3b6a5d0d3244ed73924ab2421a0d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga7beb4f82e3bf9a4b8197917f92ac4d5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga7beb4f82e3bf9a4b8197917f92ac4d5e">AObbScanner_getObbInfo</a> (const char *filename)</td></tr>
-<tr class="separator:ga7beb4f82e3bf9a4b8197917f92ac4d5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec5a4428008f545e829486099298031a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gaec5a4428008f545e829486099298031a">AObbInfo_delete</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:gaec5a4428008f545e829486099298031a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1ec7eee61541fa5a9b578801a35b9cf3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga1ec7eee61541fa5a9b578801a35b9cf3">AObbInfo_getPackageName</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:ga1ec7eee61541fa5a9b578801a35b9cf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gacd8471c6d866cffe4a32f3b5997c782c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gacd8471c6d866cffe4a32f3b5997c782c">AObbInfo_getVersion</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:gacd8471c6d866cffe4a32f3b5997c782c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga68d916570c756da9fd0d9096358300eb"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga68d916570c756da9fd0d9096358300eb">AObbInfo_getFlags</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:ga68d916570c756da9fd0d9096358300eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1c21ed9e0848fcfc03547c95eeb48877"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga1c21ed9e0848fcfc03547c95eeb48877">AStorageManager_new</a> ()</td></tr>
-<tr class="separator:ga1c21ed9e0848fcfc03547c95eeb48877"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga184c06dd9cec0f21db138167d6b331ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga184c06dd9cec0f21db138167d6b331ed">AStorageManager_delete</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr)</td></tr>
-<tr class="separator:ga184c06dd9cec0f21db138167d6b331ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga61bebaf43e57b4b7f57e7a24a62e9e3d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga61bebaf43e57b4b7f57e7a24a62e9e3d">AStorageManager_mountObb</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename, const char *key, <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a> cb, void *data)</td></tr>
-<tr class="separator:ga61bebaf43e57b4b7f57e7a24a62e9e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4c32c8d2c780016fa36097d833b57809"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga4c32c8d2c780016fa36097d833b57809">AStorageManager_unmountObb</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename, const int force, <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a> cb, void *data)</td></tr>
-<tr class="separator:ga4c32c8d2c780016fa36097d833b57809"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7572f2c650fc16cce1b0ab94e913a1ba"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga7572f2c650fc16cce1b0ab94e913a1ba">AStorageManager_isObbMounted</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename)</td></tr>
-<tr class="separator:ga7572f2c650fc16cce1b0ab94e913a1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad5c90305d627e0c768da37cb3e9f08c4"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gad5c90305d627e0c768da37cb3e9f08c4">AStorageManager_getMountedObbPath</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename)</td></tr>
-<tr class="separator:gad5c90305d627e0c768da37cb3e9f08c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<h2 class="groupheader">Typedef Documentation</h2>
-<a class="anchor" id="gaa5037fe4c0d785a50fc62ac2de9844c3"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> is an opaque type representing information for obb storage. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga419f40803228bca62e32beb911ab28e2"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef struct <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> manages application OBB storage, a pointer can be obtained with <a class="el" href="group___storage.html#ga1c21ed9e0848fcfc03547c95eeb48877">AStorageManager_new()</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="gaf077d06586fa4c0212baa2fe458b9617"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(* AStorageManager_obbCallbackFunc)(const char *filename, const int32_t state, void *data)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Callback function for asynchronous calls made on OBB files.</p>
-<p>"state" is one of the following constants:</p>
-<ul>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2a9c420e6008c108a7198fd861c042d5">AOBB_STATE_MOUNTED</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a6710bb5b68cfc115eedcde2aafd8a667">AOBB_STATE_UNMOUNTED</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a50642881107d6673aace1494a5d6fce2">AOBB_STATE_ERROR_INTERNAL</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a324da2b8fea5875339d442d1f2d0b45b">AOBB_STATE_ERROR_COULD_NOT_MOUNT</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a1f2b51b53fc57b57a9967f6ce0c88dbe">AOBB_STATE_ERROR_COULD_NOT_UNMOUNT</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a3ce8539aa8b531c9de1d16041322d7a8">AOBB_STATE_ERROR_NOT_MOUNTED</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a8b074af151167a965a550b9829fafb37">AOBB_STATE_ERROR_ALREADY_MOUNTED</a></li>
-<li><a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2467a4b6a634680e12c288a7790ff66c">AOBB_STATE_ERROR_PERMISSION_DENIED</a> </li>
-</ul>
-
-</div>
-</div>
-<h2 class="groupheader">Enumeration Type Documentation</h2>
-<a class="anchor" id="gae4d5251432e1a9e6803c0240cc492e18"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Flag for an obb file, returned by <a class="el" href="group___storage.html#ga68d916570c756da9fd0d9096358300eb">AObbInfo_getFlags()</a>. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggae4d5251432e1a9e6803c0240cc492e18a33e2ae83b4c25d33a4335dccf1de1c3a"></a>AOBBINFO_OVERLAY</em>&#160;</td><td class="fielddoc">
-<p>overlay </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<a class="anchor" id="gae8a3b6a5d0d3244ed73924ab2421a0d0"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">anonymous enum</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The different states of a OBB storage passed to <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc()</a>. </p>
-<table class="fieldtable">
-<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a2a9c420e6008c108a7198fd861c042d5"></a>AOBB_STATE_MOUNTED</em>&#160;</td><td class="fielddoc">
-<p>The OBB container is now mounted and ready for use. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a6710bb5b68cfc115eedcde2aafd8a667"></a>AOBB_STATE_UNMOUNTED</em>&#160;</td><td class="fielddoc">
-<p>The OBB container is now unmounted and not usable. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a50642881107d6673aace1494a5d6fce2"></a>AOBB_STATE_ERROR_INTERNAL</em>&#160;</td><td class="fielddoc">
-<p>There was an internal system error encountered while trying to mount the OBB. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a324da2b8fea5875339d442d1f2d0b45b"></a>AOBB_STATE_ERROR_COULD_NOT_MOUNT</em>&#160;</td><td class="fielddoc">
-<p>The OBB could not be mounted by the system. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a1f2b51b53fc57b57a9967f6ce0c88dbe"></a>AOBB_STATE_ERROR_COULD_NOT_UNMOUNT</em>&#160;</td><td class="fielddoc">
-<p>The OBB could not be unmounted. This most likely indicates that a file is in use on the OBB. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a3ce8539aa8b531c9de1d16041322d7a8"></a>AOBB_STATE_ERROR_NOT_MOUNTED</em>&#160;</td><td class="fielddoc">
-<p>A call was made to unmount the OBB when it was not mounted. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a8b074af151167a965a550b9829fafb37"></a>AOBB_STATE_ERROR_ALREADY_MOUNTED</em>&#160;</td><td class="fielddoc">
-<p>The OBB has already been mounted. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-<tr><td class="fieldname"><em><a class="anchor" id="ggae8a3b6a5d0d3244ed73924ab2421a0d0a2467a4b6a634680e12c288a7790ff66c"></a>AOBB_STATE_ERROR_PERMISSION_DENIED</em>&#160;</td><td class="fielddoc">
-<p>The current application does not have permission to use this OBB. This could be because the OBB indicates it's owned by a different package. Can be returned as the status for callbacks made during asynchronous OBB actions. </p>
-</td></tr>
-</table>
-
-</div>
-</div>
-<h2 class="groupheader">Function Documentation</h2>
-<a class="anchor" id="gaec5a4428008f545e829486099298031a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AObbInfo_delete </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *&#160;</td>
-          <td class="paramname"><em>obbInfo</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Destroy the AObbInfo object. You must call this when finished with the object. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga68d916570c756da9fd0d9096358300eb"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AObbInfo_getFlags </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *&#160;</td>
-          <td class="paramname"><em>obbInfo</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the flags of an OBB file. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1ec7eee61541fa5a9b578801a35b9cf3"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* AObbInfo_getPackageName </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *&#160;</td>
-          <td class="paramname"><em>obbInfo</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the package name for the OBB. </p>
-
-</div>
-</div>
-<a class="anchor" id="gacd8471c6d866cffe4a32f3b5997c782c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t AObbInfo_getVersion </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *&#160;</td>
-          <td class="paramname"><em>obbInfo</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the version of an OBB file. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7beb4f82e3bf9a4b8197917f92ac4d5e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a>* AObbScanner_getObbInfo </td>
-          <td>(</td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>filename</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Scan an OBB and get information about it. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga184c06dd9cec0f21db138167d6b331ed"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AStorageManager_delete </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Release AStorageManager instance. </p>
-
-</div>
-</div>
-<a class="anchor" id="gad5c90305d627e0c768da37cb3e9f08c4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* AStorageManager_getMountedObbPath </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>filename</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Get the mounted path for an OBB. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga7572f2c650fc16cce1b0ab94e913a1ba"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int AStorageManager_isObbMounted </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>filename</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Check whether an OBB is mounted. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga61bebaf43e57b4b7f57e7a24a62e9e3d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AStorageManager_mountObb </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>filename</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>key</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a>&#160;</td>
-          <td class="paramname"><em>cb</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&#160;</td>
-          <td class="paramname"><em>data</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Attempts to mount an OBB file. This is an asynchronous operation. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga1c21ed9e0848fcfc03547c95eeb48877"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a>* AStorageManager_new </td>
-          <td>(</td>
-          <td class="paramname"></td><td>)</td>
-          <td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Obtains a new instance of AStorageManager. </p>
-
-</div>
-</div>
-<a class="anchor" id="ga4c32c8d2c780016fa36097d833b57809"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void AStorageManager_unmountObb </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td>
-          <td class="paramname"><em>mgr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&#160;</td>
-          <td class="paramname"><em>filename</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const int&#160;</td>
-          <td class="paramname"><em>force</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a>&#160;</td>
-          <td class="paramname"><em>cb</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&#160;</td>
-          <td class="paramname"><em>data</em>&#160;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Attempts to unmount an OBB file. This is an asynchronous operation. </p>
-
-</div>
-</div>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/index.jd b/docs/html/ndk/reference/index.jd
deleted file mode 100644
index 94bcb7a..0000000
--- a/docs/html/ndk/reference/index.jd
+++ /dev/null
@@ -1,17 +0,0 @@
-page.title=API Reference
-@jd:body
-
-<p>The API reference for the NDK includes documentation for the base set of
-native headers that the NDK provides for Android. These headers, and their associated libraries,
-expose a variety of features otherwise only accessible via the Android framework.
-A few of these features are as follows:</p>
-
-<ul>
-   <li>Using hardware sensors.</li>
-   <li>Accessing storage.</li>
-   <li>Handling user input.</li>
-   <li>Setting configuration information, such as screen orientation.</li>
-</ul>
-
-<p>The API reference provides detailed information on these and other functionalities provided
-in the NDK.</p>
diff --git a/docs/html/ndk/reference/input_8h.jd b/docs/html/ndk/reference/input_8h.jd
deleted file mode 100644
index 855a346..0000000
--- a/docs/html/ndk/reference/input_8h.jd
+++ /dev/null
@@ -1,374 +0,0 @@
-page.title=input.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#define-members">Macros</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">input.h File Reference<div class="ingroups"><a class="el" href="group___input.html">Input</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
-<code>#include &lt;sys/types.h&gt;</code><br/>
-<code>#include &lt;<a class="el" href="keycodes_8h.html">android/keycodes.h</a>&gt;</code><br/>
-<code>#include &lt;<a class="el" href="looper_8h.html">android/looper.h</a>&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
-Macros</h2></td></tr>
-<tr class="memitem:gaeb170c0fbeeed1d999160566f09f169e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaeb170c0fbeeed1d999160566f09f169e">AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT</a>&#160;&#160;&#160;8</td></tr>
-<tr class="separator:gaeb170c0fbeeed1d999160566f09f169e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gac35dbbc035371e799d8badabc981e8fa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a></td></tr>
-<tr class="separator:gac35dbbc035371e799d8badabc981e8fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga21d8182651f4b61ae558560023e8339c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a></td></tr>
-<tr class="separator:ga21d8182651f4b61ae558560023e8339c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gabc6126af1d45847bc59afa0aa3216b04"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a9506627d5377c67dbc7fc58804b2cdfd">AKEY_STATE_UNKNOWN</a> = -1, 
-<a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04afa14022f587487c24d401c87e71c8e28">AKEY_STATE_UP</a> = 0, 
-<a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04a286ec0a7aff5903a982be0cd6785b62c">AKEY_STATE_DOWN</a> = 1, 
-<a class="el" href="group___input.html#ggabc6126af1d45847bc59afa0aa3216b04ad09fd9fe458ca6c66ead9b9a75c56192">AKEY_STATE_VIRTUAL</a> = 2
- }</td></tr>
-<tr class="separator:gabc6126af1d45847bc59afa0aa3216b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadc29c2ff13d900c2f185ee95427fb06c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cae0a3cb26517b3f876beb37594494526d">AMETA_NONE</a> = 0, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caba44b1077427e4da1d202e0c8f772881">AMETA_ALT_ON</a> = 0x02, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca256c74b768ecee57e3218e81ae6945df">AMETA_ALT_LEFT_ON</a> = 0x10, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca985db074c0f44749ca86b5cc0454056a">AMETA_ALT_RIGHT_ON</a> = 0x20, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa3d5f49c3a55b653a94c798a2c93b197">AMETA_SHIFT_ON</a> = 0x01, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06caa01fa027cdd8951530437bcbe04c3ed7">AMETA_SHIFT_LEFT_ON</a> = 0x40, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cac52930581c339216218a6f50c5b57aa1">AMETA_SHIFT_RIGHT_ON</a> = 0x80, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca8af1e90950a728baca807a83e50b22ea">AMETA_SYM_ON</a> = 0x04, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca545b31b72b0454c22c170ff534ddfdf1">AMETA_FUNCTION_ON</a> = 0x08, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cabe927318a2a11a46be3e9d78dbd81ef5">AMETA_CTRL_ON</a> = 0x1000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca752c837afd5ff0fcf75ddee7b6808be6">AMETA_CTRL_LEFT_ON</a> = 0x2000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca0ab007e367ae136b873b3e6636747419">AMETA_CTRL_RIGHT_ON</a> = 0x4000, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca9c04e7c2ad1f0f41af60402188a29c4a">AMETA_META_ON</a> = 0x10000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca6f923de8f2cd72e3ad86149c0747906f">AMETA_META_LEFT_ON</a> = 0x20000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafdf56d1259ae16c97161c443d7949bdf">AMETA_META_RIGHT_ON</a> = 0x40000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafc467c98d509b0de28b298801a0c3e37">AMETA_CAPS_LOCK_ON</a> = 0x100000, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06ca15d234534a6870add5594f02b7333dc6">AMETA_NUM_LOCK_ON</a> = 0x200000, 
-<a class="el" href="group___input.html#ggadc29c2ff13d900c2f185ee95427fb06cafe8dacdc6566f655a3eab73ea4a9af5a">AMETA_SCROLL_LOCK_ON</a> = 0x400000
-<br/>
- }</td></tr>
-<tr class="separator:gadc29c2ff13d900c2f185ee95427fb06c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga61dadd085c1777f559549e05962b2c9e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea696f0d7635f7a24c17d3f1e4ccdd44ba">AINPUT_EVENT_TYPE_KEY</a> = 1, 
-<a class="el" href="group___input.html#gga61dadd085c1777f559549e05962b2c9ea2182dfda2cceb5425dcc2823b9b6b56a">AINPUT_EVENT_TYPE_MOTION</a> = 2
- }</td></tr>
-<tr class="separator:ga61dadd085c1777f559549e05962b2c9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga726ca809ffd3d67ab4b8476646f26635"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a123c3bd18fd93b53d8aedbe7597f7b49">AKEY_EVENT_ACTION_DOWN</a> = 0, 
-<a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635abf18b7c5384c5de8657a0650f8da57c3">AKEY_EVENT_ACTION_UP</a> = 1, 
-<a class="el" href="group___input.html#gga726ca809ffd3d67ab4b8476646f26635a08e2d927e155478ee66ec46ebd845ab0">AKEY_EVENT_ACTION_MULTIPLE</a> = 2
- }</td></tr>
-<tr class="separator:ga726ca809ffd3d67ab4b8476646f26635"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0411cd49bb5b71852cecd93bcbf0ca2d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da6473a1afc0cc39e029c2a217bc57cdba">AKEY_EVENT_FLAG_WOKE_HERE</a> = 0x1, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da7dbb272c7b28be9c084df3446a629f32">AKEY_EVENT_FLAG_SOFT_KEYBOARD</a> = 0x2, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dadc0a063ca412b0ea08474df422bf9b41">AKEY_EVENT_FLAG_KEEP_TOUCH_MODE</a> = 0x4, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dae1e7ec188b2404fadd94cfba89afd5d6">AKEY_EVENT_FLAG_FROM_SYSTEM</a> = 0x8, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dab9dbcf990d1e4405e32f847fdea52013">AKEY_EVENT_FLAG_EDITOR_ACTION</a> = 0x10, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da3198fad5ab75df614bb41f0f602a9e55">AKEY_EVENT_FLAG_CANCELED</a> = 0x20, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2dad4b5eba5b14e4076c69bc7185f2804f8">AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY</a> = 0x40, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da39f9f7bdf2e256db0e2a8a5dfbfb7185">AKEY_EVENT_FLAG_LONG_PRESS</a> = 0x80, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2daf09856f03f2fffee9a82cb8e508efb7a">AKEY_EVENT_FLAG_CANCELED_LONG_PRESS</a> = 0x100, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da91e70ab527f27a1779f4550d457f1689">AKEY_EVENT_FLAG_TRACKING</a> = 0x200, 
-<a class="el" href="group___input.html#gga0411cd49bb5b71852cecd93bcbf0ca2da14f574126d2544863fa8042ddd0f48c0">AKEY_EVENT_FLAG_FALLBACK</a> = 0x400
-<br/>
- }</td></tr>
-<tr class="separator:ga0411cd49bb5b71852cecd93bcbf0ca2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabed82baf7f470b522273a3e37c24c600"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600abf84a22c84d4b7228102b80f3af92a4f">AMOTION_EVENT_ACTION_MASK</a> = 0xff, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a51384339fbb57c0087f7f50c45d9cff3">AMOTION_EVENT_ACTION_POINTER_INDEX_MASK</a> = 0xff00, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a225e61c48ba334abc1b5811db02edcf1">AMOTION_EVENT_ACTION_DOWN</a> = 0, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a43798b2b7a6de4616d150b2438b8419e">AMOTION_EVENT_ACTION_UP</a> = 1, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a41c56c4e772953fce60c93bc671639a3">AMOTION_EVENT_ACTION_MOVE</a> = 2, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e">AMOTION_EVENT_ACTION_CANCEL</a> = 3, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">AMOTION_EVENT_ACTION_OUTSIDE</a> = 4, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a1618c641fd3f49fa7483f298d05b3cd2">AMOTION_EVENT_ACTION_POINTER_DOWN</a> = 5, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600af2ef56aa7220eeb2073b9b028737bc1e">AMOTION_EVENT_ACTION_POINTER_UP</a> = 6, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a84bc9fb3c01ff7ca9ee452a510e7de60">AMOTION_EVENT_ACTION_HOVER_MOVE</a> = 7, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a45ba62b1e6fab4e84d5782d7c35ced04">AMOTION_EVENT_ACTION_SCROLL</a> = 8, 
-<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a247b2c60ad92f3130ad43c907986ffb3">AMOTION_EVENT_ACTION_HOVER_ENTER</a> = 9, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600ac00b1eacfbea779863abf3fcf02134aa">AMOTION_EVENT_ACTION_HOVER_EXIT</a> = 10
-<br/>
- }</td></tr>
-<tr class="separator:gabed82baf7f470b522273a3e37c24c600"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab04a0655cd1e3bcac5e8f48c18df1a57"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#ggab04a0655cd1e3bcac5e8f48c18df1a57a200623e1e4eee7797cad30917d289d7a">AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED</a> = 0x1
- }</td></tr>
-<tr class="separator:gab04a0655cd1e3bcac5e8f48c18df1a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga385c44f6fb256e5716a2302a5b940388"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a37dd7496968e6defbecc3c8d6ab2734d">AMOTION_EVENT_EDGE_FLAG_NONE</a> = 0, 
-<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a915e1ade9b600d11a3c70a17a88de757">AMOTION_EVENT_EDGE_FLAG_TOP</a> = 0x01, 
-<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388ad8b662839787e1c7dd2616f32c02aaeb">AMOTION_EVENT_EDGE_FLAG_BOTTOM</a> = 0x02, 
-<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388afb70c13f16daade25ba8132a5ea3cf52">AMOTION_EVENT_EDGE_FLAG_LEFT</a> = 0x04, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga385c44f6fb256e5716a2302a5b940388a7d45674e03f1876a43d4810508905078">AMOTION_EVENT_EDGE_FLAG_RIGHT</a> = 0x08
-<br/>
- }</td></tr>
-<tr class="separator:ga385c44f6fb256e5716a2302a5b940388"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabc5c98fcc1211af2b80116dd6e0a035d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f4b5b009634039a1f361048a5fc6064">AMOTION_EVENT_AXIS_X</a> = 0, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da64f7de8558265bd8179d206eb33eff6c">AMOTION_EVENT_AXIS_Y</a> = 1, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da3b4fd0f17cfdeb6a055babecd2b0ded8">AMOTION_EVENT_AXIS_PRESSURE</a> = 2, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da4baba3ccaec881089a864ba6deaf8bd6">AMOTION_EVENT_AXIS_SIZE</a> = 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da792b9e01044a2e43e7f80e5559db20c2">AMOTION_EVENT_AXIS_TOUCH_MAJOR</a> = 4, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa8b24b0f01f24898a36e5751c8eca63c">AMOTION_EVENT_AXIS_TOUCH_MINOR</a> = 5, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa273d64c392f86ae789fd5e24661ba0a">AMOTION_EVENT_AXIS_TOOL_MAJOR</a> = 6, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadebd200b37ffaf36b94e7e478c559142">AMOTION_EVENT_AXIS_TOOL_MINOR</a> = 7, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da114f2b3fc233ccf7a4470787c31457d2">AMOTION_EVENT_AXIS_ORIENTATION</a> = 8, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dad11be04b4b81715cad905ee9fa348e99">AMOTION_EVENT_AXIS_VSCROLL</a> = 9, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da92955e6b0f3f82af66a505c854e9edff">AMOTION_EVENT_AXIS_HSCROLL</a> = 10, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5a689e572da9bc5feafcb6c011368305">AMOTION_EVENT_AXIS_Z</a> = 11, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da689b612864177d6b57d4181442e3e38e">AMOTION_EVENT_AXIS_RX</a> = 12, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daa20188da209300e1f80f6f5bd4058e13">AMOTION_EVENT_AXIS_RY</a> = 13, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da381948b3321afd390ad164345eb9206b">AMOTION_EVENT_AXIS_RZ</a> = 14, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da04245c76cb9b32dcba920661f11ac9da">AMOTION_EVENT_AXIS_HAT_X</a> = 15, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da98c323321d908db459e7cf86a7e8a482">AMOTION_EVENT_AXIS_HAT_Y</a> = 16, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae4c65c3b1bd2946ff9e18c6041cdb591">AMOTION_EVENT_AXIS_LTRIGGER</a> = 17, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da116e80c6be166290ca481fefa5de38c1">AMOTION_EVENT_AXIS_RTRIGGER</a> = 18, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da6d1f5d64e607104964eb43d8fae07a4f">AMOTION_EVENT_AXIS_THROTTLE</a> = 19, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da318a0782f895949407fc192fc4280257">AMOTION_EVENT_AXIS_RUDDER</a> = 20, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0ae83ebd74e672bb35378b92a440b1d">AMOTION_EVENT_AXIS_WHEEL</a> = 21, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab0223f235a6044815918af2abafcbf16">AMOTION_EVENT_AXIS_GAS</a> = 22, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae3a99764f3681dd9e094852bb2489ece">AMOTION_EVENT_AXIS_BRAKE</a> = 23, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae800909411a1e83173b0eef7aa458d0e">AMOTION_EVENT_AXIS_DISTANCE</a> = 24, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafca0a235f69c4b38bfc95e7a7b8d9ab1">AMOTION_EVENT_AXIS_TILT</a> = 25, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadcc18afd3a7069412617df34db5a27bc">AMOTION_EVENT_AXIS_GENERIC_1</a> = 32, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac4addf06abfa6c76f0578ddde049aad5">AMOTION_EVENT_AXIS_GENERIC_2</a> = 33, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dac7df57ef5082e10be83f66d7477bce9c">AMOTION_EVENT_AXIS_GENERIC_3</a> = 34, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da321873d126b7d545665096694cb7d9d9">AMOTION_EVENT_AXIS_GENERIC_4</a> = 35, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da9b47cef7060197e1b0302a8a718c3085">AMOTION_EVENT_AXIS_GENERIC_5</a> = 36, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daad7e47a1b5fb66864b6d988374f50a84">AMOTION_EVENT_AXIS_GENERIC_6</a> = 37, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da222c06f51a60e59504b635dbf89a025b">AMOTION_EVENT_AXIS_GENERIC_7</a> = 38, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dab59a8a373a913e40b146ed762976d6fe">AMOTION_EVENT_AXIS_GENERIC_8</a> = 39, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da721fa0fbca8b22f1ecc8d3870f4e7443">AMOTION_EVENT_AXIS_GENERIC_9</a> = 40, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da29ba08f4ddc658e0127ee5bc08d185f2">AMOTION_EVENT_AXIS_GENERIC_10</a> = 41, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dafc64a4b307f62bb12b645918aa7edb57">AMOTION_EVENT_AXIS_GENERIC_11</a> = 42, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dae5d32b3e9cec4936ae1e074f320c3063">AMOTION_EVENT_AXIS_GENERIC_12</a> = 43, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da5f19f5bc52e5eaec5ebd4f07aad12180">AMOTION_EVENT_AXIS_GENERIC_13</a> = 44, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035dadb866d826ecf25161d7c7f86166e149b">AMOTION_EVENT_AXIS_GENERIC_14</a> = 45, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035da7e86befc8502b8df687284f3c40b2eca">AMOTION_EVENT_AXIS_GENERIC_15</a> = 46, 
-<a class="el" href="group___input.html#ggabc5c98fcc1211af2b80116dd6e0a035daaaa011ba929b18c6da71153638f92336">AMOTION_EVENT_AXIS_GENERIC_16</a> = 47
-<br/>
- }</td></tr>
-<tr class="separator:gabc5c98fcc1211af2b80116dd6e0a035d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac36f475ca5b446f4fde4c9b90bec77c8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ab388f65477b9dd4c51e6367111168d65">AMOTION_EVENT_BUTTON_PRIMARY</a> = 1 &lt;&lt; 0, 
-<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a08118700ecb4e147528a0e725afc9451">AMOTION_EVENT_BUTTON_SECONDARY</a> = 1 &lt;&lt; 1, 
-<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8ae6e2af1e7065e035e8a10a595827180f">AMOTION_EVENT_BUTTON_TERTIARY</a> = 1 &lt;&lt; 2, 
-<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a1841d075a2992ff7fbefa3fd50189b86">AMOTION_EVENT_BUTTON_BACK</a> = 1 &lt;&lt; 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggac36f475ca5b446f4fde4c9b90bec77c8a4105edf43f7748c52c859cc5aa7dc438">AMOTION_EVENT_BUTTON_FORWARD</a> = 1 &lt;&lt; 4
-<br/>
- }</td></tr>
-<tr class="separator:gac36f475ca5b446f4fde4c9b90bec77c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7e1ea0c955ebbac1349866e8995e0208">AMOTION_EVENT_TOOL_TYPE_UNKNOWN</a> = 0, 
-<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eafd789262defb8a268fa80d26b0c30bcc">AMOTION_EVENT_TOOL_TYPE_FINGER</a> = 1, 
-<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf05dc95a74e560c89cec1f3100185fc7">AMOTION_EVENT_TOOL_TYPE_STYLUS</a> = 2, 
-<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9ea7be0c750d7d6719e7c948914400ae0de">AMOTION_EVENT_TOOL_TYPE_MOUSE</a> = 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga05589fbab0657f08285ebdfe93f5ec9eaf9932f65b5b6b5800fb5873a60dbf0cb">AMOTION_EVENT_TOOL_TYPE_ERASER</a> = 4
-<br/>
- }</td></tr>
-<tr class="separator:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga16af7b253440dadd46a80a4b9fddba4d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daae438f475d03ea60fd9fb356abd7fa01">AINPUT_SOURCE_CLASS_MASK</a> = 0x000000ff, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dafd6d5e71f09f6452acf017559481444c">AINPUT_SOURCE_CLASS_NONE</a> = 0x00000000, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4dacf1bf3d7b3c6e59f907bdffc9b33370e">AINPUT_SOURCE_CLASS_BUTTON</a> = 0x00000001, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da7495274e98fb30dee3dfd903b878cf47">AINPUT_SOURCE_CLASS_POINTER</a> = 0x00000002, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da078a18d85d078412721c336a879bcc1a">AINPUT_SOURCE_CLASS_NAVIGATION</a> = 0x00000004, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4da682f6982bb55ee809f6acd2deb550167">AINPUT_SOURCE_CLASS_POSITION</a> = 0x00000008, 
-<a class="el" href="group___input.html#gga16af7b253440dadd46a80a4b9fddba4daaaeffb6442807dd96ec62e9d8a696b57">AINPUT_SOURCE_CLASS_JOYSTICK</a> = 0x00000010
-<br/>
- }</td></tr>
-<tr class="separator:ga16af7b253440dadd46a80a4b9fddba4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaba01db17f4a2bfbc3db60dc172972a25"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae9348bc04cdaa88b5b010f77a4945454">AINPUT_SOURCE_UNKNOWN</a> = 0x00000000, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a9860918666dd8c0b9d00a8da7af51e6d">AINPUT_SOURCE_KEYBOARD</a> = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ad0fbfeff9f8d57104bff14c70ce5e3ef">AINPUT_SOURCE_DPAD</a> = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a6417cb50ecd6ade48c708268434a49d3">AINPUT_SOURCE_GAMEPAD</a> = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a55ea411f927aed8964fa72fec0da444f">AINPUT_SOURCE_TOUCHSCREEN</a> = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ae71d3dcbd004bccb6e00fde47097cd86">AINPUT_SOURCE_MOUSE</a> = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a86d4983c71432b27634ba41a64bffdf9">AINPUT_SOURCE_STYLUS</a> = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e49d9153c86f60f626d7f797f4e78b6">AINPUT_SOURCE_TRACKBALL</a> = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a7e0715d4b544653ab11893434172a2ef">AINPUT_SOURCE_TOUCHPAD</a> = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25a3712c4e4fb8ad7f6ae6e40d48e5c6ee7">AINPUT_SOURCE_TOUCH_NAVIGATION</a> = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25afb28f10dc074e7f7435f5904c513edb5">AINPUT_SOURCE_JOYSTICK</a> = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK, 
-<a class="el" href="group___input.html#ggaba01db17f4a2bfbc3db60dc172972a25ab04317e7dd273ff5c87038df67d9796e">AINPUT_SOURCE_ANY</a> = 0xffffff00
-<br/>
- }</td></tr>
-<tr class="separator:gaba01db17f4a2bfbc3db60dc172972a25"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf105ae5beaca1dee30ae54530691fce"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fcea32cb7ce34cdce7095962f0766cc6c3ac">AINPUT_KEYBOARD_TYPE_NONE</a> = 0, 
-<a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaf0226d750ea830eb557ae68bd4a1c82a">AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC</a> = 1, 
-<a class="el" href="group___input.html#ggaaf105ae5beaca1dee30ae54530691fceaba1f5ab6bc79749ba96a5d2a3af0e574">AINPUT_KEYBOARD_TYPE_ALPHABETIC</a> = 2
- }</td></tr>
-<tr class="separator:gaaf105ae5beaca1dee30ae54530691fce"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga80155586fa275b28773c9b203f52caba"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa0e5816bc48cdb33f2b488a109596ffe1">AINPUT_MOTION_RANGE_X</a> = AMOTION_EVENT_AXIS_X, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaab48108c9450ea1b7cd021be7d8cbc332">AINPUT_MOTION_RANGE_Y</a> = AMOTION_EVENT_AXIS_Y, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa79aca706b12b28d0ab14762902fed31a">AINPUT_MOTION_RANGE_PRESSURE</a> = AMOTION_EVENT_AXIS_PRESSURE, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa46f3a6cf859fb161cd29398d8448c688">AINPUT_MOTION_RANGE_SIZE</a> = AMOTION_EVENT_AXIS_SIZE, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa7ead43624c96e165fd8a25e77148aa67">AINPUT_MOTION_RANGE_TOUCH_MAJOR</a> = AMOTION_EVENT_AXIS_TOUCH_MAJOR, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa301181a0f20681135c15010b39bb575d">AINPUT_MOTION_RANGE_TOUCH_MINOR</a> = AMOTION_EVENT_AXIS_TOUCH_MINOR, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaa860f54aa9e5a269dba6a54bbcf3c27c">AINPUT_MOTION_RANGE_TOOL_MAJOR</a> = AMOTION_EVENT_AXIS_TOOL_MAJOR, 
-<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaa19226f6cf713c1b4d0973a163daf6cf1">AINPUT_MOTION_RANGE_TOOL_MINOR</a> = AMOTION_EVENT_AXIS_TOOL_MINOR, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga80155586fa275b28773c9b203f52cabaaf9be9c04a41b610d994a3d1d7e90d06d">AINPUT_MOTION_RANGE_ORIENTATION</a> = AMOTION_EVENT_AXIS_ORIENTATION
-<br/>
- }</td></tr>
-<tr class="separator:ga80155586fa275b28773c9b203f52caba"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga8292ae06aa8120c52d7380d228600b9c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga8292ae06aa8120c52d7380d228600b9c">AInputEvent_getType</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:ga8292ae06aa8120c52d7380d228600b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9dd3fd81e51dbfde19ab861541242aa1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9dd3fd81e51dbfde19ab861541242aa1">AInputEvent_getDeviceId</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:ga9dd3fd81e51dbfde19ab861541242aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac90d4b497669dbc709ec9650db4e49be"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gac90d4b497669dbc709ec9650db4e49be">AInputEvent_getSource</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:gac90d4b497669dbc709ec9650db4e49be"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga36ec0b59f98f86a7ca263ba91279896d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga36ec0b59f98f86a7ca263ba91279896d">AKeyEvent_getAction</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga36ec0b59f98f86a7ca263ba91279896d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2a18e98efe0c4ccb6f39bb13c555010e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2a18e98efe0c4ccb6f39bb13c555010e">AKeyEvent_getFlags</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga2a18e98efe0c4ccb6f39bb13c555010e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6b01ecd60018a5445f4917a861ca9466"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga6b01ecd60018a5445f4917a861ca9466">AKeyEvent_getKeyCode</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga6b01ecd60018a5445f4917a861ca9466"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4a0a846b7a195aeb290dfcd2250137d9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga4a0a846b7a195aeb290dfcd2250137d9">AKeyEvent_getScanCode</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga4a0a846b7a195aeb290dfcd2250137d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabdda62b40b22727af2fb41740bf4787b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gabdda62b40b22727af2fb41740bf4787b">AKeyEvent_getMetaState</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:gabdda62b40b22727af2fb41740bf4787b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5358fe3ebbd4b5b2f88a4ad2eba6f885"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5358fe3ebbd4b5b2f88a4ad2eba6f885">AKeyEvent_getRepeatCount</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:ga5358fe3ebbd4b5b2f88a4ad2eba6f885"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf475b6f0860bdfca4ceea7bc46eab1a9"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaf475b6f0860bdfca4ceea7bc46eab1a9">AKeyEvent_getDownTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:gaf475b6f0860bdfca4ceea7bc46eab1a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae3eac7d68195d1767c947ca267842696"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gae3eac7d68195d1767c947ca267842696">AKeyEvent_getEventTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *key_event)</td></tr>
-<tr class="separator:gae3eac7d68195d1767c947ca267842696"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga73ea2093cc2343675ac43dd08bef4247"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga73ea2093cc2343675ac43dd08bef4247">AMotionEvent_getAction</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga73ea2093cc2343675ac43dd08bef4247"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2891d19197c070207098fa48adeb35af"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2891d19197c070207098fa48adeb35af">AMotionEvent_getFlags</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga2891d19197c070207098fa48adeb35af"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5644f0d952e3dea57ba9f7ce51dff2bb"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5644f0d952e3dea57ba9f7ce51dff2bb">AMotionEvent_getMetaState</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga5644f0d952e3dea57ba9f7ce51dff2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1aa7ebb749416491b6f0c55ae87ddf49"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga1aa7ebb749416491b6f0c55ae87ddf49">AMotionEvent_getButtonState</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga1aa7ebb749416491b6f0c55ae87ddf49"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad7e1f0caa4c27194d4a8756a18432299"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gad7e1f0caa4c27194d4a8756a18432299">AMotionEvent_getEdgeFlags</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:gad7e1f0caa4c27194d4a8756a18432299"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad44be7697e68891688cd7bcfaffec209"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gad44be7697e68891688cd7bcfaffec209">AMotionEvent_getDownTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:gad44be7697e68891688cd7bcfaffec209"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7e13fbf3cff0700b0b620284ebdd3a33"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7e13fbf3cff0700b0b620284ebdd3a33">AMotionEvent_getEventTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga7e13fbf3cff0700b0b620284ebdd3a33"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7a94ce622eb78a17737fd8bddbf86e21"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7a94ce622eb78a17737fd8bddbf86e21">AMotionEvent_getXOffset</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga7a94ce622eb78a17737fd8bddbf86e21"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7f6bd2c12d912f502c245b6ced6d3704"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7f6bd2c12d912f502c245b6ced6d3704">AMotionEvent_getYOffset</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga7f6bd2c12d912f502c245b6ced6d3704"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga81a9be07673a01f43fd0241c7b4c254f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga81a9be07673a01f43fd0241c7b4c254f">AMotionEvent_getXPrecision</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga81a9be07673a01f43fd0241c7b4c254f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae311e6e28bce4be905526f9ea71278ed"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gae311e6e28bce4be905526f9ea71278ed">AMotionEvent_getYPrecision</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:gae311e6e28bce4be905526f9ea71278ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga612e68d104adbc6d14d87510e8066bd8"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga612e68d104adbc6d14d87510e8066bd8">AMotionEvent_getPointerCount</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga612e68d104adbc6d14d87510e8066bd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga599e21a79c706807243a8ee31b116138"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga599e21a79c706807243a8ee31b116138">AMotionEvent_getPointerId</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga599e21a79c706807243a8ee31b116138"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2babe4e2e79952e004538f8f1878649c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2babe4e2e79952e004538f8f1878649c">AMotionEvent_getToolType</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga2babe4e2e79952e004538f8f1878649c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafe45e29ef138cc30592237ce479837f0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gafe45e29ef138cc30592237ce479837f0">AMotionEvent_getRawX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:gafe45e29ef138cc30592237ce479837f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5a09c3d742a93270861aa05f24257c23"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5a09c3d742a93270861aa05f24257c23">AMotionEvent_getRawY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga5a09c3d742a93270861aa05f24257c23"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga22e255a5fa52761cd92ce78af91e9757"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga22e255a5fa52761cd92ce78af91e9757">AMotionEvent_getX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga22e255a5fa52761cd92ce78af91e9757"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga113f58a37e41f2a6c3007d68418edfa6"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga113f58a37e41f2a6c3007d68418edfa6">AMotionEvent_getY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga113f58a37e41f2a6c3007d68418edfa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga97fcaa6cd08c9d54b35711e482e06c8d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga97fcaa6cd08c9d54b35711e482e06c8d">AMotionEvent_getPressure</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga97fcaa6cd08c9d54b35711e482e06c8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9b1f3c3df46b5269f9e74d2dd70c88a8"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9b1f3c3df46b5269f9e74d2dd70c88a8">AMotionEvent_getSize</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga9b1f3c3df46b5269f9e74d2dd70c88a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9ac18fe19534e07d80441582f489d471"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9ac18fe19534e07d80441582f489d471">AMotionEvent_getTouchMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga9ac18fe19534e07d80441582f489d471"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga65f71e257b5fcb29dcbaaf59b3fcb3a7"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga65f71e257b5fcb29dcbaaf59b3fcb3a7">AMotionEvent_getTouchMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga65f71e257b5fcb29dcbaaf59b3fcb3a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac04099690f278a6a27191c2027b12a77"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gac04099690f278a6a27191c2027b12a77">AMotionEvent_getToolMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:gac04099690f278a6a27191c2027b12a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2222d459759ba4a8269647012d2718fb"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2222d459759ba4a8269647012d2718fb">AMotionEvent_getToolMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:ga2222d459759ba4a8269647012d2718fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad28422998da15b789edcba6b8bc5d615"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gad28422998da15b789edcba6b8bc5d615">AMotionEvent_getOrientation</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index)</td></tr>
-<tr class="separator:gad28422998da15b789edcba6b8bc5d615"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9d364cdcebf85237f599b25861f38c21"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga9d364cdcebf85237f599b25861f38c21">AMotionEvent_getAxisValue</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, int32_t axis, size_t pointer_index)</td></tr>
-<tr class="separator:ga9d364cdcebf85237f599b25861f38c21"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0aef34c236db6d7a56a50bf590be7bcc"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga0aef34c236db6d7a56a50bf590be7bcc">AMotionEvent_getHistorySize</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event)</td></tr>
-<tr class="separator:ga0aef34c236db6d7a56a50bf590be7bcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga523f1a760754206965b42b08d62f9346"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga523f1a760754206965b42b08d62f9346">AMotionEvent_getHistoricalEventTime</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t history_index)</td></tr>
-<tr class="separator:ga523f1a760754206965b42b08d62f9346"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5d36c2e7420001c86ae2aa1168fe6f83"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga5d36c2e7420001c86ae2aa1168fe6f83">AMotionEvent_getHistoricalRawX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga5d36c2e7420001c86ae2aa1168fe6f83"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6deb0e7690a93aa53e5872c2691b69fe"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga6deb0e7690a93aa53e5872c2691b69fe">AMotionEvent_getHistoricalRawY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga6deb0e7690a93aa53e5872c2691b69fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga49a8ca89ff377b5ed2355e8d7220ae07"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga49a8ca89ff377b5ed2355e8d7220ae07">AMotionEvent_getHistoricalX</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga49a8ca89ff377b5ed2355e8d7220ae07"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga30fc4e5d3ce144955859f8c97b51b73d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga30fc4e5d3ce144955859f8c97b51b73d">AMotionEvent_getHistoricalY</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga30fc4e5d3ce144955859f8c97b51b73d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa8e9352ee5b043b3e1b6e2062d491010"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaa8e9352ee5b043b3e1b6e2062d491010">AMotionEvent_getHistoricalPressure</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gaa8e9352ee5b043b3e1b6e2062d491010"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0a04bb7ec12928db7e62645e7fad3a9e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga0a04bb7ec12928db7e62645e7fad3a9e">AMotionEvent_getHistoricalSize</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga0a04bb7ec12928db7e62645e7fad3a9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf437f223668b97f19ebdbad4b9cf4483"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaf437f223668b97f19ebdbad4b9cf4483">AMotionEvent_getHistoricalTouchMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gaf437f223668b97f19ebdbad4b9cf4483"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga126715d966e989652aa1ae5d38e0e898"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga126715d966e989652aa1ae5d38e0e898">AMotionEvent_getHistoricalTouchMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga126715d966e989652aa1ae5d38e0e898"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga160a5830e791e8c42ae97f51b92233d2"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga160a5830e791e8c42ae97f51b92233d2">AMotionEvent_getHistoricalToolMajor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga160a5830e791e8c42ae97f51b92233d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafe01aa7576a6d1bce750fb8482355849"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gafe01aa7576a6d1bce750fb8482355849">AMotionEvent_getHistoricalToolMinor</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gafe01aa7576a6d1bce750fb8482355849"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaab9cb8fa670175ecc73c75eed4e5cd3f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaab9cb8fa670175ecc73c75eed4e5cd3f">AMotionEvent_getHistoricalOrientation</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:gaab9cb8fa670175ecc73c75eed4e5cd3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7ca740e1324f3cdb934252dce0c982d0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga7ca740e1324f3cdb934252dce0c982d0">AMotionEvent_getHistoricalAxisValue</a> (const <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *motion_event, int32_t axis, size_t pointer_index, size_t history_index)</td></tr>
-<tr class="separator:ga7ca740e1324f3cdb934252dce0c982d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga900711156bfb58d1a4b158da7874930f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga900711156bfb58d1a4b158da7874930f">AInputQueue_attachLooper</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int ident, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
-<tr class="separator:ga900711156bfb58d1a4b158da7874930f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaeebe9f83392ac79b31ca40a6fd4dbeff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gaeebe9f83392ac79b31ca40a6fd4dbeff">AInputQueue_detachLooper</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td></tr>
-<tr class="separator:gaeebe9f83392ac79b31ca40a6fd4dbeff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2b72ad6ab5ef656e8c41163aa7871c96"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga2b72ad6ab5ef656e8c41163aa7871c96">AInputQueue_hasEvents</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td></tr>
-<tr class="separator:ga2b72ad6ab5ef656e8c41163aa7871c96"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga88de12e2b39787ba7d3e4ce2ea46a48c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga88de12e2b39787ba7d3e4ce2ea46a48c">AInputQueue_getEvent</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> **outEvent)</td></tr>
-<tr class="separator:ga88de12e2b39787ba7d3e4ce2ea46a48c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadecd32e6c7aefa4a508b355550d3eaa9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#gadecd32e6c7aefa4a508b355550d3eaa9">AInputQueue_preDispatchEvent</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event)</td></tr>
-<tr class="separator:gadecd32e6c7aefa4a508b355550d3eaa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga17e87e0f35d47d729eac31a0dfb1ac33"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___input.html#ga17e87e0f35d47d729eac31a0dfb1ac33">AInputQueue_finishEvent</a> (<a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue, <a class="el" href="group___input.html#gac35dbbc035371e799d8badabc981e8fa">AInputEvent</a> *event, int handled)</td></tr>
-<tr class="separator:ga17e87e0f35d47d729eac31a0dfb1ac33"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/keycodes_8h.jd b/docs/html/ndk/reference/keycodes_8h.jd
deleted file mode 100644
index 338a361..0000000
--- a/docs/html/ndk/reference/keycodes_8h.jd
+++ /dev/null
@@ -1,350 +0,0 @@
-page.title=keycodes.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#enum-members">Enumerations</a>  </div>
-  <div class="headertitle">
-<div class="title">keycodes.h File Reference<div class="ingroups"><a class="el" href="group___input.html">Input</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;sys/types.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga6b7b47dd702d9e331586d485013fd1ea"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa593f8ae18990d627785719284a12a6f">AKEYCODE_UNKNOWN</a> = 0, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2dc78d3a93876b77402d2a7f02e4b899">AKEYCODE_SOFT_LEFT</a> = 1, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8cadfbfcaaa83fef168de13639adfcae">AKEYCODE_SOFT_RIGHT</a> = 2, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa526c2411b7476b7ae579f57a0378b2dd">AKEYCODE_HOME</a> = 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeb71c74bf556ba72e9c8f8dcbe5453d0">AKEYCODE_BACK</a> = 4, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8b5720ebdd3576c2b536ec9228273d8f">AKEYCODE_CALL</a> = 5, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaff971957ae3a4e272b21987854e18d9b">AKEYCODE_ENDCALL</a> = 6, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23f585ea17aeceaad2111c51ab289e79">AKEYCODE_0</a> = 7, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabcac88b54f8d764bc4573ecc5b9571b0">AKEYCODE_1</a> = 8, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2079c6fb75141968b60ed79fe895d6db">AKEYCODE_2</a> = 9, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa40ccc018c0637e4d938e66b789054551">AKEYCODE_3</a> = 10, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c2d141c3906bd97cfec91443356f7b">AKEYCODE_4</a> = 11, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca99d2be4a3723ba3406944ad623f6e">AKEYCODE_5</a> = 12, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa72bc6560e24d08ff8f3116dac9179079">AKEYCODE_6</a> = 13, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa27070499acdb6c527a285b3840ec7bff">AKEYCODE_7</a> = 14, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93543b23683b33724ecf77ac5a8c19ab">AKEYCODE_8</a> = 15, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa31cd4d7c4e59cf7b057b6c248cff516d">AKEYCODE_9</a> = 16, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1461fbf54e3dcba96e5d6d0638c18305">AKEYCODE_STAR</a> = 17, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf448758c44899e41b67f76dfe3be51e9">AKEYCODE_POUND</a> = 18, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf2fd3133a88f3b6725834032bd74bd9e">AKEYCODE_DPAD_UP</a> = 19, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa84b721b13aae56c9f1d3c22b3d81627a">AKEYCODE_DPAD_DOWN</a> = 20, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa668dfb3ed79a37c2c07838c161c1b344">AKEYCODE_DPAD_LEFT</a> = 21, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac6f9d81b6239696a1836695bbfc6a975">AKEYCODE_DPAD_RIGHT</a> = 22, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e9c93273fd39148f54167133aa5b9ae">AKEYCODE_DPAD_CENTER</a> = 23, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5b81e325d9efd633eef7535a5b538882">AKEYCODE_VOLUME_UP</a> = 24, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a882dae17080d3b5f3329e79db60c66">AKEYCODE_VOLUME_DOWN</a> = 25, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabecfbcb9b6f5e85fdfdfa98fbc3326e6">AKEYCODE_POWER</a> = 26, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8670880765756933d3d1a10186d39e26">AKEYCODE_CAMERA</a> = 27, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95bd8c25adeaa570108c7403f08a2901">AKEYCODE_CLEAR</a> = 28, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa424a091c62d40f5d65908c9730ae9014">AKEYCODE_A</a> = 29, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa65d3bf8d6a8a6c2f7c1b08394f313758">AKEYCODE_B</a> = 30, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaeed584f454e508ce931bcb33d37adb04">AKEYCODE_C</a> = 31, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7e4cb3ef66209a2779be2c8239b57b51">AKEYCODE_D</a> = 32, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae218af7ceb207227bb10f0525e68a8d0">AKEYCODE_E</a> = 33, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa455f71ecfe59af0fbd901ac0d0a8d53a">AKEYCODE_F</a> = 34, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa165067e10464019411f768bba9e533d9">AKEYCODE_G</a> = 35, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad89a91a1500cb162f22962781ebfd9dc">AKEYCODE_H</a> = 36, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4d44b5e4a19580540d8d77bf5755d74b">AKEYCODE_I</a> = 37, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa70c259612ccec117d70afaef947a6a7a">AKEYCODE_J</a> = 38, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ce56cf50d3632c275c524bd78d0d932">AKEYCODE_K</a> = 39, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab61c534fd0f4e56c4ba13861a2f5982b">AKEYCODE_L</a> = 40, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa43b19e5e5234ce90c8e7ef67dd0cabd1">AKEYCODE_M</a> = 41, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c0b26804c89560a9e87c45f7f9fed36">AKEYCODE_N</a> = 42, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa249667bc4a59d99be1914535877329fb">AKEYCODE_O</a> = 43, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac68ef56b78bd0c8626cc68bb6cb9156f">AKEYCODE_P</a> = 44, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa932cf6ea8d87e6d6d97af658dd0fa206">AKEYCODE_Q</a> = 45, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaba25ac2c15a8edbbbff16a9fe6e74532">AKEYCODE_R</a> = 46, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae1ed25c28a8fce578cddb17ca6888ff6">AKEYCODE_S</a> = 47, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2feac8b458ef8eb9c0a0dd73766927c2">AKEYCODE_T</a> = 48, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac1a220314f986aae45d7fe3b35501595">AKEYCODE_U</a> = 49, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4043bc48fa55cce7825176052d6e199a">AKEYCODE_V</a> = 50, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0c80e98547c3daa01f3d9e7f4f00425">AKEYCODE_W</a> = 51, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec585cebac89004faffbdc28dc6d81c5">AKEYCODE_X</a> = 52, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06fc277ef25acdd89d64c18eed0daa9b">AKEYCODE_Y</a> = 53, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7439a09f219a0addc13c758ef7508cce">AKEYCODE_Z</a> = 54, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0ca0bfbdc67b2c6f76e8fcaaf782c227">AKEYCODE_COMMA</a> = 55, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9dd68c8ecebd4e274e8c357dcdfe8a04">AKEYCODE_PERIOD</a> = 56, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3dec175158abe8679bedd98ed1bc3e1a">AKEYCODE_ALT_LEFT</a> = 57, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd9b6b0846c6999f5df47d29e58ac95d">AKEYCODE_ALT_RIGHT</a> = 58, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafb9875645596928cec46368e74499dc4">AKEYCODE_SHIFT_LEFT</a> = 59, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf9eab1348ae1e8f18ad5bf3c77df4212">AKEYCODE_SHIFT_RIGHT</a> = 60, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1b1bfda850b2acd0b60e8456e2bfa958">AKEYCODE_TAB</a> = 61, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa10389300ac5d70f8d9733564b3cab4e7">AKEYCODE_SPACE</a> = 62, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6c1c6752d5db5e02da51d8937e5e3c6f">AKEYCODE_SYM</a> = 63, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaded9ec81ae6dab451665317723b94083">AKEYCODE_EXPLORER</a> = 64, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaade96efe470f428bb5c4eaea6ffc3681c">AKEYCODE_ENVELOPE</a> = 65, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac784a7bbbfbdab05fab6c6a1f29c98ff">AKEYCODE_ENTER</a> = 66, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacd013221b457d98975dc47e49817e28a">AKEYCODE_DEL</a> = 67, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa929561086ae7b519fa962597bc85f171">AKEYCODE_GRAVE</a> = 68, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaca10bd34ad0abecfecace908b8cb92ca">AKEYCODE_MINUS</a> = 69, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0a197df7ec719c95ddcd6836e76c8498">AKEYCODE_EQUALS</a> = 70, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabdeda0d373aa37ef2ded5ffdfc008708">AKEYCODE_LEFT_BRACKET</a> = 71, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa084dfa52626040a08d374f8aec066e6a">AKEYCODE_RIGHT_BRACKET</a> = 72, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac90eb064382e3c482ae86abb7b3f701">AKEYCODE_BACKSLASH</a> = 73, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac0a2920161f4f2d97b0b060614b23391">AKEYCODE_SEMICOLON</a> = 74, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab5518a8502914ea5f87ef5d29b32b1b1">AKEYCODE_APOSTROPHE</a> = 75, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa54c047be3811d637a33d9b3e39d16e1a">AKEYCODE_SLASH</a> = 76, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7284f79a266ede479b79726082642e16">AKEYCODE_AT</a> = 77, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe6e880f65bebbdd5246a4164c4ab37a">AKEYCODE_NUM</a> = 78, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0d3d29515a4815fe8d6d8d3291507a33">AKEYCODE_HEADSETHOOK</a> = 79, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa23be9506f92f6efe14d47306a39a2187">AKEYCODE_FOCUS</a> = 80, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7f72d867b311e0845aef732dcc66495">AKEYCODE_PLUS</a> = 81, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa707b85e89923b0f760be795972a87d76">AKEYCODE_MENU</a> = 82, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6115506352a5828532fc6a0b91683331">AKEYCODE_NOTIFICATION</a> = 83, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac644fd307fd0ef0d3ed3d2e074c1a4b7">AKEYCODE_SEARCH</a> = 84, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa42f8fe71e8d45b5a83d83d80c3da40e1">AKEYCODE_MEDIA_PLAY_PAUSE</a> = 85, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac4faa33993d80db1326073ea15a38e7d">AKEYCODE_MEDIA_STOP</a> = 86, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5a6c3fc963e8163852b9a23e3a198b3">AKEYCODE_MEDIA_NEXT</a> = 87, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81432c31b00d47f768c29163eb276acb">AKEYCODE_MEDIA_PREVIOUS</a> = 88, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaecd53183b84c23a2ca65670a23674319">AKEYCODE_MEDIA_REWIND</a> = 89, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa69e648024402af688d490a2041f15bca">AKEYCODE_MEDIA_FAST_FORWARD</a> = 90, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f6675d38f50e3556a8531839fd83f02">AKEYCODE_MUTE</a> = 91, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4fd0d4ea5b6898f4a40011b97a739a04">AKEYCODE_PAGE_UP</a> = 92, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0b7fe1c18f53e6328657858a88826393">AKEYCODE_PAGE_DOWN</a> = 93, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacdc7c004da1594fa156de87befef5f41">AKEYCODE_PICTSYMBOLS</a> = 94, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad6a1f88b2cc3b6ff8f1724eb01473ec3">AKEYCODE_SWITCH_CHARSET</a> = 95, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaef2d2ec912aaa9e7215aeab79f7fb086">AKEYCODE_BUTTON_A</a> = 96, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa721765c8f0bbcdb68af06817dbec8e53">AKEYCODE_BUTTON_B</a> = 97, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad622ad5df40d2fdf806abb2adda73b3d">AKEYCODE_BUTTON_C</a> = 98, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa21174962f95e32cd0345ce657d03ebc7">AKEYCODE_BUTTON_X</a> = 99, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6654a8b2c700f7783433c86fcdae7919">AKEYCODE_BUTTON_Y</a> = 100, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa06156b68e6de951b44fc662e1b16041f">AKEYCODE_BUTTON_Z</a> = 101, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa32e159826404c7d76c2a433c24de82a2">AKEYCODE_BUTTON_L1</a> = 102, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7c614b3966583b0ad027e45f594ede46">AKEYCODE_BUTTON_R1</a> = 103, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa36a38421637cfa5ebfd8a0296650cdf4">AKEYCODE_BUTTON_L2</a> = 104, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa46d487e9fe31855b7b46739bad58fe3e">AKEYCODE_BUTTON_R2</a> = 105, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68c5d8dcd8fe708ada8f4a4e17feb638">AKEYCODE_BUTTON_THUMBL</a> = 106, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9759d817172d268ced1748909a5f5fbe">AKEYCODE_BUTTON_THUMBR</a> = 107, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3c818d106f4ec793a43749c4c26a8a4">AKEYCODE_BUTTON_START</a> = 108, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa598289bc85f647c237729126ea392a43">AKEYCODE_BUTTON_SELECT</a> = 109, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa19839eebec939407d901a33b75cf2594">AKEYCODE_BUTTON_MODE</a> = 110, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac52177e5508edacb8e9c6d3a25db4fb6">AKEYCODE_ESCAPE</a> = 111, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9516bc190d37fea27e07ddab0c607b51">AKEYCODE_FORWARD_DEL</a> = 112, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaca9d0df6cc18492209eb287e659aeb1">AKEYCODE_CTRL_LEFT</a> = 113, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa99b317cf2f1eb6b06d0226e05223e60c">AKEYCODE_CTRL_RIGHT</a> = 114, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab9dcb68b35c85d380846c85f323868f1">AKEYCODE_CAPS_LOCK</a> = 115, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa78ff5c8316235635f76e3c3179e9a7fc">AKEYCODE_SCROLL_LOCK</a> = 116, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaaadfb2d920bbe422c096120d39811c58">AKEYCODE_META_LEFT</a> = 117, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68038455e2b0846db51f9957e0df9cb8">AKEYCODE_META_RIGHT</a> = 118, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1764b777aa56605f4029d3c71fe70722">AKEYCODE_FUNCTION</a> = 119, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14e22c69bcd47ffb4445ee18a4332d84">AKEYCODE_SYSRQ</a> = 120, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa047501f9cf9bce00e6048d8759ea3a23">AKEYCODE_BREAK</a> = 121, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7544f3de2fb5f78bec62af94a32fdc58">AKEYCODE_MOVE_HOME</a> = 122, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5605f49f5271430f5f150efb3cd0398a">AKEYCODE_MOVE_END</a> = 123, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62f663d11e91af750a51ddd060b08644">AKEYCODE_INSERT</a> = 124, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafbf0a16c7746e5dee2fd3adbd50da88a">AKEYCODE_FORWARD</a> = 125, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa615cf6202b0ae0ed550f42f6c64b36a1">AKEYCODE_MEDIA_PLAY</a> = 126, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f4e0178c2028b3042b0a5948e38e4e4">AKEYCODE_MEDIA_PAUSE</a> = 127, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6788c6e1443140b0ec4d004d8293e998">AKEYCODE_MEDIA_CLOSE</a> = 128, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa317bffd44306b021c401d3a26b82a7f6">AKEYCODE_MEDIA_EJECT</a> = 129, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e1eae0b245176aaa024a53411441f9">AKEYCODE_MEDIA_RECORD</a> = 130, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3b84f2c503a9e839f3d36e10e3307fcf">AKEYCODE_F1</a> = 131, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1360f7ec66aa6421e240dae637262e84">AKEYCODE_F2</a> = 132, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a4ce6105e12a3a9071cae2f40515085">AKEYCODE_F3</a> = 133, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa882050e4d0f917470a5b91fbf6ae9ebf">AKEYCODE_F4</a> = 134, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab01807c72b46620bb50fcb6abe24d937">AKEYCODE_F5</a> = 135, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa04a12e81ed80bb42ef5c63cedf0dc60">AKEYCODE_F6</a> = 136, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9583b8e4b0d994b7e3a193b67cf6020c">AKEYCODE_F7</a> = 137, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55ca54d42d8df70de2ce9031db1344c8">AKEYCODE_F8</a> = 138, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0c8225c0ef98da730933ae914077dbc9">AKEYCODE_F9</a> = 139, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa60660b13acab39282d0558cdcc93474">AKEYCODE_F10</a> = 140, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa64cc7b1d8e53d90ff57c39d0b5a4dd22">AKEYCODE_F11</a> = 141, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa491000231e0ba221b6916b1d9d2c9fb7">AKEYCODE_F12</a> = 142, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad5e349eadd3255c6ad4982dc40ed23ef">AKEYCODE_NUM_LOCK</a> = 143, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa343df35e6a0ad0599e19b8ef7174909b">AKEYCODE_NUMPAD_0</a> = 144, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c0ec8e42917fa9ac53977db3e6aeb17">AKEYCODE_NUMPAD_1</a> = 145, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4dfd17c2209908e1ec890e10a3211f89">AKEYCODE_NUMPAD_2</a> = 146, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1efe1886a4b472b999215c0e81f7386">AKEYCODE_NUMPAD_3</a> = 147, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1fdd16681c1441b934f679b94fd0e4f8">AKEYCODE_NUMPAD_4</a> = 148, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf5916003e7c737a8cc06e52d2ee76c3b">AKEYCODE_NUMPAD_5</a> = 149, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa13b83389e0f5de129227af4b8d3f035d">AKEYCODE_NUMPAD_6</a> = 150, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaed9468951ef2887c07c8095c2e7d4c93">AKEYCODE_NUMPAD_7</a> = 151, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5f0a300566235720eb93fee9f2196642">AKEYCODE_NUMPAD_8</a> = 152, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad0c490e3965df546e2d5a83edf423d95">AKEYCODE_NUMPAD_9</a> = 153, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaac108b744e8f93af69158d146425236c">AKEYCODE_NUMPAD_DIVIDE</a> = 154, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47ce00b838e7ee0a34066dc2595ac735">AKEYCODE_NUMPAD_MULTIPLY</a> = 155, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bee314dbbea0a349eb301d10256bbe">AKEYCODE_NUMPAD_SUBTRACT</a> = 156, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa9d2fefa9a3f6037f48b247e66dd28c35">AKEYCODE_NUMPAD_ADD</a> = 157, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6aab6b5914e120b43b3a1a8269e9cee1">AKEYCODE_NUMPAD_DOT</a> = 158, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa900e3bb0bc4ff70ba786f18ff4db0bd1">AKEYCODE_NUMPAD_COMMA</a> = 159, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa79432be5f7a44e99ddc3721fd9fd212e">AKEYCODE_NUMPAD_ENTER</a> = 160, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c1007a59641499ee5e1508e747c5ed">AKEYCODE_NUMPAD_EQUALS</a> = 161, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacc903e9eb495cf6cef7c6bc825f82f54">AKEYCODE_NUMPAD_LEFT_PAREN</a> = 162, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7662e0f2a099239dc69f6a27c7daabf9">AKEYCODE_NUMPAD_RIGHT_PAREN</a> = 163, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa174a5c7c39753235109696e82870c575">AKEYCODE_VOLUME_MUTE</a> = 164, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17e76263257a5dc654a413c9dc2fd649">AKEYCODE_INFO</a> = 165, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa056914fd17ae539dca44f43745d8e05c">AKEYCODE_CHANNEL_UP</a> = 166, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa18f1808c6a819e787c9a9941f78b910f">AKEYCODE_CHANNEL_DOWN</a> = 167, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacfce9bb78ef8106dce4868f81cca4fb4">AKEYCODE_ZOOM_IN</a> = 168, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf035f5234c3df4589f35a50e99e0535">AKEYCODE_ZOOM_OUT</a> = 169, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0776ffae512b4848e53fce762a3a5017">AKEYCODE_TV</a> = 170, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe7531c40ff4a31614ff6fd61802ebe8">AKEYCODE_WINDOW</a> = 171, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf33a5fa1f163245360aeed89d64b0233">AKEYCODE_GUIDE</a> = 172, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacf2f03b925a02ba6de9fd98737546a60">AKEYCODE_DVR</a> = 173, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa03ce46d177e020690aa9d26a0fa850ae">AKEYCODE_BOOKMARK</a> = 174, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa81ba8d5343362b841b8a62b8679ff994">AKEYCODE_CAPTIONS</a> = 175, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa2bbd457230c3028df6b91d5bdda9159">AKEYCODE_SETTINGS</a> = 176, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafda3b0ea1b158831fc443bf4911a3930">AKEYCODE_TV_POWER</a> = 177, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa1750b29e396bd1fd237ed4aadacc8f5">AKEYCODE_TV_INPUT</a> = 178, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab28aea3a51b11c9f227ce8cd5ff55a3d">AKEYCODE_STB_POWER</a> = 179, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa988b0372359b2bca7390878fdba9e1b5">AKEYCODE_STB_INPUT</a> = 180, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa479d36f9814bd00c8986a252664b938b">AKEYCODE_AVR_POWER</a> = 181, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa57d42dbd8ea4219f76fb116f234e6504">AKEYCODE_AVR_INPUT</a> = 182, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa2d9e3e82e69955f649b586f4518e074c">AKEYCODE_PROG_RED</a> = 183, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaad50c1e2136e47843a8dabca929f8ead1">AKEYCODE_PROG_GREEN</a> = 184, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafa813640412bd41a181f0ec3a33dddc4">AKEYCODE_PROG_YELLOW</a> = 185, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5e82219fdb937fee5a22426c607dd4e0">AKEYCODE_PROG_BLUE</a> = 186, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa53a59a262d6d523bdc2bd30a1e427bad">AKEYCODE_APP_SWITCH</a> = 187, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa28c72c33ab93d83539d0790b7e48336a">AKEYCODE_BUTTON_1</a> = 188, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab8089673fea303c7a299eefd2c327cc3">AKEYCODE_BUTTON_2</a> = 189, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa706a5ff492c80b4653e6fe0dcd278ca1">AKEYCODE_BUTTON_3</a> = 190, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa73c425a063bf6976e1ff8ae9f3cfcbe6">AKEYCODE_BUTTON_4</a> = 191, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa47149f963528ec7abe55066abfb7caf5">AKEYCODE_BUTTON_5</a> = 192, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa55057c8cda53a4c539d02ab1a93ca58b">AKEYCODE_BUTTON_6</a> = 193, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac09e0c0cbbf6449bf106e4199600db35">AKEYCODE_BUTTON_7</a> = 194, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaee64b3e0f30ed09e3c9f01b6c8877c3f">AKEYCODE_BUTTON_8</a> = 195, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaac8e54092c8be5dc0e114ec35f40e00dc">AKEYCODE_BUTTON_9</a> = 196, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7e6f8621909f3461032c33f9c8acaa7">AKEYCODE_BUTTON_10</a> = 197, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab413971c698b6e25d3955667c0142ac1">AKEYCODE_BUTTON_11</a> = 198, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafe4ee1e5446dd12bbb579b412048e79e">AKEYCODE_BUTTON_12</a> = 199, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaabde2ed26594b89d5769eef9f0d1fe6f">AKEYCODE_BUTTON_13</a> = 200, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa1f08dfd2c30ddedf1d2983680e89041b">AKEYCODE_BUTTON_14</a> = 201, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d8d0fb1a610fdb4e53f0fb675b7d7d0">AKEYCODE_BUTTON_15</a> = 202, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa224370cba99bda2db6a1c82fd2f7fa39">AKEYCODE_BUTTON_16</a> = 203, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7b8e87b47c17c5f1e97fcb56faaa26ff">AKEYCODE_LANGUAGE_SWITCH</a> = 204, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa380279768c5c50d92bef2a88394f967f">AKEYCODE_MANNER_MODE</a> = 205, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa68d314a5ec06701205cd0097c5c7145c">AKEYCODE_3D_MODE</a> = 206, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0aa2cfca11b7cabf82341a9dbec83f10">AKEYCODE_CONTACTS</a> = 207, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa114be17d1853c77a7406c024d9e4f076">AKEYCODE_CALENDAR</a> = 208, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14508751d70a0404b194d4b6df83ec72">AKEYCODE_MUSIC</a> = 209, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa293523c40bb9f1d793cd0b984f636573">AKEYCODE_CALCULATOR</a> = 210, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf782be8df9a8ca5dc86c9bfeabac6f22">AKEYCODE_ZENKAKU_HANKAKU</a> = 211, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaadd69273b99eb0b848d98b2d6b3ad3234">AKEYCODE_EISU</a> = 212, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7321e5c6b3cbab142bd16957653b2ac7">AKEYCODE_MUHENKAN</a> = 213, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab0686dd37c57d833d1158b7f1d85ee02">AKEYCODE_HENKAN</a> = 214, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3be7db22b3c8aa046a46631e44863c28">AKEYCODE_KATAKANA_HIRAGANA</a> = 215, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5ee19d21912056b902e283efa2d9d14b">AKEYCODE_YEN</a> = 216, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaae8b0af04dac5ea56fd55e577fd9e6be4">AKEYCODE_RO</a> = 217, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa62d090ae5c95a04dacdff79817dad531">AKEYCODE_KANA</a> = 218, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3f036adb654c7752890a283ecbf838">AKEYCODE_ASSIST</a> = 219, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7cf1bf3528b6d8a0e86998287fe00650">AKEYCODE_BRIGHTNESS_DOWN</a> = 220, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa0af6ec416c09d160e364466faa955c36">AKEYCODE_BRIGHTNESS_UP</a> = 221, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3cdb53cdf8c576e272502da06daa52e1">AKEYCODE_MEDIA_AUDIO_TRACK</a> = 222, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaafc077e5a6b447ea060c144f6e65bd207">AKEYCODE_SLEEP</a> = 223, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa903c5152d26b3011ae521afa06759429">AKEYCODE_WAKEUP</a> = 224, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0ecddd3dce52cf60c96c5d430b1f553">AKEYCODE_PAIRING</a> = 225, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf3ddf83cb2f701911b03c3a738e2e73a">AKEYCODE_MEDIA_TOP_MENU</a> = 226, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaa22858c3c30d596ad60f355f75df86e1">AKEYCODE_11</a> = 227, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa781c31195e55b2dcbdd772560dc61aa5">AKEYCODE_12</a> = 228, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa187963dd6f74b96f132f23e01dea35e9">AKEYCODE_LAST_CHANNEL</a> = 229, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa954c2251b2cb53f47637802cb66baf06">AKEYCODE_TV_DATA_SERVICE</a> = 230, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa95898663b7f74c93d0b860a43528c744">AKEYCODE_VOICE_ASSIST</a> = 231, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa93dd3fd752701af5a5491e01cc15db72">AKEYCODE_TV_RADIO_SERVICE</a> = 232, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa7d3d7b89756df37f01d6d0f13beff1db">AKEYCODE_TV_TELETEXT</a> = 233, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa630a08e07a3b4c6bcac9a1a72d176055">AKEYCODE_TV_NUMBER_ENTRY</a> = 234, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa14f2b6fe8550832ef9e3f9aa53164073">AKEYCODE_TV_TERRESTRIAL_ANALOG</a> = 235, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaacad8c149251a78760a5fe4931b9cdf16">AKEYCODE_TV_TERRESTRIAL_DIGITAL</a> = 236, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa3707d4396417535a611e4548afe33936">AKEYCODE_TV_SATELLITE</a> = 237, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8c52e7d06525c0ee5d943d63a0fa8ea5">AKEYCODE_TV_SATELLITE_BS</a> = 238, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4eea1809a9ff679ed7773332d728c6b0">AKEYCODE_TV_SATELLITE_CS</a> = 239, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa17c0e68066b86610ff168c6367af36eb">AKEYCODE_TV_SATELLITE_SERVICE</a> = 240, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaec5e46a5afc57953d1772e086307aa42">AKEYCODE_TV_NETWORK</a> = 241, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaabe33a80d6d3bf889af25cbd77fdb89f9">AKEYCODE_TV_ANTENNA_CABLE</a> = 242, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a50de965f50ab3aa42772aac0808445">AKEYCODE_TV_INPUT_HDMI_1</a> = 243, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab7ec65c008471d771bf879ec012f5c7f">AKEYCODE_TV_INPUT_HDMI_2</a> = 244, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa6a0f267a2696d15bf16127121b1f1c7f">AKEYCODE_TV_INPUT_HDMI_3</a> = 245, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4437c1d8d2d33058cfa71ec7b2771ec5">AKEYCODE_TV_INPUT_HDMI_4</a> = 246, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5c3097f14c6582958ba1d14d70115ccd">AKEYCODE_TV_INPUT_COMPOSITE_1</a> = 247, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaada13cbb9d619bc610678ad66325647b9">AKEYCODE_TV_INPUT_COMPOSITE_2</a> = 248, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa156e2dba81e7c73624ccf8c2ef8833ae">AKEYCODE_TV_INPUT_COMPONENT_1</a> = 249, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8db9b6ee1457267abea03430781bb0ec">AKEYCODE_TV_INPUT_COMPONENT_2</a> = 250, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa149b2c8a4817075c0a41e0adf11c8e85">AKEYCODE_TV_INPUT_VGA_1</a> = 251, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa419f0adac43cad104cd6cf83dc5f13f6">AKEYCODE_TV_AUDIO_DESCRIPTION</a> = 252, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaccc5900ca5dd399d5ce11dd8ca324678">AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP</a> = 253, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa5fca6a9ec1ce246bf3c53d859ac9f5eb">AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN</a> = 254, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa8e79045045293070c8eb9e408f1335b4">AKEYCODE_TV_ZOOM_MODE</a> = 255, 
-<br/>
-&#160;&#160;<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaa4c18feeafff3c41081073c025ee017b8">AKEYCODE_TV_CONTENTS_MENU</a> = 256, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaadde70071f6a432f367079efa6e1a6fe">AKEYCODE_TV_MEDIA_CONTEXT_MENU</a> = 257, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaaf0293c2a63e4d955080334bef6640840">AKEYCODE_TV_TIMER_PROGRAMMING</a> = 258, 
-<a class="el" href="group___input.html#gga6b7b47dd702d9e331586d485013fd1eaab062b403701292c9e2db96a1f88cc6d9">AKEYCODE_HELP</a> = 259
-<br/>
- }</td></tr>
-<tr class="separator:ga6b7b47dd702d9e331586d485013fd1ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/looper_8h.jd b/docs/html/ndk/reference/looper_8h.jd
deleted file mode 100644
index 9171631..0000000
--- a/docs/html/ndk/reference/looper_8h.jd
+++ /dev/null
@@ -1,70 +0,0 @@
-page.title=looper.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">looper.h File Reference<div class="ingroups"><a class="el" href="group___looper.html">Looper</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gadb10521a80138b777ba1bc2ca74d4af5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a></td></tr>
-<tr class="separator:gadb10521a80138b777ba1bc2ca74d4af5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga410b184b4e48302c439e36c8ce0a7a89"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> )(int fd, int events, void *data)</td></tr>
-<tr class="separator:ga410b184b4e48302c439e36c8ce0a7a89"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gaf9bdc3014f3d54c426b6d2df10de4960"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___looper.html#ggaf9bdc3014f3d54c426b6d2df10de4960a1fff26ab5859b0308b58a3f8d58ef1eb">ALOOPER_PREPARE_ALLOW_NON_CALLBACKS</a> = 1&lt;&lt;0
- }</td></tr>
-<tr class="separator:gaf9bdc3014f3d54c426b6d2df10de4960"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gadb49720dc49f7d4e4cf9adbf2948e409"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a55528f1b28df17cc4b6317cc0d0fde47">ALOOPER_POLL_WAKE</a> = -1, 
-<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a64fe936780bfd9927affaf8e8cc81cc2">ALOOPER_POLL_CALLBACK</a> = -2, 
-<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409a3fe4eec66dff78a9fa8afca02e8b8443">ALOOPER_POLL_TIMEOUT</a> = -3, 
-<a class="el" href="group___looper.html#ggadb49720dc49f7d4e4cf9adbf2948e409af8ebd4022f6f5d5fea864f6999b7e6b4">ALOOPER_POLL_ERROR</a> = -4
- }</td></tr>
-<tr class="separator:gadb49720dc49f7d4e4cf9adbf2948e409"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaae05225933a42f81e7c4a9fb286596f9"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9ae3d18f8dd1faf6f34468df10667949bc">ALOOPER_EVENT_INPUT</a> = 1 &lt;&lt; 0, 
-<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a71273fd07e009057e6e3475d10f8286d">ALOOPER_EVENT_OUTPUT</a> = 1 &lt;&lt; 1, 
-<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a14016d8f39373b8ce061276a957960f6">ALOOPER_EVENT_ERROR</a> = 1 &lt;&lt; 2, 
-<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9a5e7fb5acdecef18b2c293f6309e5d4ab">ALOOPER_EVENT_HANGUP</a> = 1 &lt;&lt; 3, 
-<br/>
-&#160;&#160;<a class="el" href="group___looper.html#ggaae05225933a42f81e7c4a9fb286596f9aefe82c6ce8e02d13aceaebdec15c2aff">ALOOPER_EVENT_INVALID</a> = 1 &lt;&lt; 4
-<br/>
- }</td></tr>
-<tr class="separator:gaae05225933a42f81e7c4a9fb286596f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga741ccd90a0eb9209c6bddf2326d89e4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga741ccd90a0eb9209c6bddf2326d89e4a">ALooper_forThread</a> ()</td></tr>
-<tr class="separator:ga741ccd90a0eb9209c6bddf2326d89e4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1a070b904dd957cc65af9eb5ef6dfa25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga1a070b904dd957cc65af9eb5ef6dfa25">ALooper_prepare</a> (int opts)</td></tr>
-<tr class="separator:ga1a070b904dd957cc65af9eb5ef6dfa25"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae1ad7ac48ab01a34bfd25840c92ff07b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gae1ad7ac48ab01a34bfd25840c92ff07b">ALooper_acquire</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
-<tr class="separator:gae1ad7ac48ab01a34bfd25840c92ff07b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab723c3c2ac2c66bc695913a194073727"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gab723c3c2ac2c66bc695913a194073727">ALooper_release</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
-<tr class="separator:gab723c3c2ac2c66bc695913a194073727"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2a9044602b76fef7f47c7e11a801561c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga2a9044602b76fef7f47c7e11a801561c">ALooper_pollOnce</a> (int timeoutMillis, int *outFd, int *outEvents, void **outData)</td></tr>
-<tr class="separator:ga2a9044602b76fef7f47c7e11a801561c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa7cd0636edc4ed227aadc585360ebefa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gaa7cd0636edc4ed227aadc585360ebefa">ALooper_pollAll</a> (int timeoutMillis, int *outFd, int *outEvents, void **outData)</td></tr>
-<tr class="separator:gaa7cd0636edc4ed227aadc585360ebefa"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab2585652f8ae2e2444979194ebe32aaf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gab2585652f8ae2e2444979194ebe32aaf">ALooper_wake</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper)</td></tr>
-<tr class="separator:gab2585652f8ae2e2444979194ebe32aaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga2668285bfadcf21ef4d371568a30be33"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#ga2668285bfadcf21ef4d371568a30be33">ALooper_addFd</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int fd, int ident, int events, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
-<tr class="separator:ga2668285bfadcf21ef4d371568a30be33"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf7d68ed05698b251489b4f6c8e54daad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___looper.html#gaf7d68ed05698b251489b4f6c8e54daad">ALooper_removeFd</a> (<a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int fd)</td></tr>
-<tr class="separator:gaf7d68ed05698b251489b4f6c8e54daad"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/modules.jd b/docs/html/ndk/reference/modules.jd
deleted file mode 100644
index 2da7307..0000000
--- a/docs/html/ndk/reference/modules.jd
+++ /dev/null
@@ -1,23 +0,0 @@
-page.title=Modules
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">Modules</div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock">Here is a list of all modules:</div><div class="directory">
-<table class="directory">
-<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___asset.html" target="_self">Asset</a></td><td class="desc"></td></tr>
-<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___bitmap.html" target="_self">Bitmap</a></td><td class="desc"></td></tr>
-<tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___configuration.html" target="_self">Configuration</a></td><td class="desc"></td></tr>
-<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___input.html" target="_self">Input</a></td><td class="desc"></td></tr>
-<tr id="row_4_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___looper.html" target="_self">Looper</a></td><td class="desc"></td></tr>
-<tr id="row_5_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___native_activity.html" target="_self">Native Activity</a></td><td class="desc"></td></tr>
-<tr id="row_6_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><a class="el" href="group___storage.html" target="_self">Storage</a></td><td class="desc"></td></tr>
-<tr id="row_7_"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><a class="el" href="group___sensor.html" target="_self">Sensor</a></td><td class="desc"></td></tr>
-</table>
-</div><!-- directory -->
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/native__activity_8h.jd b/docs/html/ndk/reference/native__activity_8h.jd
deleted file mode 100644
index 147ffdb..0000000
--- a/docs/html/ndk/reference/native__activity_8h.jd
+++ /dev/null
@@ -1,74 +0,0 @@
-page.title=native_activity.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a> &#124;
-<a href="#var-members">Variables</a>  </div>
-  <div class="headertitle">
-<div class="title">native_activity.h File Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
-<code>#include &lt;sys/types.h&gt;</code><br/>
-<code>#include &lt;jni.h&gt;</code><br/>
-<code>#include &lt;<a class="el" href="asset__manager_8h.html">android/asset_manager.h</a>&gt;</code><br/>
-<code>#include &lt;<a class="el" href="input_8h.html">android/input.h</a>&gt;</code><br/>
-<code>#include &lt;<a class="el" href="native__window_8h.html">android/native_window.h</a>&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga8abd07923f37feb1ce724d139cc2609d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_native_activity.html">ANativeActivity</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga8abd07923f37feb1ce724d139cc2609d">ANativeActivity</a></td></tr>
-<tr class="separator:ga8abd07923f37feb1ce724d139cc2609d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga28dca784e5ee939427135c72c0151c38"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/>
-<a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga28dca784e5ee939427135c72c0151c38">ANativeActivityCallbacks</a></td></tr>
-<tr class="separator:ga28dca784e5ee939427135c72c0151c38"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga569a53bcac3fcedb0189b7c412ebcb22"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, void *savedState, size_t savedStateSize)</td></tr>
-<tr class="separator:ga569a53bcac3fcedb0189b7c412ebcb22"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga39fca1837c5ce7715cbf571669660c13"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9">ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT</a> = 0x0001, 
-<a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</a> = 0x0002
- }</td></tr>
-<tr class="separator:ga39fca1837c5ce7715cbf571669660c13"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaaf8fd5f0e57d456151c951e0f3715fc4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807">ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY</a> = 0x0001, 
-<a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f">ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS</a> = 0x0002
- }</td></tr>
-<tr class="separator:gaaf8fd5f0e57d456151c951e0f3715fc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga4d872ae54a239704c06a0517e23cc0ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga4d872ae54a239704c06a0517e23cc0ad">ANativeActivity_finish</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:ga4d872ae54a239704c06a0517e23cc0ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec8b12decdf2b9841344e75c4c038c5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaec8b12decdf2b9841344e75c4c038c5a">ANativeActivity_setWindowFormat</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, int32_t format)</td></tr>
-<tr class="separator:gaec8b12decdf2b9841344e75c4c038c5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa1d091ca4a99b0ce570bab1c8c06f297"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaa1d091ca4a99b0ce570bab1c8c06f297">ANativeActivity_setWindowFlags</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t addFlags, uint32_t removeFlags)</td></tr>
-<tr class="separator:gaa1d091ca4a99b0ce570bab1c8c06f297"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga14eaeb6190f266369023b04d8ab9dba7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga14eaeb6190f266369023b04d8ab9dba7">ANativeActivity_showSoftInput</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t flags)</td></tr>
-<tr class="separator:ga14eaeb6190f266369023b04d8ab9dba7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf673d6efea7ce517ef46ff2551b25944"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaf673d6efea7ce517ef46ff2551b25944">ANativeActivity_hideSoftInput</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t flags)</td></tr>
-<tr class="separator:gaf673d6efea7ce517ef46ff2551b25944"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
-Variables</h2></td></tr>
-<tr class="memitem:ga02791d0d490839055169f39fdc905c5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">ANativeActivity_onCreate</a></td></tr>
-<tr class="separator:ga02791d0d490839055169f39fdc905c5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/native__window_8h.jd b/docs/html/ndk/reference/native__window_8h.jd
deleted file mode 100644
index 75f9469..0000000
--- a/docs/html/ndk/reference/native__window_8h.jd
+++ /dev/null
@@ -1,61 +0,0 @@
-page.title=native_window.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">native_window.h File Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;<a class="el" href="rect_8h.html">android/rect.h</a>&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga66956d540c2e3709e12156d195e64726"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a></td></tr>
-<tr class="separator:ga66956d540c2e3709e12156d195e64726"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad0983ca473ce36293baf5e51a14c3357"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gad0983ca473ce36293baf5e51a14c3357">ANativeWindow_Buffer</a></td></tr>
-<tr class="separator:gad0983ca473ce36293baf5e51a14c3357"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga94798fdadfbf49a7c658ace669a1d310"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">WINDOW_FORMAT_RGBA_8888</a> = 1, 
-<a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">WINDOW_FORMAT_RGBX_8888</a> = 2, 
-<a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">WINDOW_FORMAT_RGB_565</a> = 4
- }</td></tr>
-<tr class="separator:ga94798fdadfbf49a7c658ace669a1d310"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga533876b57909243b238927344a6592db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">ANativeWindow_acquire</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga533876b57909243b238927344a6592db"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae944e98865b902bd924663785d7b0258"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">ANativeWindow_release</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:gae944e98865b902bd924663785d7b0258"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga186f0040c5cb405a63d93889bb9a4ff1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga186f0040c5cb405a63d93889bb9a4ff1">ANativeWindow_getWidth</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga186f0040c5cb405a63d93889bb9a4ff1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga463ba99f6dee3edc1167a54e1ff7de15"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga463ba99f6dee3edc1167a54e1ff7de15">ANativeWindow_getHeight</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga463ba99f6dee3edc1167a54e1ff7de15"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga9e3a492a8300146b30d864f0ab22bb2e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga9e3a492a8300146b30d864f0ab22bb2e">ANativeWindow_getFormat</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga9e3a492a8300146b30d864f0ab22bb2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7b0652533998d61e1a3b542485889113"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga7b0652533998d61e1a3b542485889113">ANativeWindow_setBuffersGeometry</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window, int32_t width, int32_t height, int32_t format)</td></tr>
-<tr class="separator:ga7b0652533998d61e1a3b542485889113"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0b0e3b7d442dee83e1a1b42e5b0caee6"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window, <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> *outBuffer, <a class="el" href="struct_a_rect.html">ARect</a> *inOutDirtyBounds)</td></tr>
-<tr class="separator:ga0b0e3b7d442dee83e1a1b42e5b0caee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4dc9b687ead9034fbc11bf2d90f203f9"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga4dc9b687ead9034fbc11bf2d90f203f9">ANativeWindow_unlockAndPost</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ga4dc9b687ead9034fbc11bf2d90f203f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/native__window__jni_8h.jd b/docs/html/ndk/reference/native__window__jni_8h.jd
deleted file mode 100644
index bffbc03..0000000
--- a/docs/html/ndk/reference/native__window__jni_8h.jd
+++ /dev/null
@@ -1,25 +0,0 @@
-page.title=native_window_jni.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">native_window_jni.h File Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;<a class="el" href="native__window_8h.html">android/native_window.h</a>&gt;</code><br/>
-<code>#include &lt;jni.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga774d0a87ec496b3940fcddccbc31fd9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">ANativeWindow_fromSurface</a> (JNIEnv *env, jobject surface)</td></tr>
-<tr class="separator:ga774d0a87ec496b3940fcddccbc31fd9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/nav_f.png b/docs/html/ndk/reference/nav_f.png
deleted file mode 100644
index 5ceae87..0000000
--- a/docs/html/ndk/reference/nav_f.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/nav_g.png b/docs/html/ndk/reference/nav_g.png
deleted file mode 100644
index 2093a23..0000000
--- a/docs/html/ndk/reference/nav_g.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/nav_h.png b/docs/html/ndk/reference/nav_h.png
deleted file mode 100644
index e619809c..0000000
--- a/docs/html/ndk/reference/nav_h.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/obb_8h.jd b/docs/html/ndk/reference/obb_8h.jd
deleted file mode 100644
index a856d4ee..0000000
--- a/docs/html/ndk/reference/obb_8h.jd
+++ /dev/null
@@ -1,45 +0,0 @@
-page.title=obb.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">obb.h File Reference<div class="ingroups"><a class="el" href="group___storage.html">Storage</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;sys/types.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gaa5037fe4c0d785a50fc62ac2de9844c3"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a></td></tr>
-<tr class="separator:gaa5037fe4c0d785a50fc62ac2de9844c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gae4d5251432e1a9e6803c0240cc492e18"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___storage.html#ggae4d5251432e1a9e6803c0240cc492e18a33e2ae83b4c25d33a4335dccf1de1c3a">AOBBINFO_OVERLAY</a> = 0x0001
- }</td></tr>
-<tr class="separator:gae4d5251432e1a9e6803c0240cc492e18"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga7beb4f82e3bf9a4b8197917f92ac4d5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga7beb4f82e3bf9a4b8197917f92ac4d5e">AObbScanner_getObbInfo</a> (const char *filename)</td></tr>
-<tr class="separator:ga7beb4f82e3bf9a4b8197917f92ac4d5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec5a4428008f545e829486099298031a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gaec5a4428008f545e829486099298031a">AObbInfo_delete</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:gaec5a4428008f545e829486099298031a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga1ec7eee61541fa5a9b578801a35b9cf3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga1ec7eee61541fa5a9b578801a35b9cf3">AObbInfo_getPackageName</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:ga1ec7eee61541fa5a9b578801a35b9cf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gacd8471c6d866cffe4a32f3b5997c782c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gacd8471c6d866cffe4a32f3b5997c782c">AObbInfo_getVersion</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:gacd8471c6d866cffe4a32f3b5997c782c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga68d916570c756da9fd0d9096358300eb"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga68d916570c756da9fd0d9096358300eb">AObbInfo_getFlags</a> (<a class="el" href="group___storage.html#gaa5037fe4c0d785a50fc62ac2de9844c3">AObbInfo</a> *obbInfo)</td></tr>
-<tr class="separator:ga68d916570c756da9fd0d9096358300eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/open.png b/docs/html/ndk/reference/open.png
deleted file mode 100644
index 7e740cc..0000000
--- a/docs/html/ndk/reference/open.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/pages.jd b/docs/html/ndk/reference/pages.jd
deleted file mode 100644
index 2d7ece8..0000000
--- a/docs/html/ndk/reference/pages.jd
+++ /dev/null
@@ -1,16 +0,0 @@
-page.title=Related Pages
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="headertitle">
-<div class="title">Related Pages</div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock">Here is a list of all related documentation pages:</div><div class="directory">
-<table class="directory">
-<tr id="row_0_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><a class="el" href="deprecated.html" target="_self">Deprecated List</a></td><td class="desc"></td></tr>
-</table>
-</div><!-- directory -->
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/rect_8h.jd b/docs/html/ndk/reference/rect_8h.jd
deleted file mode 100644
index 85787b5..0000000
--- a/docs/html/ndk/reference/rect_8h.jd
+++ /dev/null
@@ -1,30 +0,0 @@
-page.title=rect.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#typedef-members">Typedefs</a>  </div>
-  <div class="headertitle">
-<div class="title">rect.h File Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html">ARect</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:gaa984a498f0e146ac57c6022a323423cf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_rect.html">ARect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaa984a498f0e146ac57c6022a323423cf">ARect</a></td></tr>
-<tr class="separator:gaa984a498f0e146ac57c6022a323423cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/reference_toc.cs b/docs/html/ndk/reference/reference_toc.cs
deleted file mode 100644
index d4e2d6d..0000000
--- a/docs/html/ndk/reference/reference_toc.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-<?cs # Table of contents for Dev Guide.
-
-       For each document available in translation, add an localized title to this TOC.
-       Do not add localized title for docs not available in translation.
-       Below are template spans for adding localized doc titles. Please ensure that
-       localized titles are added in the language order specified below.
-?>
-
-<ul id="nav">
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___asset.html"><span class="en">Asset Manager</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/asset__manager_8h.html">asset_manager.h</a></li>
-      <li><a href="/ndk/reference/asset__manager__jni_8h.html">asset_manager_jni.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___bitmap.html"><span class="en">
-    Bitmap</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/bitmap_8h.html">bitmap.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___configuration.html"><span class="en">
-    Configuration</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/configuration_8h.html">configuration.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___input.html"><span class="en">
-    Input</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/input_8h.html">input.h</a></li>
-      <li><a href="/ndk/reference/keycodes_8h.html">keycodes.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___looper.html"><span class="en">
-    Looper</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/looper_8h.html">looper.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___native_activity.html"><span class="en">
-    Native Activity and Window</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/native__activity_8h.html">native_activity.h</a></li>
-      <li><a href="/ndk/reference/native__window_8h.html">native_window.h</a></li>
-      <li><a href="/ndk/reference/native__window__jni_8h.html">native_window.h</a></li>
-      <li><a href="/ndk/reference/rect_8h.html">rect.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___sensor.html"><span class="en">
-    Sensor</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/sensor_8h.html">sensor.h</a></li>
-    </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="/ndk/reference/group___storage.html"><span class="en">
-    Storage Manager</span></a></div>
-    <ul>
-      <li><a href="/ndk/reference/storage__manager_8h.html">storage_manager.h</a></li>
-      <li><a href="/ndk/reference/obb_8h.html">obb.h</a></li>
-    </ul>
-  </li>
-</ul>
-
-<script type="text/javascript">
-<!--
-    buildToggleLists();
-    changeNavLang(getLangPref());
-//-->
-</script>
\ No newline at end of file
diff --git a/docs/html/ndk/reference/sensor_8h.jd b/docs/html/ndk/reference/sensor_8h.jd
deleted file mode 100644
index a537f4f..0000000
--- a/docs/html/ndk/reference/sensor_8h.jd
+++ /dev/null
@@ -1,143 +0,0 @@
-page.title=sensor.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#nested-classes">Data Structures</a> &#124;
-<a href="#define-members">Macros</a> &#124;
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">sensor.h File Reference<div class="ingroups"><a class="el" href="group___sensor.html">Sensor</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;sys/types.h&gt;</code><br/>
-<code>#include &lt;<a class="el" href="looper_8h.html">android/looper.h</a>&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
-Data Structures</h2></td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html">ASensorEvent</a></td></tr>
-<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
-Macros</h2></td></tr>
-<tr class="memitem:ga5129cb9e4091fc3474e246d5f950e52b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga5129cb9e4091fc3474e246d5f950e52b">ASENSOR_STANDARD_GRAVITY</a>&#160;&#160;&#160;(9.80665f)</td></tr>
-<tr class="separator:ga5129cb9e4091fc3474e246d5f950e52b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf8b57b13c6432bc6136aac0ad3813d63"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf8b57b13c6432bc6136aac0ad3813d63">ASENSOR_MAGNETIC_FIELD_EARTH_MAX</a>&#160;&#160;&#160;(60.0f)</td></tr>
-<tr class="separator:gaf8b57b13c6432bc6136aac0ad3813d63"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4423a712e27b6d5a57d138796892886d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga4423a712e27b6d5a57d138796892886d">ASENSOR_MAGNETIC_FIELD_EARTH_MIN</a>&#160;&#160;&#160;(30.0f)</td></tr>
-<tr class="separator:ga4423a712e27b6d5a57d138796892886d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga207e807f9e18271f6a763e57232b409f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga207e807f9e18271f6a763e57232b409f">ASensorVector</a></td></tr>
-<tr class="separator:ga207e807f9e18271f6a763e57232b409f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0378daec23b2d8a70438ef7c3912475f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga0378daec23b2d8a70438ef7c3912475f">AMetaDataEvent</a></td></tr>
-<tr class="separator:ga0378daec23b2d8a70438ef7c3912475f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga24acc545b908dd24cadc44c5e0760b3b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga24acc545b908dd24cadc44c5e0760b3b">AUncalibratedEvent</a></td></tr>
-<tr class="separator:ga24acc545b908dd24cadc44c5e0760b3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae85b6eac76abe74e6e53d78bb3a4858c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gae85b6eac76abe74e6e53d78bb3a4858c">AHeartRateEvent</a></td></tr>
-<tr class="separator:gae85b6eac76abe74e6e53d78bb3a4858c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga6bb167c45f0ef0a94d8f178d227e781f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga6bb167c45f0ef0a94d8f178d227e781f">ASensorEvent</a></td></tr>
-<tr class="separator:ga6bb167c45f0ef0a94d8f178d227e781f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaef620baab9b276ab8f914ae77babc349"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a></td></tr>
-<tr class="separator:gaef620baab9b276ab8f914ae77babc349"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa9448106d6d463f4cc5dded7c914e7ae"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a></td></tr>
-<tr class="separator:gaa9448106d6d463f4cc5dded7c914e7ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga93b28b7ce5e9b6d2ebc5b574cd5f4710"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a></td></tr>
-<tr class="separator:ga93b28b7ce5e9b6d2ebc5b574cd5f4710"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafec8dd682458c750a5f0f913a0f162ce"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a></td></tr>
-<tr class="separator:gafec8dd682458c750a5f0f913a0f162ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga26ff51817e8b320a631b3bf4ed378d58"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group___sensor.html#gafec8dd682458c750a5f0f913a0f162ce">ASensorRef</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a></td></tr>
-<tr class="separator:ga26ff51817e8b320a631b3bf4ed378d58"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:ga7ff5f2dff38e7639981794c43dc9167b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167bad72017f34c12971593a8cb14f4f254df">ASENSOR_TYPE_ACCELEROMETER</a> = 1, 
-<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba3b31509a3efebafb413e78f5ec9ae0e8">ASENSOR_TYPE_MAGNETIC_FIELD</a> = 2, 
-<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba80e9827f6c3ded009f354dc7078a2c68">ASENSOR_TYPE_GYROSCOPE</a> = 4, 
-<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba105331b6dea6f08e0d8fe3b736f8c174">ASENSOR_TYPE_LIGHT</a> = 5, 
-<br/>
-&#160;&#160;<a class="el" href="group___sensor.html#gga7ff5f2dff38e7639981794c43dc9167ba0c6a2e526ed2e4442b3843976f906932">ASENSOR_TYPE_PROXIMITY</a> = 8
-<br/>
- }</td></tr>
-<tr class="separator:ga7ff5f2dff38e7639981794c43dc9167b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaabfcbcb5ac86a1edac4035264bc7d2b8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae5d0475bd9491c4232a09afc81fa283d">ASENSOR_STATUS_NO_CONTACT</a> = -1, 
-<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ae8e43df50b7b85ed54f22c40f2cd748e">ASENSOR_STATUS_UNRELIABLE</a> = 0, 
-<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a5f306f3d45a19573539462e4c813edc0">ASENSOR_STATUS_ACCURACY_LOW</a> = 1, 
-<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8ad7e9379a4f36a42f2659cd7aec214f2d">ASENSOR_STATUS_ACCURACY_MEDIUM</a> = 2, 
-<br/>
-&#160;&#160;<a class="el" href="group___sensor.html#ggaabfcbcb5ac86a1edac4035264bc7d2b8a2df5fb4e8b684e6a801a4aff9f50ba13">ASENSOR_STATUS_ACCURACY_HIGH</a> = 3
-<br/>
- }</td></tr>
-<tr class="separator:gaabfcbcb5ac86a1edac4035264bc7d2b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga5d76b81b0ad4c19007a781d4edb8181f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8a64337fcb7e338d487dc3edc873df1c">AREPORTING_MODE_CONTINUOUS</a> = 0, 
-<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa8542165ae195bf5784cdd9ba66bd2ab5">AREPORTING_MODE_ON_CHANGE</a> = 1, 
-<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181fa002273a1ab874159a38a7e3f6bb6a7bb">AREPORTING_MODE_ONE_SHOT</a> = 2, 
-<a class="el" href="group___sensor.html#gga5d76b81b0ad4c19007a781d4edb8181faa2d29656b35889c4c23318982e847ae7">AREPORTING_MODE_SPECIAL_TRIGGER</a> = 3
- }</td></tr>
-<tr class="separator:ga5d76b81b0ad4c19007a781d4edb8181f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:gaa438fdaf34783a89d139f0a56d2692cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa438fdaf34783a89d139f0a56d2692cd">ASensorManager_getInstance</a> ()</td></tr>
-<tr class="separator:gaa438fdaf34783a89d139f0a56d2692cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga645be938627498ab2b60d94c562204bd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga645be938627498ab2b60d94c562204bd">ASensorManager_getSensorList</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___sensor.html#ga26ff51817e8b320a631b3bf4ed378d58">ASensorList</a> *list)</td></tr>
-<tr class="separator:ga645be938627498ab2b60d94c562204bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf4880d87e01f5e2d4a9b8403e4047445"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf4880d87e01f5e2d4a9b8403e4047445">ASensorManager_getDefaultSensor</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, int type)</td></tr>
-<tr class="separator:gaf4880d87e01f5e2d4a9b8403e4047445"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4313457c0e82f4afa77ef13860629633"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga4313457c0e82f4afa77ef13860629633">ASensorManager_getDefaultSensorEx</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, int type, bool wakeUp)</td></tr>
-<tr class="separator:ga4313457c0e82f4afa77ef13860629633"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gac46f8b28bcc7a846dea9d841cab0a67b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gac46f8b28bcc7a846dea9d841cab0a67b">ASensorManager_createEventQueue</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___looper.html#gadb10521a80138b777ba1bc2ca74d4af5">ALooper</a> *looper, int ident, <a class="el" href="group___looper.html#ga410b184b4e48302c439e36c8ce0a7a89">ALooper_callbackFunc</a> callback, void *data)</td></tr>
-<tr class="separator:gac46f8b28bcc7a846dea9d841cab0a67b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf35624037785cdea1e7fe9e0a73fc5e1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaf35624037785cdea1e7fe9e0a73fc5e1">ASensorManager_destroyEventQueue</a> (<a class="el" href="group___sensor.html#gaef620baab9b276ab8f914ae77babc349">ASensorManager</a> *manager, <a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue)</td></tr>
-<tr class="separator:gaf35624037785cdea1e7fe9e0a73fc5e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga48a8379cf9de9b09a71a00f8a3699499"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga48a8379cf9de9b09a71a00f8a3699499">ASensorEventQueue_enableSensor</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga48a8379cf9de9b09a71a00f8a3699499"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga03852b813887ec236a34c4aef0df4b68"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga03852b813887ec236a34c4aef0df4b68">ASensorEventQueue_disableSensor</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga03852b813887ec236a34c4aef0df4b68"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaa6e89b6d69dc3e07f2d7e72e81ec7937"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaa6e89b6d69dc3e07f2d7e72e81ec7937">ASensorEventQueue_setEventRate</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor, int32_t usec)</td></tr>
-<tr class="separator:gaa6e89b6d69dc3e07f2d7e72e81ec7937"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga79c9d6264fe81d4e30800f826db72913"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga79c9d6264fe81d4e30800f826db72913">ASensorEventQueue_hasEvents</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue)</td></tr>
-<tr class="separator:ga79c9d6264fe81d4e30800f826db72913"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gab3d4354fd0d3ceb5fa97c129b024a18a"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gab3d4354fd0d3ceb5fa97c129b024a18a">ASensorEventQueue_getEvents</a> (<a class="el" href="group___sensor.html#gaa9448106d6d463f4cc5dded7c914e7ae">ASensorEventQueue</a> *queue, <a class="el" href="struct_a_sensor_event.html">ASensorEvent</a> *events, size_t count)</td></tr>
-<tr class="separator:gab3d4354fd0d3ceb5fa97c129b024a18a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga52f4b22990c70df0784b9ccf23314fae"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga52f4b22990c70df0784b9ccf23314fae">ASensor_getName</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga52f4b22990c70df0784b9ccf23314fae"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gafaf467fc71f7adba537a90f166e3320d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gafaf467fc71f7adba537a90f166e3320d">ASensor_getVendor</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gafaf467fc71f7adba537a90f166e3320d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga93962747ab3c7d2b609f97af26fc0230"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga93962747ab3c7d2b609f97af26fc0230">ASensor_getType</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga93962747ab3c7d2b609f97af26fc0230"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga3da2930dd866cf1f76da6bc39e578a46"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga3da2930dd866cf1f76da6bc39e578a46">ASensor_getResolution</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga3da2930dd866cf1f76da6bc39e578a46"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gacb6e021757c07344b58742611eaf68e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gacb6e021757c07344b58742611eaf68e7">ASensor_getMinDelay</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gacb6e021757c07344b58742611eaf68e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gae9969580eda319926a677a6937c7afb1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gae9969580eda319926a677a6937c7afb1">ASensor_getFifoMaxEventCount</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gae9969580eda319926a677a6937c7afb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaec7084c6a9d4d85f87c95a70511c5f53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gaec7084c6a9d4d85f87c95a70511c5f53">ASensor_getFifoReservedEventCount</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gaec7084c6a9d4d85f87c95a70511c5f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gabee3eb65390fc75a639c59d653af3591"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#gabee3eb65390fc75a639c59d653af3591">ASensor_getStringType</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:gabee3eb65390fc75a639c59d653af3591"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga99e56b84cf421788c27998da8eab7e39"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga99e56b84cf421788c27998da8eab7e39">ASensor_getReportingMode</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga99e56b84cf421788c27998da8eab7e39"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga0ff4118e400bedac62be6b79e9e0f924"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___sensor.html#ga0ff4118e400bedac62be6b79e9e0f924">ASensor_isWakeUpSensor</a> (<a class="el" href="group___sensor.html#ga93b28b7ce5e9b6d2ebc5b574cd5f4710">ASensor</a> const *sensor)</td></tr>
-<tr class="separator:ga0ff4118e400bedac62be6b79e9e0f924"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/storage__manager_8h.jd b/docs/html/ndk/reference/storage__manager_8h.jd
deleted file mode 100644
index 6048d84..0000000
--- a/docs/html/ndk/reference/storage__manager_8h.jd
+++ /dev/null
@@ -1,59 +0,0 @@
-page.title=storage_manager.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#typedef-members">Typedefs</a> &#124;
-<a href="#enum-members">Enumerations</a> &#124;
-<a href="#func-members">Functions</a>  </div>
-  <div class="headertitle">
-<div class="title">storage_manager.h File Reference<div class="ingroups"><a class="el" href="group___storage.html">Storage</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
-</div><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
-Typedefs</h2></td></tr>
-<tr class="memitem:ga419f40803228bca62e32beb911ab28e2"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a></td></tr>
-<tr class="separator:ga419f40803228bca62e32beb911ab28e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gaf077d06586fa4c0212baa2fe458b9617"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a> )(const char *filename, const int32_t state, void *data)</td></tr>
-<tr class="separator:gaf077d06586fa4c0212baa2fe458b9617"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gae8a3b6a5d0d3244ed73924ab2421a0d0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2a9c420e6008c108a7198fd861c042d5">AOBB_STATE_MOUNTED</a> = 1, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a6710bb5b68cfc115eedcde2aafd8a667">AOBB_STATE_UNMOUNTED</a> = 2, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a50642881107d6673aace1494a5d6fce2">AOBB_STATE_ERROR_INTERNAL</a> = 20, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a324da2b8fea5875339d442d1f2d0b45b">AOBB_STATE_ERROR_COULD_NOT_MOUNT</a> = 21, 
-<br/>
-&#160;&#160;<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a1f2b51b53fc57b57a9967f6ce0c88dbe">AOBB_STATE_ERROR_COULD_NOT_UNMOUNT</a> = 22, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a3ce8539aa8b531c9de1d16041322d7a8">AOBB_STATE_ERROR_NOT_MOUNTED</a> = 23, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a8b074af151167a965a550b9829fafb37">AOBB_STATE_ERROR_ALREADY_MOUNTED</a> = 24, 
-<a class="el" href="group___storage.html#ggae8a3b6a5d0d3244ed73924ab2421a0d0a2467a4b6a634680e12c288a7790ff66c">AOBB_STATE_ERROR_PERMISSION_DENIED</a> = 25
-<br/>
- }</td></tr>
-<tr class="separator:gae8a3b6a5d0d3244ed73924ab2421a0d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table><table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
-Functions</h2></td></tr>
-<tr class="memitem:ga1c21ed9e0848fcfc03547c95eeb48877"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga1c21ed9e0848fcfc03547c95eeb48877">AStorageManager_new</a> ()</td></tr>
-<tr class="separator:ga1c21ed9e0848fcfc03547c95eeb48877"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga184c06dd9cec0f21db138167d6b331ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga184c06dd9cec0f21db138167d6b331ed">AStorageManager_delete</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr)</td></tr>
-<tr class="separator:ga184c06dd9cec0f21db138167d6b331ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga61bebaf43e57b4b7f57e7a24a62e9e3d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga61bebaf43e57b4b7f57e7a24a62e9e3d">AStorageManager_mountObb</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename, const char *key, <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a> cb, void *data)</td></tr>
-<tr class="separator:ga61bebaf43e57b4b7f57e7a24a62e9e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga4c32c8d2c780016fa36097d833b57809"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga4c32c8d2c780016fa36097d833b57809">AStorageManager_unmountObb</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename, const int force, <a class="el" href="group___storage.html#gaf077d06586fa4c0212baa2fe458b9617">AStorageManager_obbCallbackFunc</a> cb, void *data)</td></tr>
-<tr class="separator:ga4c32c8d2c780016fa36097d833b57809"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ga7572f2c650fc16cce1b0ab94e913a1ba"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#ga7572f2c650fc16cce1b0ab94e913a1ba">AStorageManager_isObbMounted</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename)</td></tr>
-<tr class="separator:ga7572f2c650fc16cce1b0ab94e913a1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:gad5c90305d627e0c768da37cb3e9f08c4"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___storage.html#gad5c90305d627e0c768da37cb3e9f08c4">AStorageManager_getMountedObbPath</a> (<a class="el" href="group___storage.html#ga419f40803228bca62e32beb911ab28e2">AStorageManager</a> *mgr, const char *filename)</td></tr>
-<tr class="separator:gad5c90305d627e0c768da37cb3e9f08c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_heart_rate_event.jd b/docs/html/ndk/reference/struct_a_heart_rate_event.jd
deleted file mode 100644
index 1cd2a2d..0000000
--- a/docs/html/ndk/reference/struct_a_heart_rate_event.jd
+++ /dev/null
@@ -1,51 +0,0 @@
-page.title=AHeartRateEvent Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">AHeartRateEvent Struct Reference<div class="ingroups"><a class="el" href="group___sensor.html">Sensor</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;sensor.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:ab0560092cbaa233e74bb0d543a85965d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_heart_rate_event.html#ab0560092cbaa233e74bb0d543a85965d">bpm</a></td></tr>
-<tr class="separator:ab0560092cbaa233e74bb0d543a85965d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a555c2084e8436de01dc76a23590e8824"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_heart_rate_event.html#a555c2084e8436de01dc76a23590e8824">status</a></td></tr>
-<tr class="separator:a555c2084e8436de01dc76a23590e8824"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="ab0560092cbaa233e74bb0d543a85965d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float bpm</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a555c2084e8436de01dc76a23590e8824"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int8_t status</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="sensor_8h.html">sensor.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_meta_data_event.jd b/docs/html/ndk/reference/struct_a_meta_data_event.jd
deleted file mode 100644
index 352b5ba..0000000
--- a/docs/html/ndk/reference/struct_a_meta_data_event.jd
+++ /dev/null
@@ -1,51 +0,0 @@
-page.title=AMetaDataEvent Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">AMetaDataEvent Struct Reference<div class="ingroups"><a class="el" href="group___sensor.html">Sensor</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;sensor.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a397e31e246d23c1be3fa82ca4af8b930"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_meta_data_event.html#a397e31e246d23c1be3fa82ca4af8b930">what</a></td></tr>
-<tr class="separator:a397e31e246d23c1be3fa82ca4af8b930"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a470f19badf179fe205462c060e5175b4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_meta_data_event.html#a470f19badf179fe205462c060e5175b4">sensor</a></td></tr>
-<tr class="separator:a470f19badf179fe205462c060e5175b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a470f19badf179fe205462c060e5175b4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t sensor</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a397e31e246d23c1be3fa82ca4af8b930"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t what</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="sensor_8h.html">sensor.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_native_activity.jd b/docs/html/ndk/reference/struct_a_native_activity.jd
deleted file mode 100644
index 6d8124b..0000000
--- a/docs/html/ndk/reference/struct_a_native_activity.jd
+++ /dev/null
@@ -1,177 +0,0 @@
-page.title=ANativeActivity Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">ANativeActivity Struct Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;native_activity.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:af96995a13e77baf0d71c37d20c79ad51"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#af96995a13e77baf0d71c37d20c79ad51">callbacks</a></td></tr>
-<tr class="separator:af96995a13e77baf0d71c37d20c79ad51"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a5e163c28566d4563eafeabd7dcab7eeb"><td class="memItemLeft" align="right" valign="top">JavaVM *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a5e163c28566d4563eafeabd7dcab7eeb">vm</a></td></tr>
-<tr class="separator:a5e163c28566d4563eafeabd7dcab7eeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae6f0d0cd46e56b7e299b489cb60dd27e"><td class="memItemLeft" align="right" valign="top">JNIEnv *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#ae6f0d0cd46e56b7e299b489cb60dd27e">env</a></td></tr>
-<tr class="separator:ae6f0d0cd46e56b7e299b489cb60dd27e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ab10b01c3c23c4ddb9d2ddadd71b03c94"><td class="memItemLeft" align="right" valign="top">jobject&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#ab10b01c3c23c4ddb9d2ddadd71b03c94">clazz</a></td></tr>
-<tr class="separator:ab10b01c3c23c4ddb9d2ddadd71b03c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa52947cdd1476b95e858d83c0f5b0220"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#aa52947cdd1476b95e858d83c0f5b0220">internalDataPath</a></td></tr>
-<tr class="separator:aa52947cdd1476b95e858d83c0f5b0220"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a2a61553b2f660ea8b57fcc2b495e109f"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a2a61553b2f660ea8b57fcc2b495e109f">externalDataPath</a></td></tr>
-<tr class="separator:a2a61553b2f660ea8b57fcc2b495e109f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a40b4b64be7ecfac23751618313eb610d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a40b4b64be7ecfac23751618313eb610d">sdkVersion</a></td></tr>
-<tr class="separator:a40b4b64be7ecfac23751618313eb610d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae1b90392cd257d16fd66a85bac1b08cd"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#ae1b90392cd257d16fd66a85bac1b08cd">instance</a></td></tr>
-<tr class="separator:ae1b90392cd257d16fd66a85bac1b08cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a0f76f065768b8f896ce47a3089fb438d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a0f76f065768b8f896ce47a3089fb438d">assetManager</a></td></tr>
-<tr class="separator:a0f76f065768b8f896ce47a3089fb438d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a0aff284eb9ab311d81f20955258798cf"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a0aff284eb9ab311d81f20955258798cf">obbPath</a></td></tr>
-<tr class="separator:a0aff284eb9ab311d81f20955258798cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>This structure defines the native side of an android.app.NativeActivity. It is created by the framework, and handed to the application's native code as it is being launched. </p>
-</div><h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a0f76f065768b8f896ce47a3089fb438d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>* assetManager</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Pointer to the Asset Manager instance for the application. The application uses this to access binary assets bundled inside its own .apk file. </p>
-
-</div>
-</div>
-<a class="anchor" id="af96995a13e77baf0d71c37d20c79ad51"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">struct <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>* callbacks</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Pointer to the callback function table of the native application. You can set the functions here to your own callbacks. The callbacks pointer itself here should not be changed; it is allocated and managed for you by the framework. </p>
-
-</div>
-</div>
-<a class="anchor" id="ab10b01c3c23c4ddb9d2ddadd71b03c94"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">jobject clazz</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The NativeActivity object handle.</p>
-<p>IMPORTANT NOTE: This member is mis-named. It should really be named 'activity' instead of 'clazz', since it's a reference to the NativeActivity instance created by the system for you.</p>
-<p>We unfortunately cannot change this without breaking NDK source-compatibility. </p>
-
-</div>
-</div>
-<a class="anchor" id="ae6f0d0cd46e56b7e299b489cb60dd27e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">JNIEnv* env</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>JNI context for the main thread of the app. Note that this field can ONLY be used from the main thread of the process; that is, the thread that calls into the <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>. </p>
-
-</div>
-</div>
-<a class="anchor" id="a2a61553b2f660ea8b57fcc2b495e109f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* externalDataPath</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Path to this application's external (removable/mountable) data directory. </p>
-
-</div>
-</div>
-<a class="anchor" id="ae1b90392cd257d16fd66a85bac1b08cd"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void* instance</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>This is the native instance of the application. It is not used by the framework, but can be set by the application to its own instance state. </p>
-
-</div>
-</div>
-<a class="anchor" id="aa52947cdd1476b95e858d83c0f5b0220"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* internalDataPath</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Path to this application's internal data directory. </p>
-
-</div>
-</div>
-<a class="anchor" id="a0aff284eb9ab311d81f20955258798cf"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* obbPath</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Available starting with Honeycomb: path to the directory containing the application's OBB files (if any). If the app doesn't have any OBB files, this directory may not exist. </p>
-
-</div>
-</div>
-<a class="anchor" id="a40b4b64be7ecfac23751618313eb610d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t sdkVersion</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The platform's SDK version code. </p>
-
-</div>
-</div>
-<a class="anchor" id="a5e163c28566d4563eafeabd7dcab7eeb"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">JavaVM* vm</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The global handle on the process's Java VM. </p>
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="native__activity_8h.html">native_activity.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_native_activity_callbacks.jd b/docs/html/ndk/reference/struct_a_native_activity_callbacks.jd
deleted file mode 100644
index 45b8e5e..0000000
--- a/docs/html/ndk/reference/struct_a_native_activity_callbacks.jd
+++ /dev/null
@@ -1,265 +0,0 @@
-page.title=ANativeActivityCallbacks Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">ANativeActivityCallbacks Struct Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;native_activity.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:acda344fd29c2018640a85a585317d92c"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#acda344fd29c2018640a85a585317d92c">onStart</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:acda344fd29c2018640a85a585317d92c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ac2c85491a68e6dece3d82782c1254e73"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#ac2c85491a68e6dece3d82782c1254e73">onResume</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:ac2c85491a68e6dece3d82782c1254e73"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a16a270d24a484a376e28bc6c48fc22a1"><td class="memItemLeft" align="right" valign="top">void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a16a270d24a484a376e28bc6c48fc22a1">onSaveInstanceState</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, size_t *outSize)</td></tr>
-<tr class="separator:a16a270d24a484a376e28bc6c48fc22a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aee8a4dcff234b94d0bf0bc85efea42c2"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#aee8a4dcff234b94d0bf0bc85efea42c2">onPause</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:aee8a4dcff234b94d0bf0bc85efea42c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:adefa99d16d11d21bb8a83ba426047605"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#adefa99d16d11d21bb8a83ba426047605">onStop</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:adefa99d16d11d21bb8a83ba426047605"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a45598ebed3d15847b4f97acb9e15076e"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a45598ebed3d15847b4f97acb9e15076e">onDestroy</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:a45598ebed3d15847b4f97acb9e15076e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a620ef54556eac0b2b28d7e6d0644ee4a"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a620ef54556eac0b2b28d7e6d0644ee4a">onWindowFocusChanged</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, int hasFocus)</td></tr>
-<tr class="separator:a620ef54556eac0b2b28d7e6d0644ee4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ac997f07e53ba58179a2133e86e5cbd31"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#ac997f07e53ba58179a2133e86e5cbd31">onNativeWindowCreated</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ac997f07e53ba58179a2133e86e5cbd31"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ab7bd120b8816508561126308f699f116"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#ab7bd120b8816508561126308f699f116">onNativeWindowResized</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:ab7bd120b8816508561126308f699f116"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3cad4792af363b9a40599d09afeab56c"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a3cad4792af363b9a40599d09afeab56c">onNativeWindowRedrawNeeded</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:a3cad4792af363b9a40599d09afeab56c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a150442c0611e8ce24a32a7c805e7c9db"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a150442c0611e8ce24a32a7c805e7c9db">onNativeWindowDestroyed</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr>
-<tr class="separator:a150442c0611e8ce24a32a7c805e7c9db"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a17b41ec9bb8b0b9e42d1e269a62a4d59"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a17b41ec9bb8b0b9e42d1e269a62a4d59">onInputQueueCreated</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td></tr>
-<tr class="separator:a17b41ec9bb8b0b9e42d1e269a62a4d59"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a82675193f867bc64180016923b0bb129"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a82675193f867bc64180016923b0bb129">onInputQueueDestroyed</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td></tr>
-<tr class="separator:a82675193f867bc64180016923b0bb129"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a61d30a43b3c77b6047afe951706f6a1e"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">onContentRectChanged</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, const <a class="el" href="struct_a_rect.html">ARect</a> *rect)</td></tr>
-<tr class="separator:a61d30a43b3c77b6047afe951706f6a1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a2926b45334319089e4e25fbc86d74c3f"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#a2926b45334319089e4e25fbc86d74c3f">onConfigurationChanged</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:a2926b45334319089e4e25fbc86d74c3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aac61f647cbd971321c692a74a1136f67"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html#aac61f647cbd971321c692a74a1136f67">onLowMemory</a> )(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr>
-<tr class="separator:aac61f647cbd971321c692a74a1136f67"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>These are the callbacks the framework makes into a native application. All of these callbacks happen on the main thread of the application. By default, all callbacks are NULL; set to a pointer to your own function to have it called. </p>
-</div><h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a2926b45334319089e4e25fbc86d74c3f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onConfigurationChanged)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The current device AConfiguration has changed. The new configuration can be retrieved from assetManager. </p>
-
-</div>
-</div>
-<a class="anchor" id="a61d30a43b3c77b6047afe951706f6a1e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onContentRectChanged)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, const <a class="el" href="struct_a_rect.html">ARect</a> *rect)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The rectangle in the window in which content should be placed has changed. </p>
-
-</div>
-</div>
-<a class="anchor" id="a45598ebed3d15847b4f97acb9e15076e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onDestroy)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>NativeActivity is being destroyed. See Java documentation for Activity.onDestroy() for more information. </p>
-
-</div>
-</div>
-<a class="anchor" id="a17b41ec9bb8b0b9e42d1e269a62a4d59"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onInputQueueCreated)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The input queue for this native activity's window has been created. You can use the given input queue to start retrieving input events. </p>
-
-</div>
-</div>
-<a class="anchor" id="a82675193f867bc64180016923b0bb129"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onInputQueueDestroyed)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___input.html#ga21d8182651f4b61ae558560023e8339c">AInputQueue</a> *queue)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The input queue for this native activity's window is being destroyed. You should no longer try to reference this object upon returning from this function. </p>
-
-</div>
-</div>
-<a class="anchor" id="aac61f647cbd971321c692a74a1136f67"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onLowMemory)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The system is running low on memory. Use this callback to release resources you do not need, to help the system avoid killing more important processes. </p>
-
-</div>
-</div>
-<a class="anchor" id="ac997f07e53ba58179a2133e86e5cbd31"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onNativeWindowCreated)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The drawing window for this native activity has been created. You can use the given native window object to start drawing. </p>
-
-</div>
-</div>
-<a class="anchor" id="a150442c0611e8ce24a32a7c805e7c9db"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onNativeWindowDestroyed)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The drawing window for this native activity is going to be destroyed. You MUST ensure that you do not touch the window object after returning from this function: in the common case of drawing to the window from another thread, that means the implementation of this callback must properly synchronize with the other thread to stop its drawing before returning from here. </p>
-
-</div>
-</div>
-<a class="anchor" id="a3cad4792af363b9a40599d09afeab56c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onNativeWindowRedrawNeeded)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The drawing window for this native activity needs to be redrawn. To avoid transient artifacts during screen changes (such resizing after rotation), applications should not return from this function until they have finished drawing their window in its current state. </p>
-
-</div>
-</div>
-<a class="anchor" id="ab7bd120b8816508561126308f699f116"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onNativeWindowResized)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The drawing window for this native activity has been resized. You should retrieve the new size from the window and ensure that your rendering in it now matches. </p>
-
-</div>
-</div>
-<a class="anchor" id="aee8a4dcff234b94d0bf0bc85efea42c2"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onPause)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>NativeActivity has paused. See Java documentation for Activity.onPause() for more information. </p>
-
-</div>
-</div>
-<a class="anchor" id="ac2c85491a68e6dece3d82782c1254e73"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onResume)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>NativeActivity has resumed. See Java documentation for Activity.onResume() for more information. </p>
-
-</div>
-</div>
-<a class="anchor" id="a16a270d24a484a376e28bc6c48fc22a1"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void*(* onSaveInstanceState)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, size_t *outSize)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Framework is asking NativeActivity to save its current instance state. See Java documentation for Activity.onSaveInstanceState() for more information. The returned pointer needs to be created with malloc(); the framework will call free() on it for you. You also must fill in outSize with the number of bytes in the allocation. Note that the saved state will be persisted, so it can not contain any active entities (pointers to memory, file descriptors, etc). </p>
-
-</div>
-</div>
-<a class="anchor" id="acda344fd29c2018640a85a585317d92c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onStart)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>NativeActivity has started. See Java documentation for Activity.onStart() for more information. </p>
-
-</div>
-</div>
-<a class="anchor" id="adefa99d16d11d21bb8a83ba426047605"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onStop)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>NativeActivity has stopped. See Java documentation for Activity.onStop() for more information. </p>
-
-</div>
-</div>
-<a class="anchor" id="a620ef54556eac0b2b28d7e6d0644ee4a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* onWindowFocusChanged)(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, int hasFocus)</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Focus has changed in this NativeActivity's window. This is often used, for example, to pause a game when it loses input focus. </p>
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="native__activity_8h.html">native_activity.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_native_window___buffer.jd b/docs/html/ndk/reference/struct_a_native_window___buffer.jd
deleted file mode 100644
index a2008fd..0000000
--- a/docs/html/ndk/reference/struct_a_native_window___buffer.jd
+++ /dev/null
@@ -1,110 +0,0 @@
-page.title=ANativeWindow_Buffer Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">ANativeWindow_Buffer Struct Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;native_window.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a395d15e7c2b09961c1bfd1da6179b64c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html#a395d15e7c2b09961c1bfd1da6179b64c">width</a></td></tr>
-<tr class="separator:a395d15e7c2b09961c1bfd1da6179b64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a5d8006e753a3e76ff637a4e092bbed71"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html#a5d8006e753a3e76ff637a4e092bbed71">height</a></td></tr>
-<tr class="separator:a5d8006e753a3e76ff637a4e092bbed71"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a4438e3445d33be6d33b2c0dbe9c2e0d7"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html#a4438e3445d33be6d33b2c0dbe9c2e0d7">stride</a></td></tr>
-<tr class="separator:a4438e3445d33be6d33b2c0dbe9c2e0d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a49d503b84d084937e3ceeda9f0b4659e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html#a49d503b84d084937e3ceeda9f0b4659e">format</a></td></tr>
-<tr class="separator:a49d503b84d084937e3ceeda9f0b4659e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a089d8e968fac54a9e45f059b8b78cf9b"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html#a089d8e968fac54a9e45f059b8b78cf9b">bits</a></td></tr>
-<tr class="separator:a089d8e968fac54a9e45f059b8b78cf9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a60cc5aad4013157e2e7434d6de450656"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html#a60cc5aad4013157e2e7434d6de450656">reserved</a> [6]</td></tr>
-<tr class="separator:a60cc5aad4013157e2e7434d6de450656"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> is a struct that represents a windows buffer.</p>
-<p>A pointer can be obtained using <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock()</a>. </p>
-</div><h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a089d8e968fac54a9e45f059b8b78cf9b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void* bits</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a49d503b84d084937e3ceeda9f0b4659e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t format</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a5d8006e753a3e76ff637a4e092bbed71"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t height</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a60cc5aad4013157e2e7434d6de450656"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t reserved[6]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a4438e3445d33be6d33b2c0dbe9c2e0d7"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t stride</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a395d15e7c2b09961c1bfd1da6179b64c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t width</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="native__window_8h.html">native_window.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_rect.jd b/docs/html/ndk/reference/struct_a_rect.jd
deleted file mode 100644
index 4b9bb67..0000000
--- a/docs/html/ndk/reference/struct_a_rect.jd
+++ /dev/null
@@ -1,86 +0,0 @@
-page.title=ARect Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">ARect Struct Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;rect.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a9ee4ce87784b0ebeaadce132ce7d421f"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html#a9ee4ce87784b0ebeaadce132ce7d421f">left</a></td></tr>
-<tr class="separator:a9ee4ce87784b0ebeaadce132ce7d421f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ad07137116129d873220209ea65f9d3d4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html#ad07137116129d873220209ea65f9d3d4">top</a></td></tr>
-<tr class="separator:ad07137116129d873220209ea65f9d3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3d3a4d6bf8bc6c866fa737e11590cc4e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html#a3d3a4d6bf8bc6c866fa737e11590cc4e">right</a></td></tr>
-<tr class="separator:a3d3a4d6bf8bc6c866fa737e11590cc4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a4479860c72ca8e96ac4fb1cc149dd71b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html#a4479860c72ca8e96ac4fb1cc149dd71b">bottom</a></td></tr>
-<tr class="separator:a4479860c72ca8e96ac4fb1cc149dd71b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p><a class="el" href="struct_a_rect.html">ARect</a> is a struct that represents a rectangular window area.</p>
-<p>It is used with <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks::onContentRectChanged</a> event callback and <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock()</a> function. </p>
-</div><h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a4479860c72ca8e96ac4fb1cc149dd71b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t bottom</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>bottom position </p>
-
-</div>
-</div>
-<a class="anchor" id="a9ee4ce87784b0ebeaadce132ce7d421f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t left</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>left position </p>
-
-</div>
-</div>
-<a class="anchor" id="a3d3a4d6bf8bc6c866fa737e11590cc4e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t right</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>left position </p>
-
-</div>
-</div>
-<a class="anchor" id="ad07137116129d873220209ea65f9d3d4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t top</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>top position </p>
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rect_8h.html">rect.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_sensor_event.jd b/docs/html/ndk/reference/struct_a_sensor_event.jd
deleted file mode 100644
index 3c6e49d..0000000
--- a/docs/html/ndk/reference/struct_a_sensor_event.jd
+++ /dev/null
@@ -1,364 +0,0 @@
-page.title=ASensorEvent Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">ASensorEvent Struct Reference<div class="ingroups"><a class="el" href="group___sensor.html">Sensor</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;sensor.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a67fae7dd1de9edce3656ed214d20377f"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a67fae7dd1de9edce3656ed214d20377f">version</a></td></tr>
-<tr class="separator:a67fae7dd1de9edce3656ed214d20377f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a470f19badf179fe205462c060e5175b4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a470f19badf179fe205462c060e5175b4">sensor</a></td></tr>
-<tr class="separator:a470f19badf179fe205462c060e5175b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a449e574ed6911881dc55507cb5635c2c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a449e574ed6911881dc55507cb5635c2c">type</a></td></tr>
-<tr class="separator:a449e574ed6911881dc55507cb5635c2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3b1869501b35bf41f2ff54de072b6c2c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a3b1869501b35bf41f2ff54de072b6c2c">reserved0</a></td></tr>
-<tr class="separator:a3b1869501b35bf41f2ff54de072b6c2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a8a591d341723df9496cda98e225b25b4"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a8a591d341723df9496cda98e225b25b4">timestamp</a></td></tr>
-<tr class="separator:a8a591d341723df9496cda98e225b25b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a5a4f7ed8edd7821e9e0932df3a29792d"><td class="memItemLeft" >union {</td></tr>
-<tr class="memitem:af302fa16ee998a27548f088d0d9bb64f"><td class="memItemLeft" >&#160;&#160;&#160;union {</td></tr>
-<tr class="memitem:a31244897a6c7f657a9aec807dd1e09ae"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a31244897a6c7f657a9aec807dd1e09ae">data</a> [16]</td></tr>
-<tr class="separator:a31244897a6c7f657a9aec807dd1e09ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aebf12879fa9b61c671584994ddad9610"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#aebf12879fa9b61c671584994ddad9610">vector</a></td></tr>
-<tr class="separator:aebf12879fa9b61c671584994ddad9610"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aab1f50881089166ff5f3d46f7bfcf09c"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#aab1f50881089166ff5f3d46f7bfcf09c">acceleration</a></td></tr>
-<tr class="separator:aab1f50881089166ff5f3d46f7bfcf09c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a776bc8e3beff52764ef2d6d423563d64"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html">ASensorVector</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a776bc8e3beff52764ef2d6d423563d64">magnetic</a></td></tr>
-<tr class="separator:a776bc8e3beff52764ef2d6d423563d64"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:afc1d28cfbce795d6ea954ebe725241f5"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#afc1d28cfbce795d6ea954ebe725241f5">temperature</a></td></tr>
-<tr class="separator:afc1d28cfbce795d6ea954ebe725241f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a06f14a9abd47b91465f895d5259cdc1b"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a06f14a9abd47b91465f895d5259cdc1b">distance</a></td></tr>
-<tr class="separator:a06f14a9abd47b91465f895d5259cdc1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aaf8b2537020ae0b7450785724d77a3e0"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#aaf8b2537020ae0b7450785724d77a3e0">light</a></td></tr>
-<tr class="separator:aaf8b2537020ae0b7450785724d77a3e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ac870e1249bab4a2a68cc4126761d24ef"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#ac870e1249bab4a2a68cc4126761d24ef">pressure</a></td></tr>
-<tr class="separator:ac870e1249bab4a2a68cc4126761d24ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ad60830bc80efb7e8a11d6fb25518f55b"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#ad60830bc80efb7e8a11d6fb25518f55b">relative_humidity</a></td></tr>
-<tr class="separator:ad60830bc80efb7e8a11d6fb25518f55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a4e35158edcd83e4651d7083ebdb41bae"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a4e35158edcd83e4651d7083ebdb41bae">uncalibrated_gyro</a></td></tr>
-<tr class="separator:a4e35158edcd83e4651d7083ebdb41bae"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3c746f01a48fbdefaad12c35be0dd715"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a3c746f01a48fbdefaad12c35be0dd715">uncalibrated_magnetic</a></td></tr>
-<tr class="separator:a3c746f01a48fbdefaad12c35be0dd715"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a40a6e69697a42e0f0ad04a09d7f113d3"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a40a6e69697a42e0f0ad04a09d7f113d3">meta_data</a></td></tr>
-<tr class="separator:a40a6e69697a42e0f0ad04a09d7f113d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a2325abb12f65d7cbceec766e6db506d8"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a>&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a2325abb12f65d7cbceec766e6db506d8">heart_rate</a></td></tr>
-<tr class="separator:a2325abb12f65d7cbceec766e6db506d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:af302fa16ee998a27548f088d0d9bb64f"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:af302fa16ee998a27548f088d0d9bb64f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a89806d4445310e62ed4b68c9e2698b27"><td class="memItemLeft" >&#160;&#160;&#160;union {</td></tr>
-<tr class="memitem:a1bc800e1b28e4acd0ee4e971619a598f"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;uint64_t&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a1bc800e1b28e4acd0ee4e971619a598f">data</a> [8]</td></tr>
-<tr class="separator:a1bc800e1b28e4acd0ee4e971619a598f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a2e54280490afc977b11157e387841145"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;uint64_t&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a2e54280490afc977b11157e387841145">step_counter</a></td></tr>
-<tr class="separator:a2e54280490afc977b11157e387841145"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a89806d4445310e62ed4b68c9e2698b27"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;&#160;&#160;<a class="el" href="struct_a_sensor_event.html#a89806d4445310e62ed4b68c9e2698b27">u64</a></td></tr>
-<tr class="separator:a89806d4445310e62ed4b68c9e2698b27"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a5a4f7ed8edd7821e9e0932df3a29792d"><td class="memItemLeft" valign="top">};&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:a5a4f7ed8edd7821e9e0932df3a29792d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a773b39d480759f67926cb18ae2219281"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a773b39d480759f67926cb18ae2219281">flags</a></td></tr>
-<tr class="separator:a773b39d480759f67926cb18ae2219281"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3c2ed5a26d302c47f7b3f2dd0bbf7f94"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_event.html#a3c2ed5a26d302c47f7b3f2dd0bbf7f94">reserved1</a> [3]</td></tr>
-<tr class="separator:a3c2ed5a26d302c47f7b3f2dd0bbf7f94"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a5a4f7ed8edd7821e9e0932df3a29792d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">union { ... } </td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="aab1f50881089166ff5f3d46f7bfcf09c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a> acceleration</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a31244897a6c7f657a9aec807dd1e09ae"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float data[16]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a1bc800e1b28e4acd0ee4e971619a598f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint64_t data[8]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a06f14a9abd47b91465f895d5259cdc1b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float distance</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a773b39d480759f67926cb18ae2219281"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t flags</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a2325abb12f65d7cbceec766e6db506d8"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_heart_rate_event.html">AHeartRateEvent</a> heart_rate</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="aaf8b2537020ae0b7450785724d77a3e0"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float light</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a776bc8e3beff52764ef2d6d423563d64"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a> magnetic</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a40a6e69697a42e0f0ad04a09d7f113d3"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_meta_data_event.html">AMetaDataEvent</a> meta_data</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ac870e1249bab4a2a68cc4126761d24ef"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float pressure</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ad60830bc80efb7e8a11d6fb25518f55b"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float relative_humidity</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a3b1869501b35bf41f2ff54de072b6c2c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t reserved0</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a3c2ed5a26d302c47f7b3f2dd0bbf7f94"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t reserved1[3]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a470f19badf179fe205462c060e5175b4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t sensor</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a2e54280490afc977b11157e387841145"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint64_t step_counter</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="afc1d28cfbce795d6ea954ebe725241f5"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float temperature</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a8a591d341723df9496cda98e225b25b4"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int64_t timestamp</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a449e574ed6911881dc55507cb5635c2c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t type</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a89806d4445310e62ed4b68c9e2698b27"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">union { ... }   u64</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a4e35158edcd83e4651d7083ebdb41bae"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a> uncalibrated_gyro</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a3c746f01a48fbdefaad12c35be0dd715"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_uncalibrated_event.html">AUncalibratedEvent</a> uncalibrated_magnetic</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="aebf12879fa9b61c671584994ddad9610"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_a_sensor_vector.html">ASensorVector</a> vector</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a67fae7dd1de9edce3656ed214d20377f"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t version</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="sensor_8h.html">sensor.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_sensor_vector.jd b/docs/html/ndk/reference/struct_a_sensor_vector.jd
deleted file mode 100644
index 397ad6d..0000000
--- a/docs/html/ndk/reference/struct_a_sensor_vector.jd
+++ /dev/null
@@ -1,172 +0,0 @@
-page.title=ASensorVector Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">ASensorVector Struct Reference<div class="ingroups"><a class="el" href="group___sensor.html">Sensor</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;sensor.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a1c2115c78d0380b0ecfbf9e94adcf821"><td class="memItemLeft" >union {</td></tr>
-<tr class="memitem:a9a1a1a00f1e45435cc3001b553000a21"><td class="memItemLeft" >&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#a9a1a1a00f1e45435cc3001b553000a21">v</a> [3]</td></tr>
-<tr class="separator:a9a1a1a00f1e45435cc3001b553000a21"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ada5f2f99413a51a46caa8ef7f44c7a88"><td class="memItemLeft" >&#160;&#160;&#160;struct {</td></tr>
-<tr class="memitem:ad0da36b2558901e21e7a30f6c227a45e"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#ad0da36b2558901e21e7a30f6c227a45e">x</a></td></tr>
-<tr class="separator:ad0da36b2558901e21e7a30f6c227a45e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa4f0d3eebc3c443f9be81bf48561a217"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#aa4f0d3eebc3c443f9be81bf48561a217">y</a></td></tr>
-<tr class="separator:aa4f0d3eebc3c443f9be81bf48561a217"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:af73583b1e980b0aa03f9884812e9fd4d"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#af73583b1e980b0aa03f9884812e9fd4d">z</a></td></tr>
-<tr class="separator:af73583b1e980b0aa03f9884812e9fd4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ada5f2f99413a51a46caa8ef7f44c7a88"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:ada5f2f99413a51a46caa8ef7f44c7a88"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa217775a0b49338072ee12500155bdbf"><td class="memItemLeft" >&#160;&#160;&#160;struct {</td></tr>
-<tr class="memitem:a01b03ebfa7d0a95760e743f611fecbc5"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#a01b03ebfa7d0a95760e743f611fecbc5">azimuth</a></td></tr>
-<tr class="separator:a01b03ebfa7d0a95760e743f611fecbc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a282e7d4378d4a18a805b8980295ac86c"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#a282e7d4378d4a18a805b8980295ac86c">pitch</a></td></tr>
-<tr class="separator:a282e7d4378d4a18a805b8980295ac86c"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a26fd84d522945b6038221d9e38c7cc39"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_sensor_vector.html#a26fd84d522945b6038221d9e38c7cc39">roll</a></td></tr>
-<tr class="separator:a26fd84d522945b6038221d9e38c7cc39"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa217775a0b49338072ee12500155bdbf"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:aa217775a0b49338072ee12500155bdbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a1c2115c78d0380b0ecfbf9e94adcf821"><td class="memItemLeft" valign="top">};&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:a1c2115c78d0380b0ecfbf9e94adcf821"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a555c2084e8436de01dc76a23590e8824"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_vector.html#a555c2084e8436de01dc76a23590e8824">status</a></td></tr>
-<tr class="separator:a555c2084e8436de01dc76a23590e8824"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a72aca6ea6d8153b28ea8f139b932ec3e"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_sensor_vector.html#a72aca6ea6d8153b28ea8f139b932ec3e">reserved</a> [3]</td></tr>
-<tr class="separator:a72aca6ea6d8153b28ea8f139b932ec3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>A sensor event. </p>
-</div><h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a1c2115c78d0380b0ecfbf9e94adcf821"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">union { ... } </td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a01b03ebfa7d0a95760e743f611fecbc5"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float azimuth</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a282e7d4378d4a18a805b8980295ac86c"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float pitch</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a72aca6ea6d8153b28ea8f139b932ec3e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint8_t reserved[3]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a26fd84d522945b6038221d9e38c7cc39"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float roll</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a555c2084e8436de01dc76a23590e8824"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int8_t status</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a9a1a1a00f1e45435cc3001b553000a21"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float v[3]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ad0da36b2558901e21e7a30f6c227a45e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float x</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="aa4f0d3eebc3c443f9be81bf48561a217"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float y</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="af73583b1e980b0aa03f9884812e9fd4d"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float z</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="sensor_8h.html">sensor.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_a_uncalibrated_event.jd b/docs/html/ndk/reference/struct_a_uncalibrated_event.jd
deleted file mode 100644
index 985b0b9..0000000
--- a/docs/html/ndk/reference/struct_a_uncalibrated_event.jd
+++ /dev/null
@@ -1,171 +0,0 @@
-page.title=AUncalibratedEvent Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">AUncalibratedEvent Struct Reference<div class="ingroups"><a class="el" href="group___sensor.html">Sensor</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;sensor.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a7b163a0b99971787ece3a65e6000fdf2"><td class="memItemLeft" >union {</td></tr>
-<tr class="memitem:a9c22454e765672782b7198d57a92f5fd"><td class="memItemLeft" >&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#a9c22454e765672782b7198d57a92f5fd">uncalib</a> [3]</td></tr>
-<tr class="separator:a9c22454e765672782b7198d57a92f5fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a8b528c70566cf887c975d6c5a9cdcbb1"><td class="memItemLeft" >&#160;&#160;&#160;struct {</td></tr>
-<tr class="memitem:ac8b7f8daea042eaa2b86f0bf2160c44a"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#ac8b7f8daea042eaa2b86f0bf2160c44a">x_uncalib</a></td></tr>
-<tr class="separator:ac8b7f8daea042eaa2b86f0bf2160c44a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a43437dd77e26c6b89ab1c91aeb63fd64"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#a43437dd77e26c6b89ab1c91aeb63fd64">y_uncalib</a></td></tr>
-<tr class="separator:a43437dd77e26c6b89ab1c91aeb63fd64"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae677be5f98570cc5a1fd7fddcd8a6841"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#ae677be5f98570cc5a1fd7fddcd8a6841">z_uncalib</a></td></tr>
-<tr class="separator:ae677be5f98570cc5a1fd7fddcd8a6841"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a8b528c70566cf887c975d6c5a9cdcbb1"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:a8b528c70566cf887c975d6c5a9cdcbb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a7b163a0b99971787ece3a65e6000fdf2"><td class="memItemLeft" valign="top">};&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:a7b163a0b99971787ece3a65e6000fdf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ac376d6a49d888be08124578ee9b9fc15"><td class="memItemLeft" >union {</td></tr>
-<tr class="memitem:a52bd7f09c4decadcfbc0347fda4163d6"><td class="memItemLeft" >&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#a52bd7f09c4decadcfbc0347fda4163d6">bias</a> [3]</td></tr>
-<tr class="separator:a52bd7f09c4decadcfbc0347fda4163d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a4710797e0d0109a279359bfb8d4e2327"><td class="memItemLeft" >&#160;&#160;&#160;struct {</td></tr>
-<tr class="memitem:a56c4ea73587a9ea20595cca9bcfe9593"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#a56c4ea73587a9ea20595cca9bcfe9593">x_bias</a></td></tr>
-<tr class="separator:a56c4ea73587a9ea20595cca9bcfe9593"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a130457eaa905b467bc43fedb02cbb16a"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#a130457eaa905b467bc43fedb02cbb16a">y_bias</a></td></tr>
-<tr class="separator:a130457eaa905b467bc43fedb02cbb16a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a6e265324293107afbfa9e587941a4036"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="struct_a_uncalibrated_event.html#a6e265324293107afbfa9e587941a4036">z_bias</a></td></tr>
-<tr class="separator:a6e265324293107afbfa9e587941a4036"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a4710797e0d0109a279359bfb8d4e2327"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:a4710797e0d0109a279359bfb8d4e2327"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ac376d6a49d888be08124578ee9b9fc15"><td class="memItemLeft" valign="top">};&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
-<tr class="separator:ac376d6a49d888be08124578ee9b9fc15"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a7b163a0b99971787ece3a65e6000fdf2"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">union { ... } </td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ac376d6a49d888be08124578ee9b9fc15"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">union { ... } </td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a52bd7f09c4decadcfbc0347fda4163d6"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float bias[3]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a9c22454e765672782b7198d57a92f5fd"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float uncalib[3]</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a56c4ea73587a9ea20595cca9bcfe9593"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float x_bias</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ac8b7f8daea042eaa2b86f0bf2160c44a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float x_uncalib</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a130457eaa905b467bc43fedb02cbb16a"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float y_bias</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a43437dd77e26c6b89ab1c91aeb63fd64"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float y_uncalib</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="a6e265324293107afbfa9e587941a4036"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float z_bias</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<a class="anchor" id="ae677be5f98570cc5a1fd7fddcd8a6841"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float z_uncalib</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="sensor_8h.html">sensor.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/struct_android_bitmap_info.jd b/docs/html/ndk/reference/struct_android_bitmap_info.jd
deleted file mode 100644
index f995b56..0000000
--- a/docs/html/ndk/reference/struct_android_bitmap_info.jd
+++ /dev/null
@@ -1,100 +0,0 @@
-page.title=AndroidBitmapInfo Struct Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#pub-attribs">Data Fields</a>  </div>
-  <div class="headertitle">
-<div class="title">AndroidBitmapInfo Struct Reference<div class="ingroups"><a class="el" href="group___bitmap.html">Bitmap</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-
-<p><code>#include &lt;bitmap.h&gt;</code></p>
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
-Data Fields</h2></td></tr>
-<tr class="memitem:a325272ddd9a962f05deb905101d25cbd"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html#a325272ddd9a962f05deb905101d25cbd">width</a></td></tr>
-<tr class="separator:a325272ddd9a962f05deb905101d25cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a6ad4f820ce4e75cda0686fcaad5168be"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html#a6ad4f820ce4e75cda0686fcaad5168be">height</a></td></tr>
-<tr class="separator:a6ad4f820ce4e75cda0686fcaad5168be"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a981556a4e63b7b6d9f94975c7a8930ab"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html#a981556a4e63b7b6d9f94975c7a8930ab">stride</a></td></tr>
-<tr class="separator:a981556a4e63b7b6d9f94975c7a8930ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a49d503b84d084937e3ceeda9f0b4659e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html#a49d503b84d084937e3ceeda9f0b4659e">format</a></td></tr>
-<tr class="separator:a49d503b84d084937e3ceeda9f0b4659e"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a773b39d480759f67926cb18ae2219281"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_android_bitmap_info.html#a773b39d480759f67926cb18ae2219281">flags</a></td></tr>
-<tr class="separator:a773b39d480759f67926cb18ae2219281"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>Bitmap info, see <a class="el" href="group___bitmap.html#ga80292ee39d8a675928e38849742b54bf">AndroidBitmap_getInfo()</a>. </p>
-</div><h2 class="groupheader">Field Documentation</h2>
-<a class="anchor" id="a773b39d480759f67926cb18ae2219281"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t flags</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>Unused. </p>
-
-</div>
-</div>
-<a class="anchor" id="a49d503b84d084937e3ceeda9f0b4659e"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int32_t format</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The bitmap pixel format. See <a class="el" href="group___bitmap.html#gaea286a2d4c61ae2abb02b51500499f13">AndroidBitmapFormat</a> </p>
-
-</div>
-</div>
-<a class="anchor" id="a6ad4f820ce4e75cda0686fcaad5168be"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t height</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The bitmap height in pixels. </p>
-
-</div>
-</div>
-<a class="anchor" id="a981556a4e63b7b6d9f94975c7a8930ab"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t stride</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The number of byte per row. </p>
-
-</div>
-</div>
-<a class="anchor" id="a325272ddd9a962f05deb905101d25cbd"></a>
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t width</td>
-        </tr>
-      </table>
-</div><div class="memdoc">
-<p>The bitmap width in pixels. </p>
-
-</div>
-</div>
-<hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="bitmap_8h.html">bitmap.h</a></li>
-</ul>
-</div><!-- contents -->
diff --git a/docs/html/ndk/reference/sync_off.png b/docs/html/ndk/reference/sync_off.png
deleted file mode 100644
index b856624..0000000
--- a/docs/html/ndk/reference/sync_off.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/sync_on.png b/docs/html/ndk/reference/sync_on.png
deleted file mode 100644
index e5044af..0000000
--- a/docs/html/ndk/reference/sync_on.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/tab_a.png b/docs/html/ndk/reference/tab_a.png
deleted file mode 100644
index 170a784..0000000
--- a/docs/html/ndk/reference/tab_a.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/tab_b.png b/docs/html/ndk/reference/tab_b.png
deleted file mode 100644
index 7774499..0000000
--- a/docs/html/ndk/reference/tab_b.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/tab_h.png b/docs/html/ndk/reference/tab_h.png
deleted file mode 100644
index e1dddef..0000000
--- a/docs/html/ndk/reference/tab_h.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/tab_s.png b/docs/html/ndk/reference/tab_s.png
deleted file mode 100644
index 3dc07b0..0000000
--- a/docs/html/ndk/reference/tab_s.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/ndk/reference/tabs.css b/docs/html/ndk/reference/tabs.css
deleted file mode 100644
index 71145bb..0000000
--- a/docs/html/ndk/reference/tabs.css
+++ /dev/null
@@ -1,60 +0,0 @@
-.tabs, .tabs2, .tabs3 {
-    background-image: url('tab_b.png');
-    width: 100%;
-    z-index: 101;
-    font-size: 13px;
-    font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
-}
-
-.tabs2 {
-    font-size: 10px;
-}
-.tabs3 {
-    font-size: 9px;
-}
-
-.tablist {
-    margin: 0;
-    padding: 0;
-    display: table;
-}
-
-.tablist li {
-    float: left;
-    display: table-cell;
-    background-image: url('tab_b.png');
-    line-height: 36px;
-    list-style: none;
-}
-
-.tablist a {
-    display: block;
-    padding: 0 20px;
-    font-weight: bold;
-    background-image:url('tab_s.png');
-    background-repeat:no-repeat;
-    background-position:right;
-    color: #434343;
-    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
-    text-decoration: none;
-    outline: none;
-}
-
-.tabs3 .tablist a {
-    padding: 0 10px;
-}
-
-.tablist a:hover {
-    background-image: url('tab_h.png');
-    background-repeat:repeat-x;
-    color: #fff;
-    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
-    text-decoration: none;
-}
-
-.tablist li.current a {
-    background-image: url('tab_a.png');
-    background-repeat:repeat-x;
-    color: #fff;
-    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
-}
diff --git a/docs/html/ndk/reference/window_8h.jd b/docs/html/ndk/reference/window_8h.jd
deleted file mode 100644
index 39e01dc..0000000
--- a/docs/html/ndk/reference/window_8h.jd
+++ /dev/null
@@ -1,53 +0,0 @@
-page.title=window.h File Reference
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
-@jd:body
-<!-- Generated by Doxygen 1.8.6 -->
-<div id="nav-path" class="navpath">
-  <ul>
-<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_035c76f7235f5f563d38e3ab90cb9716.html">android</a></li>  </ul>
-</div>
-</div><!-- top -->
-<div class="header">
-  <div class="summary">
-<a href="#enum-members">Enumerations</a>  </div>
-  <div class="headertitle">
-<div class="title">window.h File Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
-</div><!--header-->
-<div class="contents">
-<table class="memberdecls">
-<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
-Enumerations</h2></td></tr>
-<tr class="memitem:gaf715e26dfffd1f8de1c18449e2770cff"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508">AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON</a> = 0x00000001, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f">AWINDOW_FLAG_DIM_BEHIND</a> = 0x00000002, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">AWINDOW_FLAG_BLUR_BEHIND</a> = 0x00000004, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> = 0x00000008, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450">AWINDOW_FLAG_NOT_TOUCHABLE</a> = 0x00000010, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a> = 0x00000020, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</a> = 0x00000040, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> = 0x00000080, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">AWINDOW_FLAG_LAYOUT_IN_SCREEN</a> = 0x00000100, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389">AWINDOW_FLAG_LAYOUT_NO_LIMITS</a> = 0x00000200, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">AWINDOW_FLAG_FULLSCREEN</a> = 0x00000400, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d">AWINDOW_FLAG_FORCE_NOT_FULLSCREEN</a> = 0x00000800, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">AWINDOW_FLAG_DITHER</a> = 0x00001000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0">AWINDOW_FLAG_SECURE</a> = 0x00002000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a">AWINDOW_FLAG_SCALED</a> = 0x00004000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326">AWINDOW_FLAG_IGNORE_CHEEK_PRESSES</a> = 0x00008000, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563">AWINDOW_FLAG_LAYOUT_INSET_DECOR</a> = 0x00010000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">AWINDOW_FLAG_ALT_FOCUSABLE_IM</a> = 0x00020000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6">AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH</a> = 0x00040000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> = 0x00080000, 
-<br/>
-&#160;&#160;<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824">AWINDOW_FLAG_SHOW_WALLPAPER</a> = 0x00100000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01">AWINDOW_FLAG_TURN_SCREEN_ON</a> = 0x00200000, 
-<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">AWINDOW_FLAG_DISMISS_KEYGUARD</a> = 0x00400000
-<br/>
- }</td></tr>
-<tr class="separator:gaf715e26dfffd1f8de1c18449e2770cff"><td class="memSeparator" colspan="2">&#160;</td></tr>
-</table>
-</div><!-- contents -->
diff --git a/docs/html/ndk/samples/_book.yaml b/docs/html/ndk/samples/_book.yaml
deleted file mode 100644
index 3665f5a..0000000
--- a/docs/html/ndk/samples/_book.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-toc:
-- title: Overview
-  path: /ndk/samples/index.html
-
-- title: Walkthroughs
-  path: /ndk/samples/walkthroughs.html
-  section:
-  - title: hello-jni
-    path: /ndk/samples/sample_hellojni.html
-  - title: native-activity
-    path: /ndk/samples/sample_na.html
-  - title: Teapot
-    path: /ndk/samples/sample_teapot.html
diff --git a/docs/html/ndk/samples/index.jd b/docs/html/ndk/samples/index.jd
deleted file mode 100644
index d2e6dc3..0000000
--- a/docs/html/ndk/samples/index.jd
+++ /dev/null
@@ -1,33 +0,0 @@
-page.title=Samples: Overview
-@jd:body
-
-<p>Welcome to the NDK samples area. Here, you can download a variety of sample
-apps to help deepen your understanding the NDK.
-
-
-<p>From this page, you can download samples that provide a look at the NDK in action. A few of the
-topics covered are:</p>
-
-<ul>
-   <li>Managing your native app's activity lifecycle.</li>
-   <li>Using native OpenGL on an Android device.</li>
-   <li>Implementing native audio.</li>
-   <li>Exporting modules.</li>
-</ul>
-
-<p class="note"><strong>Note: </strong>These samples are also contained in the NDK installation
-package; if you have already downloaded the NDK, you have them. They reside in
-{@code $NDK/samples/}, where {@code $NDK} is the NDK installation root.</p>
-
- <div id="sdk-terms-form">
-      <p><a href="https://github.com/googlesamples/android-ndk/tree/android-mk" class="button">
-      Browse NDK samples</a></p>
- </div>
-
-<p>Vulkan samples are located separately from those for the rest of the NDK. To explore them,
-access the link below.</p>
-
- <div id="Vulkan-terms-form">
-      <p><a href="https://github.com/LunarG/VulkanSamples" class="button">
-      Browse Vulkan samples</a></p>
- </div>
\ No newline at end of file
diff --git a/docs/html/ndk/samples/sample_hellojni.jd b/docs/html/ndk/samples/sample_hellojni.jd
deleted file mode 100644
index fa61b28..0000000
--- a/docs/html/ndk/samples/sample_hellojni.jd
+++ /dev/null
@@ -1,123 +0,0 @@
-page.title=Sample: hello-jni
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#an">Android.mk</a></li>
-        <li><a href="#ap">Application.mk</a></li>
-        <li><a href="#ji">Java-side Implementation</a></li>
-        <li><a href="#ci">C-side Implementation</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<p>This sample guides you through HelloJNI, a minimal
-application built with the NDK. This sample is in the {@code samples/hello-jni/} directory
-under the root directory of your NDK installation.</p> 
-
-<h2 id="an">Android.mk</h2>
-
-<p>The following two lines provide the name of the native source file, along
-with the name of the shared library to build. The full name of the built
-library is {@code libhello-jni.so}, once the build system adds the
-{@code lib} prefix and the {@code .so} extension.</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES := hello-jni.c
-LOCAL_MODULE    := hello-jni
-</pre>
-
-<p>For more information about what the {@code Android.mk} file does, and how to use it, see
-<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.</p>
-
-<h2 id="ap">Application.mk</h2>
-<p>This line tells the build system the CPU and architecture against which to build. In this
-example, the build system builds for all supported architectures.</p>
-
-<pre class="no-pretty-print">
-APP_ABI := all
-</pre>
-
-<p>For more information about the {@code Application.mk} file, and how to use it, see
-<a href="{@docRoot}ndk/guides/application_mk.html">Application.mk</a>.</p>
-
-<h2 id="ji">Java-side Implementation</h2>
-<p>The {@code helloJNI.java} file is located in {@code hellojni/src/com/example/hellojni/}. It calls
-a function to retrieve a string from the native side, then displays it on the screen.</p>
-
-<p>The source code contains three lines of particular interest to the NDK user.
-They are presented here in the order in which they are used, rather than by
-line order.</p>
-
-<p>This function call loads the {@code .so} file upon application startup.</p>
-
-<pre class="no-pretty-print">
-System.loadLibrary("hello-jni");
-</pre>
-
-<p>The {@code native} keyword in this method declaration tells the
-virtual machine that the function is in the shared library (that is, implemented on the native
-side).</p>
-
-<pre class="no-pretty-print">
-public native String stringFromJNI();
-</pre>
-
-<p>The Android framework calls the function loaded and declared in the
-previous steps, displaying the string on the screen.</p>
-
-<pre class="no-pretty-print">
-tv.setText( stringFromJNI() );
-</pre>
-
-<h2 id="ci">C-side Implementation</h2>
-<p>The {@code hello-jni.c} file is located in {@code hello-jni/jni/}. It contains a function that
-returns a string that <a href="#ji">the Java side requested</a>). The function declaration is as
-follows:</p>
-
-<pre>
-jstring
-Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
-                                                  jobject thiz )
-</pre>
-
-<p>This declaration corresponds to the native function declared in the
-Java source code. The return type, {@code jstring}, is a data type defined
-in the
-<a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html">Java Native
-Interface Specification</a>. It is not actually a string, but a
-pointer to a Java string.</p>
-
-<p>After {@code jstring} comes the function name, which is based on the
-Java function name and and the path to the file containing it. Construct it
-according to the following rules:</p>
-
-<ul>
-<li>Prepend {@code Java_} to it.</li>
-<li>Describe the filepath relative to the top-level source directory.</li>
-<li>Use underscores in place of forward slashes.</li>
-<li>Omit the {@code .java} file extension.</li>
-<li>After the last underscore, append the function name.</li>
-</ul>
-
-<p>Following these rules, this example uses the function name
-{@code Java_com_example_hellojni_HelloJni_stringFromJNI}. This name refers to a Java
-function called {@code stringFromJNI()}, which resides in
-{@code hellojni/src/com/example/hellojni/HelloJni.java}.</p>
-
-<p>{@code JNIEnv*} is the pointer to the VM, and
-{@code jobject} is a pointer to the implicit {@code this} object passed from
-the Java side.</p>
-
-<p>The following line calls the VM API {@code (*env)}, and passes it a return value:
-that is, the string that the function on the Java side had requested.</p>
-
-<pre class="no-pretty-print">
-return (*env)-&gt;NewStringUTF(env, "Hello from JNI !
-Compiled with ABI " ABI ".");
-</pre>
diff --git a/docs/html/ndk/samples/sample_na.jd b/docs/html/ndk/samples/sample_na.jd
deleted file mode 100644
index 0966dd8..0000000
--- a/docs/html/ndk/samples/sample_na.jd
+++ /dev/null
@@ -1,259 +0,0 @@
-page.title=Sample: native-activity
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#am">AndroidManifest.xml</a></li>
-        <li><a href="#anm">Android.mk</a></li>
-        <li><a href="#apm">Application.mk</a></li>
-        <li><a href="#mac">main.c</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<p>The native-activity sample resides under the NDK installation root, in
-{@code samples/native-activity}. It is a very simple example of a purely native
-application, with no Java source code. In the absence of any Java source, the
-Java compiler still creates an executable stub for the virtual machine to run.
-The stub serves as a wrapper for the actual, native program, which is located in the {@code .so}
-file.</p>
-
-<p>The app itself simply renders a color onto the entire screen, and 
-then changes the color partly in response to movement that it detects.</p>
-
-<h2 id="am">AndroidManifest.xml</h2>
-
-<p>An app with only native code must not specify an Android API level lower than 9, which introduced
-the <a href="{@docRoot}ndk/guides/concepts.html#naa">{@code NativeActivity}</a> framework class.</p>
-
-<pre class="no-pretty-print">
-&lt;uses-sdk android:minSdkVersion="9" /&gt;
-</pre>
-
-<p>The following line declares {@code android:hasCode} as {@code false}, as this app has only
-native code&ndash;no Java.
-</p>
-
-<pre class="no-pretty-print">
-&lt;application android:label="@string/app_name"
-android:hasCode="false"&gt;
-</pre>
-
-<p>The next line declares the {@code NativeActivity} class.</p>
-
-<pre class="no-pretty-print">
-&lt;activity android:name="android.app.NativeActivity"
-</pre>
-
-<p>Finally, the manifest specifies {@code android:value} as the name of the shared library to be
-built, minus the initial {@code lib} and the {@code .so} extension. This value must be the same as
-the name of {@code LOCAL_MODULE} in {@code Android.mk}.</p>
-
-<pre class="no-pretty-print">
-&lt;meta-data android:name="android.app.lib_name"
-        android:value="native-activity" /&gt;
-</pre>
-
-<h2 id="anm">Android.mk</h2>
-<p>This file begins by providing the name of the shared library to generate.</p>
-
-<pre class="no-pretty-print">
-LOCAL_MODULE    := native-activity
-</pre>
-
-<p>Next, it declares the name of the native source-code file.</p>
-
-<pre class="no-pretty-print">
-LOCAL_SRC_FILES := main.c
-</pre>
-
-<p>Next, it lists the external libraries for the build system to use in building the binary. The
-{@code -l} (link-against) option precedes each library name.</p>
-
-<ul>
-<li>{@code log} is a logging library.</li>
-<li>{@code android} encompasses the standard Android support APIs for NDK. For more information about
-the APIs that Android and the NDK support, see  <a href="stable_apis.html">Android NDK Native
-APIs</a>.</li>
-<li>{@code EGL} corresponds to the platform-specific portion of the graphics API.</li>
-<li>{@code GLESv1_CM} corresponds to OpenGL ES, the version of OpenGL for Android. This library
-depends on EGL.</li>
-</ul>
-
-<p>For each library:</p>
-
-<ul>
-<li>The actual file name starts with {@code lib}, and ends with the
-{@code .so} extension. For example, the actual file name for the
-{@code log} library is {@code liblog.so}.</li>
-<li>The library resides in the following directory, NDK root:
-{@code <ndk>/platforms/android-<sdk_version>/arch-<abi>/usr/lib/}.</li>
-</ul>
-
-<pre class="no-pretty-print">
-LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv1_CM
-</pre>
-
-<p>The next line provides the name of the static library, {@code android_native_app_glue}, which the
-application uses to manage {@code NativeActivity} lifecycle events and touch input.</p>
-
-<pre class="no-pretty-print">
-LOCAL_STATIC_LIBRARIES := android_native_app_glue
-</pre>
-
-<p>The final line tells the build system to build this static library.
-The {@code ndk-build} script places the built library
-({@code libandroid_native_app_glue.a}) into the {@code obj} directory
-generated during the build process. For more information about the {@code android_native_app_glue}
-library, see its {@code android_native_app_glue.h} header and corresponding {@code .c}source file.
-</p>
-
-
-<pre class="no-pretty-print">
-$(call import-module,android/native_app_glue)
-</pre>
-
-<p>For more information about the {@code Android.mk} file, see
-<a href="{@docRoot}ndk/guides/android_mk.html">Android.mk</a>.</p>
-
-
-<h2 id="apm">Application.mk</h2>
-
-<p>This line defines the minimum level of Android API Level support.</p>
-
-<pre class="no-pretty-print">
-APP_PLATFORM := android-10
-</pre>
-
-<p>Because there is no ABI definition, the build system defaults to building only for
-{@code armeabi}.</p>
-
-<h2 id="mac">main.c</h2>
-<p>This file essentially contains the entire progam.</p>
-
-<p>The following includes correspond to the libraries, both shared and static,
-enumerated in {@code Android.mk}.</p>
-
-<pre class="no-pretty-print">
-#include &lt;EGL/egl.h&gt;
-#include &lt;GLES/gl.h&gt;
-
-
-#include &lt;android/sensor.h&gt;
-#include &lt;android/log.h&gt;
-#include &lt;android_native_app_glue&gt;
-</pre>
-
-<p>The {@code android_native_app_glue} library calls the following function,
-passing it a predefined state structure. It also serves as a wrapper that
-simplifies handling of {@code NativeActivity} callbacks.</p>
-
-<pre class="no-pretty-print">
-void android_main(struct android_app* state) {
-</pre>
-
-<p>Next, the program handles events queued by the glue library. The event
-handler follows the state structure.</p>
-
-<pre class="no-pretty-print">
-struct engine engine;
-
-
-
-// Suppress link-time optimization that removes unreferenced code
-// to make sure glue isn't stripped.
-app_dummy();
-
-
-memset(&amp;engine, 0, sizeof(engine));
-state-&gt;userData = &amp;engine;
-state-&gt;onAppCmd = engine_handle_cmd;
-state-&gt;onInputEvent = engine_handle_input;
-engine.app = state;
-</pre>
-
-<p>The application prepares to start monitoring the sensors, using the
-APIs in {@code sensor.h}.</p>
-
-<pre class="no-pretty-print">
-    engine.sensorManager = ASensorManager_getInstance();
-    engine.accelerometerSensor =
-                    ASensorManager_getDefaultSensor(engine.sensorManager,
-                        ASENSOR_TYPE_ACCELEROMETER);
-    engine.sensorEventQueue =
-                    ASensorManager_createEventQueue(engine.sensorManager,
-                        state-&gt;looper, LOOPER_ID_USER, NULL, NULL);
-</pre>
-
-<p>Next, a loop begins, in which the application polls the system for
-messages (sensor events). It sends messages to
-{@code android_native_app_glue}, which checks to see whether they match
-any {@code onAppCmd} events defined in {@code android_main}. When a
-match occurs, the message is sent to the handler for execution.</p>
-
-<pre class="no-pretty-print">
-while (1) {
-        // Read all pending events.
-        int ident;
-        int events;
-        struct android_poll_source* source;
-
-
-        // If not animating, we will block forever waiting for events.
-        // If animating, we loop until all events are read, then continue
-        // to draw the next frame of animation.
-        while ((ident=ALooper_pollAll(engine.animating ? 0 : -1, NULL,
-                &amp;events,
-                (void**)&amp;source)) &gt;= 0) {
-
-
-            // Process this event.
-            if (source != NULL) {
-                source-&gt;process(state, source);
-            }
-
-
-            // If a sensor has data, process it now.
-            if (ident == LOOPER_ID_USER) {
-                if (engine.accelerometerSensor != NULL) {
-                    ASensorEvent event;
-                    while (ASensorEventQueue_getEvents(engine.sensorEventQueue,
-                            &amp;event, 1) &gt; 0) {
-                        LOGI("accelerometer: x=%f y=%f z=%f",
-                                event.acceleration.x, event.acceleration.y,
-                                event.acceleration.z);
-                    }
-                }
-            }
-
-
-        // Check if we are exiting.
-        if (state-&gt;destroyRequested != 0) {
-            engine_term_display(&amp;engine);
-            return;
-        }
-    }
-</pre>
-
-<p>Once the queue is empty, and the program exits the polling loop, the
-program calls OpenGL to draw the screen.</p>
-<pre class="no-pretty-print">
-    if (engine.animating) {
-        // Done with events; draw next animation frame.
-        engine.state.angle += .01f;
-        if (engine.state.angle &gt; 1) {
-            engine.state.angle = 0;
-        }
-
-
-        // Drawing is throttled to the screen update rate, so there
-        // is no need to do timing here.
-        engine_draw_frame(&amp;engine);
-    }
-}
-</pre>
diff --git a/docs/html/ndk/samples/sample_teapot.jd b/docs/html/ndk/samples/sample_teapot.jd
deleted file mode 100644
index 97708a7..0000000
--- a/docs/html/ndk/samples/sample_teapot.jd
+++ /dev/null
@@ -1,360 +0,0 @@
-page.title=Sample: Teapot
-@jd:body
-
-<div id="qv-wrapper">
-    <div id="qv">
-      <h2>On this page</h2>
-
-      <ol>
-        <li><a href="#am">AndroidManifest.xml</a></li>
-        <li><a href="#ap">Application.mk</a></li>
-        <li><a href="#ji">Java-side Implementation</a></li>
-        <li><a href="#ni">Native-side Implementation</a></li>
-          </ol>
-        </li>
-      </ol>
-    </div>
-  </div>
-
-<p>The Teapot sample is located under in the {@code samples/Teapot/} directory, under the NDK
-installation's root directory. This sample uses the OpenGL library to render the iconic
-<a href="http://math.hws.edu/bridgeman/courses/324/s06/doc/opengl.html#basic">Utah
-teapot</a>. In particular, it showcases the {@code ndk_helper} helper class,
-a collection of native helper functions required for implementing games and 
-similar applications as native applications. This class provides:</p>
-
-<ul>
-<li>An abstraction layer, {@code GLContext}, that handles certain NDK-specific behaviors.</li>
-<li>Helper functions that are useful but not present in the NDK, such as tap detection.</li>
-<li>Wrappers for JNI calls for platform features such as texture loading.</li>
-</ul>
-
-<h2 id="am">AndroidManifest.xml</h2>
-<p>The activity declaration here is not {@link android.app.NativeActivity} itself, but
-a subclass of it: {@code TeapotNativeActivity}.</p>
-
-<pre class="no-pretty-print">
-    &lt;activity android:name="com.sample.teapot.TeapotNativeActivity"
-            android:label="@string/app_name"
-            android:configChanges="orientation|keyboardHidden"&gt;
-</pre>
-
-<p>Ultimately, the name of the shared-object file that the build system builds is
-{@code libTeapotNativeActivity.so}. The build system adds the {@code lib} prefix and the {@code .so}
-extension; neither is part of the value that the manifest originally assigns to
-{@code android:value}.</p>
-
-<pre class="no-pretty-print">
-        &lt;meta-data android:name="android.app.lib_name"
-                android:value="TeapotNativeActivity" /&gt;
-</pre>
-
-<h2 id="ap">Application.mk</h2>
-<p>An app that uses the {@link android.app.NativeActivity} framework class must not specify an
-Android API level lower than 9, which introduced that class. For more information about the
-{@link android.app.NativeActivity} class, see
-<a href="{@docRoot}ndk/guides/concepts.html#naa">Native Activities and Applications</a>.
-</p>
-
-<pre class="no-pretty-print">
-APP_PLATFORM := android-9
-</pre>
-
-<p>The next line tells the build system to build for all supported architectures.</p>
-<pre class="no-pretty-print">
-APP_ABI := all
-</pre>
-
-<p>Next, the file tells the build system which
-<a href="{@docRoot}ndk/guides/cpp-support.html">C++ runtime support library</a> to use. </p>
-
-<pre class="no-pretty-print">
-APP_STL := stlport_static
-</pre>
-
-<h2 id="ji">Java-side Implementation</h2>
-<p>The {@code TeapotNativeActivity.java} file is located in
-{@code samples/Teapot/src/com/sample/teapot}, under the NDK installation root directory. It handles
-activity lifecycle events, and also enables the app to display text on the screen. The following
-block of code is most important from the perspective of the native-side implementation: The native
-code calls it to display a popup window for displaying text.</p>
-
-<pre class="no-pretty-print">
-
-void setImmersiveSticky() {
-    View decorView = getWindow().getDecorView();
-    decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN
-            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
-            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
-            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
-            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
-            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
-}
-</pre>
-
-<h2 id="ni">Native-side Implementation</h2>
-
-<p>This section explores the part of the Teapot app implemented in C++.</p>
-
-<h3>TeapotRenderer.h</h3>
-
-<p>These function calls perform the actual rendering of the teapot. It uses
-{@code ndk_helper} for matrix calculation and to reposition the camera
-based on where the user taps.</p>
-
-<pre class="no-pretty-print">
-ndk_helper::Mat4 mat_projection_;
-ndk_helper::Mat4 mat_view_;
-ndk_helper::Mat4 mat_model_;
-
-
-ndk_helper::TapCamera* camera_;
-</pre>
-
-<h3>TeapotNativeActivity.cpp</h3>
-
-<p>The following lines include {@code ndk_helper} in the native source file, and define the
-helper-class name.</p>
-
-<pre class="no-pretty-print">
-
-#include "NDKHelper.h"
-
-//-------------------------------------------------------------------------
-//Preprocessor
-//-------------------------------------------------------------------------
-#define HELPER_CLASS_NAME "com/sample/helper/NDKHelper" //Class name of helper
-function
-</pre>
-
-<p>The first use of the {@code ndk_helper} class is to handle the
-EGL-related lifecycle, associating EGL context states (created/lost) with
-Android lifecycle events. The {@code ndk_helper} class enables the application to preserve context
-information so that the system can restore a destroyed activity. This ability is useful, for
-example, when the target machine is rotated (causing an activity to be
-destroyed, then immediately restored in the new orientation), or when the lock
-screen appears.</p>
-
-<pre class="no-pretty-print">
-ndk_helper::GLContext* gl_context_; // handles EGL-related lifecycle.
-</pre>
-
-<p>Next, {@code ndk_helper} provides touch control.</p>
-
-<pre class="no-pretty-print">
-ndk_helper::DoubletapDetector doubletap_detector_;
-ndk_helper::PinchDetector pinch_detector_;
-ndk_helper::DragDetector drag_detector_;
-ndk_helper::PerfMonitor monitor_;
-</pre>
-
-<p>It also provides camera control (openGL view frustum).</p>
-
-<pre class="no-pretty-print">
-ndk_helper::TapCamera tap_camera_;
-</pre>
-
-<p>The app then prepares to use the device's sensors, using the native APIs provided in the NDK.</p>
-
-<pre class="no-pretty-print">
-ASensorManager* sensor_manager_;
-const ASensor* accelerometer_sensor_;
-ASensorEventQueue* sensor_event_queue_;
-</pre>
-
-<p>The app calls the following functions in response to various Android
-lifecycle events and EGL context state changes, using various functionalities
-provided by {@code ndk_helper} via the {@code Engine} class.</p>
-
-<pre class="no-pretty-print">
-
-void LoadResources();
-void UnloadResources();
-void DrawFrame();
-void TermDisplay();
-void TrimMemory();
-bool IsReady();
-</pre>
-
-<p>Then, the following function calls back to the Java side to update the UI display.</p>
-
-<pre class="no-pretty-print">
-void Engine::ShowUI()
-{
-    JNIEnv *jni;
-    app_-&gt;activity-&gt;vm-&gt;AttachCurrentThread( &amp;jni, NULL );
-
-
-    //Default class retrieval
-    jclass clazz = jni-&gt;GetObjectClass( app_-&gt;activity-&gt;clazz );
-    jmethodID methodID = jni-&gt;GetMethodID( clazz, "showUI", "()V" );
-    jni-&gt;CallVoidMethod( app_-&gt;activity-&gt;clazz, methodID );
-
-
-    app_-&gt;activity-&gt;vm-&gt;DetachCurrentThread();
-    return;
-}
-</pre>
-
-<p>Next, this function calls back to the Java side to draw a text box
-superimposed on the screen rendered on the native side, and showing frame
-count.</p>
-
-<pre class="no-pretty-print">
-void Engine::UpdateFPS( float fFPS )
-{
-    JNIEnv *jni;
-    app_-&gt;activity-&gt;vm-&gt;AttachCurrentThread( &amp;jni, NULL );
-
-
-    //Default class retrieval
-    jclass clazz = jni-&gt;GetObjectClass( app_-&gt;activity-&gt;clazz );
-    jmethodID methodID = jni-&gt;GetMethodID( clazz, "updateFPS", "(F)V" );
-    jni-&gt;CallVoidMethod( app_-&gt;activity-&gt;clazz, methodID, fFPS );
-
-
-    app_-&gt;activity-&gt;vm-&gt;DetachCurrentThread();
-    return;
-}
-</pre>
-
-<p>The application gets the system clock and supplies it to the renderer
-for time-based animation based on real-time clock. This information is used, for example, in
-calculating momentum, where speed declines as a function of time.</p>
-
-<pre class="no-pretty-print">
-renderer_.Update( monitor_.GetCurrentTime() );
-</pre>
-
-<p>The application now checks whether the context information that {@code GLcontext} holds is still
-valid. If not, {@code ndk-helper} swaps the buffer, reinstantiating the GL context.</p>
-
-<pre class="no-pretty-print">
-if( EGL_SUCCESS != gl_context_-&gt;Swap() )  // swaps
-buffer.
-</pre>
-
-<p>The program passes touch-motion events to the gesture detector defined
-in the {@code ndk_helper} class. The gesture detector tracks multitouch
-gestures, such as pinch-and-drag, and sends a notification when triggered by
-any of these events.</p>
-
-<pre class="no-pretty-print">
-    if( AInputEvent_getType( event ) == AINPUT_EVENT_TYPE_MOTION )
-    {
-        ndk_helper::GESTURE_STATE doubleTapState =
-            eng->doubletap_detector_.Detect( event );
-        ndk_helper::GESTURE_STATE dragState = eng->drag_detector_.Detect( event );
-        ndk_helper::GESTURE_STATE pinchState = eng->pinch_detector_.Detect( event );
-
-        //Double tap detector has a priority over other detectors
-        if( doubleTapState == ndk_helper::GESTURE_STATE_ACTION )
-        {
-            //Detect double tap
-            eng->tap_camera_.Reset( true );
-        }
-        else
-        {
-            //Handle drag state
-            if( dragState & ndk_helper::GESTURE_STATE_START )
-            {
-                //Otherwise, start dragging
-                ndk_helper::Vec2 v;
-                eng->drag_detector_.GetPointer( v );
-                eng->TransformPosition( v );
-                eng->tap_camera_.BeginDrag( v );
-            }
-           // ...else other possible drag states...
-
-            //Handle pinch state
-            if( pinchState & ndk_helper::GESTURE_STATE_START )
-            {
-                //Start new pinch
-                ndk_helper::Vec2 v1;
-                ndk_helper::Vec2 v2;
-                eng->pinch_detector_.GetPointers( v1, v2 );
-                eng->TransformPosition( v1 );
-                eng->TransformPosition( v2 );
-                eng->tap_camera_.BeginPinch( v1, v2 );
-            }
-            // ...else other possible pinch states...
-        }
-        return 1;
-    }
-</pre>
-
-<p>The {@code ndk_helper} class also provides access to a vector-math library
-({@code vecmath.h}), using it here to transform touch coordinates.</p>
-
-<pre class="no-pretty-print">
-void Engine::TransformPosition( ndk_helper::Vec2& vec )
-{
-    vec = ndk_helper::Vec2( 2.0f, 2.0f ) * vec
-            / ndk_helper::Vec2( gl_context_->GetScreenWidth(),
-            gl_context_->GetScreenHeight() ) - ndk_helper::Vec2( 1.f, 1.f );
-}
-</pre>
-</ul>
-
-<p>The {@code HandleCmd()} method handles commands posted from the
-android_native_app_glue library. For more information about what the messages
-mean, refer to the comments in the {@code android_native_app_glue.h} and
-{@code .c} source files.</p>
-
-<pre class="no-pretty-print">
-void Engine::HandleCmd( struct android_app* app,
-        int32_t cmd )
-{
-    Engine* eng = (Engine*) app->userData;
-    switch( cmd )
-    {
-    case APP_CMD_SAVE_STATE:
-        break;
-    case APP_CMD_INIT_WINDOW:
-        // The window is being shown, get it ready.
-        if( app->window != NULL )
-        {
-            eng->InitDisplay();
-            eng->DrawFrame();
-        }
-        break;
-    case APP_CMD_TERM_WINDOW:
-        // The window is being hidden or closed, clean it up.
-        eng->TermDisplay();
-        eng->has_focus_ = false;
-        break;
-    case APP_CMD_STOP:
-        break;
-    case APP_CMD_GAINED_FOCUS:
-        eng->ResumeSensors();
-        //Start animation
-        eng->has_focus_ = true;
-        break;
-    case APP_CMD_LOST_FOCUS:
-        eng->SuspendSensors();
-        // Also stop animating.
-        eng->has_focus_ = false;
-        eng->DrawFrame();
-        break;
-    case APP_CMD_LOW_MEMORY:
-        //Free up GL resources
-        eng->TrimMemory();
-        break;
-    }
-}
-</pre>
-
-<p>The {@code ndk_helper} class posts {@code APP_CMD_INIT_WINDOW} when {@code android_app_glue}
-receives an {@code onNativeWindowCreated()} callback from the system.
-Applications can normally perform window initializations, such as EGL
-initialization. They do this outside of the activity lifecycle, since the
-activity is not yet ready.</p>
-
-<pre class="no-pretty-print">
-    //Init helper functions
-    ndk_helper::JNIHelper::Init( state->activity, HELPER_CLASS_NAME );
-
-    state->userData = &g_engine;
-    state->onAppCmd = Engine::HandleCmd;
-    state->onInputEvent = Engine::HandleInput;
-</pre>
diff --git a/docs/html/ndk/samples/samples_toc.cs b/docs/html/ndk/samples/samples_toc.cs
deleted file mode 100644
index 92266b1..0000000
--- a/docs/html/ndk/samples/samples_toc.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-<?cs # Table of contents for Dev Guide.
-
-       For each document available in translation, add an localized title to this TOC.
-       Do not add localized title for docs not available in translation.
-       Below are template spans for adding localized doc titles. Please ensure that
-       localized titles are added in the language order specified below.
-?>
-
-<ul id="nav">
-
-   <li class="nav-section">
-      <div class="nav-section-header empty"><a href="<?cs var:toroot ?>ndk/samples/index.html">
-      <span class="en">Overview</span></a></div>
-   </li>
-
-   <li class="nav-section">
-      <div class="nav-section-header">
-      <a href="<?cs var:toroot ?>ndk/samples/walkthroughs.html">
-      <span class="en">Walkthroughs</span></a></div>
-      <ul>
-         <li><a href="<?cs var:toroot ?>ndk/samples/sample_hellojni.html">hello-jni</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/samples/sample_na.html">native-activity</a></li>
-         <li><a href="<?cs var:toroot ?>ndk/samples/sample_teapot.html">Teapot</a></li>
-      </ul>
-   </li>
-</ul>
-
-
-<script type="text/javascript">
-<!--
-    buildToggleLists();
-    changeNavLang(getLangPref());
-//-->
-</script>
-
diff --git a/docs/html/ndk/samples/walkthroughs.jd b/docs/html/ndk/samples/walkthroughs.jd
deleted file mode 100644
index 88ceb56..0000000
--- a/docs/html/ndk/samples/walkthroughs.jd
+++ /dev/null
@@ -1,13 +0,0 @@
-page.title=Samples: Walkthroughs
-@jd:body
-
-<p>This section provides detailed walkthroughs of several key samples. The samples are as
-follows:</p>
-
-<li><a href="{@docRoot}ndk/samples/sample_hellojni.html">hello-jni</a>: A very basic app that
-illustrates core workings of the NDK.</li>
-<li><a href="{@docRoot}ndk/samples/sample_na.html">native-activity</a>: An app that shows the
-fundamentals of constructing a purely native app. It places particular emphasis on the
-{@code android_native_app_glue library}.</li>
-<li><a href="<a href="{@docRoot}ndk/samples/sample_teapot.html">Teapot</a>: A simple OpenGL demo,
-showcasing the <code>ndk_helper</code> class.</li>
diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd
index 9c92fb2..241a98e 100644
--- a/docs/html/preview/index.jd
+++ b/docs/html/preview/index.jd
@@ -115,7 +115,24 @@
     data-initial-results="3"></div>
 </div></section>
 
-<section class="dac-section dac-gray"><div class="wrap">
+
+<section class="dac-section dac-gray" id="videos"><div class="wrap">
+  <h1 class="dac-section-title">Videos</h1>
+  <div class="dac-section-subtitle">
+    New Android capabilities and the right way to use them in your apps.
+  </div>
+
+  <div class="resource-widget resource-flow-layout col-16"
+    data-query="collection:preview/landing/videos/first,type:youtube+tag:androidn"
+    data-sortOrder="-timestamp"
+    data-cardSizes="6x6"
+    data-items-per-page="6"
+    data-maxResults="15"
+    data-initial-results="3"></div>
+</div></section>
+
+
+<section class="dac-section dac-light" id="resources"><div class="wrap">
   <h1 class="dac-section-title">Resources</h1>
   <div class="dac-section-subtitle">
     Essential information to help you get your apps ready for Android N.
diff --git a/docs/html/sdk/sdk_vars.cs b/docs/html/sdk/sdk_vars.cs
index 3d6f058..af13043 100644
--- a/docs/html/sdk/sdk_vars.cs
+++ b/docs/html/sdk/sdk_vars.cs
@@ -1,22 +1,22 @@
 <?cs
-set:ndk.mac64_download='android-ndk-r12-darwin-x86_64.zip' ?><?cs
-set:ndk.mac64_bytes='734014148' ?><?cs
-set:ndk.mac64_checksum='708d4025142924f7097a9f44edf0a35965706737' ?><?cs
+set:ndk.mac64_download='android-ndk-r12b-darwin-x86_64.zip' ?><?cs
+set:ndk.mac64_bytes='734135279' ?><?cs
+set:ndk.mac64_checksum='e257fe12f8947be9f79c10c3fffe87fb9406118a' ?><?cs
 
-set:ndk.linux64_download='android-ndk-r12-linux-x86_64.zip' ?><?cs
-set:ndk.linux64_bytes='755431993' ?><?cs
-set:ndk.linux64_checksum='b7e02dc733692447366a2002ad17e87714528b39' ?><?cs
+set:ndk.linux64_download='android-ndk-r12b-linux-x86_64.zip' ?><?cs
+set:ndk.linux64_bytes='755551010' ?><?cs
+set:ndk.linux64_checksum='170a119bfa0f0ce5dc932405eaa3a7cc61b27694' ?><?cs
 
-set:ndk.win32_download='android-ndk-r12-windows-x86.zip' ?><?cs
-set:ndk.win32_bytes='706332762' ?><?cs
-set:ndk.win32_checksum='37fcd7acf6012d0068a57c1524edf24b0fef69c9' ?><?cs
+set:ndk.win32_download='android-ndk-r12b-windows-x86.zip' ?><?cs
+set:ndk.win32_bytes='706453972' ?><?cs
+set:ndk.win32_checksum='8e6eef0091dac2f3c7a1ecbb7070d4fa22212c04' ?><?cs
 
-set:ndk.win64_download='android-ndk-r12-windows-x86_64.zip' ?><?cs
-set:ndk.win64_bytes='749444245' ?><?cs
-set:ndk.win64_checksum='80d64a77aab52df867ac55cec1e976663dd3326f'
+set:ndk.win64_download='android-ndk-r12b-windows-x86_64.zip' ?><?cs
+set:ndk.win64_bytes='749567353' ?><?cs
+set:ndk.win64_checksum='337746d8579a1c65e8a69bf9cbdc9849bcacf7f5'
 ?>
 <?cs
 def:size_in_mb(bytes)
   ?><?cs set:mb = bytes / 1024 / 1024
   ?><?cs var:mb ?><?cs
-/def ?>
+/def ?>
\ No newline at end of file
diff --git a/docs/html/topic/performance/_book.yaml b/docs/html/topic/performance/_book.yaml
new file mode 100644
index 0000000..94cfc57
--- /dev/null
+++ b/docs/html/topic/performance/_book.yaml
@@ -0,0 +1,32 @@
+toc:
+- title: Reducing Network Battery Drain
+  path: /topic/performance/power/network/index.html
+  path_attributes:
+  - name: description
+    value: Access the network while going easy on battery life.
+  section:
+  - title: Collecting Network Traffic Data
+    path: /topic/performance/power/network/gather-data.html
+  - title: Analyzing Network Traffic Data
+    path: /topic/performance/power/network/analyze-data.html
+  - title: Optimizing User-Initiated Network Use
+    path: /topic/performance/power/network/action-user-traffic.html
+  - title: Optimizing Server-Initiated Network Use
+    path: /topic/performance/power/network/action-server-traffic.html
+  - title: Optimizing General Network Use
+    path: /topic/performance/power/network/action-any-traffic.html
+- title: Implementing Doze
+  path: /training/monitoring-device-state/doze-standby.html
+  path_attributes:
+  - name: description
+    value: Help ensure the device isn't depleting the battery when not in use.
+- title: Launch-Time Performance
+  path: /topic/performance/launch-time.html
+- title: Better Performance through Threading
+  path: /topic/performance/threads.html
+- title: Optimizing View Hierarchies
+  path: /topic/performance/optimizing-view-hierarchies.html
+- title: Intelligent Job-Scheduling
+  path: /topic/performance/scheduling.html
+- title: Reducing APK Size
+  path: /topic/performance/reduce-apk-size.html
diff --git a/docs/html/topic/performance/images/cold-launch.png b/docs/html/topic/performance/images/cold-launch.png
new file mode 100644
index 0000000..2935ece
--- /dev/null
+++ b/docs/html/topic/performance/images/cold-launch.png
Binary files differ
diff --git a/docs/html/topic/performance/images/displayed-logcat.png b/docs/html/topic/performance/images/displayed-logcat.png
new file mode 100644
index 0000000..7dee884
--- /dev/null
+++ b/docs/html/topic/performance/images/displayed-logcat.png
Binary files differ
diff --git a/docs/html/topic/performance/images/lint-display.png b/docs/html/topic/performance/images/lint-display.png
new file mode 100644
index 0000000..e360938
--- /dev/null
+++ b/docs/html/topic/performance/images/lint-display.png
Binary files differ
diff --git a/docs/html/topic/performance/images/lint-inspect-code.png b/docs/html/topic/performance/images/lint-inspect-code.png
new file mode 100644
index 0000000..41604a1
--- /dev/null
+++ b/docs/html/topic/performance/images/lint-inspect-code.png
Binary files differ
diff --git a/docs/html/topic/performance/index.jd b/docs/html/topic/performance/index.jd
new file mode 100644
index 0000000..08c610f
--- /dev/null
+++ b/docs/html/topic/performance/index.jd
@@ -0,0 +1,39 @@
+page.title=Performance
+page.article=true
+page.metaDescription=Android Performance does nice things. Details to come.
+
+meta.tags="performance"
+page.tags="performance"
+
+@jd:body
+
+<iframe width="448" height="252" src="//www.youtube.com/embed/qk5F6Bxqhr4?utm_source=dac&utm_medium=video&utm_content=andfuntrain&utm_campaign=udacint?rel=0&hd=1" frameborder="0" allowfullscreen style="float: right; margin: 0 0 20px 20px;"></iframe>
+
+<p>Implementing a cool idea is a great start toward an app that delights users,
+but it's just the beginning. The next step is maximizing your app's performance.
+For example, users want apps that:</p>
+
+<ul>
+   <li>Use power sparingly.</li>
+   <li>Start up quickly.</li>
+   <li>Respond quickly to user interaction.</li>
+</ul>
+
+<p>This section provides you with the know-how you need in order to make
+your apps not only cool, but also performant. Read on to discover how to
+develop apps that are power-thrifty, responsive, efficient, and well-behaved.</p>
+
+
+
+
+<section class="dac-section dac-small" id="latest-games"><div class="wrap">
+  <h2 class="norule" style="margin:0 0">More resources</h2>
+  <div class="resource-widget resource-flow-layout col-16"
+       data-query="collection:develop/performance/landing"
+       data-sortOrder="random"
+       data-cardSizes="6x6"
+       data-maxResults="24"
+       data-items-per-page="24"
+       data-initial-results="3"></div>
+  </div>
+</section>
diff --git a/docs/html/topic/performance/launch-time.jd b/docs/html/topic/performance/launch-time.jd
new file mode 100644
index 0000000..c9ce1d5
--- /dev/null
+++ b/docs/html/topic/performance/launch-time.jd
@@ -0,0 +1,565 @@
+page.title=Launch-Time Performance
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#internals">Launch Internals</a>
+  <ol>
+    <li><a href="#cold">Cold start</a></li>
+    <li><a href="#warm">Warm start</a></li>
+    <li><a href="#lukewarm">Lukewarm start</a></li>
+  </ol>
+</li>
+<li><a href="#profiling">Profiling Launch Performance</a>
+  <ol>
+    <li><a href="#time-initial">Time to initial display</a></li>
+    <li><a href="#time-full">Time to full display</a></li>
+  </ol>
+</li>
+<li><a href="#common">Common Issues</a>
+   <ol>
+      <li><a href="#heavy-app">Heavy app initialization</a></li>
+      <li><a href="#heavy-act">Heavy activity initialization</a></li>
+      <li><a href="#themed">Themed launch screens</a></li>
+   </ol>
+      </li>
+</ol>
+</div>
+</div>
+
+<p>
+Users expect apps to be responsive and fast to load. An app with a slow startup
+time doesn’t meet this expectation, and can be disappointing to users. This
+sort of poor experience may cause a user to rate your app poorly on the Play
+store, or even abandon your app altogether.
+</p>
+
+<p>
+This document provides information to help you optimize your app’s launch time.
+It begins by explaining the internals of the launch process. Next, it discusses
+how to profile startup performance. Last, it describes some common startup-time
+issues, and gives some hints on how to address them.
+</p>
+
+<h2 id="internals">Launch Internals</h2>
+
+<p>
+App launch can take place in one of three states, each affecting how
+long it takes for your app to become visible to the user: cold start,
+warm start, and lukewarm start. In a cold start, your app starts from scratch.
+In the other states, the system needs to bring the app from the background to
+the foreground. We recommend that you always optimize based on an assumption of
+a cold start. Doing so can improve the performance of warm and lukewarm starts,
+as well.
+</p>
+
+<p>
+To optimize your app for fast startup, it’s useful to understand what’s
+happening at the system and app levels, and how they interact, in each of
+these states.
+</p>
+
+<h3 id="cold">Cold start</h3>
+
+<p>
+A cold start refers to an app’s starting from scratch: the system’s process
+has not, until this start, created the app’s process. Cold starts happen in
+cases such as your app’s being launched for the first time since the device
+booted, or since the system killed the app. This type of start presents the
+greatest challenge in terms of minimizing startup time, because the system
+and app have more work to do than in the other launch states.
+</p>
+
+<p>
+At the beginning of a cold start, the system has three tasks. These tasks are:
+</p>
+
+<ol style="1">
+   <li>Loading and launching the app.</li>
+   <li>Displaying a blank starting window for the app immediately after launch.
+   </li>
+   <li>Creating the app
+   <a href="{docRoot}guide/components/processes-and-threads.html#Processes">
+   process.</a></li>
+</ol>
+<br/>
+<p>
+As soon as the system creates the app process, the app process is responsible
+for the next stages. These stages are:
+</p>
+
+<ol style="1">
+   <li>Creating the app object.</li>
+   <li>Launching the main thread.</li>
+   <li>Creating the main activity.</li>
+   <li>Inflating views.</li>
+   <li>Laying out the screen.</li>
+   <li>Performing the initial draw.</li>
+</ol>
+
+<p>
+Once the app process has completed the first draw, the system process swaps
+out the currently displayed background window, replacing it with the main
+activity. At this point, the user can start using the app.
+</p>
+
+<p>
+Figure 1 shows how the system and app processes hand off work between each
+other.
+</p>
+<br/>
+
+  <img src="{@docRoot}performance/images/cold-launch.png">
+  <p class="img-caption">
+    <strong>Figure 1.</strong> A visual representation of the important parts of
+    a cold application launch.
+  </p>
+
+<p>
+Performance issues can arise during creation of the app and
+creation of the activity.
+</p>
+
+<h4 id="app-creation">Application creation</h4>
+
+<p>
+When your application launches, the blank starting window remains on the screen
+until the system finishes drawing the app for the first time. At that point,
+the system process swaps out the starting window for your app, allowing the
+user to start interacting with the app.
+</p>
+
+<p>
+If you’ve overloaded {@link android.app.Application#onCreate() Application.oncreate()}
+in your own app, the app starts by calling this
+method on your app object. Afterwards, the app spawns the main thread, also
+known as the UI thread, and tasks it with creating your main activity.
+</p>
+
+<p>
+From this point, system- and app-level processes proceed in accordance with
+the <a href="{docRoot}guide/topics/processes/process-lifecycle.html">
+app lifecycle stages</a>.
+</p>
+
+<h4 id="act-creation">Activity creation</h4>
+
+<p>
+After the app process creates your activity, the activity performs the
+following operations:
+</p>
+
+<ol style="1">
+   <li>Initializes values.</li>
+   <li>Calls constructors.</li>
+   <li>Calls the callback method, such as
+   {@link android.app.Activity#onCreate(android.os.Bundle) Activity.onCreate()},
+   appropriate to the current lifecycle state of the activity.</li>
+</ol>
+
+<p>
+Typically, the
+{@link android.app.Activity#onCreate(android.os.Bundle) onCreate()}
+method has the greatest impact on load time, because it performs the work with
+the highest overhead: loading and inflating views, and initializing the objects
+needed for the activity to run.
+</p>
+
+<h3 id="warm">Warm start</h3>
+
+<p>
+A warm start of your application is much simpler and lower-overhead than a
+cold start. In a warm start, all the system does is bring your activity to
+the foreground. If all of your application’s activities are still resident in
+memory, then the app can avoid having to repeat object initialization, layout
+inflation, and rendering.
+</p>
+
+<p>
+However, if some memory has been purged in response to memory trimming
+events, such as
+{@link android.content.ComponentCallbacks2#onTrimMemory(int) onTrimMemory()},
+then those objects will need to be recreated in
+response to the warm start event.
+</p>
+
+<p>
+A warm start displays the same on-screen behavior as a cold start scenario:
+The system process displays a blank screen until the app has finished rendering
+the activity.
+</p>
+
+<h3 id="lukewarm">Lukewarm start</h3>
+
+<p>
+A lukewarm start encompasses some subset of the operations that
+take place during a cold start; at the same time, it represents less overhead
+than a warm start. There are many potential states that could be considered
+lukewarm starts. For instance:
+</p>
+
+<ul>
+   <li>The user backs out of your app, but then re-launches it. The process may
+       have continued to run, but the app must recreate the activity from scratch
+       via a call to
+       {@link android.app.Activity#onCreate(android.os.Bundle) onCreate()}.</li>
+
+   <li>The system evicts your app from memory, and then the user re-launches it.
+       The process and the Activity need to be restarted, but the task can
+       benefit somewhat from the saved instance state bundle passed into
+       {@link android.app.Activity#onCreate(android.os.Bundle) onCreate()}.</li>
+</ul>
+
+<h2 id="profiling">Profiling Launch Performance</h2>
+
+<p>
+In order to properly diagnose start time performance, you can track metrics
+that show how long it takes your application to start.
+</p>
+
+<h3 id="time-initial">Time to initial display</h3>
+
+<p>
+From Android 4.4 (API level 19), logcat includes an output line containing
+a value called {@code Displayed}. This value represents
+the amount of time elapsed between launching the process and finishing drawing
+the corresponding activity on the screen. The elapsed time encompasses the
+following sequence of events:
+</p>
+
+<ol style="1">
+   <li>Launch the process.</li>
+   <li>Initialize the objects.</li>
+   <li>Create and initialize the activity.</li>
+   <li>Inflate the layout.</li>
+   <li>Draw your application for the first time.</li>
+</ol>
+
+<p>
+The reported log line looks similar to the following example:
+</p>
+
+<pre class="no-pretty-print">
+ActivityManager: Displayed com.android.myexample/.StartupTiming: +3s534ms
+</pre>
+
+<p>
+If you’re tracking logcat output from the command line, or in a terminal,
+finding the elapsed time is straightforward. To find elapsed time in
+Android Studio, you must disable filters in your logcat view. Disabling the
+filters is necessary because the system server, not the app itself, serves
+this log.
+</p>
+
+<p>
+Once you’ve made the appropriate settings, you can easily search for the
+correct term to see the time. Figure 2 shows how to disable filters, and,
+in the second line of output from the bottom, an example of logcat output of
+the {@code Displayed} time.
+</p>
+<br/>
+
+  <img src="{@docRoot}performance/images/displayed-logcat.png">
+  <p class="img-caption">
+    <strong>Figure 2.</strong> Disabling filters, and
+    finding the {@code Displayed} value in logcat.
+  </p>
+
+<p>
+The {@code Displayed} metric in the logcat output does not necessarily capture
+the amount of time until all resources are loaded and displayed: it leaves out
+resources that are not referenced in the layout file or that the app creates
+as part of object initialization. It excludes these resources because loading
+them is an inline process, and does not block the app’s initial display.
+</p>
+
+<h3 id="time-full">Time to full display</h3>
+
+<p>
+You can use the {@link android.app.Activity#reportFullyDrawn()} method to
+measure the elapsed time
+between application launch and complete display of all resources and view
+hierarchies. This can be valuable in cases where an app performs lazy loading.
+In lazy loading, an app does not block the initial drawing of the window, but
+instead asynchronously loads resources and updates the view hierarchy.
+</p>
+
+<p>
+If, due to lazy loading, an app’s initial display does not include all
+resources, you might consider the completed loading and display of all
+resources and views as a separate metric: For example, your UI might be
+fully loaded, with some text drawn, but not yet display images that the
+app must fetch from the network.
+</p>
+
+<p>
+To address this concern, you can manually call
+{@link android.app.Activity#reportFullyDrawn()}
+to let the system know that your activity is
+finished with its lazy loading. When you use this method, the value
+that logcat displays is the time elapsed
+since the creation of the application object, and the moment
+{@link android.app.Activity#reportFullyDrawn()} is called.
+</p>
+
+<p>
+If you learn that your display times are slower than you’d like, you can
+go on to try to identify the bottlenecks in the startup process.
+</p>
+
+<h4 id="bottlenecks">Identifying bottlenecks</h4>
+
+<p>
+Two good ways to look for bottlenecks are Android Studio’s Method Tracer tool
+and inline tracing. To learn about Method Tracer, see that tool’s
+<a href="{docRoot}studio/profile/am-methodtrace.html">documentation</a>.
+</p>
+
+<p>
+If you do not have access to the Method Tracer tool, or cannot start the tool
+at the correct time to gain log information, you can gain similar insight
+through inline tracing inside of your apps’ and activities’ {@code onCreate()}
+methods. To learn about inline tracing, see the reference documentation for
+the {@link android.os.Trace} functions, and for the
+<a href="{docRoot}studio/profile/systrace-commandline.html">Systrace</a> tool.
+</p>
+
+<h2 id="common">Common Issues</h2>
+
+<p>
+This section discusses several issues that often affect apps’ startup
+performance. These issues chiefly concern initializing app and activity
+objects, as well as the loading of screens.
+</p>
+
+<h3 id="heavy-app">Heavy app initialization</h3>
+
+<p>
+Launch performance can suffer when your code overrides the {@code Application}
+object, and executes heavy work or complex logic when initializing that object.
+Your app may waste time during startup if your Application subclasses perform
+initializations that don’t need to be done yet. Some initializations may be
+completely unnecessary: for example, initializing state information for the
+main activity, when the app has actually started up in response to an intent.
+With an intent, the app uses only a subset of the previously initialized state
+data.
+</p>
+
+<p>
+Other challenges during app initialization include garbage-collection events
+that are impactful or numerous, or disk I/O happening concurrently with
+initialization, further blocking the initialization process. Garbage collection
+is especially a consideration with the Dalvik runtime; the Art runtime performs
+garbage collection concurrently, minimizing that operation's impact.
+</p>
+
+<h4 id="diagnosing-1">Diagnosing the problem</h4>
+
+<p>
+You can use method tracing or inline tracing to try to diagnose the problem.
+</p>
+
+<h5>Method tracing</h5>
+
+<p>
+Running the Method Tracer tool reveals that the
+{@link android.app.Instrumentation#callApplicationOnCreate(android.app.Application) callApplicationOnCreate()}
+method eventually calls your {@code com.example.customApplication.onCreate}
+method. If the tool shows that these
+methods are taking a long time to finish executing, you should explore further
+to see what work is occurring there.
+</p>
+
+<h5>Inline tracing</h5>
+
+<p>
+Use inline tracing to investigate likely culprits including:
+</p>
+
+<ul>
+   <li>Your app’s initial {@link android.app.Application#onCreate()}
+   function.</li>
+   <li>Any global singleton objects your app initializes.</li>
+   <li>Any disk I/O, deserialization, or tight loops that might be occurring
+   during the bottleneck.
+</ul>
+
+
+<h4 id="solutions-1">Solutions to the problem</h4>
+
+<p>
+Whether the problem lies with unnecessary initializations or disk I/O,
+the solution calls for lazy-initializing objects: initializing only those
+objects that are immediately needed. For example, rather than creating global
+static objects, instead, move to a singleton pattern, where the app initalizes
+objects only the first time it accesses them.
+</p>
+
+<h3 id="heavy-act">Heavy activity initialization</h4>
+
+<p>
+Activity creation often entails a lot of high-overhead work. Often, there are
+opportunities to optimize this work to achieve performance improvements. Such
+common issues include:
+</p>
+
+<ul>
+   <li>Inflating large or complex layouts.</li>
+   <li>Blocking screen drawing on disk, or network I/O.</li>
+   <li>Loading and decoding bitmaps.</li>
+   <li>Rasterizing {@link android.graphics.drawable.VectorDrawable VectorDrawable} objects.</li>
+   <li>Initialization of other subsystems of the activity.</li>
+</ul>
+
+<h4 id="diagnosing-2">Diagnosing the problem</h4>
+
+<p>
+In this case, as well, both method tracing and inline tracing can prove useful.
+</p>
+
+<h5>Method tracing</h5>
+
+<p>
+When running the Method Tracer tool, the particular areas to
+focus on your your app’s {@link android.app.Application} subclass constructors and
+{@code com.example.customApplication.onCreate()} methods.
+</p>
+
+<p>
+If the tool shows that these methods are taking a long time to finish
+executing, you should explore further to see what work is occurring there.
+</p>
+
+<h5>Inline tracing</h5>
+
+<p>
+Use inline tracing to investigate likely culprits including:
+</p>
+
+<ul>
+   <li>Your app’s initial {@link android.app.Application#onCreate()}
+   function.</li>
+   <li>Any global singleton objects it initializes.</li>
+   <li>Any disk I/O, deserialization, or tight loops that might be occurring
+   during the bottleneck.</li>
+</ul>
+
+<h4 id="solutions-2">Solutions to the problem</h4>
+
+<p>
+There are many potential bottlenecks, but two common problems and remedies
+are as follows:
+</p>
+
+<ul>
+   <li>The larger your view hierarchy, the more time the app takes to inflate
+   it. Two steps you can take to address this issue are:
+
+   <ul>
+      <li>Flattening your view hierarchy by reducing redundant or nested
+      layouts.</li>
+
+      <li>Not inflating parts of the UI that do not need to be visible during
+      launch. Instead, use use a {@link android.view.ViewStub} object as a
+      placeholder for sub-hierarchies that the app can inflate at a more
+      appropriate time.</li>
+   </ul>
+   </li>
+
+   <li>Having all of your resource initialization on the main
+       thread can also slow down startup. You can address this issue as follows:
+
+   <ul>
+      <li>Move all resource initialization so that the app can perform it
+      lazily on a different thread.</li>
+      <li>Allow the app to load and display your views, and then later
+      update visual properties that are dependent on bitmaps and other
+      resources.</li>
+   </ul>
+   </li>
+
+<h3 id="themed">Themed launch screens</h3>
+
+
+<p>
+You may wish to theme your app’s loading experience, so that the app’s
+launch screen is thematically consistent with the rest of the app, instead of
+with the system theming. Doing so can hide a slow activity launch.
+</p>
+
+<p>
+A common way to implement a themed launch screen is to use the the
+{@link android.R.attr#windowDisablePreview} theme attribute to turn off
+the initial blank screen
+that the system process draws when launching the app. However, this approach
+can result in a longer startup time than apps that don’t suppress the preview
+window. Also, it forces the user to wait with no feedback while the activity
+launches, making them wonder if the app is functioning properly.
+</p>
+
+<h4 id="diagnosing-3">Diagnosing the problem</h4>
+
+<p>
+You can often diagnose this problem by observing a slow response when a user
+launches your app. In such a case, the screen may seem to be frozen, or to
+have stopped responding to input.
+</p>
+
+<h4 id="solutions-3">Solutions to the problem</h4>
+
+<p>
+We recommend that, rather than disabling the preview window, you
+follow the common
+<a href="http://www.google.com/design/spec/patterns/launch-screens.html#">
+Material Design</a> patterns. You can use the activity's
+{@code windowBackground} theme attribute to provide a simple custom drawable
+for the starting activity.
+</p>
+
+<p>
+For example, you might create a new drawable file and reference it from the
+layout XML and app manifest file as follows:
+</p>
+
+<p>Layout XML file:</p>
+
+<pre>
+&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque"&gt;
+  &lt;!-- The background color, preferably the same as your normal theme --&gt;
+  &lt;item android:drawable="@android:color/white"/&gt;
+  &lt;!-- Your product logo - 144dp color version of your app icon --&gt;
+  &lt;item&gt;
+    &lt;bitmap
+      android:src="@drawable/product_logo_144dp"
+      android:gravity="center"/&gt;
+  &lt;/item&gt;
+&lt;/layer-list&gt;
+</pre>
+
+<p>Manifest file:</p>
+
+<pre>
+&lt;activity ...
+android:theme="@style/AppTheme.Launcher" /&gt;
+</pre>
+
+<p>
+The easiest way to transition back to your normal theme is to call
+{@link android.view.ContextThemeWrapper#setTheme(int) setTheme(R.style.AppTheme)}
+before calling {@code super.onCreate()} and {@code setContentView()}:
+</p>
+
+<pre class="no-pretty-print">
+public class MyMainActivity extends AppCompatActivity {
+  &#64;Override
+  protected void onCreate(Bundle savedInstanceState) {
+    // Make sure this is before calling super.onCreate
+    setTheme(R.style.Theme_MyApp);
+    super.onCreate(savedInstanceState);
+    // ...
+  }
+}
+</pre>
diff --git a/docs/html/topic/performance/optimizing-view-hierarchies.jd b/docs/html/topic/performance/optimizing-view-hierarchies.jd
new file mode 100644
index 0000000..1738acb
--- /dev/null
+++ b/docs/html/topic/performance/optimizing-view-hierarchies.jd
@@ -0,0 +1,388 @@
+page.title=Performance and View Hierarchies
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#lmp">Layout-and-Measure Performance</a>
+  <ol>
+    <li><a href="#managing">Managing complexity: layouts matter</a></li>
+    <li><a href="#double">Double taxation</a></li>
+  </ol>
+</li>
+<li><a href="#dx">Diagnosing View Hierarchy Issues</a>
+  <ol>
+    <li><a href="#systrace">Systrace</a></li>
+    <li><a href="#profile">Profile GPU rendering</a></li>
+    <li><a href="#lint">Lint</a></li>
+    <li><a href="#hv">Hierarchy Viewer</a></li>
+  </ol>
+</li>
+<li><a href="#solving">Solving View Hierarchy Issues</a>
+   <ol>
+      <li><a href="#removing">Removing redundant nested layouts</a></li>
+      <li><a href="#cheaper">Adopting a cheaper layout</a></li>
+   </ol>
+      </li>
+</ol>
+</div>
+</div>
+
+
+<p>
+The way you manage the hierarchy of your {@link android.view.View} objects can
+have a substantial impact on your app’s performance. This page describes how to
+assess whether your view hierarchy is slowing your app down, and offers some
+strategies for addressing issues that may arise.
+</p>
+
+<h2 id="lmp">Layout and Measure Performance</h2>
+<p>
+The rendering pipeline includes a <em>layout-and-measure</em>
+stage, during which the system appropriately positions the relevant items in
+your view hierarchy. The measure part of this stage determines the sizes and
+boundaries of {@link android.view.View} objects. The layout part determines where on the screen to
+position the {@link android.view.View} objects.
+</p>
+
+<p>
+Both of these pipeline stages incur some small cost per view or layout that they
+process. Most of the time, this cost is minimal and doesn’t noticeably affect
+performance. However, it can be greater when an app adds or removes View
+objects, such as when a {@link android.support.v7.widget.RecyclerView}
+object recycles them or reuses them. The
+cost can also be higher if a {@link android.view.View} object needs to consider
+resizing to main its constraints: For example, if your app calls
+{@link android.widget.TextView#setText(char[], int, int) SetText()} on a
+{@link android.view.View} object that wraps text, the
+{@link android.view.View} may need to resize.
+</p>
+
+<p>
+If cases like these take too long, they can prevent a frame from rendering
+within the allowed 16ms, so that frames are dropped, and animation becomes
+janky.
+</p>
+
+<p>
+Because you cannot move these operations to a worker thread&mdash;your app must
+process them on the main thread&mdash;your best bet is to optimize them so that
+they can take as little time as possible.
+</p>
+
+<h3 id="managing">Managing complexity: layouts matter</h3>
+
+<p>
+Android <a
+href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a>
+allow you to nest UI objects in the view hierarchy. This nesting can also impose
+a layout cost. When your app processes an object for layout, the app performs
+the same process on all children of the layout as well. For a complicated
+layout, sometimes a cost only arises the first time the system computes the
+layout. For instance, when your app recycles a complex list item in a
+{@link android.support.v7.widget.RecyclerView} object, the
+system needs to lay out all of the objects. In another example, trivial changes
+can propagate up the chain toward the parent
+until they reach an object that doesn’t affect the size of the parent.
+</p>
+
+<p>
+The most common case in which layout takes an especially long time is when
+hierarchies of {@link android.view.View} objects are nested within one another. Each nested layout
+object adds cost to the layout stage. The flatter your hierarchy, the less
+time that it takes for the layout stage to complete.
+</p>
+
+<p>
+If you are using the {@link android.widget.RelativeLayout} class, you may be able to achieve the same
+effect, at lower cost, by using nested, unweighted
+{@link android.widget.LinearLayout} views instead. Additionally, if your app
+targets Android N (API level 24), it is likely that
+you can use a special layout editor to create a <a
+href="http://tools.android.com/tech-docs/layout-editor">{@code ConstraintLayout}</a>
+object instead of {@link android.widget.RelativeLayout}. Doing so allows you
+to avoid many of the issues this section
+describes. The <a
+href="http://tools.android.com/tech-docs/layout-editor">{@code ConstraintLayout}</a>
+class offers similar layout control, but
+with much-improved performance. This class uses its own constraint-solving
+system to resolve relationships between views in a very different way from
+standard layouts.
+</p>
+
+<h3 id="double">Double Taxation</h3>
+
+<p>
+Typically, the framework executes the <a
+href="{@docRoot}guide/topics/ui/declaring-layout.html">layout</a>
+or measure stage in a single pass and quite quickly. However, with some more
+complicated layout cases, the framework may have to iterate multiple times on
+the layout or measure stage before ultimately positioning the elements. Having
+to perform more than one layout-and-measure iteration is referred to as
+<em>double taxation.</em>
+</p>
+
+<p>
+For example, when you use the {@link android.widget.RelativeLayout} container, which allows you to
+position {@link android.view.View} objects with respect to the positions of other {@link android.view.View} objects, the
+framework performs the following actions:
+</p>
+
+<ol style="1">
+   <li>Executes a layout-and-measure pass, during which the framework calculates
+each child object’s position and size, based on each child’s request.
+   <li>Uses this data, also taking object weights into account, to figure out the
+proper position of correlated views.
+   <li>Performs a second layout pass to finalize the objects’ positions.
+   <li>Goes on to the next stage of the rendering process.</li></ol>
+
+<p>
+The more levels your view hierarchy has, the greater the potential performance
+penalty.
+</p>
+
+<p>
+Containers other than {@link android.widget.RelativeLayout} may also give rise to double taxation. For
+example:
+</p>
+
+<ul>
+   <li>A {@link android.widget.LinearLayout} view
+could result in a double layout-and-measure pass if you make it horizontal.
+A double layout-and-measure pass may also occur in a vertical orientation if you
+add <a
+href="{@docRoot}reference/android/widget/LinearLayout.html#attr_android:measureWithLargestChild">measureWithLargestChild</a>,
+in which case the framework may need to do a second pass to resolve the proper
+sizes of objects.
+   <li>The {@link android.widget.GridLayout}
+has a similar issue. While this container also allows relative positioning, it
+normally avoids double taxation by pre-processing the positional relationships
+among child views. However, if the layout uses weights or fill with the
+{@link android.view.Gravity} class, the
+benefit of that preprocessing is lost, and the framework may have to perform
+multiple passes if it the container were a {@link android.widget.RelativeLayout}.</li>
+</ul>
+<p>
+Multiple layout-and-measure passes are not, in themselves, a performance burden.
+But they can become so if they’re in the wrong spot. You should be wary of
+situations where one of the following conditions applies to your container:
+</p>
+
+<ul>
+   <li>It is a root element in your view hierarchy.
+   <li>It has a deep view hierarchy beneath it.
+   <li>It is nested.
+   <li>There are many instances of it populating the screen, similar to children
+   in a {@link android.widget.ListView} object.</li>
+</ul>
+
+<h2 id="dx">Diagnosing View Hierarchy Issues</h2>
+
+<p>
+Layout performance is a complex problem with many facets. There are a couple of
+tools that can give you solid indications about where performance bottlenecks
+are occurring. A few other tools provide less definitive information, but can
+also provide helpful hints.
+</p>
+
+<p>
+<h3 id="systrace">Systrace</h3>
+</p>
+
+<p>
+One tool that provides excellent data about performance is <a
+href="{@docRoot}studio/profile/systrace.html">Systrace</a>,
+which is built into Android Studio. The Systrace tool allows you to collect and
+inspect timing information across an entire Android device, allowing you to see
+specifically where performance bottlenecks arise. For more information about
+Systrace, see <a href=”{docRoot}<a href="{@docRoot}studio/profile/systrace.html">
+Analyze UI Performance with Systrace</a>.
+</p>
+
+<h3 id="profile">Profile GPU rendering</h3>
+
+<p>
+The other tool most likely to provide you with concrete information about
+performance bottlenecks is the on-device <a
+href="{@docRoot}studio/profile/dev-options-rendering.html">
+Profile GPU rendering</a> tool, available on devices powered by Android 6.0 (API
+level 23) and later.  This tool allows you to see how long the layout-and-measurestage is
+ taking for <a href="https://youtu.be/erGJw8WDV74">each frame
+of rendering</a>. This data can help you diagnose runtime performance issues,
+and help you determine what, if any layout-and-measure issues you need to
+address.
+</p>
+
+<p>
+In its graphical representation of the data it captures, <a
+href="{@docRoot}studio/profile/dev-options-rendering.html">Profile
+GPU rendering</a> uses the color blue to represent layout time. For more
+information about how to use this tool, see <a
+href="{@docRoot}studio/profile/dev-options-rendering.html">Profile
+GPU Rendering Walkthrough.</a>
+</p>
+
+<h3 id="lint">Lint</h3>
+
+<p>
+Android Studio’s <a
+href="{@docRoot}studio/write/lint.html">Lint</a> tool can
+help you gain a sense of inefficiencies in the view hierarchy. To use this tool,
+select <strong>Analyze > Inspect Code</strong>, as shown in Figure 1.
+</p>
+
+  <img src="{@docRoot}topic/performance/images/lint-inspect-code.png">
+  <p class="img-caption">
+    <strong>Figure 1.</strong> Locating <strong>Inspect Code</strong> in the
+Android Studio.
+  </p>
+
+<p>
+Information about various layout items appears under
+<em>Android > Lint > Performance</em>. To see more detail,
+you can click on each item to expand it, and see more
+information in the pane on the right side of the screen.
+Figure 2 shows an example of such a display.
+</p>
+
+  <img src="{@docRoot}topic/performance/images/lint-display.png">
+  <p class="img-caption">
+    <strong>Figure 2.</strong> Viewing information about specific
+issues that the lint tool has identified.
+  </p>
+
+
+<p>
+Clicking on one of these items reveals, in the pane to the right, the problem
+associated with that item.
+</p>
+
+<p>
+To understand more about specific topics and issues in this area, see the <a
+href="{@docRoot}studio/write/lint.html">Lint
+</a>documentation.
+</p>
+
+<h3 id="hv">Hierarchy Viewer</h3>
+
+<p>
+Android Studio’s <a
+href="{@docRoot}studio/profile/hierarchy-viewer.html">Hierarchy
+Viewer</a> tool provides a visual representation of your app’s view hierarchy.
+It is a good way to navigate the hierarchy of your app, providing a clear visual
+representation of a particular view’s parent chain, and allowing you to inspect
+the layouts that your app constructs.
+</p>
+
+<p>
+The views that Hierarchy Viewer presents can also help identify performance
+problems arising from double taxation. It can also provide an easy way for you
+to identify deep chains of nested layouts, or layout areas with a large amount
+of nested children, another potential source of performance costs. In these
+scenarios, the layout-and-measure stages can be particularly costly,
+resulting in performance issues.
+</p>
+
+<p>
+You can also can get a sense of relative time taken by layout-and-measure
+operations by clicking the “profile node” button.
+</p>
+
+<p>
+For more information about Hierarchy Viewer, see <a
+href="{@docRoot}studio/profile/optimize-ui.html#HierarchyViewer">Optimizing
+Your UI</a>.
+</p>
+
+<h2 id="solving">Solving View Hierarchy Issues</h2>
+
+<p>
+The fundamental concept behind solving performance problems that arise from view
+hierarchies is simple in concept, but more difficult in practice. Preventing
+view hierarchies from imposing performance penalties encompasses the dual goals
+of flattening your view hierarchy and reducing double taxation. This section
+discusses some strategies for pursuing these goals.
+</p>
+
+<h3 id="removing">Removing redundant nested layouts</h3>
+
+<p>
+Developers often use more nested layouts than necessary. For example, a
+{@link android.widget.RelativeLayout} container might contain a single child that is also a
+{@link android.widget.RelativeLayout} container. This nesting amounts to redundancy, and adds
+unnecessary cost to the view hierarchy.
+</p>
+
+<p>
+Lint can often flag this problem for you, reducing debugging time.
+</p>
+
+<h3>Adopting Merge/Include </h3>
+<p>
+One frequent cause of redundant nested layouts is the <a
+href="{@docRoot}training/improving-layouts/reusing-layouts.html">
+&lt;include&gt;
+tag</a>. For example, you may define a re-usable layout as follows:
+</p>
+
+<pre class="prettyprint">
+&lt;LinearLayout&gt;
+    &lt;!-- some stuff here --&gt;
+&lt;/LinearLayout&gt;
+&lt;/pre&gt;
+</pre>
+
+<p>
+And then an include tag to add this item to the parent container:
+</p>
+
+<pre class="prettyprint">
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/app_bg"
+    android:gravity="center_horizontal"&gt;
+
+    &lt;include layout="@layout/titlebar"/&gt;
+
+    &lt;TextView android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:text="@string/hello"
+              android:padding="10dp" /&gt;
+
+    ...
+
+&lt;/LinearLayout&gt;
+</pre>
+
+<p>
+The include unnecessarily nests the first layout within the second layout.
+</p>
+
+<p>
+The <a
+href="{@docRoot}training/improving-layouts/reusing-layouts.html#Merge">merge
+</a>tag can help prevent this issue. For information about this tag, see <a
+href="{@docRoot}training/improving-layouts/reusing-layouts.html#Merge">Re-using
+Layouts with &lt;include&gt;</a>.
+</p>
+
+<h3 id="cheaper">Adopting a cheaper layout</h3>
+
+<p>
+You may not be able to adjust your existing layout scheme so that it doesn’t
+contain redundant layouts. In certain cases, the only solution may be to flatten
+your hierarchy by switching over to an entirely different layout type.
+</p>
+
+<p>
+For example, you may find that a {@link android.widget.TableLayout}
+provides the same functionality as a more complex layout with many
+positional dependencies. In the N release of Android, the 
+<a
+href="http://tools.android.com/tech-docs/layout-editor">{@code ConstraintLayout}</a> class provides similar functionality to
+{@link android.widget.RelativeLayout}, but at a significantly lower cost.
+</p>
diff --git a/docs/html/topic/performance/performance_toc.cs b/docs/html/topic/performance/performance_toc.cs
new file mode 100644
index 0000000..49191bc
--- /dev/null
+++ b/docs/html/topic/performance/performance_toc.cs
@@ -0,0 +1,2289 @@
+<ul id="nav">
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/index.html">
+        Getting Started
+      </a>
+    </div>
+
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/firstapp/index.html"
+             description=
+             "After you've installed the Android SDK, start with this class
+             to learn the basics about Android app development."
+            >It worked!!</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/creating-project.html">
+            Creating an Android Project
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/running-app.html">
+            Running Your Application
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/building-ui.html">
+            Building a Simple User Interface
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/firstapp/starting-activity.html">
+            Starting Another Activity
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
+             description=
+             "How to build your app with alternative resources that provide an
+             optimized user experience on multiple device form factors using a single APK."
+            >Supporting Different Devices</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
+            Supporting Different Languages
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
+            Supporting Different Screens
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
+            Supporting Different Platform Versions
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html"
+             ja-lang="アクティビティのライフサイクル 管理"
+             ko-lang="액티비티 수명 주기 관리하기"
+             pt-br-lang="Como gerenciar o ciclo de vida da atividade"
+             ru-lang="Управление жизненным циклом операций"
+             zh-cn-lang="管理活动生命周期"
+             zh-tw-lang="管理應用行為顯示生命週期"
+             description=
+             "How Android activities live and die and how to create
+             a seamless user experience by implementing lifecycle callback methods."
+            >Managing the Activity Lifecycle</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/starting.html"
+             ja-lang="アクティビティを開始する"
+             ko-lang="액티비티 시작하기"
+             pt-br-lang="Iniciando uma atividade"
+             ru-lang="Запуск операции"
+             zh-cn-lang="开始活动"
+             zh-tw-lang="啟動應用行為顯示">
+            Starting an Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/pausing.html">
+            Pausing and Resuming an Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/stopping.html"
+             ja-lang="アクティビティの一時停止と再開"
+             ko-lang="액티비티 일시정지 및 재개하기"
+             pt-br-lang="Pausando e reiniciando uma atividade"
+             ru-lang="Приостановка и возобновление операции"
+             zh-cn-lang="暂停和继续活动"
+             zh-tw-lang="暫停並繼續應用行為顯示">
+            Stopping and Restarting an Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/recreating.html"
+             ja-lang="アクティビティを再作成する"
+             ko-lang="액티비티 재생성하기"
+             pt-br-lang="Recriando uma atividade"
+             ru-lang="Воссоздание операции"
+             zh-cn-lang="重新创建活动"
+             zh-tw-lang="重新建立應用行為顯示">
+            Recreating an Activity
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/fragments/index.html"
+             description=
+             "How to build a user interface for your app that is flexible enough
+             to present multiple UI components on large screens and a more constrained set of
+             UI components on smaller screens&mdash;essential for building a single APK for both
+             phones and tablets."
+            >Building a Dynamic UI with Fragments</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/fragments/creating.html">
+            Creating a Fragment
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/fragments/fragment-ui.html" zh-cn-lang="构建灵活的界面">
+            Building a Flexible UI
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/fragments/communicating.html">
+            Communicating with Other Fragments
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header"><a href="<?cs var:toroot?>training/basics/data-storage/index.html"
+             ja-lang="データの保存"
+             ko-lang="데이터 저장하기"
+             pt-br-lang="Salvando dados"
+             ru-lang="Сохранение данных"
+             zh-cn-lang="保存数据"
+             zh-tw-lang="儲存資料"
+             description=
+             "How to save data on the device, whether it's temporary files, downloaded
+             app assets, user media, structured data, or something else."
+            >Saving Data</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/data-storage/shared-preferences.html"
+             ja-lang="キー値セットを保存する"
+             ko-lang="키-값 세트 저장하기"
+             pt-br-lang="Salvando conjuntos de valor-chave"
+             ru-lang="Сохранение наборов "\"ключ-значение\""
+             zh-cn-lang="保存键值集"
+             zh-tw-lang="儲存索引鍵值組">
+            Saving Key-Value Sets
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/data-storage/files.html"
+             ja-lang="ファイルを保存する"
+             ko-lang="파일 저장하기"
+             pt-br-lang="Salvando arquivos"
+             ru-lang="Сохранение файлов"
+             zh-cn-lang="保存文件"
+             zh-tw-lang="儲存檔案">
+            Saving Files
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/data-storage/databases.html"
+             ja-lang="SQL データベースにデータを保存する"
+             ko-lang="SQL 데이터베이스에 데이터 저장하기"
+             pt-br-lang="Salvando dados em bancos de dados do SQL"
+             ru-lang="Сохранение данных в базах данных SQL"
+             zh-cn-lang="在 SQL 数据库中保存数据"
+             zh-tw-lang="在 SQL 資料庫中儲存資料">
+            Saving Data in SQL Databases
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/intents/index.html"
+             ja-lang="他のアプリとの相互操作"
+             ko-lang="액티비티 수명 주기 관리하기"
+             pt-br-lang="Interagindo com outros aplicativos"
+             ru-lang="Взаимодействие с другими приложениями"
+             zh-cn-lang="与其他应用交互"
+             zh-tw-lang="與其他應用程式互動"
+             description=
+             "How to build a user experience that leverages other apps available
+             on the device to perform advanced user tasks, such as capture a photo or view
+             an address on a map."
+            >Interacting with Other Apps</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/intents/sending.html"
+             ja-lang="別のアプリにユーザーを送る"
+             ko-lang="다른 앱으로 사용자 보내기"
+             pt-br-lang="Enviando o usuário para outro aplicativo"
+             ru-lang="Направление пользователя в другое приложение"
+             zh-cn-lang="向另一个应用发送用户"
+             zh-tw-lang="將使用者傳送至其他應用程式">
+            Sending the User to Another App
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/intents/result.html"
+             ja-lang="アクティビティから結果を取得する"
+             ko-lang="액티비티로부터 결과 가져오기"
+             pt-br-lang="Obtendo resultados de uma atividade"
+             ru-lang="Получение результата операции"
+             zh-cn-lang="获取活动的结果"
+             zh-tw-lang="從應用行為顯示取得結果">
+            Getting a Result from the Activity
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/intents/filters.html"
+             ja-lang="他のアプリからのアクティビティの開始を許可する"
+             ko-lang="다른 앱이 자신의 액티비티를 시작하도록 허용하기"
+             pt-br-lang="Permitindo que outros aplicativos iniciem sua atividade"
+             ru-lang="Разрешение другим приложениям на запуск вашей операции"
+             zh-cn-lang="允许其他应用开始您的活动"
+             zh-tw-lang="允許其他應用程式啟動您的應用行為顯示">
+            Allowing Other Apps to Start Your Activity
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/permissions/index.html"
+             description=
+             "How to declare that your app needs access to features and
+             resources outside of its 'sandbox', and how to request those
+             privileges at runtime."
+            >Working with System Permissions</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/permissions/declaring.html">
+            Declaring Permissions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/permissions/requesting.html">
+            Requesting Permissions at Run Time
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/permissions/best-practices.html">
+            Best Practices for Runtime Permissions
+          </a>
+          </li>
+        </ul>
+      </li>
+
+    </ul>
+  </li><!-- end getting started -->
+    <li class="nav-section">
+        <div class="nav-section-header">
+            <a href="<?cs var:toroot ?>training/building-content-sharing.html">
+            <span class="small">Building Apps with</span><br/>Content Sharing
+            </a>
+        </div>
+        <ul>
+            <li class="nav-section">
+                <div class="nav-section-header">
+                    <a href="<?cs var:toroot ?>training/sharing/index.html"
+                    description=
+                    "How to take your app interaction to the next level by sharing
+                    information with other apps, receive information back, and provide a simple and
+                    scalable way to perform Share actions with user content."
+                    >Sharing Simple Data</a>
+                </div>
+                <ul>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/sharing/send.html">
+                        Sending Simple Data to Other Apps
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/sharing/receive.html">
+                        Receiving Simple Data from Other Apps
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/sharing/shareaction.html">
+                        Adding an Easy Share Action
+                        </a>
+                    </li>
+                </ul>
+            </li>
+            <li class="nav-section">
+                <div class="nav-section-header">
+                    <a href="<?cs var:toroot?>training/secure-file-sharing/index.html"
+                    description=
+                    "How to provide secure access to a file associated with your app using a content
+                    URI and temporary access permissions."
+                    >Sharing Files</a>
+                </div>
+                <ul>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/setup-sharing.html">
+                        Setting Up File Sharing
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/share-file.html">
+                        Sharing a File
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/request-file.html">
+                        Requesting a Shared File
+                        </a>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/secure-file-sharing/retrieve-info.html">
+                        Retrieving File Information
+                        </a>
+                    </li>
+                </ul>
+            </li>
+            <li class="nav-section">
+                <div class="nav-section-header">
+                    <a href="<?cs var:toroot ?>training/beam-files/index.html"
+                    description=
+                    "How to transfer files between devices using the NFC Android Beam feature."
+                    >Sharing Files with NFC</a>
+                </div>
+                <ul>
+                    <li>
+                        <a href="<?cs var:toroot ?>training/beam-files/send-files.html"
+                        >Sending Files to Another Device</a>
+                    </li>
+                    <li><a href="<?cs var:toroot ?>training/beam-files/receive-files.html"
+                    >Receiving Files from Another Device</a></li>
+                </ul>
+            </li>
+        </ul>
+    </li>
+
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-multimedia.html">
+      <span class="small">Building Apps with</span><br/>Multimedia
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/managing-audio/index.html"
+             description=
+             "How to respond to hardware audio key presses, request audio focus
+             when playing audio, and respond appropriately to changes in audio focus."
+            >Managing Audio Playback</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/volume-playback.html">
+            Controlling Your App's Volume and Playback
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-focus.html">
+            Managing Audio Focus
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-output.html">
+            Dealing with Audio Output Hardware
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/camera/index.html"
+             description=
+             "How to leverage existing camera apps on the user's device to capture
+             photos or control the camera hardware directly and build your own camera app."
+            >Capturing Photos</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/camera/photobasics.html">
+            Taking Photos Simply
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/camera/videobasics.html">
+            Recording Videos Simply
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/camera/cameradirect.html">
+            Controlling the Camera
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/printing/index.html"
+             description=
+             "How to print photos, HTML documents, and custom documents from your app."
+            >Printing Content</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/printing/photos.html">
+            Photos
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/printing/html-docs.html">
+            HTML Documents
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/printing/custom-docs.html">
+            Custom Documents
+          </a>
+          </li>
+        </ul>
+      </li>
+
+    </ul>
+  </li>
+  <!-- End multimedia -->
+
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-graphics.html">
+      <span class="small">Building Apps with</span><br/>Graphics &amp; Animation
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html"
+             description=
+             "How to load and process bitmaps while keeping your user interface
+             responsive and avoid exceeding memory limits."
+            >Displaying Bitmaps Efficiently</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/load-bitmap.html">
+            Loading Large Bitmaps Efficiently
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/process-bitmap.html">
+            Processing Bitmaps Off the UI Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/cache-bitmap.html">
+            Caching Bitmaps
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/manage-memory.html">
+            Managing Bitmap Memory
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/display-bitmap.html">
+            Displaying Bitmaps in Your UI
+          </a></li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot?>training/graphics/opengl/index.html"
+             description=
+             "How to create OpenGL graphics within the Android app framework
+             and respond to touch input."
+            >Displaying Graphics with OpenGL ES</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/environment.html">
+            Building an OpenGL ES Environment
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/shapes.html">
+            Defining Shapes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/draw.html">
+            Drawing Shapes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/projection.html">
+            Applying Projection and Camera Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/motion.html">
+            Adding Motion
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/touch.html">
+            Responding to Touch Events
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot?>training/transitions/index.html"
+             description=
+             "How to animate state changes in a view hierarchy using transitions."
+            >Animating Views Using Scenes and Transitions</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/transitions/overview.html">
+            The Transitions Framework
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/transitions/scenes.html">
+            Creating a Scene
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/transitions/transitions.html">
+            Applying a Transition
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/transitions/custom-transitions.html">
+            Creating Custom Transitions
+          </a>
+          </li>
+
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/animation/index.html"
+             description=
+             "How to add transitional animations to your user interface.">
+            Adding Animations
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/animation/crossfade.html">
+            Crossfading Two Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/screen-slide.html">
+            Using ViewPager for Screen Slide
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/cardflip.html">
+            Displaying Card Flip Animations
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/zoom.html">
+            Zooming a View
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/layout.html">
+            Animating Layout Changes
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End graphics and animation -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-connectivity.html">
+      <span class="small">Building Apps with</span><br/>
+              Connectivity &amp; the Cloud
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/connect-devices-wirelessly/index.html"
+             description=
+             "How to find and connect to local devices using Network Service
+             Discovery and how to create peer-to-peer connections with Wi-Fi."
+             >Connecting Devices Wirelessly</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd.html">
+            Using Network Service Discovery
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/wifi-direct.html">
+            Creating P2P Connections with Wi-Fi
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd-wifi-direct.html">
+            Using Wi-Fi P2P for Service Discovery
+          </a>
+          </li>
+        </ul>
+      </li>
+       <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/network-ops/index.html"
+             description=
+             "How to create a network connection, monitor the connection for changes
+             in connectivity, and perform transactions with XML data."
+            >Performing Network Operations</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/connecting.html">
+            Connecting to the Network
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/managing.html">
+            Managing Network Usage
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/xml.html">
+            Parsing XML Data
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/efficient-downloads/index.html"
+             description=
+             "How to minimize your app's impact on the battery when performing downloads
+             and other network transactions."
+            >Transferring Data Without Draining the Battery</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
+            Optimizing Downloads for Efficient Network Access
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
+            Minimizing the Effect of Regular Updates
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
+            Redundant Downloads are Redundant
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
+            Modifying Patterns Based on the Connectivity Type
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/backup/index.html"
+             description=
+             "How to sync and back up app and user data to remote web services in the
+              cloud and how to restore the data back to multiple devices."
+            >Syncing to the Cloud</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/backup/autosyncapi.html">
+            Configuring Auto Backup
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backup/backupapi.html">
+            Using the Backup API
+          </a>
+          </li>
+        </ul>
+        <li><a href="<?cs var:toroot ?>training/cloudsave/conflict-res.html"
+           description=
+           "How to design a robust conflict resolution strategy for apps that save data to the cloud."
+           >Resolving Cloud Save Conflicts
+          </a>
+        </li>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/sync-adapters/index.html"
+             description="How to transfer data between the cloud and the device using the Android
+             sync adapter framework"
+             >Transferring Data Using Sync Adapters</a>
+        </div>
+        <ul>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/creating-authenticator.html">
+                Creating a Stub Authenticator
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/creating-stub-provider.html">
+                Creating a Stub Content Provider
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/creating-sync-adapter.html">
+                Creating a Sync Adapter
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/sync-adapters/running-sync-adapter.html">
+                Running a Sync Adapter
+                </a>
+            </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/volley/index.html"
+             description="How to perform fast, scalable UI operations over the network using Volley"
+             >Transmitting Network Data Using Volley</a>
+        </div>
+        <ul>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/simple.html">
+                Sending a Simple Request
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/requestqueue.html">
+                Setting Up a RequestQueue
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/request.html">
+                Making a Standard Request
+                </a>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>training/volley/request-custom.html">
+                Implementing a Custom Request
+                </a>
+            </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End connectivity and cloud -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-location.html">
+      <span class="small">Building Apps with</span><br/>
+              Location &amp; Maps
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/location/index.html"
+             description="How to add location-aware features to your app by getting the user's current location.">
+             Making Your App Location-Aware
+          </a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/retrieve-current.html">
+            Getting the Last Known Location
+            </a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/change-location-settings.html">
+            Changing Location Settings
+            </a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/receive-location-updates.html">
+            Receiving Location Updates
+            </a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/location/display-address.html">
+            Displaying a Location Address
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/location/geofencing.html">
+            Creating and Monitoring Geofences
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <a href="<?cs var:toroot ?>training/maps/index.html"
+           description="How to add maps and mapping information to your app.">
+           Adding Maps
+        </a>
+      </li>
+    </ul>
+  </li>
+  <!-- End location and maps -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-userinfo.html">
+      <span class="small">Building Apps with</span><br/>
+              User Info &amp; Sign-In
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/contacts-provider/index.html"
+             description=
+             "How to use Android's central address book, the Contacts Provider, to
+             display contacts and their details and modify contact information.">
+          Accessing Contacts Data</a>
+        </div>
+        <ul>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/retrieve-names.html">
+                Retrieving a List of Contacts
+                </a>
+          </li>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/retrieve-details.html">
+                Retrieving Details for a Contact
+                </a>
+          </li>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/modify-data.html">
+                Modifying Contacts Using Intents
+                </a>
+          </li>
+          <li>
+                <a href="<?cs var:toroot ?>training/contacts-provider/display-contact-badge.html">
+                Displaying the Quick Contact Badge
+                </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <a href="<?cs var:toroot ?>training/sign-in/index.html"
+           description="How to add user sign-in functionality to your app.">
+           Adding Sign-In
+        </a>
+      </li>
+    </ul>
+  </li>
+  <!-- End user info and sign-in -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-wearables.html">
+      <span class="small">Building Apps for</span><br/>
+              Wearables
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/notifications/index.html"
+             description="How to build handheld notifications that are synced to
+             and look great on wearables."
+            >Adding Wearable Features to Notifications</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/creating.html">Creating a Notification</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/voice-input.html">Receiving Voice Input in a Notification</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/pages.html">Adding Pages to a Notification</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/notifications/stacks.html">Stacking Notifications</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/apps/index.html"
+             description="How to build apps that run directly on wearables."
+            >Creating Wearable Apps</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/creating.html">Creating and Running a Wearable App</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/layouts.html">Creating Custom Layouts</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/always-on.html">Keeping Your App Visible</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/voice.html">Adding Voice Capabilities</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/packaging.html">Packaging Wearable Apps</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/apps/bt-debugging.html">Debugging over Bluetooth</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/ui/index.html"
+             description="How to create custom user interfaces for wearable apps."
+            >Creating Custom UIs</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/layouts.html">Defining Layouts</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/cards.html">Creating Cards</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/lists.html">Creating Lists</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/2d-picker.html">Creating a 2D Picker</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/confirm.html">Showing Confirmations</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/ui/exit.html">Exiting Full-Screen Activities</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/data-layer/index.html"
+             description="How to sync data between handhelds and wearables."
+            >Sending and Syncing Data</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/accessing.html">Accessing the Wearable Data Layer</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/data-items.html">Syncing Data Items</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/assets.html">Transferring Assets</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/messages.html">Sending and Receiving Messages</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/data-layer/events.html">Handling Data Layer Events</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/wearables/watch-faces/index.html"
+             description="How to create watch faces for wearables."
+            >Creating Watch Faces</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/designing.html">Designing Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/service.html">Building a Watch Face Service</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/drawing.html">Drawing Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/information.html">Showing Information in Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/interacting.html">Creating Interactive Watch Faces</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/configuration.html">Providing Configuration Activities</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/issues.html">Addressing Common Issues</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/wearables/watch-faces/performance.html">Optimizing Performance and Battery Life</a>
+          </li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/wear-location-detection.html"
+           description=
+           "How to detect location data on Android Wear devices."
+          >Detecting Location</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/wear-permissions.html"
+           description=
+           "How to request permissions on Android Wear devices."
+          >Requesting Permissions</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/wearables/wearable-sounds.html"
+           description=
+           "How to use the speaker on Android Wear devices."
+          >Using the Speaker</a>
+      </li>
+
+    </ul>
+  </li>
+  <!-- End Building for wearables -->
+
+
+  <!-- Start: Building for TV -->
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/tv/index.html">
+      <span class="small">Building Apps for</span><br/>
+              TV
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+
+          <a href="<?cs var:toroot ?>training/tv/start/index.html"
+             ja-lang="TV アプリのビルド"
+             description="How to start building TV apps or extend your existing app to run on TV
+             devices.">
+             Building TV Apps</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/start.html"
+               ja-lang="TV アプリのビルドを開始する">
+              Getting Started with TV Apps</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/hardware.html"
+               ja-lang="TV ハードウェアを処理する">
+              Handling TV Hardware</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/layouts.html"
+               ja-lang="TV 向けレイアウトをビルドする">
+              Building TV Layouts</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/start/navigation.html"
+               ja-lang="TV 用のナビゲーションを作成する">
+              Creating TV Navigation</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/tv/playback/index.html"
+             ja-lang="TV 再生アプリのビルド"
+             description="How to build apps that provide media catalogs and play content.">
+             Building TV Playback Apps</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/browse.html"
+               ja-lang="カタログ ブラウザを作成する">
+              Creating a Catalog Browser</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/card.html">
+              Providing a Card View</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/details.html"
+               ja-lang="詳細ビューをビルドする">
+              Building a Details View</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/now-playing.html"
+               ja-lang="再生中カードを表示する">
+              Displaying a Now Playing Card</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/guided-step.html">
+              Adding a Guided Step</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/options.html">
+              Enabling Background Playback</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/tv/discovery/index.html"
+             description="How to help users discover content from your app.">
+             Helping Users Find Content on TV</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/discovery/recommendations.html">
+              Recommending TV Content</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/discovery/searchable.html">
+              Making TV Apps Searchable</a>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/discovery/in-app-search.html">
+              Searching within TV Apps</a>
+          </li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/tv/games/index.html"
+           description="How to build games for TV.">
+           Building TV Games</a>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/tv/tif/index.html"
+           description="How to build channels for TV.">
+           Building TV Channels</a>
+        </div>
+        <ul>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/tif/tvinput.html">
+              Developing a TV Input Service</a>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/tif/channel.html">
+              Working with Channel Data</a>
+          </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/tif/ui.html">
+              Managing User Interaction</a>
+          </li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/tv/publishing/checklist.html"
+           description="An itemized list of requirements for TV apps.">
+           TV Apps Checklist</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End: Building for TV -->
+
+
+  <!-- Start: Building for Auto -->
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/auto/index.html">
+      <span class="small">Building Apps for</span><br/>
+              Auto
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/auto/start/index.html"
+             description="How to start building or extending apps that work
+             with Auto devices.">
+             Getting Started with Auto</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/auto/audio/index.html"
+             description="How to extend audio apps to play content on Auto devices.">
+             Playing Audio for Auto</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/auto/messaging/index.html"
+             description="How to extend text messaging apps to work with Auto devices.">
+             Messaging for Auto</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End: Building for Auto -->
+
+
+  <!-- Start: Building for Work -->
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/enterprise/index.html">
+      <span class="small">Building Apps for</span><br/>
+              Work
+      </a>
+    </div>
+    <ul>
+      <li><a href="<?cs var:toroot ?>training/enterprise/app-compatibility.html">
+        Ensuring Compatibility with Managed Profiles
+      </a>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/enterprise/app-restrictions.html">
+        Implementing App Restrictions
+      </a>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/enterprise/work-policy-ctrl.html">
+        Building a Device Policy Controller
+      </a>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/enterprise/cosu.html">
+        Configuring Corporate-Owned, Single-Use Devices
+      </a>
+      </li>
+    </ul>
+  </li>
+  <!-- End: Building for Work -->
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-ux.html">
+      <span class="small">Best Practices for</span><br/>
+              Interaction &amp; Engagement
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/design-navigation/index.html"
+             description=
+             "How to plan your app's screen hierarchy and forms of navigation so users can
+             effectively and intuitively traverse your app content using various navigation
+             patterns."
+            >Designing Effective Navigation</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/screen-planning.html">
+            Planning Screens and Their Relationships
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/multiple-sizes.html">
+            Planning for Multiple Touchscreen Sizes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/descendant-lateral.html">
+            Providing Descendant and Lateral Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/ancestral-temporal.html">
+            Providing Ancestral and Temporal Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/wireframing.html">
+            Putting it All Together: Wireframing the Example App
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/implementing-navigation/index.html"
+             description=
+             "How to implement various navigation patterns such as swipe views,
+             a navigation drawer, and up navigation."
+            >Implementing Effective Navigation</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/lateral.html">
+            Creating Swipe Views with Tabs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/nav-drawer.html">
+            Creating a Navigation Drawer
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/ancestral.html">
+            Providing Up Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/temporal.html">
+            Providing Proper Back Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/descendant.html">
+            Implementing Descendant Navigation
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+          <div class="nav-section-header">
+              <a href="<?cs var:toroot ?>training/notify-user/index.html"
+                 description=
+                 "How to display messages called notifications outside of
+                 your application's UI."
+               >Notifying the User</a>
+          </div>
+          <ul>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/build-notification.html">
+                  Building a Notification
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/navigation.html">
+                  Preserving Navigation when Starting an Activity
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/managing.html">
+                  Updating Notifications
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/expanded.html">
+                  Using Big View Styles
+                  </a>
+              </li>
+              <li>
+                  <a href="<?cs var:toroot ?>training/notify-user/display-progress.html">
+                  Displaying Progress in a Notification
+                  </a>
+              </li>
+          </ul>
+      </li>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+            <a href="<?cs var:toroot ?>training/swipe/index.html"
+            description=
+            "How to modify your app's layout to support manual content updates triggered by the
+             swipe-to-refresh gesture."
+            >Supporting Swipe-to-Refresh</a>
+        </div>
+        <ul>
+            <li>
+                <a href="<?cs var:toroot ?>training/swipe/add-swipe-interface.html"
+                >Adding Swipe-to-Refresh To Your App</a></li>
+            <li>
+                <a href="<?cs var:toroot ?>training/swipe/respond-refresh-request.html"
+                >Responding to a Refresh Gesture</a>
+            </li>
+        </ul>
+      </li>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/search/index.html"
+             description=
+             "How to properly add a search interface to your app and create a searchable database."
+            >Adding Search Functionality</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/search/setup.html">
+            Setting up the Search Interface
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/search/search.html">
+            Storing and Searching for Data
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/search/backward-compat.html">
+            Remaining Backward Compatible
+          </a>
+          </li>
+        </ul>
+      </li>
+
+     <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/app-indexing/index.html"
+             description=
+             "How to enable deep linking and indexing of your application
+content so that users can open this content directly from their mobile search
+results."
+            >Making Your App Content Searchable by Google</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/app-indexing/deep-linking.html">
+            Enabling Deep Links for App Content
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/app-indexing/enabling-app-indexing.html">
+            Specifying App Content for Indexing
+          </a>
+          </li>
+        </ul>
+  </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/assistant.html"
+           description=
+           "Support contextually relevant actions through the Assist API."
+          >Optimizing Content for the Assistant</a>
+      </li>
+       <li class="nav-section">
+        <div class="nav-section">
+          <a href="<?cs var:toroot ?>training/app-links/index.html"
+             description=
+             "How to enable the system to handle web requests by taking the user directly
+             to your app instead of your website."
+            >Handling App Links</a>
+        </div>
+      </li>
+  <!-- End Interaction and Engagement -->
+
+</ul>
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-ui.html">
+      <span class="small">Best Practices for</span><br/>
+              User Interface
+      </a>
+    </div>
+    <ul>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiscreen/index.html"
+             zh-cn-lang="针对多种屏幕进行设计"
+             ja-lang="複数画面のデザイン"
+             es-lang="Cómo diseñar aplicaciones para varias pantallas"
+             description=
+             "How to build a user interface that's flexible enough to
+             fit perfectly on any screen and how to create different interaction
+             patterns that are optimized for different screen sizes."
+            >Designing for Multiple Screens</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/multiscreen/screensizes.html"
+            zh-cn-lang="支持各种屏幕尺寸"
+            ko-lang="다양한 화면 크기 지원"
+            ja-lang="さまざまな画面サイズのサポート"
+            es-lang="Cómo admitir varios tamaños de pantalla"
+            >Supporting Different Screen Sizes</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiscreen/screendensities.html"
+            zh-cn-lang="支持各种屏幕密度"
+            ja-lang="さまざまな画面密度のサポート"
+            es-lang="Cómo admitir varias densidades de pantalla"
+            >Supporting Different Screen Densities</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiscreen/adaptui.html"
+            zh-cn-lang="实施自适应用户界面流程"
+            ja-lang="順応性のある UI フローの実装"
+            es-lang="Cómo implementar interfaces de usuario adaptables"
+            >Implementing Adaptive UI Flows</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/appbar/index.html"
+             description=
+             "How to use the support library's toolbar widget to implement an
+             app bar that displays properly on a wide range of devices."
+            >Adding the App Bar</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/appbar/setting-up.html"
+            >Setting Up the App Bar</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/appbar/actions.html"
+            >Adding and Handling Actions</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/appbar/up-action.html"
+            >Adding an Up Action</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/appbar/action-views.html"
+            >Action Views and Action Providers</a>
+          </li>
+        </ul>
+      </li>
+
+            <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/snackbar/index.html"
+             description=
+             "How to use the support library's Snackbar widget to display a
+             brief pop-up message."
+            >Showing Pop-Up Messages</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/snackbar/showing.html"
+            >Building and Displaying a Pop-Up Message</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/snackbar/action.html"
+            >Adding an Action to a Message</a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/custom-views/index.html"
+             description=
+             "How to build custom UI widgets that are interactive and smooth."
+            >Creating Custom Views</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/custom-views/create-view.html">
+            Creating a Custom View Class
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/custom-drawing.html">
+            Implementing Custom Drawing
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/making-interactive.html">
+            Making the View Interactive
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/optimizing-view.html">
+            Optimizing the View
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/backward-compatible-ui/index.html"
+             description=
+             "How to use UI components and other APIs from the more recent versions of Android
+             while remaining compatible with older versions of the platform."
+            >Creating Backward-Compatible UIs</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/abstracting.html">
+            Abstracting the New APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/new-implementation.html">
+            Proxying to the New APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/older-implementation.html">
+            Creating an Implementation with Older APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/using-component.html">
+            Using the Version-Aware Component
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/accessibility/index.html"
+             description=
+             "How to make your app accessible to users with vision
+             impairment or other physical disabilities."
+            >Implementing Accessibility</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/accessibility/accessible-app.html">
+            Developing Accessible Applications
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/accessibility/service.html">
+            Developing Accessibility Services
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/accessibility/testing.html">
+            Accessibility Testing Checklist
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/system-ui/index.html"
+             description=
+             "How to hide and show status and navigation bars across different versions of Android,
+              while managing the display of other screen components."
+            >Managing the System UI</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/system-ui/dim.html">
+            Dimming the System Bars
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/status.html">
+            Hiding the Status Bar
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/navigation.html">
+            Hiding the Navigation Bar
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/immersive.html">
+            Using Immersive Full-Screen Mode
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/system-ui/visibility.html">
+            Responding to UI Visibility Changes
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/material/index.html"
+             description=
+             "How to implement material design on Android."
+            zh-cn-lang="面向开发者的材料设计"
+            zh-tw-lang="開發人員材料設計"
+            ja-lang="マテリアル デザインでのアプリ作成"
+            es-lang="Crear aplicaciones con Material Design"
+            pt-br-lang="Material Design para desenvolvedores"
+            ko-lang="개발자를 위한 머티리얼 디자인"
+            ru-lang="Создание приложений с помощью Material Design"
+            in-lang="Desain Bahan untuk Pengembang"
+            vi-lang="Material Design cho Nhà phát triển"
+            >Creating Apps with Material Design</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/material/get-started.html"
+            zh-cn-lang="入门指南"
+            zh-tw-lang="開始使用"
+            ja-lang="スタート ガイド"
+            es-lang="Comencemos"
+            pt-br-lang="Como iniciar"
+            ko-lang="시작하기"
+            ru-lang="Начало работы"
+            in-lang="Memulai"
+            vi-lang="Bắt đầu"
+            >
+            Getting Started
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/theme.html"
+            zh-cn-lang="使用材料主题"
+            zh-tw-lang="使用材料設計風格"
+            ja-lang="マテリアル テーマの使用"
+            es-lang="Usar el tema Material"
+            pt-br-lang="Como usar o tema do Material"
+            ko-lang="머티어리얼 테마 사용"
+            ru-lang="Использование темы Material Design"
+            in-lang="Menggunakan Tema Bahan"
+            vi-lang="Sử dụng Chủ đề Material"
+            >
+            Using the Material Theme
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/lists-cards.html"
+            zh-cn-lang="创建列表与卡片"
+            zh-tw-lang="建立清單和卡片"
+            ja-lang="リストとカードの作成"
+            es-lang="Crear listas y tarjetas"
+            pt-br-lang="Como criar listas e cartões"
+            ko-lang="목록 및 카드 생성"
+            ru-lang="Создание списков и подсказок"
+            in-lang="Membuat Daftar dan Kartu"
+            vi-lang="Tạo Danh sách và Thẻ"
+            >
+            Creating Lists and Cards
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/shadows-clipping.html"
+            zh-cn-lang="定义阴影与裁剪视图"
+            zh-tw-lang="定義陰影和裁剪檢視"
+            ja-lang="シャドウとクリッピング ビューの定義"
+            es-lang="Definir vistas de recorte y sombras"
+            pt-br-lang="Como definir sombras e recortar visualizações"
+            ko-lang="그림자 정의 및 뷰 클리핑"
+            ru-lang="Определение теней и обрезка представлений"
+            in-lang="Mendefinisikan Bayangan dan Memangkas Tampilan"
+            vi-lang="Định nghĩa Đổ bóng và Dạng xem Cắt hình"
+            >
+            Defining Shadows and Clipping Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/drawables.html"
+            zh-cn-lang="使用 Drawables"
+            zh-tw-lang="使用可繪項目"
+            ja-lang="ドローアブルの使用"
+            es-lang="Trabajar con interfaces dibujables"
+            pt-br-lang="Como trabalhar com desenháveis"
+            ko-lang="Drawable 사용"
+            ru-lang="Работа с элементами дизайна"
+            in-lang="Bekerja dengan Drawable"
+            vi-lang="Làm việc với Nội dung vẽ được"
+            >
+            Working with Drawables
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/animations.html"
+            zh-cn-lang="定义定制动画"
+            zh-tw-lang="定義自訂動畫"
+            ja-lang="カスタム アニメーションの定義"
+            es-lang="Definir animaciones personalizadas"
+            pt-br-lang="Como definir animações personalizadas"
+            ko-lang="사용자지정 애니메이션 정의"
+            ru-lang="Определение настраиваемой анимации"
+            in-lang="Mendefinisikan Animasi Custom"
+            vi-lang="Định nghĩa Hoạt hình Tùy chỉnh"
+            >
+            Defining Custom Animations
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/compatibility.html"
+            zh-cn-lang="维护兼容性"
+            zh-tw-lang="維持相容性"
+            ja-lang="互換性の維持"
+            es-lang="Mantener la compatibilidad"
+            pt-br-lang="Como manter a compatibilidade"
+            ko-lang="호환성 유지"
+            ru-lang="Обеспечение совместимости"
+            in-lang="Mempertahankan Kompatibilitas"
+            vi-lang="Duy trì Tính tương thích"
+            >
+            Maintaining Compatibility
+          </a>
+          </li>
+        </ul>
+      </li>
+
+    </ul>
+  </li>
+  <!-- End User Interface -->
+
+
+
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-user-input.html">
+      <span class="small">Best Practices for</span><br/>
+              User Input
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/gestures/index.html"
+             description=
+             "How to write apps that allow users to interact with the touch screen via touch gestures."
+            >Using Touch Gestures</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/gestures/detector.html">
+            Detecting Common Gestures
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/movement.html">
+            Tracking Movement
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/scroll.html">
+            Animating a Scroll Gesture
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/multi.html">
+            Handling Multi-Touch Gestures
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/scale.html">
+            Dragging and Scaling
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/gestures/viewgroup.html">
+            Managing Touch Events in a ViewGroup
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/keyboard-input/index.html"
+             description=
+             "How to specify the appearance and behaviors of soft input methods (such
+             as on-screen keyboards) and how to optimize the experience with
+             hardware keyboards."
+            >Handling Keyboard Input</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/style.html">
+            Specifying the Input Method Type
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/visibility.html">
+            Handling Input Method Visibility
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/navigation.html">
+            Supporting Keyboard Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/keyboard-input/commands.html">
+            Handling Keyboard Actions
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/game-controllers/index.html"
+             description=
+             "How to write apps that support game controllers."
+            >Supporting Game Controllers</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/game-controllers/controller-input.html">
+            Handling Controller Actions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/game-controllers/compatibility.html">
+            Supporting Controllers Across Android Versions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/game-controllers/multiple-controllers.html">
+            Supporting Multiple Game Controllers
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li> <!-- end of User Input -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-background.html">
+      <span class="small">Best Practices for</span><br/>
+              Background Jobs
+      </a>
+    </div>
+    <ul>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/run-background-service/index.html"
+             description=
+             "How to improve UI performance and responsiveness by sending work to a
+             Service running in the background"
+            >Running in a Background Service</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/run-background-service/create-service.html">
+            Creating a Background Service
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/run-background-service/send-request.html">
+            Sending Work Requests to the Background Service
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/run-background-service/report-status.html">
+            Reporting Work Status
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/load-data-background/index.html"
+             description="How to use CursorLoader to query data without
+             affecting UI responsiveness."
+            >Loading Data in the Background</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/load-data-background/setup-loader.html">
+            Running a Query with a CursorLoader</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/load-data-background/handle-results.html">
+            Handling the Results</a>
+          </li>
+        </ul>
+      </li>
+
+       <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/scheduling/index.html"
+             description="How to use repeating alarms and wake locks
+             to run background jobs."
+            >Managing Device Awake State</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/scheduling/wakelock.html">
+            Keeping the Device Awake</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/scheduling/alarms.html">
+            Scheduling Repeating Alarms</a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li> <!-- end of Background Jobs -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-performance.html">
+      <span class="small">Best Practices for</span><br/>
+              Performance
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/memory.html"
+          description=
+          "How to keep your app's memory footprint small in order to improve performance
+          on a variety of mobile devices."
+          >Managing Your App's Memory</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/perf-tips.html"
+           description=
+           "How to optimize your app's performance in various ways to improve its
+           responsiveness and battery efficiency."
+          >Performance Tips</a>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/improving-layouts/index.html"
+             description=
+             "How to identify problems in your app's layout performance and improve the UI
+             responsiveness."
+            >Improving Layout Performance</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/optimizing-layout.html">
+            Optimizing Layout Hierarchies
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/reusing-layouts.html">
+            Re-using Layouts with &lt;include/&gt;
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/loading-ondemand.html">
+            Loading Views On Demand
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/smooth-scrolling.html">
+            Making ListView Scrolling Smooth
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/monitoring-device-state/index.html"
+             zh-cn-lang="优化电池使用时间"
+             ja-lang="電池消費量の最適化"
+             es-lang="Cómo optimizar la duración de la batería"
+             description=
+             "How to minimize the amount of power your app requires by adapting to current
+             power conditions and performing power-hungry tasks at proper intervals."
+            >Optimizing Battery Life
+            </a>
+        </div>
+        <ul>
+
+          <li class="nav-section">
+            <div class="nav-section-header">
+              <a href="<?cs var:toroot ?>training/performance/battery/network/index.html">
+                Reducing Network Battery Drain
+              </a>
+            </div>
+            <ul>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/gather-data.html">
+                Collecting Network Traffic Data
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/analyze-data.html">
+                Analyzing Network Traffic Data
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-user-traffic.html">
+                Optimizing User-Initiated Network Use
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-app-traffic.html">
+                Optimizing App-Initiated Network Use
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-server-traffic.html">
+                Optimizing Server-Initiated Network Use
+              </a>
+              </li>
+              <li><a href="<?cs var:toroot ?>training/performance/battery/network/action-any-traffic.html">
+                Optimizing General Network Use
+              </a>
+              </li>
+            </ul>
+          </li> <!-- End of Reducing Network Battery Drain -->
+
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/doze-standby.html"
+            >Optimizing for Doze and App Standby</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/battery-monitoring.html"
+            zh-cn-lang="监控电池电量和充电状态"
+            ja-lang="電池残量と充電状態の監視"
+            es-lang="Cómo controlar el nivel de batería y el estado de carga"
+            >Monitoring the Battery Level and Charging State</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/docking-monitoring.html"
+            zh-cn-lang="确定和监控基座对接状态和类型"
+            ja-lang="ホルダーの装着状態とタイプの特定と監視"
+            es-lang="Cómo determinar y controlar el tipo de conector y el estado de la conexión"
+            >Determining and Monitoring the Docking State and Type</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/connectivity-monitoring.html"
+            zh-cn-lang="确定和监控网络连接状态"
+            ja-lang="接続状態の特定と監視"
+            es-lang="Cómo determinar y controlar el estado de la conectividad"
+            >Determining and Monitoring the Connectivity Status</a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/manifest-receivers.html"
+            zh-cn-lang="根据需要操作广播接收器"
+            ja-lang="オンデマンドでのブロードキャスト レシーバ操作"
+            es-lang="Cómo manipular los receptores de emisión bajo demanda"
+            >Manipulating Broadcast Receivers On Demand</a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiple-threads/index.html"
+             description=
+             "How to improve the performance and scalability of long-running operations by
+              dispatching work to multiple threads.">
+             Sending Operations to Multiple Threads</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/define-runnable.html">
+            Specifying the Code to Run on a Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/create-threadpool.html">
+            Creating a Manager for Multiple Threads
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/run-code.html">
+            Running Code on a Thread Pool Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-threads/communicate-ui.html">
+            Communicating with the UI Thread
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/perf-anr.html"
+           description=
+           "How to keep your app responsive to user interaction so the UI does not lock-up and
+           display an &quot;Application Not Responding&quot; dialog."
+          >Keeping Your App Responsive</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/perf-jni.html"
+           description=
+           "How to efficiently use the Java Native Interface with the Android NDK."
+          >JNI Tips</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/smp.html"
+           description=
+           "Tips for coding Android apps on symmetric multiprocessor systems."
+          >SMP Primer for Android</a>
+      </li>
+    </ul>
+  </li> <!-- end of Performance -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-security.html">
+      <span class="small">Best Practices for</span><br/>
+              Security &amp; Privacy
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-tips.html"
+           description=
+           "How to perform various tasks and keep your app's data and your user's data secure."
+          >Security Tips</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-ssl.html"
+           description=
+           "How to ensure that your app is secure when performing network transactions."
+          >Security with HTTPS and SSL</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/security-gms-provider.html"
+           description=
+           "How to use and update Google Play services security provider, to
+           protect against SSL exploits."
+          >Updating Your Security Provider to Protect Against SSL Exploits</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/safetynet/index.html"
+           description=
+           "How to use the SafetyNet service to analyze a device where your app is running
+            and get information about its compatibility with your app."
+          >Checking Device Compatibility with SafetyNet</a>
+      </li>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/enterprise/device-management-policy.html"
+            description="How to create an application that enforces security policies on devices."
+            >Enhancing Security with Device Management Policies</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End security and user info -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-permissions-ids.html">
+      <span class="small">Best Practices for</span><br/>
+              Permissions &amp; Identifiers
+      </a>
+    </div>
+    <ul>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/user-data-overview.html"
+           description=
+           "Overview of app permissions on Android and how they affect your users."
+          >Permissions and User Data</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/user-data-permissions.html"
+           description=
+           "How to manage permissions the right way for users."
+          >Best Practices for App Permissions</a>
+      </li>
+      <li>
+        <a href="<?cs var:toroot ?>training/articles/user-data-ids.html"
+           description=
+           "Unique identifiers available and how to choose the right one for your use case."
+          >Best Practices for Unique Identifiers</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End Permissions and identifiers -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/testing/index.html">
+      <span class="small">Best Practices for</span><br/>
+              Testing
+      </a>
+    </div>
+    <ul>
+      <li>
+      <a href="<?cs var:toroot ?>training/testing/start/index.html"
+         description="How to get started with testing your Android applications.">
+            Getting Started with Testing
+          </a>
+      </li>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/testing/unit-testing/index.html"
+         description="How to build effective unit tests for Android apps.">
+            Building Effective Unit Tests
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/testing/unit-testing/local-unit-tests.html">
+            <span class="en">Building Local Unit Tests</span>
+            </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/testing/unit-testing/instrumented-unit-tests.html">
+            <span class="en">Building Instrumented Unit Tests</span>
+            </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/testing/ui-testing/index.html"
+         description="How to automate your user interface tests for Android apps.">
+            Automating UI Tests
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/testing/ui-testing/espresso-testing.html">
+            <span class="en">Testing UI for a Single App</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/testing/ui-testing/uiautomator-testing.html">
+            <span class="en">Testing UI for Multiple Apps</span>
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/testing/integration-testing/index.html"
+         description="How to build effective integration tests for Android apps.">
+            Testing App Component Integrations
+          </a></div>
+        <ul>
+         <li><a href="<?cs var:toroot ?>training/testing/integration-testing/service-testing.html">
+           <span class="en">Testing Your Service</span></a></li>
+         <li><a href="<?cs var:toroot ?>training/testing/integration-testing/content-provider-testing.html">
+           <span class="en">Testing Your Content Provider</span></a></li>
+        </ul>
+      </li>
+      <li><a href="<?cs var:toroot ?>training/testing/performance.html"
+          description="How to automate UI performance testing.">Testing Display Performance</a>
+      </li>
+    </ul>
+  </li>
+  <!-- End best Testing -->
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/distribute.html">
+      <span class="small">Using Google Play to</span><br/>
+              Distribute &amp; Monetize
+      </a>
+    </div>
+    <ul>
+      <li class="nav-section">
+      <div class="nav-section-header"><a href="<?cs var:toroot ?>training/in-app-billing/index.html"
+         description="How to sell in-app products from your application using In-app Billing.">
+            Selling In-app Products
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/preparing-iab-app.html">
+            <span class="en">Preparing Your App</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/list-iab-products.html">
+            <span class="en">Establishing Products for Sale</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/purchase-iab-products.html">
+            <span class="en">Purchasing Products</span>
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/in-app-billing/test-iab-app.html">
+            <span class="en">Testing Your App</span>
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiple-apks/index.html"
+             description=
+             "How to publish your app on Google Play with separate APKs that target
+             different devices, while using a single app listing."
+            >Maintaining Multiple APKs</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/api.html">
+            Creating Multiple APKs for Different API Levels
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/screensize.html">
+            Creating Multiple APKs for Different Screen Sizes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/texture.html">
+            Creating Multiple APKs for Different GL Textures
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/multiple-apks/multiple.html">
+            Creating Multiple APKs with 2+ Dimensions
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End best Publishing -->
+
+</ul><!-- nav -->
+<script type="text/javascript">
+<!--
+    buildToggleLists();
+    changeNavLang(getLangPref());
+//-->
+</script>
diff --git a/docs/html/training/performance/battery/network/action-any-traffic.jd b/docs/html/topic/performance/power/network/action-any-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-any-traffic.jd
rename to docs/html/topic/performance/power/network/action-any-traffic.jd
diff --git a/docs/html/training/performance/battery/network/action-app-traffic.jd b/docs/html/topic/performance/power/network/action-app-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-app-traffic.jd
rename to docs/html/topic/performance/power/network/action-app-traffic.jd
diff --git a/docs/html/training/performance/battery/network/action-server-traffic.jd b/docs/html/topic/performance/power/network/action-server-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-server-traffic.jd
rename to docs/html/topic/performance/power/network/action-server-traffic.jd
diff --git a/docs/html/training/performance/battery/network/action-user-traffic.jd b/docs/html/topic/performance/power/network/action-user-traffic.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/action-user-traffic.jd
rename to docs/html/topic/performance/power/network/action-user-traffic.jd
diff --git a/docs/html/training/performance/battery/network/analyze-data.jd b/docs/html/topic/performance/power/network/analyze-data.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/analyze-data.jd
rename to docs/html/topic/performance/power/network/analyze-data.jd
diff --git a/docs/html/training/performance/battery/network/gather-data.jd b/docs/html/topic/performance/power/network/gather-data.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/gather-data.jd
rename to docs/html/topic/performance/power/network/gather-data.jd
diff --git a/docs/html/training/performance/battery/network/index.jd b/docs/html/topic/performance/power/network/index.jd
similarity index 100%
rename from docs/html/training/performance/battery/network/index.jd
rename to docs/html/topic/performance/power/network/index.jd
diff --git a/docs/html/topic/performance/reduce-apk-size.jd b/docs/html/topic/performance/reduce-apk-size.jd
new file mode 100644
index 0000000..1e73bf0
--- /dev/null
+++ b/docs/html/topic/performance/reduce-apk-size.jd
@@ -0,0 +1,538 @@
+page.title=Reduce APK Size
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#apk-structure">Understand the APK Structure</a></li>
+  <li><a href="#reduce-resources">Reduce Resource Count and Size</a></li>
+  <li><a href="#reduce-code">Reduce Native and Java Code</a></li>
+  <li><a href="#multiple-apks">Maintain Multiple Lean APKs</a></li>
+</ol>
+
+<h2>
+  You should also read
+</h2>
+
+<ul>
+  <li>
+    <a href="{@docRoot}studio/build/shrink-code.html">Shrink Your Code and
+    Resources</a>
+  </li>
+</ul>
+
+
+</div>
+</div>
+
+<p>
+  Users often avoid downloading apps that seem too large, particularly in
+  emerging markets where devices connect to often-spotty 2G and
+  3G networks or work on pay-by-the-byte plans. This article describes how to
+  reduce your app's APK size, which enables more users to download your app.
+</p>
+
+<h2 id="apk-structure">
+  Understand the APK Structure
+</h2>
+
+<p>
+  Before discussing how to reduce the size of your app, it's helpful to
+  understand the structure of an app's APK. An APK file consists of a ZIP
+  archive that contains all the files that comprise your app. These files
+  include Java class files, resource files, and a file containing compiled
+  resources.
+</p>
+
+<p>
+An APK contains the following directories:
+</p>
+
+<ul>
+  <li>{@code META-INF/}: Contains the <code>CERT.SF</code> and
+  <code>CERT.RSA</code> signature files, as well as the {@code MANIFEST.MF}
+  manifest file.
+  </li>
+
+  <li>{@code assets/}: Contains the app's assets, which the app can retrieve
+  using an {@link android.content.res.AssetManager} object.
+  </li>
+
+  <li>
+  {@code res/}: Contains resources that aren't compiled into
+  <code>resources.arsc</code>.
+  </li>
+
+  <li>{@code lib/}: Contains the compiled code that is specific to the software
+  layer of a processor. This directory contains a subdirectory for each
+  platform type, like <code>armeabi</code>, <code>armeabi-v7a</code>,
+  <code>arm64-v8a</code>, <code>x86</code>, <code>x86_64</code>, and
+  <code>mips</code>.
+  </li>
+</ul>
+
+<p>
+An APK also contains the following files. Among them,
+only <code>AndroidManifest.xml</code> is mandatory.
+</p>
+
+<ul>
+  <li>{@code resources.arsc}: Contains compiled resources. This file contains
+  the XML content from all configurations of the <code>res/values/</code>
+  folder. The packaging tool extracts this XML content, compiles it to binary
+  form, and archives the content. This content includes language strings and
+  styles, as well as paths to content that is not included directly in the
+  <code>resources.arsc</code> file, such as layout files and images.
+  </li>
+
+  <li>{@code classes.dex}: Contains the classes compiled in the DEX file format
+  understood by the Dalvik/ART virtual machine.
+  </li>
+
+  <li>{@code AndroidManifest.xml}: Contains the core Android manifest file.
+  This file lists the name, version, access rights, and referenced library
+  files of the app. The file uses Android's binary XML format.
+  </li>
+</ul>
+
+<h2 id="reduce-resources">
+  Reduce Resource Count and Size
+</h2>
+
+<p>
+  The size of your APK has an impact on how fast your app loads, how much
+  memory it uses, and how much power it consumes. One of the simple ways to
+  make your APK smaller is to reduce the number and size of the
+  resources it contains. In particular, you can remove resources
+  that your app no longer uses, and you can use scalable {@link
+  android.graphics.drawable.Drawable} objects in place of image files. This
+  section discusses these methods as well as several other ways that you can
+  reduce the resources in your app to decrease the overall size of your APK.
+</p>
+
+<h3 id="remove-unused">
+  Remove Unused Resources
+</h3>
+
+<p>
+  The <a href="{@docRoot}studio/write/lint.html">{@code lint}</a> tool, a
+  static code analyzer included in Android Studio, detects resources in your
+  <code>res/</code> folder that your code doesn't reference. When the
+  <code>lint</code> tool discovers a potentially unused resource in your
+  project, it prints a message like the following example.
+</p>
+
+<pre class="no-pretty-print">
+res/layout/preferences.xml: Warning: The resource R.layout.preferences appears
+    to be unused [UnusedResources]
+</pre>
+<p class="note">
+  <strong>Note:</strong> The <code>lint</code> tool doesn't scan the {@code
+  assets/} folder, assets that are referenced via reflection, or library files
+  that you've linked to your app. Also, it doesn't remove resources; it only
+  alerts you to their presence.
+</p>
+
+<p>
+  Libraries that you add to your code may include unused resources. Gradle can
+  automatically remove resources on your behalf if you enable <a href=
+  "{@docRoot}studio/build/shrink-code.html">{@code shrinkResources}</a> in
+  your app's <code>build.gradle</code> file.
+</p>
+
+<pre class="prettyprint">
+android {
+    // Other settings
+
+    buildTypes {
+        release {
+            minifyEnabled true
+            shrinkResources true
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+</pre>
+<p>
+  To use {@code shrinkResources}, you must enable code shrinking. During the
+  build process, first <a href=
+  "{@docRoot}studio/build/shrink-code.html">ProGuard</a> removes unused code
+  but leaves unused resources. Then Gradle removes the unused resources.
+</p>
+
+<p>
+  For more information about ProGuard and other ways
+  Android Studio helps you reduce APK size, see <a href=
+  "{@docRoot}studio/build/shrink-code.html">Shrink Your Code and Resources</a>.
+</p>
+
+<p>
+  In Android Gradle Plugin 0.7 and higher, you can declare the configurations
+  that your app supports. Gradle passes this information to the build system
+  using the {@code resConfig} and {@code resConfigs} flavors and the
+  <code>defaultConfig</code> option. The build system then prevents resources
+  from other, unsupported configurations from appearing in the APK, reducing
+  the APK's size. For more information about this feature, see <a href=
+  "{@docRoot}studio/build/shrink-code.html#unused-alt-resources">Remove unused
+  alternative resources</a>.
+</p>
+
+<h3 id="minimize">
+  Minimize Resource Use from Libraries
+</h3>
+
+<p>
+  When developing an Android app, you usually use external libraries to improve
+  your app's usability and versatility. For example, you might reference the
+  <a href="{@docRoot}topic/libraries/support-library/index.html">Android
+  Support Library</a> to improve the user experience on older devices, or you
+  could use <a class="external-link" href=
+  "https://developers.google.com/android/guides/overview">Google Play
+  Services</a> to retrieve automatic translations for text within your app.
+</p>
+
+<p>
+  If a library was designed for a server or desktop, it can include many
+  objects and methods that your app doesn’t need. To include only the parts of
+  the library that your app needs, you can edit the library's files if the
+  license allows you to modify the library. You can also use an alternative,
+  mobile-friendly library to add specific functionality to your app.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> <a href=
+  "{@docRoot}studio/build/shrink-code.html">ProGuard</a> can clean up some
+  unnecessary code imported with a library, but it can't remove a library's
+  large internal dependencies.
+</p>
+
+<h3 id="support-densities">
+  Support Only Specific Densities
+</h3>
+
+<p>
+  Android supports a very large set of devices, encompassing a variety of
+  screen densities. In Android 4.4 (API level 19) and higher, the framework
+  supports various densities: <code>ldpi</code>, <code>mdpi</code>,
+  <code>tvdpi</code>, <code>hdpi,</code> <code>xhdpi</code>,
+  <code>xxhdpi</code> and <code>xxxhdpi</code>. Although Android supports all
+  these densities, you don't need to export your rasterized assets to each
+  density.
+</p>
+
+<p>
+  If you know that only a small percentage of your users have devices with
+  specific densities, consider whether you need to bundle those densities into
+  your app. If you don't include resources for a specific screen density,
+  Android automatically scales existing resources originally designed for other
+  screen densities.
+</p>
+
+<p>
+  If your app needs only scaled images, you can save even more space by having
+  a single variant of an image in <code>drawable-nodpi/</code>. We recommend
+  that every app include at least an <code>xxhdpi</code> image variant.
+</p>
+
+<p>
+  For more information screen densities, see <a class="external-link" href=
+  "{@docRoot}about/dashboards/index.html#Screens">Screen Sizes and
+  Densities</a>.
+</p>
+
+<h3 id="reduce-frames">
+  Reduce Animation Frames
+</h3>
+
+<p>
+  Frame-by-frame animations can drastically increase the size of your APK.
+  Figure 1 shows an example of a frame-by-frame animation separated into
+  multiple PNG files within a directory. Each image is one frame in the
+  animation.
+</p>
+
+<p>
+  For each frame that you add to the animation, you increase the number of
+  images stored in the APK. In Figure 1, the image animates at 30 FPS within
+  the app. If the image animated at only 15 FPS instead, the animation would
+  require only half the number of needed frames.
+</p>
+
+<figure id="fig-frame-animations">
+  <img src="{@docRoot}images/training/performance/animation-frames.png" srcset=
+  "{@docRoot}images/training/performance/animation-frames.png 1x, {@docRoot}images/training/performance/animation-frames_2x.png 2x"
+  width="803" alt="">
+  <figcaption>
+    <strong>Figure 1.</strong> Frame by frame animations stored as resources.
+  </figcaption>
+</figure>
+
+<h3 id="use-drawables">
+  Use Drawable Objects
+</h3>
+
+<p>
+  Some images don't require a static image resource; the framework can
+  dynamically draw the image at runtime instead. {@link
+  android.graphics.drawable.Drawable} objects (<code>&lt;shape&gt;</code> in
+  XML) can take up a tiny amount of space in your APK. In addition, XML {@link
+  android.graphics.drawable.Drawable} objects produce monochromatic images
+  compliant with material design guidelines.
+</p>
+
+<h3 id="reuse-resources">
+  Reuse Resources
+</h3>
+
+<p>
+  You can include a separate resource for variations of an image, such as
+  tinted, shaded, or rotated versions of the same image. We recommend, however,
+  that you reuse the same set of resources, customizing them as needed at
+  runtime.
+</p>
+
+<p>
+  Android provides several utilities to change the color of an asset, either
+  using the {@code android:tint} and {@code tintMode} attributes on Android 5.0
+  (API level 21) and higher. For lower versions of the platform, use the {@link
+  android.graphics.ColorFilter} class.
+</p>
+<p>
+  You can also omit resources that are only a rotated equivalent of another
+  resource. The following code snippet provides an example of turning an
+  "expand" arrow into a "collapse" arrow icon by simply rotating the original
+  image 180 degrees:
+</p>
+
+<pre class="prettyprint">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:drawable="@drawable/ic_arrow_expand"
+    android:fromDegrees="180"
+    android:pivotX="50%"
+    android:pivotY="50%"
+    android:toDegrees="180" /&gt;
+</pre>
+<h3 id="render-code">
+  Render From Code
+</h3>
+
+<p>
+  You can also reduce your APK size by procedurally rendering your images.
+  Procedural rendering frees up space because you no longer store an image file
+  in your APK.
+</p>
+
+<h3 id="crunch">
+  Crunch PNG Files
+</h3>
+
+<p>
+  The <code>aapt</code> tool can optimize the image resources placed in
+  <code>res/drawable/</code> with lossless compression during the build
+  process. For example, the <code>aapt</code> tool can convert a true-color PNG
+  that does not require more than 256 colors to an 8-bit PNG with a color
+  palette. Doing so results in an image of equal quality but a smaller memory
+  footprint.
+</p>
+
+<p>
+  Keep in mind that the <code>aapt</code> has the following limitations:
+</p>
+
+<ul>
+  <li>The <code>aapt</code> tool does not shrink PNG files contained in the
+  <code>asset/</code> folder.
+  </li>
+
+  <li>Image files need to use 256 or fewer colors for the <code>aapt</code>
+  tool to optimize them.
+  </li>
+
+  <li>The <code>aapt</code> tool may inflate PNG files that have already been
+  compressed. To prevent this, you can use the <code>cruncherEnabled</code>
+  flag in Gradle to disable this process for PNG files:
+  </li>
+</ul>
+
+<pre class="prettyprint">
+aaptOptions {
+    cruncherEnabled = false
+}
+</pre>
+<h3 id="compress">
+  Compress PNG and JPEG Files
+</h3>
+
+<p>
+  You can reduce PNG file sizes without losing image quality using tools like
+  <a class="external-link" href=
+  "http://pmt.sourceforge.net/pngcrush/">pngcrush</a>, <a class="external-link"
+  href="https://pngquant.org/">pngquant</a>, or <a class="external-link" href=
+  "https://github.com/google/zopfli">zopflipng</a>. All of these tools can
+  reduce PNG file size while preserving image quality.
+</p>
+
+<p>
+  The {@code pngcrush} tool is particularly effective: This tool iterates over
+  PNG filters and zlib (Deflate) parameters, using each combination of filters
+  and parameters to compress the image. It then chooses the configuration that
+  yields the smallest compressed output.
+</p>
+
+<p>
+  For JPEG files, you can use tools like <a class="external-link" href=
+  "http://www.elektronik.htw-aalen.de/packjpg/">packJPG</a> that compress JPEG
+  files into a more compact form.
+</p>
+
+<h3 id="use-webp">
+  Use WebP File Format
+</h3>
+
+<p>
+  Instead of using PNG or JPEG files, you can also use the <a class=
+  "external-link" href="https://developers.google.com/speed/webp/">WebP</a>
+  file format for your images. The WebP format provides lossy compression (like
+  JPEG) as well as transparency (like PNG) but can provide better compression
+  than either JPEG or PNG.
+</p>
+
+<p>
+  Using the WebP file format has a few notable drawbacks, however. First,
+  support for WebP is not available in versions of the platform lower than
+  Android 3.2 (API level 13). Second, it takes a longer amount of time for the
+  system to decode WebP than PNG files.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> Google Play accepts APKs only if the included icons
+  use the PNG format. You can't use other file formats like JPEG or WebP for
+  app icons if you intend to publish your app through Google Play.
+</p>
+
+<h3 id="vector">
+  Use Vector Graphics
+</h3>
+
+<p>
+  You can use vector graphics to create resolution-independent icons and other
+  scalable media. Using these graphics can greatly reduce your APK footprint.
+  Vector images are represented in Android as {@link
+  android.graphics.drawable.VectorDrawable} objects. With a {@link
+  android.graphics.drawable.VectorDrawable } object, a 100-byte file can
+  generate a sharp image the size of the screen.
+</p>
+
+<p>
+  However, it takes a significant amount of time for the system to render each
+  {@link android.graphics.drawable.VectorDrawable} object, and larger images
+  take even longer to appear on the screen. Therefore, consider using these
+  vector graphics only when displaying small images.
+</p>
+
+<p>
+  For more information on working with {@link
+  android.graphics.drawable.VectorDrawable } objects, see <a class=
+  "external-link" href="{@docRoot}training/material/drawables.html">Working
+  with Drawables</a>.
+</p>
+
+<h2 id="reduce-code">
+  Reduce Native and Java Code
+</h2>
+
+<p>
+  There are several methods you can use to reduce the size of the Java and
+  native codebase in your app.
+</p>
+
+<h3 id="remove-generated">
+  Remove Unnecessary Generated Code
+</h3>
+
+<p>
+  Make sure to understand the footprint of any code which is automatically
+  generated. For example, many protocol buffer tools generate an excessive
+  number of methods and classes, which can double or triple the size of your
+  app.
+</p>
+
+<h3 id="remove-enums">
+  Remove Enumerations
+</h3>
+
+<p>
+  A single enum can add about 1.0 to 1.4 KB of size to your app's
+  <code>classes.dex</code> file. These additions can quickly accumulate for
+  complex systems or shared libraries. If possible, consider using the
+  <code>@IntDef</code> annotation and <a href=
+  "{@docRoot}studio/build/shrink-code.html">ProGuard</a> to strip enumerations
+  out and convert them to integers. This type conversion preserves all of the
+  type safety benefits of enums.
+</p>
+
+<h3 id="reduce-binaries">
+  Reduce the Size of Native Binaries
+</h3>
+
+<p>
+  If your app uses native code and the Android NDK, you can also reduce the
+  size of your app by optimizing your code. Two useful techniques are
+  removing debug symbols and not extracting native libraries.
+</p>
+
+<h4 id="remove-debug">
+  Remove Debug Symbols
+</h4>
+
+<p>
+  Using debug symbols makes sense if your application is in development and
+  still requires debugging. Use the <code>arm-eabi-strip</code> tool, provided
+  in the Android NDK, to remove unnecessary debug symbols from native
+  libraries. After that, you can compile your release build.
+</p>
+
+<h4 id="extract-false">
+  Avoid Extracting Native Libraries
+</h4>
+
+<p>
+  Store {@code .so} files uncompressed in the APK, and set the {@code
+  android:extractNativeLibs} flag to false in the <a href=
+  "{@docRoot}guide/topics/manifest/application-element.html">{@code
+  <application>}</a> element of your app manifest. This will prevent
+  {@link android.content.pm.PackageManager} from copying out {@code .so} files
+  from the APK to the filesystem during installation and will have the added
+  benefit of making delta updates of your app smaller.
+</p>
+
+<h2 id="multiple-apks">
+  Maintain Multiple Lean APKs
+</h2>
+
+<p>
+  Your APK can contain content that users download but never use, like regional
+  or language information. To create a minimal download for your users, you can
+  segment your app into several APKs, differentiated by factors such as screen
+  size or GPU texture support.
+</p>
+
+<p>
+  When a user downloads your app, their device receives the correct APK based
+  on the device's features and settings. This way, devices don't receive assets
+  for features that the devices don't have. For example, if a user has a
+  <code>hdpi</code> device, they don’t need <code>xxxhdpi</code> resources that
+  you might include for devices with higher density displays.
+</p>
+
+<p>
+  For more information, see <a href=
+  "{@docRoot}studio/build/configure-apk-splits.html">Configure APK Splits</a>
+  and <a class="external-link" href=
+  "{@docRoot}training/multiple-apks/index.html">Maintaining Multiple APKs</a>.
+</p>
diff --git a/docs/html/topic/performance/scheduling.jd b/docs/html/topic/performance/scheduling.jd
new file mode 100644
index 0000000..b6f0fdc
--- /dev/null
+++ b/docs/html/topic/performance/scheduling.jd
@@ -0,0 +1,285 @@
+page.title=Intelligent Job-Scheduling
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+   <li><a href="#js">Android Framework JobScheduler</a></li>
+   <li><a href="#am">AlarmManager</a></li>
+   <li><a href="#fjd">Firebase JobDispatcher</a></li>
+   <li><a href="#gcmnm">GCM Network Manager</a></li>
+   <li><a href="#af">Additional Facilities</a></li>
+   <ul>
+      <li><a href="#sa">SyncAdapter</a></li>
+      <li><a href="#services">Services</a></li>
+   </ul>
+   <li><a href="#ap">Additional Points</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>
+Modern apps can perform many of their tasks asynchronously, outside the
+direct flow of user interaction. Some examples of these asynchronous tasks are:
+</p>
+
+<ul>
+   <li>Updating network resources.</li>
+   <li>Downloading information.</li>
+   <li>Updating background tasks.</li>
+   <li>Scheduling system service calls.</li>
+</ul>
+
+<p>
+Scheduling this work intelligently can improve your app’s performance,
+along with aspects of system health such as battery life. {@link android.app.job.JobScheduler}
+does this scheduling work for you.
+<p>
+
+<p>
+There are several APIs that your app can use to schedule background work. Chief
+among these options is {@link android.app.job.JobScheduler}.
+The {@link android.app.job.JobScheduler} API allows you to specify robust
+conditions for executing tasks,
+along with centralized task scheduling across the device for optimal
+system health. {@link android.app.job.JobScheduler} also offers highly
+scalable functionality: it is suitable for small tasks like clearing a cache,
+and for large ones such as syncing a database to the cloud.
+<p>
+
+<p>
+In addition to {@link android.app.job.JobScheduler}, there are several other
+facilities available to help your app schedule work. These include:
+</p>
+
+<ul>
+   <li><a href="{@docRoot}reference/android/app/AlarmManager.html">AlarmManager
+   </a></li>
+   <li><a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+   Firebase JobDispatcher</a></li>
+   <li><a href="https://developers.google.com/cloud-messaging/network-manager">
+   GCM Network Manager</a></li>
+   <li><a href="{@docRoot}reference/android/content/AbstractThreadedSyncAdapter.html">
+   SyncAdapter</a></li>
+   <li><a href="{@docRoot}reference/android/content/AbstractThreadedSyncAdapter.html">
+   Additional Facilities</a></li>
+</ul>
+
+<p>
+This page provides brief introductions to {@link android.app.job.JobScheduler}
+and other APIs that can help your app schedule work to maximize app performance
+and system health.
+</p>
+
+<h2 id="js">Android Framework JobScheduler</h2>
+
+<p>
+{@link android.app.job.JobScheduler} is the Android framework’s native platform
+for scheduling tasks or work. It first became available in Android 5.0 (API
+level 21), and remains under active development. Notably, Android N (API
+level 24) added the ability to trigger jobs based on
+{@link android.content.ContentProvider} changes.
+</p>
+
+<p>
+{@link android.app.job.JobScheduler} is implemented in the platform, which
+allows it to collect information about jobs that need to run across all apps.
+This information is used to schedule jobs to run at, or around, the same time.
+Batching job execution in this fashion allows the device to enter and stay in
+sleep states longer, preserving battery life.
+</p>
+
+<p>
+You use {@link android.app.job.JobScheduler} by registering jobs, specifying
+their requirements for network and timing. The system then gracefully schedules
+the jobs to execute at the appropriate times. At the same time, it also defers
+job execution as necessary to comply with
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze and App Standby</a> restrictions.
+{@link android.app.job.JobScheduler} provides many methods to define
+job-execution conditions.
+</p>
+
+<p>
+If your app targets Android 5.0 (API level 21), we recommend that you use the
+{@link android.app.job.JobScheduler} to execute background tasks. For more
+information about {@link android.app.job.JobScheduler}, see its
+<a href="{@docRoot}reference/android/app/job/JobScheduler.html">API-reference
+documentation.</a>
+</p>
+
+<h2 id="am">AlarmManager</h2>
+
+<p>
+The {@link android.app.AlarmManager} API is another option that the framework
+provides for scheduling tasks. This API is useful in cases in which an app
+needs to post a notification or set off an alarm at a very specific time.
+</p>
+
+<p>
+You should only use this API for tasks that must execute at a specific time,
+but do not require the other, more robust, execution conditions that
+{@link android.app.job.JobScheduler} allows you to specify, such as device
+idle and charging detect.
+</p>
+
+<p>
+{@link android.app.AlarmManager} does not honor
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze and App Standby</a> restrictions; it runs tasks even during
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze or App Standby</a> mode. Additionally,
+an app running during
+<a href="{@docRoot}topic/performance/monitoring-device-state/doze-standby.html">
+Doze or App Standby</a> mode cannot use the network.
+</p>
+
+<h2 id="fjd">Firebase JobDispatcher</h2>
+
+<p>
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> is an open-source library that provides an API similar to
+{@link android.app.job.JobScheduler} in the Android platform.
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> serves as a
+{@link android.app.job.JobScheduler}-compatibility layer for apps targeting
+versions of Android lower than 5.0 (API level 21).
+</p>
+
+<p>
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> supports the use of Google Play services as an
+implementation for dispatching (running) jobs, but the library also allows you
+to define and use other implementations: For example, you might decide to use
+{@link android.app.job.JobScheduler} or write your own, custom code.
+Because of this versatility, we recommend that you use this
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> if your app targets a version of Android lower
+than 5.0 (API level 21).
+</p>
+
+<p>
+For more information about
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a>, refer to its
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+documentation and source code</a>.
+</p>
+
+<h2 id = "gcmnm">GCM Network Manager</h2>
+
+<p>
+<a href="https://developers.google.com/cloud-messaging/network-manager">GCM
+Network Manager</a> is a compatibility port of the Android
+{@link android.app.job.JobScheduler} for apps that support versions of Android
+prior to 5.0 (API level 21). This API has all of the same advantages as
+{@link android.app.job.JobScheduler}. However, it depends on Google Play
+services, which acts like {@link android.app.job.JobScheduler} by taking care
+of cross-app job scheduling to improve battery life. This client library is
+part of the Google Play services GCM client library, but does not require
+that an app use
+<a href="https://developers.google.com/cloud-messaging/">Google Cloud
+Messaging</a>.
+</p>
+
+<p>
+This library is an earlier version of
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a>. Forward development on GCM Network Manager has
+stopped; we recommend that you use
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a> going forward.
+</p>
+
+<h2 id="af">Additional Facilities</h2>
+
+<p>
+In addition to the APIs and libraries described above, there are also sync
+adapters and services that can enable your app, under specific conditions,
+to perform better and more robustly.
+</p>
+
+<h3 id="sa">SyncAdapter</h3>
+
+<p>
+The framework continues to provide the
+{@link android.content.AbstractThreadedSyncAdapter SyncAdapter} class for
+managing tasks that sync data between the device and a server. Sync adapters are
+designed specifically for syncing data between a device and the cloud; you
+should only use them for this type of task. Sync adapters are more complex to
+implement than the libraries and APIs mentioned above, because they require at
+least a fake
+<a href="{@docRoot}training/sync-adapters/creating-authenticator.html">
+authenticator</a>and
+<a href="{@docRoot}training/sync-adapters/creating-stub-provider.html">
+content provider</a> implementation. For these reasons, you typically should
+not create a sync adapter just to sync data to the cloud in the
+background. Wherever possible, you should instead use
+{@link android.app.job.JobScheduler},
+<a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+Firebase JobDispatcher</a>, or
+<a href="https://developers.google.com/cloud-messaging/network-manager">GCM
+Network Manager</a> .
+</p>
+
+<p>
+In Android N (API level 24), the {@code SyncManager} sits on top of
+the {@link android.app.job.JobScheduler}. You should only use the
+{@link android.content.AbstractThreadedSyncAdapter SyncAdapter}
+class if you require the additional functionality that it provides.
+</p>
+
+<h3 id="services">Services</h3>
+
+<p>
+The <a href="{@docRoot}guide/components/services.html">Services</a>
+framework allows you to perform long-running operations in the background.
+We recommend foreground services for tasks, such as playing
+music, which need to stay resident for the user. Bound services also continue
+to be useful for various use cases: for example, when a service needs to
+run only when a user is viewing a fragment or activity.
+</p>
+
+<p>
+You should avoid using started services that run perpetually or
+perform periodic work, since they continue to use device resources
+even when they are not performing useful tasks. Instead, you
+should use other solutions that this page describes,
+and that provide native lifecycle management. Use started services
+only as a last resort. The Android platform may not support
+started services in the future.
+</p>
+
+<h2 id="ap">Additional Points</h2>
+
+<p>
+Regardless of the solution you adopt, keep the following points in mind:
+</p>
+
+<ul>
+   <li>Captive Internet Portals, VPNs, and proxies can pose
+   Internet-connectivity detection problems. A library or API may think the
+   Internet is available, but your service may not be accessible. Fail
+   gracefully and reschedule as few of your tasks as possible.</li>
+   <li>Depending on the conditions you assign for running a task, 
+   such as network availability, after the task is triggered, a
+   change may occur so that those conditions are no longer met.
+   In such a case, your operation may fail unexpectedly and repeatedly.
+   For this reason, you
+   should code your background task logic to notice when tasks are failing
+   persistently, and perform exponential back-off to avoid
+   inadvertently over-using resources.</li>
+
+
+
+   <li>Remember to use exponential backoff when rescheduling any work,
+   especially when using {@link android.app.AlarmManager}. If your app uses
+   {@link android.app.job.JobScheduler},
+   <a href="https://developers.google.com/cloud-messaging/network-manager">GCM
+   Network Manager</a>,
+   <a href="https://github.com/firebase/firebase-jobdispatcher-android#user-content-firebase-jobdispatcher-">
+   Firebase JobDispatcher</a>, or sync adapters, exponential backoff is automatically used.</li>
+</ul>
diff --git a/docs/html/topic/performance/threads.jd b/docs/html/topic/performance/threads.jd
new file mode 100644
index 0000000..b2a2d9f
--- /dev/null
+++ b/docs/html/topic/performance/threads.jd
@@ -0,0 +1,453 @@
+page.title=Threading Performance
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#main">Main Thread</a>
+  <ol>
+    <li><a href="#internals">Internals</a></li>
+  </ol>
+</li>
+<li><a href="#references">Threading and UI Object References</a>
+  <ol>
+    <li><a href="#explicit">Explicit references</a></li>
+    <li><a href="#implicit">Implicit references</a></li>
+  </ol>
+</li>
+<li><a href="#lifecycles">Threading and App and Activity Lifecycles</a>
+   <ol>
+      <li><a href="#persisting">Persisting threads</a></li>
+      <li><a href="#priority">Thread priority</a></li>
+   </ol>
+      </li>
+<li><a href="#helper">Helper Classes for Threading</a>
+   <ol>
+      <li><a href="#asynctask">The AsyncTask class</a></li>
+      <li><a href="#handlerthread">The HandlerThread class</a></li>
+      <li><a href="#threadpool">The ThreadPoolExecutor class</a></li>
+   </ol>
+      </li>
+</ol>
+</div>
+</div>
+
+<p>
+Making adept use of threads on Android can help you boost your app’s
+performance. This page discusses several aspects of working with threads:
+working with the UI, or main, thread; the relationship between app lifecycle and
+thread priority; and, methods that the platform provides to help manage thread
+complexity. In each of these areas, this page describes potential pitfalls and
+strategies for avoiding them.
+</p>
+<h2 id="main">Main Thread</h2>
+<p>
+When the user launches your app, Android creates a new <a
+href="{@docRoot}guide/components/fundamentals.html">Linux
+process</a> along with an execution thread. This <strong>main thread,</strong>
+also known as the UI thread, is responsible for everything that happens
+onscreen. Understanding how it works can help you design your app to use the
+main thread for the best possible performance.
+</p>
+<h3 id="internals">Internals</h3>
+<p>
+The main thread has a very simple design: Its only job is to take and execute
+blocks of work from a thread-safe work queue until its app is terminated. The
+framework generates some of these blocks of work from a variety of places. These
+places include callbacks associated with lifecycle information, user events such
+as input, or events coming from other apps and processes. In addition, app can
+explicitly enqueue blocks on their own, without using the framework.
+</p>
+<p>
+Nearly <a
+href="https://www.youtube.com/watch?v=qk5F6Bxqhr4&index=1&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE">any
+block of code your app executes</a> is tied to an event callback, such as input,
+layout inflation, or draw. When something triggers an event, the thread where the event
+happened pushes the event out of itself, and into the main thread’s message
+queue. The main thread can then service the event.
+</p>
+
+<p>
+While an animation or screen update is occurring, the system tries to execute a
+block of work (which is responsible for drawing the screen) every 16ms or so, in
+order to render smoothly at <a
+href="https://www.youtube.com/watch?v=CaMTIgxCSqU&index=62&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE">60
+frames per second</a>. For the system to reach this goal, some operations must
+happen on the main thread. However, when the main thread’s messaging queue
+contains tasks that are either too numerous or too long for the main thread to
+complete work within the 16ms window, the app should move this work to a worker
+thread. If the main thread cannot finish executing blocks of work within 16ms,
+the user may observe hitching, lagging, or a lack of UI responsiveness to input.
+If the main thread blocks for approximately five seconds, the system displays
+the <a
+href="{@docRoot}training/articles/perf-anr.html"><em>Application
+Not Responding</em></a> (ANR) dialog, allowing the user to close the app directly.
+</p>
+<p>
+Moving numerous or long tasks from the main thread, so that they don’t interfere
+with smooth rendering and fast responsiveness to user input, is the biggest
+reason for you to adopt threading in your app.
+</p>
+<h2 id="references">Threading and UI Object References</h2>
+<p>
+By design, <a
+href="https://www.youtube.com/watch?v=tBHPmQQNiS8&index=3&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE">Android
+UI objects are not thread-safe</a>. An app is expected to create, use, and
+destroy UI objects, all on the main thread. If you try to modify
+or even reference a UI object in a thread other than the main thread, the result
+can be exceptions, silent failures, crashes, and other undefined misbehavior.
+</p>
+<p>
+Issues with references fall into two distinct categories: explicit references
+and implicit references.
+</p>
+<h3 id="explicit">Explicit references</h3>
+<p>
+Many tasks on non-main threads have the end goal of updating UI objects.
+However, if one of these threads accesses an object in the view hierarchy,
+application instability can result: If a worker thread changes the properties of
+that object at the same time that any other thread is referencing the object,
+the results are undefined.
+</p>
+<p>
+For example, consider an app that holds a direct reference to a UI object on a
+worker thread. The object on the worker thread may contain a reference to a
+{@link android.view.View}; but before the work completes, the {@link android.view.View} is
+removed from the view hierarchy. When these two actions happen simultaneously,
+the reference keeps the {@link android.view.View} object in memory and sets properties on it.
+However, the user never sees
+this object, and the app deletes the object once the reference to it is gone.
+</p>
+
+<p>
+In another example, {@link android.view.View} objects contain references to the activity
+that owns them. If
+that activity is destroyed, but there remains a threaded block of work that
+references it&mdash;directly or indirectly&mdash;the garbage collector will not collect
+the activity until that block of work finishes executing.
+</p>
+<p>
+This scenario can cause a problem in situations where threaded work may be in
+flight while some activity lifecycle event, such as a screen rotation, occurs.
+The system wouldn’t be able to perform garbage collection until the in-flight
+work completes. As a result, there may be two {@link android.app.Activity} objects in
+memory until garbage collection can take place.
+</p>
+
+<p>
+With scenarios like these, we suggest that your app not include explicit
+references to UI objects in threaded work tasks. Avoiding such references helps you avoid
+these types of memory leaks, while also steering clear of threading contention.
+</p>
+<p>
+In all cases, your app should only update UI objects on the main thread. This
+means that you should craft a negotiation policy that allows multiple threads to
+communicate work back to the main thread, which tasks the topmost activity or
+fragment with the work of updating the actual UI object.
+</p>
+<h3 id="implicit">Implicit references</h3>
+<p>
+A common code-design flaw with threaded objects can be seen in the snippet of
+code below:
+</p>
+<pre class="prettyprint">
+public class MainActivity extends Activity {
+  // …...
+  public class MyAsyncTask extends AsyncTask<Void, Void, String>   {
+    &#64;Override protected String doInBackground(Void... params) {...}
+    &#64;Override protected void onPostExecute(String result) {...}
+  }
+}
+</pre>
+<p>
+The flaw in this snippet is that the code declares the threading object
+{@code MyAsyncTask} as an inner class of some activity. This declaration creates an
+implicit reference to the enclosing {@link android.app.Activity} object.
+As a result, the object contains a reference to the activity until the
+threaded work completes, causing a delay in the destruction of the referenced activity.
+This delay, in turn, puts more pressure on memory.
+</p>
+<p>
+A direct solution to this problem would be to define your overloaded class
+instances in their own files, thus removing the implicit reference.
+</p>
+<p>
+Another solution is to declare the {@link android.os.AsyncTask} object
+as a static nested class.  Doing so eliminates the implicit reference problem
+because of the way a static nested
+class differs from an inner class: An instance of an inner class requires an
+instance of the outer class to be instantiated, and has direct access to the
+methods and fields of its enclosing instance. By contrast, a static nested class
+does not require a reference to an instance of enclosing class, so it contains
+no references to the outer class members.
+</p>
+<pre class="prettyprint">
+public class MainActivity extends Activity {
+  // …...
+  Static public class MyAsyncTask extends AsyncTask<Void, Void, String>   {
+    &#64;Override protected String doInBackground(Void... params) {...}
+    &#64;Override protected void onPostExecute(String result) {...}
+  }
+}
+</pre>
+<h2 id="lifecycles">Threading and App and Activity Lifecycles</h2>
+<p>
+The app lifecycle can affect how threading works in your application.
+You may need to decide that a thread should, or should not, persist after an
+activity is destroyed. You should also be aware of the relationship between
+thread prioritization and whether an activity is running in the foreground or
+background.
+</p>
+<h3 id="persisting">Persisting threads</h3>
+<p>
+Threads persist past the lifetime of the activities that spawn them. Threads
+continue to execute, uninterrupted, regardless of the creation or destruction of
+activities. In some cases, this persistence is undesirable.
+</p>
+<p>
+Consider a case in which an activity spawns a set of threaded work blocks, and
+is then destroyed before a worker thread can execute the blocks. What should the
+app do with the blocks that are in flight?
+</p>
+
+<p>
+If the blocks were going to update a UI that no longer exists, there’s no reason
+for the work to continue. For example, if the work is to load user information
+from a database, and then update views, the thread is no longer necessary.
+</p>
+
+<p>
+By contrast, the work packets may have some benefit not entirely related to the
+UI. In this case, you should persist the thread. For example, the packets may be
+waiting to download an image, cache it to disk, and update the associated
+{@link android.view.View} object. Although the object no longer exists, the acts of downloading and
+caching the image may still be helpful, in case the user returns to the
+destroyed activity.
+</p>
+
+<p>
+Managing lifecycle responses manually for all threading objects can become
+extremely complex. If you don’t manage them correctly, your app can suffer from
+memory contention and performance issues. <a
+href="{@docRoot}guide/components/loaders.html">Loaders</a>
+are one solution to this problem. A loader facilitates asynchronous loading of
+data, while also persisting information through configuration changes.
+</p>
+<h3 id="priority">Thread priority</h3>
+<p>
+As described in <a
+href="{@docRoot}guide/topics/processes/process-lifecycle.html">Processes
+and the Application Lifecycle</a>, the priority that your app’s threads receive
+depends partly on where the app is in the app lifecycle. As you create and
+manage threads in your application, it’s important to set their priority so that
+the right threads get the right priorities at the right times. If set too high,
+your thread may interrupt the UI thread and RenderThread, causing your app to
+drop frames. If set too low, you can make your async tasks (such as image
+loading) slower than they need to be.
+</p>
+<p>
+Every time you create a thread, you should call
+{@link android.os.Process#setThreadPriority(int, int) setThreadPriority()}.
+The system’s thread
+scheduler gives preference to threads with high priorities, balancing those
+priorities with the need to eventually get all the work done. Generally, threads
+in the <a
+href="https://www.youtube.com/watch?v=NwFXVsM15Co&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&index=9">foreground
+group get about 95%</a> of the total execution time from the device, while the
+background group gets roughly 5%.
+</p>
+<p>
+The system also assigns each thread its own priority value, using the
+{@link android.os.Process} class.
+</p>
+<p>
+By default, the system sets a thread’s priority to the same priority and group
+memberships as the spawning thread. However, your application can explicitly
+adjust thread priority by using
+{@link android.os.Process#setThreadPriority(int, int) setThreadPriority()}.
+</p>
+<p>
+The {@link android.os.Process}
+class</a> helps reduce complexity in assigning priority values by providing a
+set of constants that your app can use to set thread priorities. For example, <a
+href="{@docRoot}reference/android/os/Process.html#THREAD_PRIORITY_DEFAULT">THREAD_PRIORITY_DEFAULT</a>
+represents the default value for a thread. Your app should set the thread's priority to <a
+href="{@docRoot}reference/android/os/Process.html#THREAD_PRIORITY_BACKGROUND">THREAD_PRIORITY_BACKGROUND</a>
+for threads that are executing less-urgent work.
+</p>
+<p>
+Your app can use the <a
+href="{@docRoot}reference/android/os/Process.html#THREAD_PRIORITY_LESS_FAVORABLE">THREAD_PRIORITY_LESS_FAVORABLE</a>
+and <a
+href="{@docRoot}reference/android/os/Process.html#THREAD_PRIORITY_MORE_FAVORABLE">THREAD_PRIORITY_MORE_FAVORABLE</a>
+constants as incrementers to set relative priorities. A list of all of these
+enumerated states and modifiers appears in the reference documentation for
+the {@link android.os.Process#THREAD_PRIORITY_AUDIO} class.
+
+For more information on
+managing threads, see the reference documentation about the
+{@link java.lang.Thread} and {@link android.os.Process} classes.
+</p>
+<p>
+https://developer.android.com/reference/android/os/Process.html#THREAD_PRIORITY_AUDIO
+</p>
+<h2 id="helper">Helper Classes for Threading</h2>
+<p>
+The framework provides the same Java classes & primitives to facilitate
+threading, such as the {@link java.lang.Thread} and
+{@link java.lang.Runnable} classes.
+In order to help reduce the cognitive load associated with
+of developing threaded applications for
+Android, the framework provides a set of helpers which can aide in development.
+Each helper class has a specific set of performance nuances that make them
+unique for a specific subset of threading problems. Using the wrong class for
+the wrong situation can lead to performance issues.
+</p>
+<h3 id="asynctask">The AsyncTask class</h3>
+<p>
+
+The {@link android.os.AsyncTask} class
+is a simple, useful primitive for apps that need to quickly move work from the
+main thread onto worker threads. For example, an input event might trigger the
+need to update the UI with a loaded bitmap. An {@link android.os.AsyncTask}
+object can offload the
+bitmap loading and decoding to an alternate thread; once that processing is
+complete, the {@link android.os.AsyncTask} object can manage receiving the work
+back on the main thread to update the UI.
+</p>
+<p>
+When using {@link android.os.AsyncTask}, there are a few important performance
+aspects to keep in
+mind. First, by default, an app pushes all of the {@link android.os.AsyncTask}
+objects it creates into a
+single thread. Therefore, they execute in serial fashion, and&mdash;as with the
+main
+thread&mdash;an especially long work packet can block the queue. For this reason,
+we suggest that you only use {@link android.os.AsyncTask} to handle work items
+shorter than 5ms in duration.
+</p>
+<p>
+{@link android.os.AsyncTask} objects are also the most common offenders
+for implicit-reference issues.
+{@link android.os.AsyncTask} objects present risks related to explicit
+references, as well, but these are
+sometimes easier to work around. For example, an {@link android.os.AsyncTask}
+may require a reference to a UI object in order to update the UI object
+properly once {@link android.os.AsyncTask} executes its callbacks on the
+main thread. In such a situation, you
+can use a {@link java.lang.ref.WeakReference}
+to store a reference to the required UI object, and access the object once the
+{@link android.os.AsyncTask} is operating on the main thread. To be clear,
+holding a {@link java.lang.ref.WeakReference}
+to an object does not make the object thread-safe; the
+{@link java.lang.ref.WeakReference} merely
+provides a method to handle issues with explicit references and garbage
+collection.
+</p>
+<h3 id="handlerthread">The HandlerThread class</h3>
+<p>
+While an {@link android.os.AsyncTask}
+is useful,<a
+href="https://www.youtube.com/watch?v=adPLIAnx9og&index=5&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE">
+it may not always be the right solution</a> to your threading problem. Instead,
+you may need a more traditional approach to executing a block of work on a
+longer running thread, and some ability to manage that workflow manually.
+</p>
+
+<p>
+Consider a common challenge with getting preview frames from your
+{@link android.hardware.Camera} object.
+ When you register for Camera preview frames, you receive them in the
+ {@link android.hardware.Camera.PreviewCallback#onPreviewFrame(byte[], android.hardware.Camera) onPreviewFrame()}
+callback, which is invoked on the event thread it was called from. If this
+callback were invoked on the UI thread, the task of dealing with the huge pixel
+arrays would be interfering with rendering and event processing work. The same
+problem applies to {@link android.os.AsyncTask}, which also executes jobs serially and is
+susceptible to blocking.
+</p>
+<p>
+This is a situation where a handler thread would be appropriate: A handler thread
+is effectively a long-running thread that grabs work from a queue, and operates
+on it. In this example, when your app delegates the
+{@link android.hardware.Camera#open Camera.open()} command to a
+block of work on the handler thread, the associated
+ {@link android.hardware.Camera.PreviewCallback#onPreviewFrame(byte[], android.hardware.Camera) onPreviewFrame()}
+callback
+lands on the handler thread, rather than the UI or {@link android.os.AsyncTask}
+threads. So, if you’re going to be doing long-running work on the pixels, this
+may be a better solution for you.
+</p>
+<p>
+When your app creates a thread using {@link android.os.HandlerThread}, don’t
+forget to set the thread’s
+<a href="https://www.youtube.com/watch?v=NwFXVsM15Co&index=9&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE">
+priority based on the type of work it’s doing</a>. Remember, CPUs can only
+handle a small number of threads in parallel. Setting the priority helps
+the system know the right ways to schedule this work when all other threads
+are fighting for attention.
+</p>
+<h3 id="threadpool">The ThreadPoolExecutor class</h3>
+<p>
+There are certain types of work that can be reduced to highly parallel,
+distributed tasks. One such task, for example, is calculating a filter for each
+8x8 block of an 8 megapixel image. With the sheer volume of work packets this
+creates, <a
+href="https://www.youtube.com/watch?v=uCmHoEY1iTM&index=6&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE">
+{@code AsyncTask} and {@code HandlerThread} aren’t appropriate
+classes</a>. The single-threaded nature of {@link android.os.AsyncTask} would
+turn all the threadpooled work into a linear system.
+Using the {@link android.os.HandlerThread} class, on the other hand, would
+require the programmer to manually manage load balancing between a group of
+threads.
+</p>
+
+<p>
+{@link java.util.concurrent.ThreadPoolExecutor} is a helper class to make
+this process easier. This class manages the creation of a group of threads, sets
+their priorities, and manages how work is distributed among those threads.
+As workload increases or decreases, the class spins up or destroys more threads
+to adjust to the workload.
+</p>
+<p>
+This class also helps your app spawn an optimum number of threads. When it
+constructs a {@link java.util.concurrent.ThreadPoolExecutor}
+object, the app sets a minimum and maximum
+number of threads. As the workload given to the
+{@link java.util.concurrent.ThreadPoolExecutor} increases,
+the class will take the initialized minimum and maximum thread counts into
+account, and consider the amount of pending work there is to do. Based on these
+factors, {@link java.util.concurrent.ThreadPoolExecutor} decides on how many
+threads should be alive at any given time.
+</p>
+<h4>How many threads should you create?</h4>
+<p>
+Although from a software level, your code has the ability to create hundreds of
+threads, doing so can create performance issues. CPUs really only have the
+ability to handle a small number of threads in parallel; everything above that
+runs<a
+href="https://www.youtube.com/watch?v=NwFXVsM15Co&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&index=9">
+into priority and scheduling issues</a>. As such, it’s important to only create
+as many threads as your workload needs.
+</p>
+<p>
+Practically speaking, there’s a number of variables responsible for this, but
+picking a value (like 4, for starters), and testing it with <a
+href=”{@docRoot}studio/profile/systrace-commandline.html”>Systrace</a> is as
+solid a strategy as any other. You can use trial-and-error to discover the
+minimum number of threads you can use without running into problems.
+</p>
+<p>
+Another consideration in deciding on how many threads to have is that threads
+aren’t free: they take up memory. Each thread costs a minimum of 64k of memory.
+This adds up quickly across the many apps installed on a device, especially in
+situations where the call stacks grow significantly.
+</p>
+<p>
+Many system processes and third-party libraries often spin up their own
+threadpools. If your app can reuse an existing threadpool, this reuse may help
+performance by reducing contention for memory and processing resources.
+</p>
+
+
diff --git a/docs/html/training/auto/index.jd b/docs/html/training/auto/index.jd
index 0a7ceb3..a0d0bb8 100644
--- a/docs/html/training/auto/index.jd
+++ b/docs/html/training/auto/index.jd
@@ -8,7 +8,9 @@
 
 @jd:body
 
-<iframe width="448" height="252" src="//www.youtube.com/embed/ctiaVxgclsg?autohide=1&amp;showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
+      <iframe width="338" height="169" src="//www.youtube.com/embed/LfVBFFoy9Y0?utm_source=dac&utm_medium=video&utm_content=andfuntrain&utm_campaign=udacint?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe>
+      <p><a href="https://www.udacity.com/course/ud853" class="button"
+        style="width:100%">Start the video course</a>
 
 <p>
   The Android platform enables you to extend your app to work with in-vehicle console systems
@@ -27,7 +29,7 @@
   For more information, follow the links below to learn how to extend your Android app to support
   use in vehicles.
 </p>
- 
+
 <h2 id="overview">Get Started</h2>
 
 <p>
diff --git a/graphics/java/android/graphics/Picture.java b/graphics/java/android/graphics/Picture.java
index 28d8690..08eeaff 100644
--- a/graphics/java/android/graphics/Picture.java
+++ b/graphics/java/android/graphics/Picture.java
@@ -21,11 +21,14 @@
 
 /**
  * A Picture records drawing calls (via the canvas returned by beginRecording)
- * and can then play them back into Canvas (via {@link Picture#draw(Canvas)} or 
+ * and can then play them back into Canvas (via {@link Picture#draw(Canvas)} or
  * {@link Canvas#drawPicture(Picture)}).For most content (e.g. text, lines, rectangles),
  * drawing a sequence from a picture can be faster than the equivalent API
  * calls, since the picture performs its playback without incurring any
  * method-call overhead.
+ *
+ * <p class="note"><strong>Note:</strong> Prior to API level 23 a picture cannot
+ * be replayed on a hardware accelerated canvas.</p>
  */
 public class Picture {
     private Canvas mRecordingCanvas;
@@ -135,10 +138,6 @@
      * have been persisted across device restarts are not guaranteed to decode
      * properly and are highly discouraged.
      *
-     * <p>
-     * <strong>Note:</strong> Prior to API level 23 a picture created from an
-     * input stream cannot be replayed on a hardware accelerated canvas.
-     *
      * @see #writeToStream(java.io.OutputStream)
      * @deprecated The recommended alternative is to not use writeToStream and
      * instead draw the picture into a Bitmap from which you can persist it as
@@ -155,10 +154,6 @@
      * The resulting stream is NOT to be persisted across device restarts as
      * there is no guarantee that the Picture can be successfully reconstructed.
      *
-     * <p>
-     * <strong>Note:</strong> Prior to API level 23 a picture created from an
-     * input stream cannot be replayed on a hardware accelerated canvas.
-     *
      * @see #createFromStream(java.io.InputStream)
      * @deprecated The recommended alternative is to draw the picture into a
      * Bitmap from which you can persist it as raw or compressed pixels.
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index 6762bea..0bdc76f 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -46,6 +46,7 @@
 import android.util.Log;
 import android.util.LongArray;
 import android.util.PathParser;
+import android.util.Property;
 import android.util.TimeUtils;
 import android.view.Choreographer;
 import android.view.DisplayListCanvas;
@@ -157,7 +158,7 @@
     private static final boolean DBG_ANIMATION_VECTOR_DRAWABLE = false;
 
     /** Local, mutable animator set. */
-    private VectorDrawableAnimator mAnimatorSet = new VectorDrawableAnimatorUI(this);
+    private VectorDrawableAnimator mAnimatorSet;
 
     /**
      * The resources against which this drawable was created. Used to attempt
@@ -182,6 +183,7 @@
 
     private AnimatedVectorDrawable(AnimatedVectorDrawableState state, Resources res) {
         mAnimatedVectorState = new AnimatedVectorDrawableState(state, mCallback, res);
+        mAnimatorSet = new VectorDrawableAnimatorRT(this);
         mRes = res;
     }
 
@@ -237,6 +239,17 @@
 
     @Override
     public void draw(Canvas canvas) {
+        if (!canvas.isHardwareAccelerated() && mAnimatorSet instanceof VectorDrawableAnimatorRT) {
+            // If we have SW canvas and the RT animation is waiting to start, We need to fallback
+            // to UI thread animation for AVD.
+            if (!mAnimatorSet.isRunning() &&
+                    ((VectorDrawableAnimatorRT) mAnimatorSet).mPendingAnimationActions.size() > 0) {
+                VectorDrawableAnimatorRT oldAnim = (VectorDrawableAnimatorRT) mAnimatorSet;
+                mAnimatorSet = new VectorDrawableAnimatorUI(this);
+                mAnimatorSet.init(mAnimatorSetFromXml);
+                oldAnim.transferPendingActions(mAnimatorSet);
+            }
+        }
         mAnimatorSet.onDraw(canvas);
         mAnimatedVectorState.mVectorDrawable.draw(canvas);
     }
@@ -390,9 +403,12 @@
                             R.styleable.AnimatedVectorDrawableTarget_animation, 0);
                     if (animResId != 0) {
                         if (theme != null) {
-                            final Animator objectAnimator = AnimatorInflater.loadAnimator(
+                            // The animator here could be ObjectAnimator or AnimatorSet.
+                            final Animator animator = AnimatorInflater.loadAnimator(
                                     res, theme, animResId, pathErrorScale);
-                            state.addTargetAnimator(target, objectAnimator);
+                            updateAnimatorProperty(animator, target, state.mVectorDrawable,
+                                    state.mShouldIgnoreInvalidAnim);
+                            state.addTargetAnimator(target, animator);
                         } else {
                             // The animation may be theme-dependent. As a
                             // workaround until Animator has full support for
@@ -414,6 +430,55 @@
         mRes = state.mPendingAnims == null ? null : res;
     }
 
+    private static void updateAnimatorProperty(Animator animator, String targetName,
+            VectorDrawable vectorDrawable, boolean ignoreInvalidAnim) {
+        if (animator instanceof ObjectAnimator) {
+            // Change the property of the Animator from using reflection based on the property
+            // name to a Property object that wraps the setter and getter for modifying that
+            // specific property for a given object. By replacing the reflection with a direct call,
+            // we can largely reduce the time it takes for a animator to modify a VD property.
+            PropertyValuesHolder[] holders = ((ObjectAnimator) animator).getValues();
+            for (int i = 0; i < holders.length; i++) {
+                PropertyValuesHolder pvh = holders[i];
+                String propertyName = pvh.getPropertyName();
+                Object targetNameObj = vectorDrawable.getTargetByName(targetName);
+                Property property = null;
+                if (targetNameObj instanceof VectorDrawable.VObject) {
+                    property = ((VectorDrawable.VObject) targetNameObj).getProperty(propertyName);
+                } else if (targetNameObj instanceof VectorDrawable.VectorDrawableState) {
+                    property = ((VectorDrawable.VectorDrawableState) targetNameObj)
+                            .getProperty(propertyName);
+                }
+                if (property != null) {
+                    if (containsSameValueType(pvh, property)) {
+                        pvh.setProperty(property);
+                    } else if (!ignoreInvalidAnim) {
+                        throw new RuntimeException("Wrong valueType for Property: " + propertyName
+                                + ".  Expected type: " + property.getType().toString() + ". Actual "
+                                + "type defined in resources: " + pvh.getValueType().toString());
+
+                    }
+                }
+            }
+        } else if (animator instanceof AnimatorSet) {
+            for (Animator anim : ((AnimatorSet) animator).getChildAnimations()) {
+                updateAnimatorProperty(anim, targetName, vectorDrawable, ignoreInvalidAnim);
+            }
+        }
+    }
+
+    private static boolean containsSameValueType(PropertyValuesHolder holder, Property property) {
+        Class type1 = holder.getValueType();
+        Class type2 = property.getType();
+        if (type1 == float.class || type1 == Float.class) {
+            return type2 == float.class || type2 == Float.class;
+        } else if (type1 == int.class || type1 == Integer.class) {
+            return type2 == int.class || type2 == Integer.class;
+        } else {
+            return type1 == type2;
+        }
+    }
+
     /**
      * Force to animate on UI thread.
      * @hide
@@ -462,6 +527,8 @@
         @Config int mChangingConfigurations;
         VectorDrawable mVectorDrawable;
 
+        private final boolean mShouldIgnoreInvalidAnim;
+
         /** Animators that require a theme before inflation. */
         ArrayList<PendingAnimator> mPendingAnims;
 
@@ -473,6 +540,7 @@
 
         public AnimatedVectorDrawableState(AnimatedVectorDrawableState copy,
                 Callback owner, Resources res) {
+            mShouldIgnoreInvalidAnim = shouldIgnoreInvalidAnimation();
             if (copy != null) {
                 mChangingConfigurations = copy.mChangingConfigurations;
 
@@ -616,8 +684,10 @@
 
                 for (int i = 0, count = pendingAnims.size(); i < count; i++) {
                     final PendingAnimator pendingAnimator = pendingAnims.get(i);
-                    final Animator objectAnimator = pendingAnimator.newInstance(res, t);
-                    addTargetAnimator(pendingAnimator.target, objectAnimator);
+                    final Animator animator = pendingAnimator.newInstance(res, t);
+                    updateAnimatorProperty(animator, pendingAnimator.target, mVectorDrawable,
+                            mShouldIgnoreInvalidAnim);
+                    addTargetAnimator(pendingAnimator.target, animator);
                 }
             }
         }
@@ -982,6 +1052,9 @@
         private static final int REVERSE_ANIMATION = 2;
         private static final int RESET_ANIMATION = 3;
         private static final int END_ANIMATION = 4;
+
+        // If the duration of an animation is more than 300 frames, we cap the sample size to 300.
+        private static final int MAX_SAMPLE_POINTS = 300;
         private AnimatorListener mListener = null;
         private final LongArray mStartDelays = new LongArray();
         private PropertyValuesHolder.PropertyValues mTmpValues =
@@ -992,14 +1065,12 @@
         private boolean mInitialized = false;
         private boolean mIsReversible = false;
         private boolean mIsInfinite = false;
-        // This needs to be set before parsing starts.
-        private boolean mShouldIgnoreInvalidAnim;
         // TODO: Consider using NativeAllocationRegistery to track native allocation
         private final VirtualRefBasePtr mSetRefBasePtr;
         private WeakReference<RenderNode> mLastSeenTarget = null;
         private int mLastListenerId = 0;
         private final IntArray mPendingAnimationActions = new IntArray();
-        private final Drawable mDrawable;
+        private final AnimatedVectorDrawable mDrawable;
 
         VectorDrawableAnimatorRT(AnimatedVectorDrawable drawable) {
             mDrawable = drawable;
@@ -1016,8 +1087,10 @@
                 throw new UnsupportedOperationException("VectorDrawableAnimator cannot be " +
                         "re-initialized");
             }
-            mShouldIgnoreInvalidAnim = shouldIgnoreInvalidAnimation();
             parseAnimatorSet(set, 0);
+            long vectorDrawableTreePtr = mDrawable.mAnimatedVectorState.mVectorDrawable
+                    .getNativeTree();
+            nSetVectorDrawableTarget(mSetPtr, vectorDrawableTreePtr);
             mInitialized = true;
             mIsInfinite = set.getTotalDuration() == Animator.DURATION_INFINITE;
 
@@ -1077,7 +1150,7 @@
                     }  else if (target instanceof VectorDrawable.VFullPath) {
                         createRTAnimatorForFullPath(animator, (VectorDrawable.VFullPath) target,
                                 startTime);
-                    } else if (!mShouldIgnoreInvalidAnim) {
+                    } else if (!mDrawable.mAnimatedVectorState.mShouldIgnoreInvalidAnim) {
                         throw new IllegalArgumentException("ClipPath only supports PathData " +
                                 "property");
                     }
@@ -1086,7 +1159,7 @@
             } else if (target instanceof VectorDrawable.VectorDrawableState) {
                 createRTAnimatorForRootGroup(values, animator,
                         (VectorDrawable.VectorDrawableState) target, startTime);
-            } else if (!mShouldIgnoreInvalidAnim) {
+            } else if (!mDrawable.mAnimatedVectorState.mShouldIgnoreInvalidAnim) {
                 // Should never get here
                 throw new UnsupportedOperationException("Target should be either VGroup, VPath, " +
                         "or ConstantState, " + target == null ? "Null target" : target.getClass() +
@@ -1121,8 +1194,8 @@
                 long propertyPtr = nCreateGroupPropertyHolder(nativePtr, propertyId,
                         (Float) mTmpValues.startValue, (Float) mTmpValues.endValue);
                 if (mTmpValues.dataSource != null) {
-                    float[] dataPoints = createDataPoints(mTmpValues.dataSource, animator
-                            .getDuration());
+                    float[] dataPoints = createFloatDataPoints(mTmpValues.dataSource,
+                            animator.getDuration());
                     nSetPropertyHolderData(propertyPtr, dataPoints, dataPoints.length);
                 }
                 createNativeChildAnimator(propertyPtr, startTime, animator);
@@ -1149,7 +1222,7 @@
             long nativePtr = target.getNativePtr();
             if (mTmpValues.type == Float.class || mTmpValues.type == float.class) {
                 if (propertyId < 0) {
-                    if (mShouldIgnoreInvalidAnim) {
+                    if (mDrawable.mAnimatedVectorState.mShouldIgnoreInvalidAnim) {
                         return;
                     } else {
                         throw new IllegalArgumentException("Property: " + mTmpValues.propertyName
@@ -1158,12 +1231,24 @@
                 }
                 propertyPtr = nCreatePathPropertyHolder(nativePtr, propertyId,
                         (Float) mTmpValues.startValue, (Float) mTmpValues.endValue);
+                if (mTmpValues.dataSource != null) {
+                    // Pass keyframe data to native, if any.
+                    float[] dataPoints = createFloatDataPoints(mTmpValues.dataSource,
+                            animator.getDuration());
+                    nSetPropertyHolderData(propertyPtr, dataPoints, dataPoints.length);
+                }
 
             } else if (mTmpValues.type == Integer.class || mTmpValues.type == int.class) {
                 propertyPtr = nCreatePathColorPropertyHolder(nativePtr, propertyId,
                         (Integer) mTmpValues.startValue, (Integer) mTmpValues.endValue);
+                if (mTmpValues.dataSource != null) {
+                    // Pass keyframe data to native, if any.
+                    int[] dataPoints = createIntDataPoints(mTmpValues.dataSource,
+                            animator.getDuration());
+                    nSetPropertyHolderData(propertyPtr, dataPoints, dataPoints.length);
+                }
             } else {
-                if (mShouldIgnoreInvalidAnim) {
+                if (mDrawable.mAnimatedVectorState.mShouldIgnoreInvalidAnim) {
                     return;
                 } else {
                     throw new UnsupportedOperationException("Unsupported type: " +
@@ -1171,45 +1256,63 @@
                             "supported for Paths.");
                 }
             }
-            if (mTmpValues.dataSource != null) {
-                float[] dataPoints = createDataPoints(mTmpValues.dataSource, animator
-                        .getDuration());
-                nSetPropertyHolderData(propertyPtr, dataPoints, dataPoints.length);
-            }
             createNativeChildAnimator(propertyPtr, startTime, animator);
         }
 
         private void createRTAnimatorForRootGroup(PropertyValuesHolder[] values,
                 ObjectAnimator animator, VectorDrawable.VectorDrawableState target,
                 long startTime) {
-                long nativePtr = target.getNativeRenderer();
-                if (!animator.getPropertyName().equals("alpha")) {
-                    if (mShouldIgnoreInvalidAnim) {
-                        return;
-                    } else {
-                        throw new UnsupportedOperationException("Only alpha is supported for root "
-                                + "group");
-                    }
+            long nativePtr = target.getNativeRenderer();
+            if (!animator.getPropertyName().equals("alpha")) {
+                if (mDrawable.mAnimatedVectorState.mShouldIgnoreInvalidAnim) {
+                    return;
+                } else {
+                    throw new UnsupportedOperationException("Only alpha is supported for root "
+                            + "group");
                 }
-                Float startValue = null;
-                Float endValue = null;
-                for (int i = 0; i < values.length; i++) {
-                    values[i].getPropertyValues(mTmpValues);
-                    if (mTmpValues.propertyName.equals("alpha")) {
-                        startValue = (Float) mTmpValues.startValue;
-                        endValue = (Float) mTmpValues.endValue;
-                        break;
-                    }
+            }
+            Float startValue = null;
+            Float endValue = null;
+            for (int i = 0; i < values.length; i++) {
+                values[i].getPropertyValues(mTmpValues);
+                if (mTmpValues.propertyName.equals("alpha")) {
+                    startValue = (Float) mTmpValues.startValue;
+                    endValue = (Float) mTmpValues.endValue;
+                    break;
                 }
-                if (startValue == null && endValue == null) {
-                    if (mShouldIgnoreInvalidAnim) {
-                        return;
-                    } else {
-                        throw new UnsupportedOperationException("No alpha values are specified");
-                    }
+            }
+            if (startValue == null && endValue == null) {
+                if (mDrawable.mAnimatedVectorState.mShouldIgnoreInvalidAnim) {
+                    return;
+                } else {
+                    throw new UnsupportedOperationException("No alpha values are specified");
                 }
-                long propertyPtr = nCreateRootAlphaPropertyHolder(nativePtr, startValue, endValue);
-                createNativeChildAnimator(propertyPtr, startTime, animator);
+            }
+            long propertyPtr = nCreateRootAlphaPropertyHolder(nativePtr, startValue, endValue);
+            if (mTmpValues.dataSource != null) {
+                // Pass keyframe data to native, if any.
+                float[] dataPoints = createFloatDataPoints(mTmpValues.dataSource,
+                        animator.getDuration());
+                nSetPropertyHolderData(propertyPtr, dataPoints, dataPoints.length);
+            }
+            createNativeChildAnimator(propertyPtr, startTime, animator);
+        }
+
+        /**
+         * Calculate the amount of frames an animation will run based on duration.
+         */
+        private static int getFrameCount(long duration) {
+            long frameIntervalNanos = Choreographer.getInstance().getFrameIntervalNanos();
+            int animIntervalMs = (int) (frameIntervalNanos / TimeUtils.NANOS_PER_MS);
+            int numAnimFrames = (int) Math.ceil(((double) duration) / animIntervalMs);
+            // We need 2 frames of data minimum.
+            numAnimFrames = Math.max(2, numAnimFrames);
+            if (numAnimFrames > MAX_SAMPLE_POINTS) {
+                Log.w("AnimatedVectorDrawable", "Duration for the animation is too long :" +
+                        duration + ", the animation will subsample the keyframe or path data.");
+                numAnimFrames = MAX_SAMPLE_POINTS;
+            }
+            return numAnimFrames;
         }
 
         // These are the data points that define the value of the animating properties.
@@ -1217,11 +1320,9 @@
         // a point on the path corresponds to the values of translateX and translateY.
         // TODO: (Optimization) We should pass the path down in native and chop it into segments
         // in native.
-        private static float[] createDataPoints(
+        private static float[] createFloatDataPoints(
                 PropertyValuesHolder.PropertyValues.DataSource dataSource, long duration) {
-            long frameIntervalNanos = Choreographer.getInstance().getFrameIntervalNanos();
-            int animIntervalMs = (int) (frameIntervalNanos / TimeUtils.NANOS_PER_MS);
-            int numAnimFrames = (int) Math.ceil(((double) duration) / animIntervalMs);
+            int numAnimFrames = getFrameCount(duration);
             float values[] = new float[numAnimFrames];
             float lastFrame = numAnimFrames - 1;
             for (int i = 0; i < numAnimFrames; i++) {
@@ -1231,6 +1332,18 @@
             return values;
         }
 
+        private static int[] createIntDataPoints(
+                PropertyValuesHolder.PropertyValues.DataSource dataSource, long duration) {
+            int numAnimFrames = getFrameCount(duration);
+            int values[] = new int[numAnimFrames];
+            float lastFrame = numAnimFrames - 1;
+            for (int i = 0; i < numAnimFrames; i++) {
+                float fraction = i / lastFrame;
+                values[i] = (Integer) dataSource.getValueAtFraction(fraction);
+            }
+            return values;
+        }
+
         private void createNativeChildAnimator(long propertyPtr, long extraDelay,
                                                ObjectAnimator animator) {
             long duration = animator.getDuration();
@@ -1254,16 +1367,19 @@
          * to the last seen RenderNode target and start right away.
          */
         protected void recordLastSeenTarget(DisplayListCanvas canvas) {
-            mLastSeenTarget = new WeakReference<RenderNode>(
-                    RenderNodeAnimatorSetHelper.getTarget(canvas));
-            if (mPendingAnimationActions.size() > 0 && useLastSeenTarget()) {
-                if (DBG_ANIMATION_VECTOR_DRAWABLE) {
-                    Log.d(LOGTAG, "Target is set in the next frame");
+            final RenderNode node = RenderNodeAnimatorSetHelper.getTarget(canvas);
+            mLastSeenTarget = new WeakReference<RenderNode>(node);
+            // Add the animator to the list of animators on every draw
+            if (mInitialized || mPendingAnimationActions.size() > 0) {
+                if (useTarget(node)) {
+                    if (DBG_ANIMATION_VECTOR_DRAWABLE) {
+                        Log.d(LOGTAG, "Target is set in the next frame");
+                    }
+                    for (int i = 0; i < mPendingAnimationActions.size(); i++) {
+                        handlePendingAction(mPendingAnimationActions.get(i));
+                    }
+                    mPendingAnimationActions.clear();
                 }
-                for (int i = 0; i < mPendingAnimationActions.size(); i++) {
-                    handlePendingAction(mPendingAnimationActions.get(i));
-                }
-                mPendingAnimationActions.clear();
             }
         }
 
@@ -1285,10 +1401,15 @@
         private boolean useLastSeenTarget() {
             if (mLastSeenTarget != null) {
                 final RenderNode target = mLastSeenTarget.get();
-                if (target != null && target.isAttached()) {
-                    target.addAnimator(this);
-                    return true;
-                }
+                return useTarget(target);
+            }
+            return false;
+        }
+
+        private boolean useTarget(RenderNode target) {
+            if (target != null && target.isAttached()) {
+                target.registerVectorDrawableAnimator(this);
+                return true;
             }
             return false;
         }
@@ -1480,9 +1601,29 @@
         private static void callOnFinished(VectorDrawableAnimatorRT set, int id) {
             set.onAnimationEnd(id);
         }
+
+        private void transferPendingActions(VectorDrawableAnimator animatorSet) {
+            for (int i = 0; i < mPendingAnimationActions.size(); i++) {
+                int pendingAction = mPendingAnimationActions.get(i);
+                if (pendingAction == START_ANIMATION) {
+                    animatorSet.start();
+                } else if (pendingAction == END_ANIMATION) {
+                    animatorSet.end();
+                } else if (pendingAction == REVERSE_ANIMATION) {
+                    animatorSet.reverse();
+                } else if (pendingAction == RESET_ANIMATION) {
+                    animatorSet.reset();
+                } else {
+                    throw new UnsupportedOperationException("Animation action " +
+                            pendingAction + "is not supported");
+                }
+            }
+            mPendingAnimationActions.clear();
+        }
     }
 
     private static native long nCreateAnimatorSet();
+    private static native void nSetVectorDrawableTarget(long animatorPtr, long vectorDrawablePtr);
     private static native void nAddAnimator(long setPtr, long propertyValuesHolder,
              long nativeInterpolator, long startDelay, long duration, int repeatCount);
 
@@ -1498,6 +1639,7 @@
     private static native long nCreateRootAlphaPropertyHolder(long nativePtr, float startValue,
             float endValue);
     private static native void nSetPropertyHolderData(long nativePtr, float[] data, int length);
+    private static native void nSetPropertyHolderData(long nativePtr, int[] data, int length);
     private static native void nStart(long animatorSetPtr, VectorDrawableAnimatorRT set, int id);
     private static native void nReverse(long animatorSetPtr, VectorDrawableAnimatorRT set, int id);
     private static native void nEnd(long animatorSetPtr);
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index bcc354c..3dbd2a9 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -699,7 +699,7 @@
             float rad = mStrokePaint.getStrokeWidth();
             canvas.saveLayer(mRect.left - rad, mRect.top - rad,
                              mRect.right + rad, mRect.bottom + rad,
-                             mLayerPaint, Canvas.HAS_ALPHA_LAYER_SAVE_FLAG);
+                             mLayerPaint);
 
             // don't perform the filter in our individual paints
             // since the layer will do it for us
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 7b8dc52..4f6368c 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -34,9 +34,12 @@
 import android.util.ArrayMap;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
+import android.util.FloatProperty;
+import android.util.IntProperty;
 import android.util.LayoutDirection;
 import android.util.Log;
 import android.util.PathParser;
+import android.util.Property;
 import android.util.Xml;
 
 import com.android.internal.R;
@@ -240,9 +243,7 @@
      * constructors to set the state and initialize local properties.
      */
     private VectorDrawable(@NonNull VectorDrawableState state, @Nullable Resources res) {
-        // Constant state sharing is disabled until we fix onStateChanged()
-        // affecting the shared bitmap.
-        mVectorState = new VectorDrawableState(state);
+        mVectorState = state;
         updateLocalState(res);
     }
 
@@ -388,6 +389,11 @@
     protected boolean onStateChange(int[] stateSet) {
         boolean changed = false;
 
+        // When the VD is stateful, we need to mutate the drawable such that we don't share the
+        // cache bitmap with others. Such that the state change only affect this new cached bitmap.
+        if (isStateful()) {
+            mutate();
+        }
         final VectorDrawableState state = mVectorState;
         if (state.onStateChange(stateSet)) {
             changed = true;
@@ -760,6 +766,13 @@
         return mVectorState.mAutoMirrored;
     }
 
+    /**
+     * @hide
+     */
+    public long getNativeTree() {
+        return mVectorState.getNativeRenderer();
+    }
+
     static class VectorDrawableState extends ConstantState {
         // Variables below need to be copied (deep copy if applicable) for mutation.
         int[] mThemeAttrs;
@@ -792,6 +805,26 @@
         int mLastSWCachePixelCount = 0;
         int mLastHWCachePixelCount = 0;
 
+        final static Property<VectorDrawableState, Float> ALPHA =
+                new FloatProperty<VectorDrawableState>("alpha") {
+                    @Override
+                    public void setValue(VectorDrawableState state, float value) {
+                        state.setAlpha(value);
+                    }
+
+                    @Override
+                    public Float get(VectorDrawableState state) {
+                        return state.getAlpha();
+                    }
+                };
+
+        Property getProperty(String propertyName) {
+            if (ALPHA.getName().equals(propertyName)) {
+                return ALPHA;
+            }
+            return null;
+        }
+
         // This tracks the total native allocation for all the nodes.
         private int mAllocationOfAllNodes = 0;
 
@@ -969,7 +1002,7 @@
     }
 
     static class VGroup extends VObject {
-        private static final int ROTATE_INDEX = 0;
+        private static final int ROTATION_INDEX = 0;
         private static final int PIVOT_X_INDEX = 1;
         private static final int PIVOT_Y_INDEX = 2;
         private static final int SCALE_X_INDEX = 3;
@@ -980,7 +1013,7 @@
 
         private static final int NATIVE_ALLOCATION_SIZE = 100;
 
-        private static final HashMap<String, Integer> sPropertyMap =
+        private static final HashMap<String, Integer> sPropertyIndexMap =
                 new HashMap<String, Integer>() {
                     {
                         put("translateX", TRANSLATE_X_INDEX);
@@ -989,19 +1022,123 @@
                         put("scaleY", SCALE_Y_INDEX);
                         put("pivotX", PIVOT_X_INDEX);
                         put("pivotY", PIVOT_Y_INDEX);
-                        put("rotation", ROTATE_INDEX);
+                        put("rotation", ROTATION_INDEX);
                     }
                 };
 
         static int getPropertyIndex(String propertyName) {
-            if (sPropertyMap.containsKey(propertyName)) {
-                return sPropertyMap.get(propertyName);
+            if (sPropertyIndexMap.containsKey(propertyName)) {
+                return sPropertyIndexMap.get(propertyName);
             } else {
                 // property not found
                 return -1;
             }
         }
 
+        // Below are the Properties that wrap the setters to avoid reflection overhead in animations
+        private static final Property<VGroup, Float> TRANSLATE_X =
+                new FloatProperty<VGroup> ("translateX") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setTranslateX(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getTranslateX();
+                    }
+                };
+
+        private static final Property<VGroup, Float> TRANSLATE_Y =
+                new FloatProperty<VGroup> ("translateY") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setTranslateY(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getTranslateY();
+                    }
+        };
+
+        private static final Property<VGroup, Float> SCALE_X =
+                new FloatProperty<VGroup> ("scaleX") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setScaleX(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getScaleX();
+                    }
+                };
+
+        private static final Property<VGroup, Float> SCALE_Y =
+                new FloatProperty<VGroup> ("scaleY") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setScaleY(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getScaleY();
+                    }
+                };
+
+        private static final Property<VGroup, Float> PIVOT_X =
+                new FloatProperty<VGroup> ("pivotX") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setPivotX(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getPivotX();
+                    }
+                };
+
+        private static final Property<VGroup, Float> PIVOT_Y =
+                new FloatProperty<VGroup> ("pivotY") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setPivotY(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getPivotY();
+                    }
+                };
+
+        private static final Property<VGroup, Float> ROTATION =
+                new FloatProperty<VGroup> ("rotation") {
+                    @Override
+                    public void setValue(VGroup object, float value) {
+                        object.setRotation(value);
+                    }
+
+                    @Override
+                    public Float get(VGroup object) {
+                        return object.getRotation();
+                    }
+                };
+
+        private static final HashMap<String, Property> sPropertyMap =
+                new HashMap<String, Property>() {
+                    {
+                        put("translateX", TRANSLATE_X);
+                        put("translateY", TRANSLATE_Y);
+                        put("scaleX", SCALE_X);
+                        put("scaleY", SCALE_Y);
+                        put("pivotX", PIVOT_X);
+                        put("pivotY", PIVOT_Y);
+                        put("rotation", ROTATION);
+                    }
+                };
         // Temp array to store transform values obtained from native.
         private float[] mTransform;
         /////////////////////////////////////////////////////
@@ -1057,6 +1194,15 @@
             mNativePtr = nCreateGroup();
         }
 
+        Property getProperty(String propertyName) {
+            if (sPropertyMap.containsKey(propertyName)) {
+                return sPropertyMap.get(propertyName);
+            } else {
+                // property not found
+                return null;
+            }
+        }
+
         public String getGroupName() {
             return mGroupName;
         }
@@ -1104,7 +1250,7 @@
                 throw new RuntimeException("Error: inconsistent property count");
             }
             float rotate = a.getFloat(R.styleable.VectorDrawableGroup_rotation,
-                    mTransform[ROTATE_INDEX]);
+                    mTransform[ROTATION_INDEX]);
             float pivotX = a.getFloat(R.styleable.VectorDrawableGroup_pivotX,
                     mTransform[PIVOT_X_INDEX]);
             float pivotY = a.getFloat(R.styleable.VectorDrawableGroup_pivotY,
@@ -1290,6 +1436,27 @@
         String mPathName;
         @Config int mChangingConfigurations;
 
+        private static final Property<VPath, PathParser.PathData> PATH_DATA =
+                new Property<VPath, PathParser.PathData>(PathParser.PathData.class, "pathData") {
+                    @Override
+                    public void set(VPath object, PathParser.PathData data) {
+                        object.setPathData(data);
+                    }
+
+                    @Override
+                    public PathParser.PathData get(VPath object) {
+                        return object.getPathData();
+                    }
+                };
+
+        Property getProperty(String propertyName) {
+            if (PATH_DATA.getName().equals(propertyName)) {
+                return PATH_DATA;
+            }
+            // property not found
+            return null;
+        }
+
         public VPath() {
             // Empty constructor.
         }
@@ -1412,7 +1579,7 @@
 
         private static final int NATIVE_ALLOCATION_SIZE = 264;
         // Property map for animatable attributes.
-        private final static HashMap<String, Integer> sPropertyMap
+        private final static HashMap<String, Integer> sPropertyIndexMap
                 = new HashMap<String, Integer> () {
             {
                 put("strokeWidth", STROKE_WIDTH_INDEX);
@@ -1426,6 +1593,125 @@
             }
         };
 
+        // Below are the Properties that wrap the setters to avoid reflection overhead in animations
+        private static final Property<VFullPath, Float> STROKE_WIDTH =
+                new FloatProperty<VFullPath> ("strokeWidth") {
+                    @Override
+                    public void setValue(VFullPath object, float value) {
+                        object.setStrokeWidth(value);
+                    }
+
+                    @Override
+                    public Float get(VFullPath object) {
+                        return object.getStrokeWidth();
+                    }
+                };
+
+        private static final Property<VFullPath, Integer> STROKE_COLOR =
+                new IntProperty<VFullPath> ("strokeColor") {
+                    @Override
+                    public void setValue(VFullPath object, int value) {
+                        object.setStrokeColor(value);
+                    }
+
+                    @Override
+                    public Integer get(VFullPath object) {
+                        return object.getStrokeColor();
+                    }
+                };
+
+        private static final Property<VFullPath, Float> STROKE_ALPHA =
+                new FloatProperty<VFullPath> ("strokeAlpha") {
+                    @Override
+                    public void setValue(VFullPath object, float value) {
+                        object.setStrokeAlpha(value);
+                    }
+
+                    @Override
+                    public Float get(VFullPath object) {
+                        return object.getStrokeAlpha();
+                    }
+                };
+
+        private static final Property<VFullPath, Integer> FILL_COLOR =
+                new IntProperty<VFullPath>("fillColor") {
+                    @Override
+                    public void setValue(VFullPath object, int value) {
+                        object.setFillColor(value);
+                    }
+
+                    @Override
+                    public Integer get(VFullPath object) {
+                        return object.getFillColor();
+                    }
+                };
+
+        private static final Property<VFullPath, Float> FILL_ALPHA =
+                new FloatProperty<VFullPath> ("fillAlpha") {
+                    @Override
+                    public void setValue(VFullPath object, float value) {
+                        object.setFillAlpha(value);
+                    }
+
+                    @Override
+                    public Float get(VFullPath object) {
+                        return object.getFillAlpha();
+                    }
+                };
+
+        private static final Property<VFullPath, Float> TRIM_PATH_START =
+                new FloatProperty<VFullPath> ("trimPathStart") {
+                    @Override
+                    public void setValue(VFullPath object, float value) {
+                        object.setTrimPathStart(value);
+                    }
+
+                    @Override
+                    public Float get(VFullPath object) {
+                        return object.getTrimPathStart();
+                    }
+                };
+
+        private static final Property<VFullPath, Float> TRIM_PATH_END =
+                new FloatProperty<VFullPath> ("trimPathEnd") {
+                    @Override
+                    public void setValue(VFullPath object, float value) {
+                        object.setTrimPathEnd(value);
+                    }
+
+                    @Override
+                    public Float get(VFullPath object) {
+                        return object.getTrimPathEnd();
+                    }
+                };
+
+        private static final Property<VFullPath, Float> TRIM_PATH_OFFSET =
+                new FloatProperty<VFullPath> ("trimPathOffset") {
+                    @Override
+                    public void setValue(VFullPath object, float value) {
+                        object.setTrimPathOffset(value);
+                    }
+
+                    @Override
+                    public Float get(VFullPath object) {
+                        return object.getTrimPathOffset();
+                    }
+                };
+
+        private final static HashMap<String, Property> sPropertyMap
+                = new HashMap<String, Property> () {
+            {
+                put("strokeWidth", STROKE_WIDTH);
+                put("strokeColor", STROKE_COLOR);
+                put("strokeAlpha", STROKE_ALPHA);
+                put("fillColor", FILL_COLOR);
+                put("fillAlpha", FILL_ALPHA);
+                put("trimPathStart", TRIM_PATH_START);
+                put("trimPathEnd", TRIM_PATH_END);
+                put("trimPathOffset", TRIM_PATH_OFFSET);
+            }
+        };
+
         // Temp array to store property data obtained from native getter.
         private byte[] mPropertyData;
         /////////////////////////////////////////////////////
@@ -1448,11 +1734,24 @@
             mFillColors = copy.mFillColors;
         }
 
+        Property getProperty(String propertyName) {
+            Property p = super.getProperty(propertyName);
+            if (p != null) {
+                return p;
+            }
+            if (sPropertyMap.containsKey(propertyName)) {
+                return sPropertyMap.get(propertyName);
+            } else {
+                // property not found
+                return null;
+            }
+        }
+
         int getPropertyIndex(String propertyName) {
-            if (!sPropertyMap.containsKey(propertyName)) {
+            if (!sPropertyIndexMap.containsKey(propertyName)) {
                 return -1;
             } else {
-                return sPropertyMap.get(propertyName);
+                return sPropertyIndexMap.get(propertyName);
             }
         }
 
@@ -1786,6 +2085,7 @@
         abstract boolean onStateChange(int[] state);
         abstract boolean isStateful();
         abstract int getNativeSize();
+        abstract Property getProperty(String propertyName);
     }
 
     private static native long nCreateTree(long rootGroupPtr);
diff --git a/libs/hwui/AnimationContext.h b/libs/hwui/AnimationContext.h
index 909ed36..801fd87 100644
--- a/libs/hwui/AnimationContext.h
+++ b/libs/hwui/AnimationContext.h
@@ -100,6 +100,8 @@
 
     ANDROID_API virtual void destroy();
 
+    ANDROID_API virtual void detachAnimators() {}
+
 private:
     friend class AnimationHandle;
     void addAnimationHandle(AnimationHandle* handle);
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index 4d65782..dc18018 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -274,6 +274,10 @@
     return playTime >= mDuration;
 }
 
+nsecs_t BaseRenderNodeAnimator::getRemainingPlayTime() {
+    return mPlayState == PlayState::Reversing ? mPlayTime : mDuration - mPlayTime;
+}
+
 void BaseRenderNodeAnimator::forceEndNow(AnimationContext& context) {
     if (mPlayState < PlayState::Finished) {
         mPlayState = PlayState::Finished;
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index fdae0f3..9476750 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -62,19 +62,23 @@
     }
     bool mayRunAsync() { return mMayRunAsync; }
     ANDROID_API void start();
-    ANDROID_API void reset();
+    ANDROID_API virtual void reset();
     ANDROID_API void reverse();
     // Terminates the animation at its current progress.
     ANDROID_API void cancel();
 
     // Terminates the animation and skip to the end of the animation.
-    ANDROID_API void end();
+    ANDROID_API virtual void end();
 
     void attach(RenderNode* target);
     virtual void onAttached() {}
     void detach() { mTarget = nullptr; }
-    void pushStaging(AnimationContext& context);
-    bool animate(AnimationContext& context);
+    ANDROID_API void pushStaging(AnimationContext& context);
+    ANDROID_API bool animate(AnimationContext& context);
+
+    // Returns the remaining time in ms for the animation. Note this should only be called during
+    // an animation on RenderThread.
+    ANDROID_API nsecs_t getRemainingPlayTime();
 
     bool isRunning() { return mPlayState == PlayState::Running
             || mPlayState == PlayState::Reversing; }
diff --git a/libs/hwui/ClipArea.cpp b/libs/hwui/ClipArea.cpp
index fe68239..39b8d3d 100644
--- a/libs/hwui/ClipArea.cpp
+++ b/libs/hwui/ClipArea.cpp
@@ -464,10 +464,7 @@
             }
             case ClipMode::Region:
                 other = getRegion(recordedClip);
-
-                // TODO: handle non-translate transforms properly!
-                other.translate(recordedClipTransform.getTranslateX(),
-                        recordedClipTransform.getTranslateY());
+                applyTransformToRegion(recordedClipTransform, &other);
             }
 
             ClipRegion* regionClip = allocator.create<ClipRegion>();
@@ -527,11 +524,29 @@
         }
     } else {
         SkRegion region(getRegion(clip));
-        // TODO: handle non-translate transforms properly!
-        region.translate(transform.getTranslateX(), transform.getTranslateY());
+        applyTransformToRegion(transform, &region);
         clipRegion(region, SkRegion::kIntersect_Op);
     }
 }
 
+void ClipArea::applyTransformToRegion(const Matrix4& transform, SkRegion* region) {
+    if (transform.isSimple() && !transform.isPureTranslate()) {
+        // handle matrices with scale manually by mapping each rect
+        SkRegion other;
+        SkRegion::Iterator it(*region);
+        while (!it.done()) {
+            Rect rect(it.rect());
+            transform.mapRect(rect);
+            rect.roundOut();
+            other.op(rect.left, rect.top, rect.right, rect.bottom, SkRegion::kUnion_Op);
+            it.next();
+        }
+        region->swap(other);
+    } else {
+        // TODO: handle non-translate transforms properly!
+        region->translate(transform.getTranslateX(), transform.getTranslateY());
+    }
+}
+
 } /* namespace uirenderer */
 } /* namespace android */
diff --git a/libs/hwui/ClipArea.h b/libs/hwui/ClipArea.h
index 6eb2eef..53d9d03 100644
--- a/libs/hwui/ClipArea.h
+++ b/libs/hwui/ClipArea.h
@@ -179,6 +179,8 @@
             const ClipBase* recordedClip, const Matrix4& recordedClipTransform);
     void applyClip(const ClipBase* recordedClip, const Matrix4& recordedClipTransform);
 
+    static void applyTransformToRegion(const Matrix4& transform, SkRegion* region);
+
 private:
     void enterRectangleMode();
     void rectangleModeClipRectWithTransform(const Rect& r, const mat4* transform, SkRegion::Op op);
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index b572bda..28be05c 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -45,7 +45,7 @@
         , regions(stdAllocator)
         , referenceHolders(stdAllocator)
         , functors(stdAllocator)
-        , pushStagingFunctors(stdAllocator)
+        , vectorDrawables(stdAllocator)
         , hasDrawOps(false) {
 }
 
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h
index 5b3227b..ccf71c6 100644
--- a/libs/hwui/DisplayList.h
+++ b/libs/hwui/DisplayList.h
@@ -69,6 +69,11 @@
 typedef DrawRenderNodeOp NodeOpType;
 #endif
 
+namespace VectorDrawable {
+class Tree;
+};
+typedef uirenderer::VectorDrawable::Tree VectorDrawableRoot;
+
 /**
  * Holds data used in the playback a tree of DisplayLists.
  */
@@ -110,16 +115,6 @@
     LinearAllocator mReplayAllocator;
 };
 
-/**
- * Functor that can be used for objects with data in both UI thread and RT to keep the data
- * in sync. This functor, when added to DisplayList, will be call during DisplayList sync.
- */
-struct PushStagingFunctor {
-    PushStagingFunctor() {}
-    virtual ~PushStagingFunctor() {}
-    virtual void operator ()() {}
-};
-
 struct FunctorContainer {
     Functor* functor;
     GlFunctorLifecycleListener* listener;
@@ -161,7 +156,7 @@
 
     const LsaVector<const SkBitmap*>& getBitmapResources() const { return bitmapResources; }
     const LsaVector<FunctorContainer>& getFunctors() const { return functors; }
-    const LsaVector<PushStagingFunctor*>& getPushStagingFunctors() { return pushStagingFunctors; }
+    const LsaVector<VectorDrawableRoot*>& getVectorDrawables() { return vectorDrawables; }
 
     size_t addChild(NodeOpType* childOp);
 
@@ -203,10 +198,10 @@
     // List of functors
     LsaVector<FunctorContainer> functors;
 
-    // List of functors that need to be notified of pushStaging. Note that this list gets nothing
+    // List of VectorDrawables that need to be notified of pushStaging. Note that this list gets nothing
     // but a callback during sync DisplayList, unlike the list of functors defined above, which
     // gets special treatment exclusive for webview.
-    LsaVector<PushStagingFunctor*> pushStagingFunctors;
+    LsaVector<VectorDrawableRoot*> vectorDrawables;
 
     bool hasDrawOps; // only used if !HWUI_NEW_OPS
 
diff --git a/libs/hwui/DisplayListCanvas.cpp b/libs/hwui/DisplayListCanvas.cpp
index ca968ce..bec66295 100644
--- a/libs/hwui/DisplayListCanvas.cpp
+++ b/libs/hwui/DisplayListCanvas.cpp
@@ -417,7 +417,7 @@
 
 void DisplayListCanvas::drawVectorDrawable(VectorDrawableRoot* tree) {
     mDisplayList->ref(tree);
-    mDisplayList->pushStagingFunctors.push_back(tree->getFunctor());
+    mDisplayList->vectorDrawables.push_back(tree);
     addDrawOp(new (alloc()) DrawVectorDrawableOp(tree, tree->stagingProperties()->getBounds()));
 }
 
diff --git a/libs/hwui/PropertyValuesAnimatorSet.cpp b/libs/hwui/PropertyValuesAnimatorSet.cpp
index b29f91f..796c73b 100644
--- a/libs/hwui/PropertyValuesAnimatorSet.cpp
+++ b/libs/hwui/PropertyValuesAnimatorSet.cpp
@@ -29,7 +29,11 @@
     PropertyAnimator* animator = new PropertyAnimator(propertyValuesHolder,
             interpolator, startDelay, duration, repeatCount);
     mAnimators.emplace_back(animator);
-    setListener(new PropertyAnimatorSetListener(this));
+
+    // Check whether any child animator is infinite after adding it them to the set.
+    if (repeatCount == -1) {
+        mIsInfinite = true;
+    }
 }
 
 PropertyValuesAnimatorSet::PropertyValuesAnimatorSet()
@@ -37,6 +41,7 @@
     setStartValue(0);
     mLastFraction = 0.0f;
     setInterpolator(new LinearInterpolator());
+    setListener(new PropertyAnimatorSetListener(this));
 }
 
 void PropertyValuesAnimatorSet::onFinished(BaseRenderNodeAnimator* animator) {
@@ -78,15 +83,27 @@
 void PropertyValuesAnimatorSet::start(AnimationListener* listener) {
     init();
     mOneShotListener = listener;
+    mRequestId++;
     BaseRenderNodeAnimator::start();
 }
 
 void PropertyValuesAnimatorSet::reverse(AnimationListener* listener) {
     init();
     mOneShotListener = listener;
+    mRequestId++;
     BaseRenderNodeAnimator::reverse();
 }
 
+void PropertyValuesAnimatorSet::reset() {
+    mRequestId++;
+    BaseRenderNodeAnimator::reset();
+}
+
+void PropertyValuesAnimatorSet::end() {
+    mRequestId++;
+    BaseRenderNodeAnimator::end();
+}
+
 void PropertyValuesAnimatorSet::init() {
     if (mInitialized) {
         return;
@@ -98,7 +115,7 @@
     std::sort(mAnimators.begin(), mAnimators.end(), [](auto& a, auto&b) {
         return a->getTotalDuration() < b->getTotalDuration();
     });
-    mDuration = mAnimators[mAnimators.size() - 1]->getTotalDuration();
+    mDuration = mAnimators.empty() ? 0 : mAnimators[mAnimators.size() - 1]->getTotalDuration();
     mInitialized = true;
 }
 
diff --git a/libs/hwui/PropertyValuesAnimatorSet.h b/libs/hwui/PropertyValuesAnimatorSet.h
index c7ae7c0..49021bc 100644
--- a/libs/hwui/PropertyValuesAnimatorSet.h
+++ b/libs/hwui/PropertyValuesAnimatorSet.h
@@ -43,6 +43,7 @@
     float mLatestFraction = 0.0f;
 };
 
+// TODO: This class should really be named VectorDrawableAnimator
 class ANDROID_API PropertyValuesAnimatorSet : public BaseRenderNodeAnimator {
 public:
     friend class PropertyAnimatorSetListener;
@@ -50,11 +51,19 @@
 
     void start(AnimationListener* listener);
     void reverse(AnimationListener* listener);
+    virtual void reset() override;
+    virtual void end() override;
 
     void addPropertyAnimator(PropertyValuesHolder* propertyValuesHolder,
             Interpolator* interpolators, int64_t startDelays,
             nsecs_t durations, int repeatCount);
     virtual uint32_t dirtyMask();
+    bool isInfinite() { return mIsInfinite; }
+    void setVectorDrawable(VectorDrawableRoot* vd) { mVectorDrawable = vd; }
+    VectorDrawableRoot* getVectorDrawable() const { return mVectorDrawable; }
+    AnimationListener* getOneShotListener() { return mOneShotListener.get(); }
+    void clearOneShotListener() { mOneShotListener = nullptr; }
+    uint32_t getRequestId() const { return mRequestId; }
 
 protected:
     virtual float getValue(RenderNode* target) const override;
@@ -69,6 +78,11 @@
     std::vector< std::unique_ptr<PropertyAnimator> > mAnimators;
     float mLastFraction = 0.0f;
     bool mInitialized = false;
+    VectorDrawableRoot* mVectorDrawable = nullptr;
+    bool mIsInfinite = false;
+    // This request id gets incremented (on UI thread only) when a new request to modfiy the
+    // lifecycle of an animation happens, namely when start/end/reset/reverse is called.
+    uint32_t mRequestId = 0;
 };
 
 class PropertyAnimatorSetListener : public AnimationListener {
diff --git a/libs/hwui/PropertyValuesHolder.cpp b/libs/hwui/PropertyValuesHolder.cpp
index 0932d65..6ba0ab5 100644
--- a/libs/hwui/PropertyValuesHolder.cpp
+++ b/libs/hwui/PropertyValuesHolder.cpp
@@ -25,7 +25,27 @@
 
 using namespace VectorDrawable;
 
-float PropertyValuesHolder::getValueFromData(float fraction) {
+inline U8CPU lerp(U8CPU fromValue, U8CPU toValue, float fraction) {
+    return (U8CPU) (fromValue * (1 - fraction) + toValue * fraction);
+}
+
+// TODO: Add a test for this
+void ColorEvaluator::evaluate(SkColor* outColor,
+        const SkColor& fromColor, const SkColor& toColor, float fraction) const {
+    U8CPU alpha = lerp(SkColorGetA(fromColor), SkColorGetA(toColor), fraction);
+    U8CPU red = lerp(SkColorGetR(fromColor), SkColorGetR(toColor), fraction);
+    U8CPU green = lerp(SkColorGetG(fromColor), SkColorGetG(toColor), fraction);
+    U8CPU blue = lerp(SkColorGetB(fromColor), SkColorGetB(toColor), fraction);
+    *outColor = SkColorSetARGB(alpha, red, green, blue);
+}
+
+void PathEvaluator::evaluate(PathData* out,
+        const PathData& from, const PathData& to, float fraction) const {
+    VectorDrawableUtils::interpolatePaths(out, from, to, fraction);
+}
+
+template<typename T>
+const T PropertyValuesHolderImpl<T>::getValueFromData(float fraction) const {
     if (mDataSource.size() == 0) {
         LOG_ALWAYS_FATAL("No data source is defined");
         return 0;
@@ -41,57 +61,44 @@
     int lowIndex = floor(fraction);
     fraction -= lowIndex;
 
-    float value = mDataSource[lowIndex] * (1.0f - fraction)
-            + mDataSource[lowIndex + 1] * fraction;
+    T value;
+    mEvaluator->evaluate(&value, mDataSource[lowIndex], mDataSource[lowIndex + 1], fraction);
     return value;
 }
 
-void GroupPropertyValuesHolder::setFraction(float fraction) {
-    float animatedValue;
+template<typename T>
+const T PropertyValuesHolderImpl<T>::calculateAnimatedValue(float fraction) const {
     if (mDataSource.size() > 0) {
-        animatedValue = getValueFromData(fraction);
+        return getValueFromData(fraction);
     } else {
-        animatedValue = mStartValue * (1 - fraction) + mEndValue * fraction;
+        T value;
+        mEvaluator->evaluate(&value, mStartValue, mEndValue, fraction);
+        return value;
     }
+}
+
+void GroupPropertyValuesHolder::setFraction(float fraction) {
+    float animatedValue = calculateAnimatedValue(fraction);
     mGroup->mutateProperties()->setPropertyValue(mPropertyId, animatedValue);
 }
 
-inline U8CPU lerp(U8CPU fromValue, U8CPU toValue, float fraction) {
-    return (U8CPU) (fromValue * (1 - fraction) + toValue * fraction);
-}
-
-// TODO: Add a test for this
-SkColor FullPathColorPropertyValuesHolder::interpolateColors(SkColor fromColor, SkColor toColor,
-        float fraction) {
-    U8CPU alpha = lerp(SkColorGetA(fromColor), SkColorGetA(toColor), fraction);
-    U8CPU red = lerp(SkColorGetR(fromColor), SkColorGetR(toColor), fraction);
-    U8CPU green = lerp(SkColorGetG(fromColor), SkColorGetG(toColor), fraction);
-    U8CPU blue = lerp(SkColorGetB(fromColor), SkColorGetB(toColor), fraction);
-    return SkColorSetARGB(alpha, red, green, blue);
-}
-
 void FullPathColorPropertyValuesHolder::setFraction(float fraction) {
-    SkColor animatedValue = interpolateColors(mStartValue, mEndValue, fraction);
+    SkColor animatedValue = calculateAnimatedValue(fraction);
     mFullPath->mutateProperties()->setColorPropertyValue(mPropertyId, animatedValue);
 }
 
 void FullPathPropertyValuesHolder::setFraction(float fraction) {
-    float animatedValue;
-    if (mDataSource.size() > 0) {
-        animatedValue = getValueFromData(fraction);
-    } else {
-        animatedValue = mStartValue * (1 - fraction) + mEndValue * fraction;
-    }
+    float animatedValue = calculateAnimatedValue(fraction);
     mFullPath->mutateProperties()->setPropertyValue(mPropertyId, animatedValue);
 }
 
 void PathDataPropertyValuesHolder::setFraction(float fraction) {
-    VectorDrawableUtils::interpolatePaths(&mPathData, mStartValue, mEndValue, fraction);
+    mEvaluator->evaluate(&mPathData, mStartValue, mEndValue, fraction);
     mPath->mutateProperties()->setData(mPathData);
 }
 
 void RootAlphaPropertyValuesHolder::setFraction(float fraction) {
-    float animatedValue = mStartValue * (1 - fraction) + mEndValue * fraction;
+    float animatedValue = calculateAnimatedValue(fraction);
     mTree->mutateProperties()->setRootAlpha(animatedValue);
 }
 
diff --git a/libs/hwui/PropertyValuesHolder.h b/libs/hwui/PropertyValuesHolder.h
index b905fae..432f8ba 100644
--- a/libs/hwui/PropertyValuesHolder.h
+++ b/libs/hwui/PropertyValuesHolder.h
@@ -31,91 +31,130 @@
 class ANDROID_API PropertyValuesHolder {
 public:
     virtual void setFraction(float fraction) = 0;
-    void setPropertyDataSource(float* dataSource, int length) {
-        mDataSource.insert(mDataSource.begin(), dataSource, dataSource + length);
-    }
-   float getValueFromData(float fraction);
-   virtual ~PropertyValuesHolder() {}
-protected:
-   std::vector<float> mDataSource;
+    virtual ~PropertyValuesHolder() {}
 };
 
-class ANDROID_API GroupPropertyValuesHolder : public PropertyValuesHolder {
+template <typename T>
+class Evaluator {
+public:
+    virtual void evaluate(T* out, const T& from, const T& to, float fraction) const {};
+    virtual ~Evaluator() {}
+};
+
+class FloatEvaluator : public Evaluator<float> {
+public:
+    virtual void evaluate(float* out, const float& from, const float& to, float fraction)
+            const override {
+        *out = from * (1 - fraction) + to * fraction;
+    }
+};
+
+class ANDROID_API ColorEvaluator : public Evaluator<SkColor> {
+public:
+    virtual void evaluate(SkColor* outColor, const SkColor& from, const SkColor& to,
+            float fraction) const override;
+};
+
+class ANDROID_API PathEvaluator : public Evaluator<PathData> {
+    virtual void evaluate(PathData* out, const PathData& from, const PathData& to, float fraction)
+            const override;
+};
+
+template <typename T>
+class ANDROID_API PropertyValuesHolderImpl : public PropertyValuesHolder {
+public:
+    PropertyValuesHolderImpl(const T& startValue, const T& endValue)
+            : mStartValue(startValue)
+            , mEndValue(endValue) {}
+    void setPropertyDataSource(T* dataSource, int length) {
+        mDataSource.insert(mDataSource.begin(), dataSource, dataSource + length);
+    }
+    // Calculate the animated value from the data source.
+    const T getValueFromData(float fraction) const;
+    // Convenient method to favor getting animated value from data source. If no data source is set
+    // fall back to linear interpolation.
+    const T calculateAnimatedValue(float fraction) const;
+protected:
+   std::unique_ptr<Evaluator<T>> mEvaluator = nullptr;
+   // This contains uniformly sampled data throughout the animation duration. The first element
+   // should be the start value and the last should be the end value of the animation. When the
+   // data source is set, we'll favor data source over the linear interpolation of start/end value
+   // for calculation of animated value.
+   std::vector<T> mDataSource;
+   T mStartValue;
+   T mEndValue;
+};
+
+class ANDROID_API GroupPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
 public:
     GroupPropertyValuesHolder(VectorDrawable::Group* ptr, int propertyId, float startValue,
             float endValue)
-            : mGroup(ptr)
-            , mPropertyId(propertyId)
-            , mStartValue(startValue)
-            , mEndValue(endValue){
+            : PropertyValuesHolderImpl(startValue, endValue)
+            , mGroup(ptr)
+            , mPropertyId(propertyId) {
+        mEvaluator.reset(new FloatEvaluator());
     }
     void setFraction(float fraction) override;
 private:
     VectorDrawable::Group* mGroup;
     int mPropertyId;
-    float mStartValue;
-    float mEndValue;
 };
 
-class ANDROID_API FullPathColorPropertyValuesHolder : public PropertyValuesHolder {
+class ANDROID_API FullPathColorPropertyValuesHolder : public PropertyValuesHolderImpl<SkColor> {
 public:
-    FullPathColorPropertyValuesHolder(VectorDrawable::FullPath* ptr, int propertyId, int32_t startValue,
-            int32_t endValue)
-            : mFullPath(ptr)
-            , mPropertyId(propertyId)
-            , mStartValue(startValue)
-            , mEndValue(endValue) {};
+    FullPathColorPropertyValuesHolder(VectorDrawable::FullPath* ptr, int propertyId,
+            SkColor startValue, SkColor endValue)
+            : PropertyValuesHolderImpl(startValue, endValue)
+            , mFullPath(ptr)
+            , mPropertyId(propertyId) {
+        mEvaluator.reset(new ColorEvaluator());
+    }
     void setFraction(float fraction) override;
     static SkColor interpolateColors(SkColor fromColor, SkColor toColor, float fraction);
 private:
     VectorDrawable::FullPath* mFullPath;
     int mPropertyId;
-    int32_t mStartValue;
-    int32_t mEndValue;
 };
 
-class ANDROID_API FullPathPropertyValuesHolder : public PropertyValuesHolder {
+class ANDROID_API FullPathPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
 public:
     FullPathPropertyValuesHolder(VectorDrawable::FullPath* ptr, int propertyId, float startValue,
             float endValue)
-            : mFullPath(ptr)
-            , mPropertyId(propertyId)
-            , mStartValue(startValue)
-            , mEndValue(endValue) {};
+            : PropertyValuesHolderImpl(startValue, endValue)
+            , mFullPath(ptr)
+            , mPropertyId(propertyId) {
+        mEvaluator.reset(new FloatEvaluator());
+    };
     void setFraction(float fraction) override;
 private:
     VectorDrawable::FullPath* mFullPath;
     int mPropertyId;
-    float mStartValue;
-    float mEndValue;
 };
 
-class ANDROID_API PathDataPropertyValuesHolder : public PropertyValuesHolder {
+class ANDROID_API PathDataPropertyValuesHolder : public PropertyValuesHolderImpl<PathData> {
 public:
     PathDataPropertyValuesHolder(VectorDrawable::Path* ptr, PathData* startValue,
             PathData* endValue)
-            : mPath(ptr)
-            , mStartValue(*startValue)
-            , mEndValue(*endValue) {};
+            : PropertyValuesHolderImpl(*startValue, *endValue)
+            , mPath(ptr) {
+        mEvaluator.reset(new PathEvaluator());
+    };
     void setFraction(float fraction) override;
 private:
     VectorDrawable::Path* mPath;
     PathData mPathData;
-    PathData mStartValue;
-    PathData mEndValue;
 };
 
-class ANDROID_API RootAlphaPropertyValuesHolder : public PropertyValuesHolder {
+class ANDROID_API RootAlphaPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
 public:
     RootAlphaPropertyValuesHolder(VectorDrawable::Tree* tree, float startValue, float endValue)
-            : mTree(tree)
-            , mStartValue(startValue)
-            , mEndValue(endValue) {}
+            : PropertyValuesHolderImpl(startValue, endValue)
+            , mTree(tree) {
+        mEvaluator.reset(new FloatEvaluator());
+    }
     void setFraction(float fraction) override;
 private:
     VectorDrawable::Tree* mTree;
-    float mStartValue;
-    float mEndValue;
 };
 }
 }
diff --git a/libs/hwui/RecordingCanvas.cpp b/libs/hwui/RecordingCanvas.cpp
index b49f9b5..cbefccb 100644
--- a/libs/hwui/RecordingCanvas.cpp
+++ b/libs/hwui/RecordingCanvas.cpp
@@ -127,7 +127,8 @@
     // operations will be able to store and restore the current clip and transform info, and
     // quick rejection will be correct (for display lists)
 
-    const Rect unmappedBounds(left, top, right, bottom);
+    Rect unmappedBounds(left, top, right, bottom);
+    unmappedBounds.roundOut();
 
     // determine clipped bounds relative to previous viewport.
     Rect visibleBounds = unmappedBounds;
@@ -440,8 +441,8 @@
 }
 
 void RecordingCanvas::drawVectorDrawable(VectorDrawableRoot* tree) {
-    mDisplayList->pushStagingFunctors.push_back(tree->getFunctor());
     mDisplayList->ref(tree);
+    mDisplayList->vectorDrawables.push_back(tree);
     addOp(alloc().create_trivial<VectorDrawableOp>(
             tree,
             Rect(tree->stagingProperties()->getBounds()),
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index de4fa55..5786668 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -73,6 +73,13 @@
             bottom(height) {
     }
 
+    inline Rect(const SkIRect& rect):
+            left(rect.fLeft),
+            top(rect.fTop),
+            right(rect.fRight),
+            bottom(rect.fBottom) {
+    }
+
     inline Rect(const SkRect& rect):
             left(rect.fLeft),
             top(rect.fTop),
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index d48d544..f8797bf 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -421,6 +421,16 @@
     prepareSubTree(info, childFunctorsNeedLayer, mDisplayList);
     pushLayerUpdate(info);
 
+    if (mDisplayList) {
+        for (auto& vectorDrawable : mDisplayList->getVectorDrawables()) {
+            // If any vector drawable in the display list needs update, damage the node.
+            if (vectorDrawable->isDirty()) {
+                damageSelf(info);
+            }
+            vectorDrawable->setPropertyChangeWillBeConsumed(true);
+        }
+    }
+
     info.damageAccumulator->popTransform();
 }
 
@@ -479,8 +489,8 @@
         for (auto& iter : mDisplayList->getFunctors()) {
             (*iter.functor)(DrawGlInfo::kModeSync, nullptr);
         }
-        for (size_t i = 0; i < mDisplayList->getPushStagingFunctors().size(); i++) {
-            (*mDisplayList->getPushStagingFunctors()[i])();
+        for (auto& vectorDrawable : mDisplayList->getVectorDrawables()) {
+            vectorDrawable->syncProperties();
         }
     }
 }
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index f80be5e..47fef6d 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -232,7 +232,7 @@
     // the frameNumber to appropriately batch/synchronize these transactions.
     // There is no other filtering/batching to ensure that only the "final"
     // state called once per frame.
-    class ANDROID_API PositionListener {
+    class ANDROID_API PositionListener : public VirtualLightRefBase {
     public:
         virtual ~PositionListener() {}
         // Called when the RenderNode's position changes
@@ -247,7 +247,7 @@
     // before the RenderNode is used for drawing.
     // RenderNode takes ownership of the pointer
     ANDROID_API void setPositionListener(PositionListener* listener) {
-        mPositionListener.reset(listener);
+        mPositionListener = listener;
     }
 
     // This is only modified in MODE_FULL, so it can be safely accessed
@@ -366,7 +366,7 @@
     // mDisplayList, not mStagingDisplayList.
     uint32_t mParentCount;
 
-    std::unique_ptr<PositionListener> mPositionListener;
+    sp<PositionListener> mPositionListener;
 }; // class RenderNode
 
 } /* namespace uirenderer */
diff --git a/libs/hwui/VectorDrawable.h b/libs/hwui/VectorDrawable.h
index a5d1d4b..e67dfdd 100644
--- a/libs/hwui/VectorDrawable.h
+++ b/libs/hwui/VectorDrawable.h
@@ -673,21 +673,16 @@
     void onPropertyChanged(TreeProperties* prop);
     TreeProperties* mutateStagingProperties() { return &mStagingProperties; }
     const TreeProperties* stagingProperties() const { return &mStagingProperties; }
-    PushStagingFunctor* getFunctor() { return &mFunctor;}
 
     // This should only be called from animations on RT
     TreeProperties* mutateProperties() { return &mProperties; }
 
+    // This should always be called from RT.
+    bool isDirty() const { return mCache.dirty; }
+    bool getPropertyChangeWillBeConsumed() const { return mWillBeConsumed; }
+    void setPropertyChangeWillBeConsumed(bool willBeConsumed) { mWillBeConsumed = willBeConsumed; }
+
 private:
-    class VectorDrawableFunctor : public PushStagingFunctor {
-    public:
-        VectorDrawableFunctor(Tree* tree) : mTree(tree) {}
-        virtual void operator ()() {
-            mTree->syncProperties();
-        }
-    private:
-        Tree* mTree;
-    };
 
     SkPaint* updatePaint(SkPaint* outPaint, TreeProperties* prop);
     bool allocateBitmapIfNeeded(SkBitmap* outCache, int width, int height);
@@ -704,8 +699,6 @@
     TreeProperties mProperties = TreeProperties(this);
     TreeProperties mStagingProperties = TreeProperties(this);
 
-    VectorDrawableFunctor mFunctor = VectorDrawableFunctor(this);
-
     SkPaint mPaint;
     struct Cache {
         SkBitmap bitmap;
@@ -717,6 +710,8 @@
 
     PropertyChangedListener mPropertyChangedListener
             = PropertyChangedListener(&mCache.dirty, &mStagingCache.dirty);
+
+    mutable bool mWillBeConsumed = false;
 };
 
 } // namespace VectorDrawable
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index c626c54..5003c6a 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -198,6 +198,45 @@
     return info && ((*info)[FrameInfoIndex::Flags] & FrameInfoFlags::SkippedFrame);
 }
 
+bool CanvasContext::isSwapChainStuffed() {
+    if (mSwapHistory.size() != mSwapHistory.capacity()) {
+        // We want at least 3 frames of history before attempting to
+        // guess if the queue is stuffed
+        return false;
+    }
+    nsecs_t frameInterval = mRenderThread.timeLord().frameIntervalNanos();
+    auto& swapA = mSwapHistory[0];
+
+    // Was there a happy queue & dequeue time? If so, don't
+    // consider it stuffed
+    if (swapA.dequeueDuration < 3_ms
+            && swapA.queueDuration < 3_ms) {
+        return false;
+    }
+
+    for (size_t i = 1; i < mSwapHistory.size(); i++) {
+        auto& swapB = mSwapHistory[i];
+
+        // If there's a frameInterval gap we effectively already dropped a frame,
+        // so consider the queue healthy.
+        if (swapA.swapCompletedTime - swapB.swapCompletedTime > frameInterval) {
+            return false;
+        }
+
+        // Was there a happy queue & dequeue time? If so, don't
+        // consider it stuffed
+        if (swapB.dequeueDuration < 3_ms
+                && swapB.queueDuration < 3_ms) {
+            return false;
+        }
+
+        swapA = swapB;
+    }
+
+    // All signs point to a stuffed swap chain
+    return true;
+}
+
 void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo,
         int64_t syncQueued, RenderNode* target) {
     mRenderThread.removeFrameCallback(this);
@@ -243,7 +282,12 @@
 
     if (CC_LIKELY(mSwapHistory.size())) {
         nsecs_t latestVsync = mRenderThread.timeLord().latestVsync();
-        const SwapHistory& lastSwap = mSwapHistory.back();
+        SwapHistory& lastSwap = mSwapHistory.back();
+        int durationUs;
+        mNativeSurface->query(NATIVE_WINDOW_LAST_DEQUEUE_DURATION, &durationUs);
+        lastSwap.dequeueDuration = us2ns(durationUs);
+        mNativeSurface->query(NATIVE_WINDOW_LAST_QUEUE_DURATION, &durationUs);
+        lastSwap.queueDuration = us2ns(durationUs);
         nsecs_t vsyncDelta = std::abs(lastSwap.vsyncTime - latestVsync);
         // The slight fudge-factor is to deal with cases where
         // the vsync was estimated due to being slow handling the signal.
@@ -253,15 +297,12 @@
             // Already drew for this vsync pulse, UI draw request missed
             // the deadline for RT animations
             info.out.canDrawThisFrame = false;
-        } else if (lastSwap.swapTime < latestVsync) {
+        } else if (vsyncDelta >= mRenderThread.timeLord().frameIntervalNanos()) {
+            // It's been at least an entire frame interval, assume
+            // the buffer queue is fine
             info.out.canDrawThisFrame = true;
         } else {
-            // We're maybe behind? Find out for sure
-            int runningBehind = 0;
-            // TODO: Have this method be on Surface, too, not just ANativeWindow...
-            ANativeWindow* window = mNativeSurface.get();
-            window->query(window, NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND, &runningBehind);
-            info.out.canDrawThisFrame = !runningBehind;
+            info.out.canDrawThisFrame = !isSwapChainStuffed();
         }
     } else {
         info.out.canDrawThisFrame = true;
@@ -282,6 +323,7 @@
 
 void CanvasContext::stopDrawing() {
     mRenderThread.removeFrameCallback(this);
+    mAnimationContext->detachAnimators();
 }
 
 void CanvasContext::notifyFramePending() {
@@ -515,7 +557,7 @@
         }
         SwapHistory& swap = mSwapHistory.next();
         swap.damage = screenDirty;
-        swap.swapTime = systemTime(CLOCK_MONOTONIC);
+        swap.swapCompletedTime = systemTime(CLOCK_MONOTONIC);
         swap.vsyncTime = mRenderThread.timeLord().latestVsync();
         mHaveNewSurface = false;
         mFrameNumber = -1;
@@ -783,6 +825,7 @@
     }
     sp<FuncTask> task(new FuncTask());
     task->func = func;
+    mFrameFences.push_back(task);
     mFrameWorkProcessor->add(task);
 }
 
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index a6eb7ad..b0d980b 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -180,6 +180,8 @@
 
     void waitOnFences();
 
+    bool isSwapChainStuffed();
+
     EGLint mLastFrameWidth = 0;
     EGLint mLastFrameHeight = 0;
 
@@ -198,7 +200,9 @@
     struct SwapHistory {
         SkRect damage;
         nsecs_t vsyncTime;
-        nsecs_t swapTime;
+        nsecs_t swapCompletedTime;
+        nsecs_t dequeueDuration;
+        nsecs_t queueDuration;
     };
 
     RingBuffer<SwapHistory, 3> mSwapHistory;
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 54af282..06a24b2 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -514,6 +514,10 @@
     post(task);
 }
 
+int RenderProxy::getRenderThreadTid() {
+    return mRenderThread.getTid();
+}
+
 CREATE_BRIDGE3(addRenderNode, CanvasContext* context, RenderNode* node, bool placeFront) {
     args->context->addRenderNode(args->node, args->placeFront);
     return nullptr;
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index 898b314..e31062c8 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -115,6 +115,7 @@
 
     ANDROID_API void setTextureAtlas(const sp<GraphicBuffer>& buffer, int64_t* map, size_t size);
     ANDROID_API void setProcessStatsBuffer(int fd);
+    ANDROID_API int getRenderThreadTid();
 
     ANDROID_API void serializeDisplayListTree();
 
diff --git a/libs/hwui/tests/unit/ClipAreaTests.cpp b/libs/hwui/tests/unit/ClipAreaTests.cpp
index 54ca68d..afabd35 100644
--- a/libs/hwui/tests/unit/ClipAreaTests.cpp
+++ b/libs/hwui/tests/unit/ClipAreaTests.cpp
@@ -275,5 +275,64 @@
     }
 }
 
+TEST(ClipArea, serializeIntersectedClip_scale) {
+    ClipArea area(createClipArea());
+    area.setClip(0, 0, 400, 400);
+    LinearAllocator allocator;
+
+    SkPath circlePath;
+    circlePath.addCircle(50, 50, 50);
+
+    ClipRegion recordedClip;
+    recordedClip.region.setPath(circlePath, SkRegion(SkIRect::MakeWH(100, 100)));
+    recordedClip.rect = Rect(100, 100);
+
+    Matrix4 translateScale;
+    translateScale.loadTranslate(100, 100, 0);
+    translateScale.scale(2, 2, 1);
+    auto resolvedClip = area.serializeIntersectedClip(allocator, &recordedClip, translateScale);
+
+    ASSERT_NE(nullptr, resolvedClip);
+    EXPECT_EQ(ClipMode::Region, resolvedClip->mode);
+    EXPECT_EQ(Rect(100, 100, 300, 300), resolvedClip->rect);
+    auto clipRegion = reinterpret_cast<const ClipRegion*>(resolvedClip);
+    EXPECT_EQ(SkIRect::MakeLTRB(100, 100, 300, 300), clipRegion->region.getBounds());
+}
+
+TEST(ClipArea, applyTransformToRegion_identity) {
+    SkRegion region(SkIRect::MakeLTRB(1, 2, 3, 4));
+    ClipArea::applyTransformToRegion(Matrix4::identity(), &region);
+    EXPECT_TRUE(region.isRect());
+    EXPECT_EQ(SkIRect::MakeLTRB(1, 2, 3, 4), region.getBounds());
+}
+
+TEST(ClipArea, applyTransformToRegion_translate) {
+    SkRegion region(SkIRect::MakeLTRB(1, 2, 3, 4));
+    Matrix4 transform;
+    transform.loadTranslate(10, 20, 0);
+    ClipArea::applyTransformToRegion(transform, &region);
+    EXPECT_TRUE(region.isRect());
+    EXPECT_EQ(SkIRect::MakeLTRB(11, 22, 13, 24), region.getBounds());
+}
+
+TEST(ClipArea, applyTransformToRegion_scale) {
+    SkRegion region(SkIRect::MakeLTRB(1, 2, 3, 4));
+    Matrix4 transform;
+    transform.loadScale(2, 3, 1);
+    ClipArea::applyTransformToRegion(transform, &region);
+    EXPECT_TRUE(region.isRect());
+    EXPECT_EQ(SkIRect::MakeLTRB(2, 6, 6, 12), region.getBounds());
+}
+
+TEST(ClipArea, applyTransformToRegion_translateScale) {
+    SkRegion region(SkIRect::MakeLTRB(1, 2, 3, 4));
+    Matrix4 transform;
+    transform.translate(10, 20);
+    transform.scale(2, 3, 1);
+    ClipArea::applyTransformToRegion(transform, &region);
+    EXPECT_TRUE(region.isRect());
+    EXPECT_EQ(SkIRect::MakeLTRB(12, 26, 16, 32), region.getBounds());
+}
+
 } // namespace uirenderer
 } // namespace android
diff --git a/libs/hwui/tests/unit/RecordingCanvasTests.cpp b/libs/hwui/tests/unit/RecordingCanvasTests.cpp
index 18171de..9cd504e 100644
--- a/libs/hwui/tests/unit/RecordingCanvasTests.cpp
+++ b/libs/hwui/tests/unit/RecordingCanvasTests.cpp
@@ -340,6 +340,36 @@
     EXPECT_EQ(3, count);
 }
 
+TEST(RecordingCanvas, saveLayer_rounding) {
+    auto dl = TestUtils::createDisplayList<RecordingCanvas>(100, 100, [](RecordingCanvas& canvas) {
+            canvas.saveLayerAlpha(10.25f, 10.75f, 89.25f, 89.75f, 128, SaveFlags::ClipToLayer);
+            canvas.drawRect(20, 20, 80, 80, SkPaint());
+            canvas.restore();
+        });
+        int count = 0;
+        playbackOps(*dl, [&count](const RecordedOp& op) {
+            Matrix4 expectedMatrix;
+            switch(count++) {
+            case 0:
+                EXPECT_EQ(RecordedOpId::BeginLayerOp, op.opId);
+                EXPECT_EQ(Rect(10, 10, 90, 90), op.unmappedBounds) << "Expect bounds rounded out";
+                break;
+            case 1:
+                EXPECT_EQ(RecordedOpId::RectOp, op.opId);
+                expectedMatrix.loadTranslate(-10, -10, 0);
+                EXPECT_MATRIX_APPROX_EQ(expectedMatrix, op.localMatrix) << "Expect rounded offset";
+                break;
+            case 2:
+                EXPECT_EQ(RecordedOpId::EndLayerOp, op.opId);
+                // Don't bother asserting recording state data - it's not used
+                break;
+            default:
+                ADD_FAILURE();
+            }
+        });
+        EXPECT_EQ(3, count);
+}
+
 TEST(RecordingCanvas, saveLayer_missingRestore) {
     auto dl = TestUtils::createDisplayList<RecordingCanvas>(200, 200, [](RecordingCanvas& canvas) {
         canvas.saveLayerAlpha(0, 0, 200, 200, 128, SaveFlags::ClipToLayer);
diff --git a/libs/hwui/tests/unit/RenderNodeTests.cpp b/libs/hwui/tests/unit/RenderNodeTests.cpp
index b2997df..cf76a86 100644
--- a/libs/hwui/tests/unit/RenderNodeTests.cpp
+++ b/libs/hwui/tests/unit/RenderNodeTests.cpp
@@ -16,13 +16,26 @@
 
 #include <gtest/gtest.h>
 
+#include "AnimationContext.h"
+#include "DamageAccumulator.h"
+#include "IContextFactory.h"
 #include "RenderNode.h"
 #include "TreeInfo.h"
+#include "renderthread/CanvasContext.h"
 #include "tests/common/TestUtils.h"
 #include "utils/Color.h"
 
 using namespace android;
 using namespace android::uirenderer;
+using namespace android::uirenderer::renderthread;
+
+class ContextFactory : public android::uirenderer::IContextFactory {
+public:
+    android::uirenderer::AnimationContext* createAnimationContext
+        (android::uirenderer::renderthread::TimeLord& clock) override {
+        return new android::uirenderer::AnimationContext(clock);
+    }
+};
 
 TEST(RenderNode, hasParents) {
     auto child = TestUtils::createNode(0, 0, 200, 400,
@@ -89,3 +102,31 @@
     TestUtils::syncHierarchyPropertiesAndDisplayList(node);
     EXPECT_EQ(0, refcnt);
 }
+
+RENDERTHREAD_TEST(RenderNode, prepareTree_nullableDisplayList) {
+    ContextFactory contextFactory;
+    CanvasContext canvasContext(renderThread, false, nullptr, &contextFactory);
+    TreeInfo info(TreeInfo::MODE_RT_ONLY, canvasContext);
+    DamageAccumulator damageAccumulator;
+    info.damageAccumulator = &damageAccumulator;
+    info.observer = nullptr;
+
+    {
+        auto nonNullDLNode = TestUtils::createNode(0, 0, 200, 400,
+                [](RenderProperties& props, TestCanvas& canvas) {
+            canvas.drawColor(Color::Red_500, SkXfermode::kSrcOver_Mode);
+        });
+        TestUtils::syncHierarchyPropertiesAndDisplayList(nonNullDLNode);
+        EXPECT_TRUE(nonNullDLNode->getDisplayList());
+        nonNullDLNode->prepareTree(info);
+    }
+
+    {
+        auto nullDLNode = TestUtils::createNode(0, 0, 200, 400, nullptr);
+        TestUtils::syncHierarchyPropertiesAndDisplayList(nullDLNode);
+        EXPECT_FALSE(nullDLNode->getDisplayList());
+        nullDLNode->prepareTree(info);
+    }
+
+    canvasContext.destroy(nullptr);
+}
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index a4484e7..7d5939c 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -263,6 +263,10 @@
      * on some platforms when converting to short internally.
      */
     public static final int ENCODING_IEC61937 = 13;
+    /** Audio data format: DOLBY TRUEHD compressed
+     * @hide
+     **/
+    public static final int ENCODING_DOLBY_TRUEHD = 14;
 
     /** Invalid audio channel configuration */
     /** @deprecated Use {@link #CHANNEL_INVALID} instead.  */
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 4bdc70e..f19a262 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -2744,6 +2744,7 @@
      * to be notified.
      * Use {@link AudioManager#getActiveRecordingConfigurations()} to query the current
      * configuration.
+     * @see AudioRecordingConfiguration
      */
     public static abstract class AudioRecordingCallback {
         /**
@@ -2850,6 +2851,7 @@
      * Returns the current active audio recording configurations of the device.
      * @return a non-null list of recording configurations. An empty list indicates there is
      *     no recording active when queried.
+     * @see AudioRecordingConfiguration
      */
     public @NonNull List<AudioRecordingConfiguration> getActiveRecordingConfigurations() {
         final IAudioService service = getService();
diff --git a/media/java/android/media/AudioRecordingConfiguration.java b/media/java/android/media/AudioRecordingConfiguration.java
index 5935166..354339c 100644
--- a/media/java/android/media/AudioRecordingConfiguration.java
+++ b/media/java/android/media/AudioRecordingConfiguration.java
@@ -28,8 +28,18 @@
 
 /**
  * The AudioRecordingConfiguration class collects the information describing an audio recording
- * session. This information is returned through the
- * {@link AudioManager#getActiveRecordingConfigurations()} method.
+ * session.
+ * <p>Direct polling (see {@link AudioManager#getActiveRecordingConfigurations()}) or callback
+ * (see {@link AudioManager#registerAudioRecordingCallback(android.media.AudioManager.AudioRecordingCallback, android.os.Handler)}
+ * methods are ways to receive information about the current recording configuration of the device.
+ * <p>An audio recording configuration contains information about the recording format as used by
+ * the application ({@link #getClientFormat()}, as well as the recording format actually used by
+ * the device ({@link #getFormat()}). The two recording formats may, for instance, be at different
+ * sampling rates due to hardware limitations (e.g. application recording at 44.1kHz whereas the
+ * device always records at 48kHz, and the Android framework resamples for the application).
+ * <p>The configuration also contains the use case for which audio is recorded
+ * ({@link #getClientAudioSource()}), enabling the ability to distinguish between different
+ * activities such as ongoing voice recognition or camcorder recording.
  *
  */
 public final class AudioRecordingConfiguration implements Parcelable {
@@ -198,4 +208,4 @@
                 && (mClientFormat.equals(that.mClientFormat))
                 && (mDeviceFormat.equals(that.mDeviceFormat)));
     }
-}
\ No newline at end of file
+}
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 5fd85d1..c8ab5f9 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -60,11 +60,14 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.text.SimpleDateFormat;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Locale;
+import java.util.TimeZone;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
@@ -451,6 +454,8 @@
 
     private class MyMediaScannerClient implements MediaScannerClient {
 
+        private final SimpleDateFormat mDateFormatter;
+
         private String mArtist;
         private String mAlbumArtist;    // use this if mArtist is missing
         private String mAlbum;
@@ -463,6 +468,7 @@
         private int mYear;
         private int mDuration;
         private String mPath;
+        private long mDate;
         private long mLastModified;
         private long mFileSize;
         private String mWriter;
@@ -472,6 +478,11 @@
         private int mWidth;
         private int mHeight;
 
+        public MyMediaScannerClient() {
+            mDateFormatter = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
+            mDateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
+        }
+
         public FileEntry beginFile(String path, String mimeType, long lastModified,
                 long fileSize, boolean isDirectory, boolean noMedia) {
             mMimeType = mimeType;
@@ -537,6 +548,7 @@
             mYear = 0;
             mDuration = 0;
             mPath = path;
+            mDate = 0;
             mLastModified = lastModified;
             mWriter = null;
             mCompilation = 0;
@@ -627,6 +639,14 @@
             return result;
         }
 
+        private long parseDate(String date) {
+            try {
+              return mDateFormatter.parse(date).getTime();
+            } catch (ParseException e) {
+              return 0;
+            }
+        }
+
         private int parseSubstring(String s, int start, int defaultValue) {
             int length = s.length();
             if (start == length) return defaultValue;
@@ -684,6 +704,8 @@
                 mCompilation = parseSubstring(value, 0, 0);
             } else if (name.equalsIgnoreCase("isdrm")) {
                 mIsDrm = (parseSubstring(value, 0, 0) == 1);
+            } else if (name.equalsIgnoreCase("date")) {
+                mDate = parseDate(value);
             } else if (name.equalsIgnoreCase("width")) {
                 mWidth = parseSubstring(value, 0, 0);
             } else if (name.equalsIgnoreCase("height")) {
@@ -830,6 +852,9 @@
                     if (resolution != null) {
                         map.put(Video.Media.RESOLUTION, resolution);
                     }
+                    if (mDate > 0) {
+                        map.put(Video.Media.DATE_TAKEN, mDate);
+                    }
                 } else if (MediaFile.isImageFileType(mFileType)) {
                     // FIXME - add DESCRIPTION
                 } else if (MediaFile.isAudioFileType(mFileType)) {
diff --git a/media/java/android/media/SoundPool.java b/media/java/android/media/SoundPool.java
index 3164930..5ede1d5 100644
--- a/media/java/android/media/SoundPool.java
+++ b/media/java/android/media/SoundPool.java
@@ -133,6 +133,8 @@
     private final IAppOpsService mAppOps;
     private final IAppOpsCallback mAppOpsCallback;
 
+    private static IAudioService sService;
+
     /**
      * Constructor. Constructs a SoundPool object with the following
      * characteristics:
@@ -492,7 +494,34 @@
         }
     }
 
+    private static IAudioService getService()
+    {
+        if (sService != null) {
+            return sService;
+        }
+        IBinder b = ServiceManager.getService(Context.AUDIO_SERVICE);
+        sService = IAudioService.Stub.asInterface(b);
+        return sService;
+    }
+
     private boolean isRestricted() {
+        IAudioService service = getService();
+        boolean cameraSoundForced = false;
+
+        try {
+            cameraSoundForced = service.isCameraSoundForced();
+        } catch (RemoteException e) {
+            Log.e(TAG, "Cannot access AudioService in isRestricted()");
+        }
+
+        if (cameraSoundForced &&
+                ((mAttributes.getAllFlags() & AudioAttributes.FLAG_AUDIBILITY_ENFORCED) != 0)
+// FIXME: should also check usage when set properly by camera app
+//                && (mAttributes.getUsage() == AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
+                ) {
+            return false;
+        }
+
         if ((mAttributes.getAllFlags() & AudioAttributes.FLAG_BYPASS_INTERRUPTION_POLICY) != 0) {
             return false;
         }
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 38ed932..0f5dd3a 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -16,6 +16,13 @@
 
 package android.opengl;
 
+import android.content.Context;
+import android.os.Trace;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+
 import java.io.Writer;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
@@ -29,15 +36,6 @@
 import javax.microedition.khronos.opengles.GL;
 import javax.microedition.khronos.opengles.GL10;
 
-import android.content.Context;
-import android.content.pm.ConfigurationInfo;
-import android.os.SystemProperties;
-import android.os.Trace;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
-
 /**
  * An implementation of SurfaceView that uses the dedicated surface for
  * displaying OpenGL rendering.
@@ -119,9 +117,9 @@
  * {@link #setRenderMode}. The default is continuous rendering.
  * <p>
  * <h3>Activity Life-cycle</h3>
- * A GLSurfaceView must be notified when the activity is paused and resumed. GLSurfaceView clients
- * are required to call {@link #onPause()} when the activity pauses and
- * {@link #onResume()} when the activity resumes. These calls allow GLSurfaceView to
+ * A GLSurfaceView must be notified when to pause and resume rendering. GLSurfaceView clients
+ * are required to call {@link #onPause()} when the activity stops and
+ * {@link #onResume()} when the activity starts. These calls allow GLSurfaceView to
  * pause and resume the rendering thread, and also allow GLSurfaceView to release and recreate
  * the OpenGL display.
  * <p>
@@ -294,10 +292,12 @@
      * resumed.
      * <p>
      * If set to true, then the EGL context may be preserved when the GLSurfaceView is paused.
-     * Whether the EGL context is actually preserved or not depends upon whether the
-     * Android device that the program is running on can support an arbitrary number of EGL
-     * contexts or not. Devices that can only support a limited number of EGL contexts must
-     * release the  EGL context in order to allow multiple applications to share the GPU.
+     * <p>
+     * Prior to API level 11, whether the EGL context is actually preserved or not
+     * depends upon whether the Android device can support an arbitrary number of
+     * EGL contexts or not. Devices that can only support a limited number of EGL
+     * contexts must release the EGL context in order to allow multiple applications
+     * to share the GPU.
      * <p>
      * If set to false, the EGL context will be released when the GLSurfaceView is paused,
      * and recreated when the GLSurfaceView is resumed.
@@ -554,9 +554,13 @@
 
 
     /**
-     * Inform the view that the activity is paused. The owner of this view must
-     * call this method when the activity is paused. Calling this method will
-     * pause the rendering thread.
+     * Pause the rendering thread, optionally tearing down the EGL context
+     * depending upon the value of {@link #setPreserveEGLContextOnPause(boolean)}.
+     *
+     * This method should be called when it is no longer desirable for the
+     * GLSurfaceView to continue rendering, such as in response to
+     * {@link android.app.Activity#onStop Activity.onStop}.
+     *
      * Must not be called before a renderer has been set.
      */
     public void onPause() {
@@ -564,10 +568,12 @@
     }
 
     /**
-     * Inform the view that the activity is resumed. The owner of this view must
-     * call this method when the activity is resumed. Calling this method will
-     * recreate the OpenGL display and resume the rendering
-     * thread.
+     * Resumes the rendering thread, re-creating the OpenGL context if necessary. It
+     * is the counterpart to {@link #onPause()}.
+     *
+     * This method should typically be called in
+     * {@link android.app.Activity#onStart Activity.onStart}.
+     *
      * Must not be called before a renderer has been set.
      */
     public void onResume() {
@@ -1354,7 +1360,7 @@
                                 GLSurfaceView view = mGLSurfaceViewWeakRef.get();
                                 boolean preserveEglContextOnPause = view == null ?
                                         false : view.mPreserveEGLContextOnPause;
-                                if (!preserveEglContextOnPause || sGLThreadManager.shouldReleaseEGLContextWhenPausing()) {
+                                if (!preserveEglContextOnPause) {
                                     stopEglContextLocked();
                                     if (LOG_SURFACE) {
                                         Log.i("GLThread", "releasing EGL context because paused tid=" + getId());
@@ -1362,16 +1368,6 @@
                                 }
                             }
 
-                            // When pausing, optionally terminate EGL:
-                            if (pausing) {
-                                if (sGLThreadManager.shouldTerminateEGLWhenPausing()) {
-                                    mEglHelper.finish();
-                                    if (LOG_SURFACE) {
-                                        Log.i("GLThread", "terminating EGL because paused tid=" + getId());
-                                    }
-                                }
-                            }
-
                             // Have we lost the SurfaceView surface?
                             if ((! mHasSurface) && (! mWaitingForSurface)) {
                                 if (LOG_SURFACE) {
@@ -1411,7 +1407,7 @@
                                 if (! mHaveEglContext) {
                                     if (askedToReleaseEglContext) {
                                         askedToReleaseEglContext = false;
-                                    } else if (sGLThreadManager.tryAcquireEglContextLocked(this)) {
+                                    } else {
                                         try {
                                             mEglHelper.start();
                                         } catch (RuntimeException t) {
@@ -1506,7 +1502,6 @@
                     if (createGlInterface) {
                         gl = (GL10) mEglHelper.createGL();
 
-                        sGLThreadManager.checkGLDriver(gl);
                         createGlInterface = false;
                     }
 
@@ -1888,111 +1883,16 @@
                 Log.i("GLThread", "exiting tid=" +  thread.getId());
             }
             thread.mExited = true;
-            if (mEglOwner == thread) {
-                mEglOwner = null;
-            }
             notifyAll();
         }
 
         /*
-         * Tries once to acquire the right to use an EGL
-         * context. Does not block. Requires that we are already
-         * in the sGLThreadManager monitor when this is called.
-         *
-         * @return true if the right to use an EGL context was acquired.
-         */
-        public boolean tryAcquireEglContextLocked(GLThread thread) {
-            if (mEglOwner == thread || mEglOwner == null) {
-                mEglOwner = thread;
-                notifyAll();
-                return true;
-            }
-            checkGLESVersion();
-            if (mMultipleGLESContextsAllowed) {
-                return true;
-            }
-            // Notify the owning thread that it should release the context.
-            // TODO: implement a fairness policy. Currently
-            // if the owning thread is drawing continuously it will just
-            // reacquire the EGL context.
-            if (mEglOwner != null) {
-                mEglOwner.requestReleaseEglContextLocked();
-            }
-            return false;
-        }
-
-        /*
          * Releases the EGL context. Requires that we are already in the
          * sGLThreadManager monitor when this is called.
          */
         public void releaseEglContextLocked(GLThread thread) {
-            if (mEglOwner == thread) {
-                mEglOwner = null;
-            }
             notifyAll();
         }
-
-        public synchronized boolean shouldReleaseEGLContextWhenPausing() {
-            // Release the EGL context when pausing even if
-            // the hardware supports multiple EGL contexts.
-            // Otherwise the device could run out of EGL contexts.
-            return mLimitedGLESContexts;
-        }
-
-        public synchronized boolean shouldTerminateEGLWhenPausing() {
-            checkGLESVersion();
-            return !mMultipleGLESContextsAllowed;
-        }
-
-        public synchronized void checkGLDriver(GL10 gl) {
-            if (! mGLESDriverCheckComplete) {
-                checkGLESVersion();
-                String renderer = gl.glGetString(GL10.GL_RENDERER);
-                if (mGLESVersion < kGLES_20) {
-                    mMultipleGLESContextsAllowed =
-                        ! renderer.startsWith(kMSM7K_RENDERER_PREFIX);
-                    notifyAll();
-                }
-                mLimitedGLESContexts = !mMultipleGLESContextsAllowed;
-                if (LOG_SURFACE) {
-                    Log.w(TAG, "checkGLDriver renderer = \"" + renderer + "\" multipleContextsAllowed = "
-                        + mMultipleGLESContextsAllowed
-                        + " mLimitedGLESContexts = " + mLimitedGLESContexts);
-                }
-                mGLESDriverCheckComplete = true;
-            }
-        }
-
-        private void checkGLESVersion() {
-            if (! mGLESVersionCheckComplete) {
-                mGLESVersion = SystemProperties.getInt(
-                        "ro.opengles.version",
-                        ConfigurationInfo.GL_ES_VERSION_UNDEFINED);
-                if (mGLESVersion >= kGLES_20) {
-                    mMultipleGLESContextsAllowed = true;
-                }
-                if (LOG_SURFACE) {
-                    Log.w(TAG, "checkGLESVersion mGLESVersion =" +
-                            " " + mGLESVersion + " mMultipleGLESContextsAllowed = " + mMultipleGLESContextsAllowed);
-                }
-                mGLESVersionCheckComplete = true;
-            }
-        }
-
-        /**
-         * This check was required for some pre-Android-3.0 hardware. Android 3.0 provides
-         * support for hardware-accelerated views, therefore multiple EGL contexts are
-         * supported on all Android 3.0+ EGL drivers.
-         */
-        private boolean mGLESVersionCheckComplete;
-        private int mGLESVersion;
-        private boolean mGLESDriverCheckComplete;
-        private boolean mMultipleGLESContextsAllowed;
-        private boolean mLimitedGLESContexts;
-        private static final int kGLES_20 = 0x20000;
-        private static final String kMSM7K_RENDERER_PREFIX =
-            "Q3Dimension MSM7500 ";
-        private GLThread mEglOwner;
     }
 
     private static final GLThreadManager sGLThreadManager = new GLThreadManager();
diff --git a/packages/DocumentsUI/res/drawable/ic_check_circle.xml b/packages/DocumentsUI/res/drawable/ic_check_circle.xml
index d49ba6a..62a4e34 100644
--- a/packages/DocumentsUI/res/drawable/ic_check_circle.xml
+++ b/packages/DocumentsUI/res/drawable/ic_check_circle.xml
@@ -19,6 +19,6 @@
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
-        android:fillColor="#FF009688"
+        android:fillColor="?android:attr/colorAccent"
         android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10,-4.48 10,-10S17.52 2 12 2zm-2 15l-5,-5 1.41,-1.41L10 14.17l7.59,-7.59L19 8l-9 9z"/>
 </vector>
diff --git a/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml b/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml
index 23e375d..83f2763 100644
--- a/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/DocumentsUI/res/values-b+sr+Latn/strings.xml
@@ -106,7 +106,6 @@
     <string name="close" msgid="3043722427445528732">"Zatvori"</string>
     <string name="copy_failure_alert_content" msgid="4563147454522476183">"Sledeće datoteke nisu kopirane: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <string name="move_failure_alert_content" msgid="2635075788682922861">"Sledeće datoteke nisu premeštene: <xliff:g id="LIST">%1$s</xliff:g>"</string>
-    <string name="delete_failure_alert_content" msgid="892393767207938353">"Sledeće datoteke nisu izbrisane: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <string name="copy_converted_warning_content" msgid="5753861488218674361">"Ove datoteke su konvertovane u drugi format: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <plurals name="clipboard_files_clipped" formatted="false" msgid="855459017537058539">
       <item quantity="one">Kopirali ste <xliff:g id="COUNT_1">%1$d</xliff:g> datoteku u privremenu memoriju.</item>
@@ -150,6 +149,4 @@
       <item quantity="few">Želite li da izbrišete <xliff:g id="COUNT_1">%1$d</xliff:g> stavke?</item>
       <item quantity="other">Želite li da izbrišete <xliff:g id="COUNT_1">%1$d</xliff:g> stavki?</item>
     </plurals>
-    <string name="too_many_selected" msgid="6781456208116966753">"Žao nam je, istovremeno možete da izaberete najviše 1000 stavki"</string>
-    <string name="too_many_in_select_all" msgid="8281987479885307456">"Možete da izaberete najviše 1000 stavki"</string>
 </resources>
diff --git a/packages/DocumentsUI/res/values-be-rBY/strings.xml b/packages/DocumentsUI/res/values-be-rBY/strings.xml
index fabcdc2..1c06cd1 100644
--- a/packages/DocumentsUI/res/values-be-rBY/strings.xml
+++ b/packages/DocumentsUI/res/values-be-rBY/strings.xml
@@ -46,14 +46,14 @@
     <string name="button_dismiss" msgid="3714065566893946085">"Адхіліць"</string>
     <string name="button_retry" msgid="4392027584153752797">"Паўтарыце спробу"</string>
     <string name="sort_name" msgid="9183560467917256779">"Па назве"</string>
-    <string name="sort_date" msgid="586080032956151448">"Па даце змянення"</string>
+    <string name="sort_date" msgid="586080032956151448">"Па даце ўнясення змен"</string>
     <string name="sort_size" msgid="3350681319735474741">"Па памеры"</string>
     <string name="drawer_open" msgid="4545466532430226949">"Паказаць каранёвыя папкі"</string>
     <string name="drawer_close" msgid="7602734368552123318">"Схаваць каранёвыя папкі"</string>
     <string name="save_error" msgid="6167009778003223664">"Не атрымалася захаваць дакумент"</string>
     <string name="create_error" msgid="3735649141335444215">"Не атрымалася стварыць папку"</string>
     <string name="query_error" msgid="5999895349602476581">"Зараз немагчыма загрузіць змесціва"</string>
-    <string name="root_recent" msgid="4470053704320518133">"Нядаўнія"</string>
+    <string name="root_recent" msgid="4470053704320518133">"Апошнія"</string>
     <string name="root_available_bytes" msgid="8568452858617033281">"<xliff:g id="SIZE">%1$s</xliff:g> свабодна"</string>
     <string name="root_type_service" msgid="2178854894416775409">"Службы захоўвання"</string>
     <string name="root_type_shortcut" msgid="3318760609471618093">"Ярлыкі"</string>
@@ -112,7 +112,6 @@
     <string name="close" msgid="3043722427445528732">"Закрыць"</string>
     <string name="copy_failure_alert_content" msgid="4563147454522476183">"Не былі скапіраваны наступныя файлы: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <string name="move_failure_alert_content" msgid="2635075788682922861">"Не былі перамешчаны наступныя файлы: <xliff:g id="LIST">%1$s</xliff:g>"</string>
-    <string name="delete_failure_alert_content" msgid="892393767207938353">"Не былі выдалены наступныя файлы: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <string name="copy_converted_warning_content" msgid="5753861488218674361">"Гэтыя файлы былі сканвертаваныя ў іншы фармат: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <plurals name="clipboard_files_clipped" formatted="false" msgid="855459017537058539">
       <item quantity="one">У буфер абмену скапіраваны <xliff:g id="COUNT_1">%1$d</xliff:g> файл.</item>
@@ -129,7 +128,7 @@
     <string name="open_external_dialog_root_request" msgid="8899108702926347720">"Даць <xliff:g id="APPNAME"><b>^1</b></xliff:g> доступ да вашых даных, у тым ліку фатаграфій і відэа, на <xliff:g id="STORAGE"><i>^2</i></xliff:g>?"</string>
     <string name="never_ask_again" msgid="4295278542972859268">"Больш не пытацца"</string>
     <string name="allow" msgid="7225948811296386551">"Дазволіць"</string>
-    <string name="deny" msgid="2081879885755434506">"Адмовіць"</string>
+    <string name="deny" msgid="2081879885755434506">"Забараніць"</string>
     <plurals name="elements_selected" formatted="false" msgid="1376955402452875047">
       <item quantity="one">Выбраны <xliff:g id="COUNT_1">%1$d</xliff:g></item>
       <item quantity="few">Выбраны <xliff:g id="COUNT_1">%1$d</xliff:g></item>
@@ -162,6 +161,4 @@
       <item quantity="many">Выдаліць <xliff:g id="COUNT_1">%1$d</xliff:g> элементаў?</item>
       <item quantity="other">Выдаліць <xliff:g id="COUNT_1">%1$d</xliff:g> элемента?</item>
     </plurals>
-    <string name="too_many_selected" msgid="6781456208116966753">"На жаль, вы можаце выбраць не больш за 1000 элементаў адначасова"</string>
-    <string name="too_many_in_select_all" msgid="8281987479885307456">"Атрымалася выбраць толькі 1000 элементаў"</string>
 </resources>
diff --git a/packages/DocumentsUI/res/values-bs-rBA/strings.xml b/packages/DocumentsUI/res/values-bs-rBA/strings.xml
index eff27449..aae7986 100644
--- a/packages/DocumentsUI/res/values-bs-rBA/strings.xml
+++ b/packages/DocumentsUI/res/values-bs-rBA/strings.xml
@@ -106,7 +106,6 @@
     <string name="close" msgid="3043722427445528732">"Zatvori"</string>
     <string name="copy_failure_alert_content" msgid="4563147454522476183">"Nisu kopirani sljedeći fajlovi: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <string name="move_failure_alert_content" msgid="2635075788682922861">"Nisu premješteni sljedeći fajlovi: <xliff:g id="LIST">%1$s</xliff:g>"</string>
-    <string name="delete_failure_alert_content" msgid="892393767207938353">"Nisu izbrisani sljedeći fajlovi: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <string name="copy_converted_warning_content" msgid="5753861488218674361">"Ove datoteke su pretvorene u drugi format: <xliff:g id="LIST">%1$s</xliff:g>"</string>
     <plurals name="clipboard_files_clipped" formatted="false" msgid="855459017537058539">
       <item quantity="one"><xliff:g id="COUNT_1">%1$d</xliff:g> fajl je kopiran u međuspremnik.</item>
@@ -150,6 +149,4 @@
       <item quantity="few">Želite li izbrisati <xliff:g id="COUNT_1">%1$d</xliff:g> stavke?</item>
       <item quantity="other">Želite li izbrisati <xliff:g id="COUNT_1">%1$d</xliff:g> stavki?</item>
     </plurals>
-    <string name="too_many_selected" msgid="6781456208116966753">"Žao nam je, možete izabrati samo do 1000 stavki istovremeno"</string>
-    <string name="too_many_in_select_all" msgid="8281987479885307456">"Možete izabrati samo 1000 stavki"</string>
 </resources>
diff --git a/packages/DocumentsUI/res/values-zh-rHK/strings.xml b/packages/DocumentsUI/res/values-zh-rHK/strings.xml
index 971afdc..21cf755 100644
--- a/packages/DocumentsUI/res/values-zh-rHK/strings.xml
+++ b/packages/DocumentsUI/res/values-zh-rHK/strings.xml
@@ -53,7 +53,7 @@
     <string name="save_error" msgid="6167009778003223664">"無法儲存文件"</string>
     <string name="create_error" msgid="3735649141335444215">"無法建立資料夾"</string>
     <string name="query_error" msgid="5999895349602476581">"目前無法載入內容"</string>
-    <string name="root_recent" msgid="4470053704320518133">"最近"</string>
+    <string name="root_recent" msgid="4470053704320518133">"近期用過"</string>
     <string name="root_available_bytes" msgid="8568452858617033281">"可用空間:<xliff:g id="SIZE">%1$s</xliff:g>"</string>
     <string name="root_type_service" msgid="2178854894416775409">"儲存空間服務"</string>
     <string name="root_type_shortcut" msgid="3318760609471618093">"捷徑"</string>
diff --git a/packages/DocumentsUI/res/values/colors.xml b/packages/DocumentsUI/res/values/colors.xml
index cf0643d..366a8a4 100644
--- a/packages/DocumentsUI/res/values/colors.xml
+++ b/packages/DocumentsUI/res/values/colors.xml
@@ -15,9 +15,6 @@
 -->
 
 <resources>
-    <color name="material_grey_400">#ffbdbdbd</color>
-    <color name="material_teal_700">#ff00796b</color>
-
     <!-- This is the window background, but also the background for anything
          else that needs to manually declare a background matching the "default"
          app background (e.g. the drawer overlay). -->
@@ -26,22 +23,19 @@
     <color name="directory_background">#fff7f7f7</color>
     <color name="menu_search_background">@android:color/transparent</color>
 
-    <color name="primary_dark">@*android:color/primary_dark_material_dark</color>
-    <color name="primary">@*android:color/material_blue_grey_900</color>
-    <color name="accent">@*android:color/accent_material_light</color>
-    <color name="accent_dark">@*android:color/accent_material_dark</color>
-    <color name="action_mode">@color/material_grey_400</color>
-    <color name="status_bar_color">@*android:color/material_blue_grey_950</color>
+    <color name="primary_dark">@*android:color/primary_dark_device_default_settings</color>
+    <color name="primary">@*android:color/primary_device_default_settings</color>
+    <color name="accent">@*android:color/accent_device_default_light</color>
+    <color name="accent_dark">@*android:color/accent_device_default_dark</color>
 
     <color name="band_select_background">#88ffffff</color>
     <color name="band_select_border">#44000000</color>
 
-    <color name="item_doc_background_disabled">#fff4f4f4</color>
-
-    <color name="root_activated_color">@color/material_teal_700</color>
+    <color name="root_activated_color">@*android:color/accent_device_default_700</color>
 
     <!-- TODO: Would be nice to move this to a color-set, but not sure how to support animation -->
     <color name="item_doc_background">#fffafafa</color>
-    <color name="item_doc_background_selected">#ffe0f2f1</color>
+    <color name="item_doc_background_disabled">#fff4f4f4</color>
+    <color name="item_doc_background_selected">@*android:color/accent_device_default_50</color>
 
 </resources>
diff --git a/packages/DocumentsUI/res/values/styles.xml b/packages/DocumentsUI/res/values/styles.xml
index 9f09ebc..b5e32d4 100644
--- a/packages/DocumentsUI/res/values/styles.xml
+++ b/packages/DocumentsUI/res/values/styles.xml
@@ -28,9 +28,8 @@
         <item name="android:colorPrimaryDark">@color/primary_dark</item>
         <item name="android:colorPrimary">@color/primary</item>
         <item name="android:colorAccent">@color/accent</item>
-        <item name="colorActionMode">@color/action_mode</item>
+        <item name="android:colorControlActivated">?android:attr/colorAccent</item>
         <item name="android:queryBackground">@color/menu_search_background</item>
-        <item name="android:statusBarColor">@color/status_bar_color</item>
 
         <item name="android:listDivider">@*android:drawable/list_divider_material</item>
 
diff --git a/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java b/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java
index c28fae8..177ba0d 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/IconUtils.java
@@ -23,181 +23,7 @@
 import android.provider.DocumentsContract.Document;
 import android.util.TypedValue;
 
-import java.util.HashMap;
-
 public class IconUtils {
-
-    private static HashMap<String, Integer> sMimeIcons = new HashMap<>();
-
-    private static void add(String mimeType, int resId) {
-        if (sMimeIcons.put(mimeType, resId) != null) {
-            throw new RuntimeException(mimeType + " already registered!");
-        }
-    }
-
-    static {
-        int icon;
-
-        // Package
-        icon = R.drawable.ic_doc_apk;
-        add("application/vnd.android.package-archive", icon);
-
-        // Audio
-        icon = R.drawable.ic_doc_audio;
-        add("application/ogg", icon);
-        add("application/x-flac", icon);
-
-        // Certificate
-        icon = R.drawable.ic_doc_certificate;
-        add("application/pgp-keys", icon);
-        add("application/pgp-signature", icon);
-        add("application/x-pkcs12", icon);
-        add("application/x-pkcs7-certreqresp", icon);
-        add("application/x-pkcs7-crl", icon);
-        add("application/x-x509-ca-cert", icon);
-        add("application/x-x509-user-cert", icon);
-        add("application/x-pkcs7-certificates", icon);
-        add("application/x-pkcs7-mime", icon);
-        add("application/x-pkcs7-signature", icon);
-
-        // Source code
-        icon = R.drawable.ic_doc_codes;
-        add("application/rdf+xml", icon);
-        add("application/rss+xml", icon);
-        add("application/x-object", icon);
-        add("application/xhtml+xml", icon);
-        add("text/css", icon);
-        add("text/html", icon);
-        add("text/xml", icon);
-        add("text/x-c++hdr", icon);
-        add("text/x-c++src", icon);
-        add("text/x-chdr", icon);
-        add("text/x-csrc", icon);
-        add("text/x-dsrc", icon);
-        add("text/x-csh", icon);
-        add("text/x-haskell", icon);
-        add("text/x-java", icon);
-        add("text/x-literate-haskell", icon);
-        add("text/x-pascal", icon);
-        add("text/x-tcl", icon);
-        add("text/x-tex", icon);
-        add("application/x-latex", icon);
-        add("application/x-texinfo", icon);
-        add("application/atom+xml", icon);
-        add("application/ecmascript", icon);
-        add("application/json", icon);
-        add("application/javascript", icon);
-        add("application/xml", icon);
-        add("text/javascript", icon);
-        add("application/x-javascript", icon);
-
-        // Compressed
-        icon = R.drawable.ic_doc_compressed;
-        add("application/mac-binhex40", icon);
-        add("application/rar", icon);
-        add("application/zip", icon);
-        add("application/x-apple-diskimage", icon);
-        add("application/x-debian-package", icon);
-        add("application/x-gtar", icon);
-        add("application/x-iso9660-image", icon);
-        add("application/x-lha", icon);
-        add("application/x-lzh", icon);
-        add("application/x-lzx", icon);
-        add("application/x-stuffit", icon);
-        add("application/x-tar", icon);
-        add("application/x-webarchive", icon);
-        add("application/x-webarchive-xml", icon);
-        add("application/gzip", icon);
-        add("application/x-7z-compressed", icon);
-        add("application/x-deb", icon);
-        add("application/x-rar-compressed", icon);
-
-        // Contact
-        icon = R.drawable.ic_doc_contact;
-        add("text/x-vcard", icon);
-        add("text/vcard", icon);
-
-        // Event
-        icon = R.drawable.ic_doc_event;
-        add("text/calendar", icon);
-        add("text/x-vcalendar", icon);
-
-        // Font
-        icon = R.drawable.ic_doc_font;
-        add("application/x-font", icon);
-        add("application/font-woff", icon);
-        add("application/x-font-woff", icon);
-        add("application/x-font-ttf", icon);
-
-        // Image
-        icon = R.drawable.ic_doc_image;
-        add("application/vnd.oasis.opendocument.graphics", icon);
-        add("application/vnd.oasis.opendocument.graphics-template", icon);
-        add("application/vnd.oasis.opendocument.image", icon);
-        add("application/vnd.stardivision.draw", icon);
-        add("application/vnd.sun.xml.draw", icon);
-        add("application/vnd.sun.xml.draw.template", icon);
-
-        // PDF
-        icon = R.drawable.ic_doc_pdf;
-        add("application/pdf", icon);
-
-        // Presentation
-        icon = R.drawable.ic_doc_presentation;
-        add("application/vnd.stardivision.impress", icon);
-        add("application/vnd.sun.xml.impress", icon);
-        add("application/vnd.sun.xml.impress.template", icon);
-        add("application/x-kpresenter", icon);
-        add("application/vnd.oasis.opendocument.presentation", icon);
-
-        // Spreadsheet
-        icon = R.drawable.ic_doc_spreadsheet;
-        add("application/vnd.oasis.opendocument.spreadsheet", icon);
-        add("application/vnd.oasis.opendocument.spreadsheet-template", icon);
-        add("application/vnd.stardivision.calc", icon);
-        add("application/vnd.sun.xml.calc", icon);
-        add("application/vnd.sun.xml.calc.template", icon);
-        add("application/x-kspread", icon);
-
-        // Document
-        icon = R.drawable.ic_doc_document;
-        add("application/vnd.oasis.opendocument.text", icon);
-        add("application/vnd.oasis.opendocument.text-master", icon);
-        add("application/vnd.oasis.opendocument.text-template", icon);
-        add("application/vnd.oasis.opendocument.text-web", icon);
-        add("application/vnd.stardivision.writer", icon);
-        add("application/vnd.stardivision.writer-global", icon);
-        add("application/vnd.sun.xml.writer", icon);
-        add("application/vnd.sun.xml.writer.global", icon);
-        add("application/vnd.sun.xml.writer.template", icon);
-        add("application/x-abiword", icon);
-        add("application/x-kword", icon);
-
-        // Video
-        icon = R.drawable.ic_doc_video;
-        add("application/x-quicktimeplayer", icon);
-        add("application/x-shockwave-flash", icon);
-
-        // Word
-        icon = R.drawable.ic_doc_word;
-        add("application/msword", icon);
-        add("application/vnd.openxmlformats-officedocument.wordprocessingml.document", icon);
-        add("application/vnd.openxmlformats-officedocument.wordprocessingml.template", icon);
-
-        // Excel
-        icon = R.drawable.ic_doc_excel;
-        add("application/vnd.ms-excel", icon);
-        add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", icon);
-        add("application/vnd.openxmlformats-officedocument.spreadsheetml.template", icon);
-
-        // Powerpoint
-        icon = R.drawable.ic_doc_powerpoint;
-        add("application/vnd.ms-powerpoint", icon);
-        add("application/vnd.openxmlformats-officedocument.presentationml.presentation", icon);
-        add("application/vnd.openxmlformats-officedocument.presentationml.template", icon);
-        add("application/vnd.openxmlformats-officedocument.presentationml.slideshow", icon);
-    }
-
     public static Drawable loadPackageIcon(Context context, String authority, int icon) {
         if (icon != 0) {
             if (authority != null) {
@@ -225,7 +51,7 @@
             if (mode == State.MODE_GRID) {
                 return context.getDrawable(R.drawable.ic_grid_folder);
             } else {
-                return context.getDrawable(R.drawable.ic_doc_folder);
+                return context.getDrawable(com.android.internal.R.drawable.ic_doc_folder);
             }
         }
 
@@ -233,34 +59,7 @@
     }
 
     public static Drawable loadMimeIcon(Context context, String mimeType) {
-        if (Document.MIME_TYPE_DIR.equals(mimeType)) {
-            return context.getDrawable(R.drawable.ic_doc_folder);
-        }
-
-        // Look for exact match first
-        Integer resId = sMimeIcons.get(mimeType);
-        if (resId != null) {
-            return context.getDrawable(resId);
-        }
-
-        if (mimeType == null) {
-            // TODO: generic icon?
-            return null;
-        }
-
-        // Otherwise look for partial match
-        final String typeOnly = mimeType.split("/")[0];
-        if ("audio".equals(typeOnly)) {
-            return context.getDrawable(R.drawable.ic_doc_audio);
-        } else if ("image".equals(typeOnly)) {
-            return context.getDrawable(R.drawable.ic_doc_image);
-        } else if ("text".equals(typeOnly)) {
-            return context.getDrawable(R.drawable.ic_doc_text);
-        } else if ("video".equals(typeOnly)) {
-            return context.getDrawable(R.drawable.ic_doc_video);
-        } else {
-            return context.getDrawable(R.drawable.ic_doc_generic);
-        }
+        return context.getContentResolver().getTypeDrawable(mimeType);
     }
 
     public static Drawable applyTintColor(Context context, int drawableId, int tintColorId) {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java b/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java
index af6aee7..5e3bbbb 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/QuickViewIntentBuilder.java
@@ -28,6 +28,7 @@
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.net.Uri;
+import android.os.Build;
 import android.provider.DocumentsContract;
 import android.provider.DocumentsContract.Document;
 import android.support.annotation.Nullable;
@@ -73,7 +74,7 @@
     @Nullable Intent build() {
         if (DEBUG) Log.d(TAG, "Preparing intent for doc:" + mDocument.documentId);
 
-        String trustedPkg = mResources.getString(R.string.trusted_quick_viewer_package);
+        String trustedPkg = getQuickViewPackage();
 
         if (!TextUtils.isEmpty(trustedPkg)) {
             Intent intent = new Intent(Intent.ACTION_QUICK_VIEW);
@@ -116,6 +117,16 @@
         return null;
     }
 
+    private String getQuickViewPackage() {
+        String resValue = mResources.getString(R.string.trusted_quick_viewer_package);
+        if (Build.IS_DEBUGGABLE ) {
+            // Allow users of debug devices to override default quick viewer
+            // for the purposes of testing.
+            return android.os.SystemProperties.get("debug.quick_viewer", resValue);
+        }
+        return resValue;
+    }
+
     private int collectViewableUris(ArrayList<Uri> uris) {
         final String[] siblingIds = mModel.getModelIds();
         uris.ensureCapacity(siblingIds.length);
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
index 870c343..47df940 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
@@ -1391,7 +1391,7 @@
                 return mIconHelper.getDocumentIcon(mContext, doc.authority, doc.documentId,
                         doc.mimeType, doc.icon);
             }
-            return mContext.getDrawable(R.drawable.ic_doc_generic);
+            return mContext.getDrawable(com.android.internal.R.drawable.ic_doc_generic);
         }
 
         private String getTitle(List<DocumentInfo> docs) {
diff --git a/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java b/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
index d54bdfd..649dde0 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
@@ -213,13 +213,13 @@
             derivedIcon = R.drawable.ic_root_download;
         } else if (isImages()) {
             derivedType = TYPE_IMAGES;
-            derivedIcon = R.drawable.ic_doc_image;
+            derivedIcon = com.android.internal.R.drawable.ic_doc_image;
         } else if (isVideos()) {
             derivedType = TYPE_VIDEO;
-            derivedIcon = R.drawable.ic_doc_video;
+            derivedIcon = com.android.internal.R.drawable.ic_doc_video;
         } else if (isAudio()) {
             derivedType = TYPE_AUDIO;
-            derivedIcon = R.drawable.ic_doc_audio;
+            derivedIcon = com.android.internal.R.drawable.ic_doc_audio;
         } else if (isRecents()) {
             derivedType = TYPE_RECENTS;
         } else {
diff --git a/packages/EasterEgg/src/com/android/egg/neko/Cat.java b/packages/EasterEgg/src/com/android/egg/neko/Cat.java
index 864b20c..8c44fd6 100644
--- a/packages/EasterEgg/src/com/android/egg/neko/Cat.java
+++ b/packages/EasterEgg/src/com/android/egg/neko/Cat.java
@@ -28,6 +28,7 @@
 import java.util.concurrent.ThreadLocalRandom;
 
 import com.android.egg.R;
+import com.android.internal.logging.MetricsLogger;
 
 public class Cat extends Drawable {
     public static final long[] PURR = {0, 40, 20, 40, 20, 40, 20, 40, 20, 40, 20, 40};
@@ -37,6 +38,8 @@
     private long mSeed;
     private String mName;
     private int mBodyColor;
+    private int mFootType;
+    private boolean mBowTie;
 
     private synchronized Random notSoRandom(long seed) {
         if (mNotSoRandom == null) {
@@ -66,6 +69,15 @@
         return a[i+1];
     }
 
+    public static final int getColorIndex(int q, int[] a) {
+        for(int i = 1; i < a.length; i+=2) {
+            if (a[i] == q) {
+                return i/2;
+            }
+        }
+        return -1;
+    }
+
     public static final int[] P_BODY_COLORS = {
             180, 0xFF212121, // black
             180, 0xFFFFFFFF, // white
@@ -155,14 +167,19 @@
             tint(0xFF000000, D.mouth, D.nose);
         }
 
+        mFootType = 0;
         if (nsr.nextFloat() < 0.25f) {
+            mFootType = 4;
             tint(0xFFFFFFFF, D.foot1, D.foot2, D.foot3, D.foot4);
         } else {
             if (nsr.nextFloat() < 0.25f) {
+                mFootType = 2;
                 tint(0xFFFFFFFF, D.foot1, D.foot2);
             } else if (nsr.nextFloat() < 0.25f) {
+                mFootType = 3; // maybe -2 would be better? meh.
                 tint(0xFFFFFFFF, D.foot3, D.foot4);
             } else if (nsr.nextFloat() < 0.1f) {
+                mFootType = 1;
                 tint(0xFFFFFFFF, (Drawable) choose(nsr, D.foot1, D.foot2, D.foot3, D.foot4));
             }
         }
@@ -175,7 +192,8 @@
 
         final int collarColor = chooseP(nsr, P_COLLAR_COLORS);
         tint(collarColor, D.collar);
-        tint((nsr.nextFloat() < 0.1f) ? collarColor : 0, D.bowtie);
+        mBowTie = nsr.nextFloat() < 0.1f;
+        tint(mBowTie ? collarColor : 0, D.bowtie);
     }
 
     public static Cat create(Context context) {
@@ -290,6 +308,26 @@
         return mBodyColor;
     }
 
+    public void logAdd(Context context) {
+        logCatAction(context, "egg_neko_add");
+    }
+
+    public void logRemove(Context context) {
+        logCatAction(context, "egg_neko_remove");
+    }
+
+    public void logShare(Context context) {
+        logCatAction(context, "egg_neko_share");
+    }
+
+    private void logCatAction(Context context, String prefix) {
+        MetricsLogger.count(context, prefix, 1);
+        MetricsLogger.histogram(context, prefix +"_color",
+                getColorIndex(mBodyColor, P_BODY_COLORS));
+        MetricsLogger.histogram(context, prefix + "_bowtie", mBowTie ? 1 : 0);
+        MetricsLogger.histogram(context, prefix + "_feet", mFootType);
+    }
+
     public static class CatParts {
         public Drawable leftEar;
         public Drawable rightEar;
diff --git a/packages/EasterEgg/src/com/android/egg/neko/NekoActivationActivity.java b/packages/EasterEgg/src/com/android/egg/neko/NekoActivationActivity.java
index 88a7968..c0b725c 100644
--- a/packages/EasterEgg/src/com/android/egg/neko/NekoActivationActivity.java
+++ b/packages/EasterEgg/src/com/android/egg/neko/NekoActivationActivity.java
@@ -20,6 +20,8 @@
 import android.util.Log;
 import android.widget.Toast;
 
+import com.android.internal.logging.MetricsLogger;
+
 public class NekoActivationActivity extends Activity {
     private void toastUp(String s) {
         Toast toast = Toast.makeText(this, s, Toast.LENGTH_SHORT);
@@ -39,6 +41,7 @@
             }
             pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                     PackageManager.DONT_KILL_APP);
+            MetricsLogger.histogram(this, "egg_neko_enable", 0);
             toastUp("\uD83D\uDEAB");
         } else {
             if (NekoLand.DEBUG) {
@@ -46,6 +49,7 @@
             }
             pm.setComponentEnabledSetting(cn, PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
                     PackageManager.DONT_KILL_APP);
+            MetricsLogger.histogram(this, "egg_neko_enable", 1);
             toastUp("\uD83D\uDC31");
         }
         finish();
diff --git a/packages/EasterEgg/src/com/android/egg/neko/NekoDialog.java b/packages/EasterEgg/src/com/android/egg/neko/NekoDialog.java
index a2ffd3e..2d2fbe8 100644
--- a/packages/EasterEgg/src/com/android/egg/neko/NekoDialog.java
+++ b/packages/EasterEgg/src/com/android/egg/neko/NekoDialog.java
@@ -26,6 +26,7 @@
 import android.widget.TextView;
 
 import com.android.egg.R;
+import com.android.internal.logging.MetricsLogger;
 
 import java.util.ArrayList;
 
@@ -51,6 +52,7 @@
         if (currentState == 0 && food.getType() != 0) {
             NekoService.registerJob(getContext(), food.getInterval(getContext()));
         }
+        MetricsLogger.histogram(getContext(), "egg_neko_offered_food", food.getType());
         prefs.setFoodState(food.getType());
         dismiss();
     }
diff --git a/packages/EasterEgg/src/com/android/egg/neko/NekoLand.java b/packages/EasterEgg/src/com/android/egg/neko/NekoLand.java
index e6a4177..feada7f 100644
--- a/packages/EasterEgg/src/com/android/egg/neko/NekoLand.java
+++ b/packages/EasterEgg/src/com/android/egg/neko/NekoLand.java
@@ -44,6 +44,7 @@
 
 import com.android.egg.R;
 import com.android.egg.neko.PrefState.PrefsListener;
+import com.android.internal.logging.MetricsLogger;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -79,7 +80,8 @@
         mAdapter = new CatAdapter();
         recyclerView.setAdapter(mAdapter);
         recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
-        updateCats();
+        int numCats = updateCats();
+        MetricsLogger.histogram(this, "egg_neko_visit_gallery", numCats);
     }
 
     @Override
@@ -88,7 +90,7 @@
         mPrefs.setListener(null);
     }
 
-    private void updateCats() {
+    private int updateCats() {
         Cat[] cats;
         if (CAT_GEN) {
             cats = new Cat[50];
@@ -99,6 +101,7 @@
             cats = mPrefs.getCats().toArray(new Cat[0]);
         }
         mAdapter.setCats(cats);
+        return cats.length;
     }
 
     private void onCatClick(Cat cat) {
@@ -115,11 +118,12 @@
     }
 
     private void onCatRemove(Cat cat) {
+        cat.logRemove(this);
         mPrefs.removeCat(cat);
     }
 
     private void showNameDialog(final Cat cat) {
-        Context context = new ContextThemeWrapper(this,
+        final Context context = new ContextThemeWrapper(this,
                 android.R.style.Theme_Material_Light_Dialog_NoActionBar);
         // TODO: Move to XML, add correct margins.
         View view = LayoutInflater.from(context).inflate(R.layout.edit_text, null);
@@ -134,6 +138,7 @@
                 .setPositiveButton(android.R.string.ok, new OnClickListener() {
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
+                        MetricsLogger.count(context, "egg_neko_rename_cat", 1);
                         cat.setName(text.getText().toString().trim());
                         mPrefs.addCat(cat);
                     }
@@ -244,6 +249,7 @@
                 intent.putExtra(Intent.EXTRA_SUBJECT, cat.getName());
                 intent.setType("image/png");
                 startActivity(Intent.createChooser(intent, null));
+                cat.logShare(this);
             } catch (IOException e) {
                 Log.e("NekoLand", "save: error: " + e);
             }
diff --git a/packages/EasterEgg/src/com/android/egg/neko/NekoService.java b/packages/EasterEgg/src/com/android/egg/neko/NekoService.java
index 1ee3851..32e3358 100644
--- a/packages/EasterEgg/src/com/android/egg/neko/NekoService.java
+++ b/packages/EasterEgg/src/com/android/egg/neko/NekoService.java
@@ -82,6 +82,7 @@
                 if (cats.size() == 0 || rng.nextFloat() <= new_cat_prob) {
                     cat = Cat.create(this);
                     prefs.addCat(cat);
+                    cat.logAdd(this);
                     Log.v(TAG, "A new cat is here: " + cat.getName());
                 } else {
                     cat = cats.get(rng.nextInt(cats.size()));
diff --git a/packages/EasterEgg/src/com/android/egg/neko/NekoTile.java b/packages/EasterEgg/src/com/android/egg/neko/NekoTile.java
index d5e143c..8a3ec8f 100644
--- a/packages/EasterEgg/src/com/android/egg/neko/NekoTile.java
+++ b/packages/EasterEgg/src/com/android/egg/neko/NekoTile.java
@@ -20,6 +20,7 @@
 import android.util.Log;
 
 import com.android.egg.neko.PrefState.PrefsListener;
+import com.android.internal.logging.MetricsLogger;
 
 public class NekoTile extends TileService implements PrefsListener {
 
@@ -47,6 +48,18 @@
     }
 
     @Override
+    public void onTileAdded() {
+        super.onTileAdded();
+        MetricsLogger.count(this, "egg_neko_tile_added", 1);
+    }
+
+    @Override
+    public void onTileRemoved() {
+        super.onTileRemoved();
+        MetricsLogger.count(this, "egg_neko_tile_removed", 1);
+    }
+
+    @Override
     public void onPrefsChanged() {
         updateState();
     }
@@ -65,6 +78,7 @@
     public void onClick() {
         if (mPrefs.getFoodState() != 0) {
             // there's already food loaded, let's empty it
+            MetricsLogger.count(this, "egg_neko_empty_food", 1);
             mPrefs.setFoodState(0);
             NekoService.cancelJob(this);
         } else {
@@ -91,6 +105,7 @@
 
     private void showNekoDialog() {
         Log.d(TAG, "showNekoDialog");
+        MetricsLogger.count(this, "egg_neko_select_food", 1);
         showDialog(new NekoDialog(this));
     }
 }
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 62f33bf..a3070bd 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -492,23 +492,26 @@
             throw new IllegalStateException("Failed to delete " + file);
         }
 
-        final ContentResolver resolver = getContext().getContentResolver();
-        final Uri externalUri = MediaStore.Files.getContentUri("external");
+        final File visibleFile = getFileForDocId(docId, true);
+        if (visibleFile != null) {
+            final ContentResolver resolver = getContext().getContentResolver();
+            final Uri externalUri = MediaStore.Files.getContentUri("external");
 
-        // Remove media store entries for any files inside this directory, using
-        // path prefix match. Logic borrowed from MtpDatabase.
-        if (isDirectory) {
-            final String path = file.getAbsolutePath() + "/";
+            // Remove media store entries for any files inside this directory, using
+            // path prefix match. Logic borrowed from MtpDatabase.
+            if (isDirectory) {
+                final String path = visibleFile.getAbsolutePath() + "/";
+                resolver.delete(externalUri,
+                        "_data LIKE ?1 AND lower(substr(_data,1,?2))=lower(?3)",
+                        new String[] { path + "%", Integer.toString(path.length()), path });
+            }
+
+            // Remove media store entry for this exact file.
+            final String path = visibleFile.getAbsolutePath();
             resolver.delete(externalUri,
-                    "_data LIKE ?1 AND lower(substr(_data,1,?2))=lower(?3)",
-                    new String[] { path + "%", Integer.toString(path.length()), path });
+                    "_data LIKE ?1 AND lower(_data)=lower(?2)",
+                    new String[] { path, path });
         }
-
-        // Remove media store entry for this exact file.
-        final String path = file.getAbsolutePath();
-        resolver.delete(externalUri,
-                "_data LIKE ?1 AND lower(_data)=lower(?2)",
-                new String[] { path, path });
     }
 
     @Override
diff --git a/packages/InputDevices/res/values-be-rBY/strings.xml b/packages/InputDevices/res/values-be-rBY/strings.xml
index a552fa5..7d7683c 100644
--- a/packages/InputDevices/res/values-be-rBY/strings.xml
+++ b/packages/InputDevices/res/values-be-rBY/strings.xml
@@ -3,8 +3,8 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="8016145283189546017">"Input Devices"</string>
     <string name="keyboard_layouts_label" msgid="6688773268302087545">"Клавіятура Android"</string>
-    <string name="keyboard_layout_english_uk_label" msgid="6664258463319999632">"англійская (Вялікабрытанія)"</string>
-    <string name="keyboard_layout_english_us_label" msgid="8994890249649106291">"англійская (ЗША)"</string>
+    <string name="keyboard_layout_english_uk_label" msgid="6664258463319999632">"Англійская (Злучанае Каралеўства)"</string>
+    <string name="keyboard_layout_english_us_label" msgid="8994890249649106291">"Англійская (ЗША)"</string>
     <string name="keyboard_layout_english_us_intl" msgid="3705168594034233583">"Англійская (ЗША), міжнар. раскладка"</string>
     <string name="keyboard_layout_english_us_colemak_label" msgid="4194969610343455380">"Англійская (ЗША), раскладка Colemak"</string>
     <string name="keyboard_layout_english_us_dvorak_label" msgid="793528923171145202">"Англійская (ЗША), раскладка Дворака"</string>
diff --git a/packages/Keyguard/res/values-b+sr+Latn/strings.xml b/packages/Keyguard/res/values-b+sr+Latn/strings.xml
index 22dc059..70f3bda 100644
--- a/packages/Keyguard/res/values-b+sr+Latn/strings.xml
+++ b/packages/Keyguard/res/values-b+sr+Latn/strings.xml
@@ -121,8 +121,10 @@
     <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Treba da unesete šablon kada prelazite sa jednog profila na drugi"</string>
     <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Treba da unesete PIN kada prelazite sa jednog profila na drugi"</string>
     <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Treba da unesete lozinku kada prelazite sa jednog profila na drugi"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administrator uređaja je zaključao uređaj"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Uređaj je ručno zaključan"</string>
+    <!-- no translation found for kg_prompt_reason_device_admin (5838877342219587193) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (500999297306031595) -->
+    <skip />
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
       <item quantity="one">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite šablon.</item>
       <item quantity="few">Niste otključali uređaj <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite šablon.</item>
diff --git a/packages/Keyguard/res/values-be-rBY/strings.xml b/packages/Keyguard/res/values-be-rBY/strings.xml
index ca6a476..4ed1a10 100644
--- a/packages/Keyguard/res/values-be-rBY/strings.xml
+++ b/packages/Keyguard/res/values-be-rBY/strings.xml
@@ -58,7 +58,7 @@
     <string name="keyboardview_keycode_delete" msgid="3337914833206635744">"Выдаліць"</string>
     <string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
     <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забылі ключ"</string>
-    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Няправільны ўзор"</string>
+    <string name="kg_wrong_pattern" msgid="1850806070801358830">"Няправільна ключ"</string>
     <string name="kg_wrong_password" msgid="2333281762128113157">"Няправiльны пароль"</string>
     <string name="kg_wrong_pin" msgid="1131306510833563801">"Няправільны PIN-код"</string>
     <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"Паўтарыце спробу праз <xliff:g id="NUMBER">%d</xliff:g> с."</string>
@@ -123,8 +123,10 @@
     <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Пры пераключэнні профіляў патрабуецца ўзор"</string>
     <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Пры пераключэнні профіляў патрабуецца PIN-код"</string>
     <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Пры пераключэнні профіляў патрабуецца пароль"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Адміністратар прылады заблакіраваў прыладу"</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Прылада была заблакіравана ўручную"</string>
+    <!-- no translation found for kg_prompt_reason_device_admin (5838877342219587193) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (500999297306031595) -->
+    <skip />
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
       <item quantity="one">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзіны. Увядзіце ўзор.</item>
       <item quantity="few">Прылада не была разблакіравана на працягу <xliff:g id="NUMBER_1">%d</xliff:g> гадзін. Увядзіце ўзор.</item>
diff --git a/packages/Keyguard/res/values-bs-rBA/strings.xml b/packages/Keyguard/res/values-bs-rBA/strings.xml
index be73580..062213e 100644
--- a/packages/Keyguard/res/values-bs-rBA/strings.xml
+++ b/packages/Keyguard/res/values-bs-rBA/strings.xml
@@ -121,8 +121,10 @@
     <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Potreban je uzorak nakon prelaska na drugi profil"</string>
     <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Potreban je PIN nakon prelaska na drugi profil"</string>
     <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Potrebna je lozinka nakon prelaska na drugi profil"</string>
-    <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"Administrator je zaključao uređaj."</string>
-    <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"Uređaj je ručno zaključan"</string>
+    <!-- no translation found for kg_prompt_reason_device_admin (5838877342219587193) -->
+    <skip />
+    <!-- no translation found for kg_prompt_reason_user_request (500999297306031595) -->
+    <skip />
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
       <item quantity="one">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sat. Potvrdite obrazac.</item>
       <item quantity="few">Uređaj nije bio otključan <xliff:g id="NUMBER_1">%d</xliff:g> sata. Potvrdite obrazac.</item>
diff --git a/packages/Keyguard/res/values-fr-rCA/strings.xml b/packages/Keyguard/res/values-fr-rCA/strings.xml
index 9bc2456..7259bd3 100644
--- a/packages/Keyguard/res/values-fr-rCA/strings.xml
+++ b/packages/Keyguard/res/values-fr-rCA/strings.xml
@@ -110,20 +110,20 @@
     <string name="keyguard_carrier_default" msgid="8700650403054042153">"Aucun service"</string>
     <string name="accessibility_ime_switch_button" msgid="2829803408288433429">"Changer de méthode d\'entrée"</string>
     <string name="airplane_mode" msgid="3122107900897202805">"Mode Avion"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Le schéma est exigé après le redémarrage de l\'appareil"</string>
+    <string name="kg_prompt_reason_restart_pattern" msgid="5519822969283306009">"Le motif est exigé après le redémarrage de l\'appareil"</string>
     <string name="kg_prompt_reason_restart_pin" msgid="4411398237158448198">"Le NIP est exigé après le redémarrage de l\'appareil"</string>
     <string name="kg_prompt_reason_restart_password" msgid="6504585392626524695">"Le mot de passe est exigé après le redémarrage de l\'appareil"</string>
-    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Le schéma est exigé pour plus de sécurité"</string>
+    <string name="kg_prompt_reason_timeout_pattern" msgid="3717506169674397620">"Le motif est exigé pour plus de sécurité"</string>
     <string name="kg_prompt_reason_timeout_pin" msgid="6951483704195396341">"Le NIP est exigé pour plus de sécurité"</string>
     <string name="kg_prompt_reason_timeout_password" msgid="7306667546971345027">"Le mot de passe est exigé pour plus de sécurité"</string>
-    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Le schéma est exigé lorsque vous changez de profil"</string>
+    <string name="kg_prompt_reason_switch_profiles_pattern" msgid="8476293962695171574">"Le motif est exigé lorsque vous changez de profil"</string>
     <string name="kg_prompt_reason_switch_profiles_pin" msgid="2343607138520460043">"Le NIP est exigé lorsque vous changez de profil"</string>
     <string name="kg_prompt_reason_switch_profiles_password" msgid="1295960907951965927">"Le mot de passe est exigé lorsque vous changez de profil"</string>
     <string name="kg_prompt_reason_device_admin" msgid="5838877342219587193">"L\'administrateur de l\'appareil l\'a verrouillé"</string>
     <string name="kg_prompt_reason_user_request" msgid="500999297306031595">"L\'appareil a été verrouillé manuellement"</string>
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="2697444392228541853">
-      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le schéma.</item>
-      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le schéma.</item>
+      <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le motif.</item>
+      <item quantity="other">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heures. Confirmez le motif.</item>
     </plurals>
     <plurals name="kg_prompt_reason_time_pin" formatted="false" msgid="2118758475374354849">
       <item quantity="one">L\'appareil n\'a pas été déverrouillé depuis <xliff:g id="NUMBER_1">%d</xliff:g> heure. Confirmez le NIP.</item>
diff --git a/packages/Keyguard/res/values-pa-rIN/strings.xml b/packages/Keyguard/res/values-pa-rIN/strings.xml
index 8cf86a0..5f0b6d8 100644
--- a/packages/Keyguard/res/values-pa-rIN/strings.xml
+++ b/packages/Keyguard/res/values-pa-rIN/strings.xml
@@ -25,7 +25,7 @@
     <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"SIM PUK ਅਤੇ ਨਵਾਂ PIN ਕੋਡ ਟਾਈਪ ਕਰੋ"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"SIM PUK ਕੋਡ"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"ਨਵਾਂ SIM PIN ਕੋਡ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"ਪਾਸਵਰਡ ਟਾਈਪ ਕਰਨ ਲਈ ਸਪੱਰਸ਼ ਕਰੋ"</font></string>
+    <string name="keyguard_password_entry_touch_hint" msgid="7858547464982981384"><font size="17">"ਪਾਸਵਰਡ ਟਾਈਪ ਕਰਨ ਲਈ ਛੋਹਵੋ"</font></string>
     <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"ਅਨਲੌਕ ਕਰਨ ਲਈ ਪਾਸਵਰਡ ਟਾਈਪ ਕਰੋ"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"ਅਨਲੌਕ ਕਰਨ ਲਈ PIN ਟਾਈਪ ਕਰੋ"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"ਗ਼ਲਤ PIN ਕੋਡ।"</string>
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
index 60eaad2..038e08d 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
@@ -137,12 +137,21 @@
                 entry,
                 userId,
                 new LockPatternChecker.OnCheckCallback() {
+
+                    @Override
+                    public void onEarlyMatched() {
+                        onPasswordChecked(userId, true /* matched */, 0 /* timeoutMs */,
+                                true /* isValidPassword */);
+                    }
+
                     @Override
                     public void onChecked(boolean matched, int timeoutMs) {
                         setPasswordEntryInputEnabled(true);
                         mPendingLockCheck = null;
-                        onPasswordChecked(userId, matched, timeoutMs,
-                                true /* isValidPassword */);
+                        if (!matched) {
+                            onPasswordChecked(userId, false /* matched */, timeoutMs,
+                                    true /* isValidPassword */);
+                        }
                     }
                 });
     }
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
index 7ea767c..4f5152a 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
@@ -36,6 +36,7 @@
 
     private final AppearAnimationUtils mAppearAnimationUtils;
     private final DisappearAnimationUtils mDisappearAnimationUtils;
+    private final DisappearAnimationUtils mDisappearAnimationUtilsLocked;
     private ViewGroup mContainer;
     private ViewGroup mRow0;
     private ViewGroup mRow1;
@@ -44,6 +45,7 @@
     private View mDivider;
     private int mDisappearYTranslation;
     private View[][] mViews;
+    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
 
     public KeyguardPINView(Context context) {
         this(context, null);
@@ -56,8 +58,14 @@
                 125, 0.6f /* translationScale */,
                 0.45f /* delayScale */, AnimationUtils.loadInterpolator(
                         mContext, android.R.interpolator.fast_out_linear_in));
+        mDisappearAnimationUtilsLocked = new DisappearAnimationUtils(context,
+                (long) (125 * KeyguardPatternView.DISAPPEAR_MULTIPLIER_LOCKED),
+                0.6f /* translationScale */,
+                0.45f /* delayScale */, AnimationUtils.loadInterpolator(
+                        mContext, android.R.interpolator.fast_out_linear_in));
         mDisappearYTranslation = getResources().getDimensionPixelSize(
                 R.dimen.disappear_y_translation);
+        mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
     }
 
     @Override
@@ -136,7 +144,10 @@
         setTranslationY(0);
         AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 280 /* duration */,
                 mDisappearYTranslation, mDisappearAnimationUtils.getInterpolator());
-        mDisappearAnimationUtils.startAnimation2d(mViews,
+        DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor.isUserUnlocked()
+                ? mDisappearAnimationUtils
+                : mDisappearAnimationUtilsLocked;
+        disappearAnimationUtils.startAnimation2d(mViews,
                 new Runnable() {
                     @Override
                     public void run() {
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index e070492..84b90c4 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -55,9 +55,13 @@
     // how many cells the user has to cross before we poke the wakelock
     private static final int MIN_PATTERN_BEFORE_POKE_WAKELOCK = 2;
 
+    // How much we scale up the duration of the disappear animation when the current user is locked
+    public static final float DISAPPEAR_MULTIPLIER_LOCKED = 1.5f;
+
     private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
     private final AppearAnimationUtils mAppearAnimationUtils;
     private final DisappearAnimationUtils mDisappearAnimationUtils;
+    private final DisappearAnimationUtils mDisappearAnimationUtilsLocked;
 
     private CountDownTimer mCountdownTimer = null;
     private LockPatternUtils mLockPatternUtils;
@@ -109,6 +113,10 @@
                 125, 1.2f /* translationScale */,
                 0.6f /* delayScale */, AnimationUtils.loadInterpolator(
                         mContext, android.R.interpolator.fast_out_linear_in));
+        mDisappearAnimationUtilsLocked = new DisappearAnimationUtils(context,
+                (long) (125 * DISAPPEAR_MULTIPLIER_LOCKED), 1.2f /* translationScale */,
+                0.6f /* delayScale */, AnimationUtils.loadInterpolator(
+                mContext, android.R.interpolator.fast_out_linear_in));
         mDisappearYTranslation = getResources().getDimensionPixelSize(
                 R.dimen.disappear_y_translation);
     }
@@ -239,11 +247,21 @@
                     pattern,
                     userId,
                     new LockPatternChecker.OnCheckCallback() {
+
+                        @Override
+                        public void onEarlyMatched() {
+                            onPatternChecked(userId, true /* matched */, 0 /* timeoutMs */,
+                                    true /* isValidPattern */);
+                        }
+
                         @Override
                         public void onChecked(boolean matched, int timeoutMs) {
                             mLockPatternView.enableInput();
                             mPendingLockCheck = null;
-                            onPatternChecked(userId, matched, timeoutMs, true);
+                            if (!matched) {
+                                onPatternChecked(userId, false /* matched */, timeoutMs,
+                                        true /* isValidPattern */);
+                            }
                         }
                     });
             if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) {
@@ -390,25 +408,30 @@
 
     @Override
     public boolean startDisappearAnimation(final Runnable finishRunnable) {
+        float durationMultiplier = mKeyguardUpdateMonitor.isUserUnlocked()
+                ? 1f
+                : DISAPPEAR_MULTIPLIER_LOCKED;
         mLockPatternView.clearPattern();
         enableClipping(false);
         setTranslationY(0);
-        AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 300 /* duration */,
+        AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */,
+                (long) (300 * durationMultiplier),
                 -mDisappearAnimationUtils.getStartTranslation(),
                 mDisappearAnimationUtils.getInterpolator());
-        mDisappearAnimationUtils.startAnimation2d(mLockPatternView.getCellStates(),
-                new Runnable() {
-                    @Override
-                    public void run() {
-                        enableClipping(true);
-                        if (finishRunnable != null) {
-                            finishRunnable.run();
-                        }
+
+        DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor.isUserUnlocked()
+                ? mDisappearAnimationUtils
+                : mDisappearAnimationUtilsLocked;
+        disappearAnimationUtils.startAnimation2d(mLockPatternView.getCellStates(),
+                () -> {
+                    enableClipping(true);
+                    if (finishRunnable != null) {
+                        finishRunnable.run();
                     }
                 }, KeyguardPatternView.this);
         if (!TextUtils.isEmpty(mSecurityMessageDisplay.getText())) {
             mDisappearAnimationUtils.createAnimation(mSecurityMessageDisplay, 0,
-                    200,
+                    (long) (200 * durationMultiplier),
                     - mDisappearAnimationUtils.getStartTranslation() * 3,
                     false /* appearing */,
                     mDisappearAnimationUtils.getInterpolator(),
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index a8419bf..dec1fd2 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -16,6 +16,16 @@
 
 package com.android.keyguard;
 
+import static android.os.BatteryManager.BATTERY_HEALTH_UNKNOWN;
+import static android.os.BatteryManager.BATTERY_STATUS_FULL;
+import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
+import static android.os.BatteryManager.EXTRA_HEALTH;
+import static android.os.BatteryManager.EXTRA_LEVEL;
+import static android.os.BatteryManager.EXTRA_MAX_CHARGING_CURRENT;
+import static android.os.BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE;
+import static android.os.BatteryManager.EXTRA_PLUGGED;
+import static android.os.BatteryManager.EXTRA_STATUS;
+
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
 import android.app.AlarmManager;
@@ -29,7 +39,6 @@
 import android.content.IntentFilter;
 import android.database.ContentObserver;
 import android.graphics.Bitmap;
-import android.hardware.fingerprint.Fingerprint;
 import android.hardware.fingerprint.FingerprintManager;
 import android.hardware.fingerprint.FingerprintManager.AuthenticationCallback;
 import android.hardware.fingerprint.FingerprintManager.AuthenticationResult;
@@ -42,6 +51,7 @@
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.os.UserHandle;
+import android.os.UserManager;
 import android.provider.Settings;
 import android.telephony.ServiceState;
 import android.telephony.SubscriptionInfo;
@@ -69,16 +79,6 @@
 import java.util.List;
 import java.util.Map.Entry;
 
-import static android.os.BatteryManager.BATTERY_HEALTH_UNKNOWN;
-import static android.os.BatteryManager.BATTERY_STATUS_FULL;
-import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
-import static android.os.BatteryManager.EXTRA_HEALTH;
-import static android.os.BatteryManager.EXTRA_LEVEL;
-import static android.os.BatteryManager.EXTRA_MAX_CHARGING_CURRENT;
-import static android.os.BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE;
-import static android.os.BatteryManager.EXTRA_PLUGGED;
-import static android.os.BatteryManager.EXTRA_STATUS;
-
 /**
  * Watches for updates that may be interesting to the keyguard, and provides
  * the up to date information as well as a registration for callbacks that care
@@ -176,6 +176,7 @@
     private boolean mGoingToSleep;
     private boolean mBouncer;
     private boolean mBootCompleted;
+    private boolean mUserUnlocked;
 
     // Device provisioning state
     private boolean mDeviceProvisioned;
@@ -202,6 +203,7 @@
     private AlarmManager mAlarmManager;
     private List<SubscriptionInfo> mSubscriptionInfo;
     private TrustManager mTrustManager;
+    private UserManager mUserManager;
     private int mFingerprintRunningState = FINGERPRINT_STATE_STOPPED;
 
     private final Handler mHandler = new Handler() {
@@ -554,6 +556,10 @@
                 && !hasFingerprintUnlockTimedOut(sCurrentUser);
     }
 
+    public boolean isUserUnlocked() {
+        return mUserUnlocked;
+    }
+
     public StrongAuthTracker getStrongAuthTracker() {
         return mStrongAuthTracker;
     }
@@ -1040,10 +1046,9 @@
                         public void onForegroundProfileSwitch(int newProfileId) {
                             // Ignore.
                         }
-                    });
+                    }, TAG);
         } catch (RemoteException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+            e.rethrowAsRuntimeException();
         }
 
         IntentFilter strongAuthTimeoutFilter = new IntentFilter();
@@ -1059,6 +1064,8 @@
         if (mFpm != null) {
             mFpm.addLockoutResetCallback(mLockoutResetCallback);
         }
+
+        mUserManager = context.getSystemService(UserManager.class);
     }
 
     private void updateFingerprintListeningState() {
@@ -1391,6 +1398,7 @@
     private void handleKeyguardReset() {
         if (DEBUG) Log.d(TAG, "handleKeyguardReset");
         updateFingerprintListeningState();
+        mUserUnlocked = mUserManager.isUserUnlocked(getCurrentUser());
     }
 
     /**
diff --git a/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml b/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml
index c2b84d0..50ce1f9 100644
--- a/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml
+++ b/packages/PrintSpooler/res/values-b+sr+Latn/strings.xml
@@ -62,7 +62,6 @@
     </plurals>
     <string name="printer_extended_description_template" msgid="1366699227703381874">"<xliff:g id="PRINT_SERVICE_LABEL">%1$s</xliff:g> – <xliff:g id="PRINTER_DESCRIPTION">%2$s</xliff:g>"</string>
     <string name="printer_info_desc" msgid="7181988788991581654">"Još informacija o ovom štampaču"</string>
-    <string name="could_not_create_file" msgid="3425025039427448443">"Pravljenje datoteke nije uspelo"</string>
     <string name="print_services_disabled_toast" msgid="9089060734685174685">"Neke usluge štampanja su onemogućene"</string>
     <string name="print_searching_for_printers" msgid="6550424555079932867">"Pretraga štampača"</string>
     <string name="print_no_print_services" msgid="8561247706423327966">"Nijedna usluga štampanja nije omogućena"</string>
diff --git a/packages/PrintSpooler/res/values-be-rBY/strings.xml b/packages/PrintSpooler/res/values-be-rBY/strings.xml
index e74b4cf..c264f92 100644
--- a/packages/PrintSpooler/res/values-be-rBY/strings.xml
+++ b/packages/PrintSpooler/res/values-be-rBY/strings.xml
@@ -63,7 +63,6 @@
     </plurals>
     <string name="printer_extended_description_template" msgid="1366699227703381874">"<xliff:g id="PRINT_SERVICE_LABEL">%1$s</xliff:g> – <xliff:g id="PRINTER_DESCRIPTION">%2$s</xliff:g>"</string>
     <string name="printer_info_desc" msgid="7181988788991581654">"Больш падрабязная інфармацыя пра гэты прынтар"</string>
-    <string name="could_not_create_file" msgid="3425025039427448443">"Не ўдалося стварыць файл"</string>
     <string name="print_services_disabled_toast" msgid="9089060734685174685">"Некаторыя службы друку адключаны"</string>
     <string name="print_searching_for_printers" msgid="6550424555079932867">"Пошук прынтараў"</string>
     <string name="print_no_print_services" msgid="8561247706423327966">"Службы друку не ўключаны"</string>
diff --git a/packages/PrintSpooler/res/values-bs-rBA/strings.xml b/packages/PrintSpooler/res/values-bs-rBA/strings.xml
index cc04d66..c3c9bb33 100644
--- a/packages/PrintSpooler/res/values-bs-rBA/strings.xml
+++ b/packages/PrintSpooler/res/values-bs-rBA/strings.xml
@@ -62,7 +62,6 @@
     </plurals>
     <string name="printer_extended_description_template" msgid="1366699227703381874">"<xliff:g id="PRINT_SERVICE_LABEL">%1$s</xliff:g> - <xliff:g id="PRINTER_DESCRIPTION">%2$s</xliff:g>"</string>
     <string name="printer_info_desc" msgid="7181988788991581654">"Više informacija o ovom štampaču"</string>
-    <string name="could_not_create_file" msgid="3425025039427448443">"Nije uspjelo kreiranje fajla"</string>
     <string name="print_services_disabled_toast" msgid="9089060734685174685">"Neke usluge za štampanje su isključene"</string>
     <string name="print_searching_for_printers" msgid="6550424555079932867">"Traženje štampača"</string>
     <string name="print_no_print_services" msgid="8561247706423327966">"Usluga za štampanje nije uključena"</string>
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
index 999d82d..6140428 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
@@ -838,9 +838,15 @@
 
                     try (ParcelFileDescriptor source = pipe[0]) {
                         try (ParcelFileDescriptor destination = pipe[1]) {
-
-                            mRenderer.renderPage(mPageIndex, bitmap.getWidth(), bitmap.getHeight(),
-                                    mRenderSpec.printAttributes, destination);
+                            synchronized (mLock) {
+                                if (mRenderer != null) {
+                                    mRenderer.renderPage(mPageIndex, bitmap.getWidth(),
+                                            bitmap.getHeight(), mRenderSpec.printAttributes,
+                                            destination);
+                                } else {
+                                    throw new IllegalStateException("Renderer is disconnected");
+                                }
+                            }
                         }
 
                         BitmapSerializeUtils.readBitmapPixels(bitmap, source);
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index c318275..2c4025d 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -2060,6 +2060,7 @@
 
         if (mPrinterRegistry != null) {
             mPrinterRegistry.setTrackedPrinter(null);
+            mPrinterRegistry.setOnPrintersChangeListener(null);
         }
 
         if (mPrintersObserver != null) {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java
index 86366dd..9fca959 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrinterRegistry.java
@@ -120,13 +120,11 @@
         @Override
         public void onLoaderReset(Loader<List<PrinterInfo>> loader) {
             mPrinters.clear();
-            if (mOnPrintersChangeListener != null) {
-                // Post a message as we are in onLoadFinished and certain operations
-                // are not allowed in this callback, such as fragment transactions.
-                // Clients should not handle this explicitly.
-                mHandler.obtainMessage(MyHandler.MSG_PRINTERS_INVALID,
-                        mOnPrintersChangeListener).sendToTarget();
-            }
+
+            // Post a message as we are in onLoadFinished and certain operations
+            // are not allowed in this callback, such as fragment transactions.
+            // Clients should not handle this explicitly.
+            mHandler.obtainMessage(MyHandler.MSG_PRINTERS_INVALID).sendToTarget();
         }
 
         // LoaderCallbacks#onLoadFinished
@@ -134,15 +132,12 @@
         public void onLoadFinished(Loader<List<PrinterInfo>> loader, List<PrinterInfo> printers) {
             mPrinters.clear();
             mPrinters.addAll(printers);
-            if (mOnPrintersChangeListener != null) {
-                // Post a message as we are in onLoadFinished and certain operations
-                // are not allowed in this callback, such as fragment transactions.
-                // Clients should not handle this explicitly.
-                SomeArgs args = SomeArgs.obtain();
-                args.arg1 = mOnPrintersChangeListener;
-                args.arg2 = printers;
-                mHandler.obtainMessage(MyHandler.MSG_PRINTERS_CHANGED, args).sendToTarget();
-            }
+
+            // Post a message as we are in onLoadFinished and certain operations
+            // are not allowed in this callback, such as fragment transactions.
+            // Clients should not handle this explicitly.
+            mHandler.obtainMessage(MyHandler.MSG_PRINTERS_CHANGED, printers).sendToTarget();
+
             if (!mReady) {
                 mReady = true;
                 if (mReadyCallback != null) {
@@ -158,7 +153,7 @@
         }
     };
 
-    private static final class MyHandler extends Handler {
+    private final class MyHandler extends Handler {
         public static final int MSG_PRINTERS_CHANGED = 0;
         public static final int MSG_PRINTERS_INVALID = 1;
 
@@ -171,16 +166,17 @@
         public void handleMessage(Message message) {
             switch (message.what) {
                 case MSG_PRINTERS_CHANGED: {
-                    SomeArgs args = (SomeArgs) message.obj;
-                    OnPrintersChangeListener callback = (OnPrintersChangeListener) args.arg1;
-                    List<PrinterInfo> printers = (List<PrinterInfo>) args.arg2;
-                    args.recycle();
-                    callback.onPrintersChanged(printers);
+                    List<PrinterInfo> printers = (List<PrinterInfo>) message.obj;
+
+                    if (mOnPrintersChangeListener != null) {
+                        mOnPrintersChangeListener.onPrintersChanged(printers);
+                    }
                 } break;
 
                 case MSG_PRINTERS_INVALID: {
-                    OnPrintersChangeListener callback = (OnPrintersChangeListener) message.obj;
-                    callback.onPrintersInvalid();
+                    if (mOnPrintersChangeListener != null) {
+                        mOnPrintersChangeListener.onPrintersInvalid();
+                    }
                 } break;
             }
         }
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-hdpi/ic_bt_cellphone.png
deleted file mode 100644
index 6e29d23..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_bt_headphones_a2dp.png b/packages/SettingsLib/res/drawable-hdpi/ic_bt_headphones_a2dp.png
deleted file mode 100644
index 6110e9e..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_bt_headphones_a2dp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_bt_headset_hfp.png b/packages/SettingsLib/res/drawable-hdpi/ic_bt_headset_hfp.png
deleted file mode 100644
index 6cca225..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_bt_headset_hfp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_bt_misc_hid.png b/packages/SettingsLib/res/drawable-hdpi/ic_bt_misc_hid.png
deleted file mode 100644
index 6445f2a..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_bt_misc_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_bt_network_pan.png b/packages/SettingsLib/res/drawable-hdpi/ic_bt_network_pan.png
deleted file mode 100644
index 78c0294..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_bt_network_pan.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_bt_pointing_hid.png b/packages/SettingsLib/res/drawable-hdpi/ic_bt_pointing_hid.png
deleted file mode 100644
index 2fcc3b0..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_bt_pointing_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-hdpi/ic_lockscreen_ime.png b/packages/SettingsLib/res/drawable-hdpi/ic_lockscreen_ime.png
deleted file mode 100644
index 70d35bf..0000000
--- a/packages/SettingsLib/res/drawable-hdpi/ic_lockscreen_ime.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-ldrtl-hdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-ldrtl-hdpi/ic_bt_cellphone.png
deleted file mode 100644
index 2d9b75e..0000000
--- a/packages/SettingsLib/res/drawable-ldrtl-hdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-ldrtl-mdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-ldrtl-mdpi/ic_bt_cellphone.png
deleted file mode 100644
index b6ebe34..0000000
--- a/packages/SettingsLib/res/drawable-ldrtl-mdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-ldrtl-xhdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-ldrtl-xhdpi/ic_bt_cellphone.png
deleted file mode 100644
index 8b67b91..0000000
--- a/packages/SettingsLib/res/drawable-ldrtl-xhdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-mdpi/ic_bt_cellphone.png
deleted file mode 100644
index 1fa0a3d..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_bt_headphones_a2dp.png b/packages/SettingsLib/res/drawable-mdpi/ic_bt_headphones_a2dp.png
deleted file mode 100644
index 175bd78..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_bt_headphones_a2dp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_bt_headset_hfp.png b/packages/SettingsLib/res/drawable-mdpi/ic_bt_headset_hfp.png
deleted file mode 100644
index 05b27e8..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_bt_headset_hfp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_bt_misc_hid.png b/packages/SettingsLib/res/drawable-mdpi/ic_bt_misc_hid.png
deleted file mode 100644
index 6e9f8ae..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_bt_misc_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_bt_network_pan.png b/packages/SettingsLib/res/drawable-mdpi/ic_bt_network_pan.png
deleted file mode 100644
index 5f3371f..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_bt_network_pan.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_bt_pointing_hid.png b/packages/SettingsLib/res/drawable-mdpi/ic_bt_pointing_hid.png
deleted file mode 100644
index 539d77f..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_bt_pointing_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-mdpi/ic_lockscreen_ime.png b/packages/SettingsLib/res/drawable-mdpi/ic_lockscreen_ime.png
deleted file mode 100644
index 3216776..0000000
--- a/packages/SettingsLib/res/drawable-mdpi/ic_lockscreen_ime.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-xhdpi/ic_bt_cellphone.png
deleted file mode 100644
index 4f381ba..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_headphones_a2dp.png b/packages/SettingsLib/res/drawable-xhdpi/ic_bt_headphones_a2dp.png
deleted file mode 100644
index c67127d..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_headphones_a2dp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_headset_hfp.png b/packages/SettingsLib/res/drawable-xhdpi/ic_bt_headset_hfp.png
deleted file mode 100644
index d3b356b..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_headset_hfp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_misc_hid.png b/packages/SettingsLib/res/drawable-xhdpi/ic_bt_misc_hid.png
deleted file mode 100644
index 2d38129..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_misc_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_network_pan.png b/packages/SettingsLib/res/drawable-xhdpi/ic_bt_network_pan.png
deleted file mode 100644
index fb76575..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_network_pan.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_pointing_hid.png b/packages/SettingsLib/res/drawable-xhdpi/ic_bt_pointing_hid.png
deleted file mode 100644
index d8b68eb..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_bt_pointing_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xhdpi/ic_lockscreen_ime.png b/packages/SettingsLib/res/drawable-xhdpi/ic_lockscreen_ime.png
deleted file mode 100644
index 02cc3af..0000000
--- a/packages/SettingsLib/res/drawable-xhdpi/ic_lockscreen_ime.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_cellphone.png
deleted file mode 100644
index 7805b7a..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png
deleted file mode 100644
index 8127774..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_headphones_a2dp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_headset_hfp.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_headset_hfp.png
deleted file mode 100644
index 84b8085..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_headset_hfp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_misc_hid.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_misc_hid.png
deleted file mode 100644
index 289d6ac..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_misc_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_network_pan.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_network_pan.png
deleted file mode 100644
index 72bc804..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_network_pan.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_pointing_hid.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_pointing_hid.png
deleted file mode 100644
index e31ce2b..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_bt_pointing_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxhdpi/ic_lockscreen_ime.png b/packages/SettingsLib/res/drawable-xxhdpi/ic_lockscreen_ime.png
deleted file mode 100644
index f23b0e7..0000000
--- a/packages/SettingsLib/res/drawable-xxhdpi/ic_lockscreen_ime.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_cellphone.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_cellphone.png
deleted file mode 100644
index 1e12f96..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_cellphone.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_headphones_a2dp.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_headphones_a2dp.png
deleted file mode 100644
index 8b547d9..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_headphones_a2dp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_headset_hfp.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_headset_hfp.png
deleted file mode 100644
index 03c5033..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_headset_hfp.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_misc_hid.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_misc_hid.png
deleted file mode 100644
index b9a9923..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_misc_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_network_pan.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_network_pan.png
deleted file mode 100644
index 989e1ab..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_network_pan.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_pointing_hid.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_pointing_hid.png
deleted file mode 100644
index de8c389..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_bt_pointing_hid.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable-xxxhdpi/ic_lockscreen_ime.png b/packages/SettingsLib/res/drawable-xxxhdpi/ic_lockscreen_ime.png
deleted file mode 100644
index 2eb8a92..0000000
--- a/packages/SettingsLib/res/drawable-xxxhdpi/ic_lockscreen_ime.png
+++ /dev/null
Binary files differ
diff --git a/packages/SettingsLib/res/drawable/ic_bt_cellphone.xml b/packages/SettingsLib/res/drawable/ic_bt_cellphone.xml
new file mode 100644
index 0000000..cc9b732
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_cellphone.xml
@@ -0,0 +1,29 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent"
+    android:autoMirrored="true">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36
+            1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1
+            -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45
+            0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/drawable/ic_bt_headphones_a2dp.xml b/packages/SettingsLib/res/drawable/ic_bt_headphones_a2dp.xml
new file mode 100644
index 0000000..bbe3914
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_headphones_a2dp.xml
@@ -0,0 +1,26 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,1c-4.97,0 -9,4.03 -9,9v7c0,1.66 1.34,3 3,3h3v-8H5v-2c0,-3.87
+            3.13,-7 7,-7s7,3.13 7,7v2h-4v8h3c1.66,0 3,-1.34 3,-3v-7c0,-4.97 -4.03,-9 -9,-9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/drawable/ic_bt_headset_hfp.xml b/packages/SettingsLib/res/drawable/ic_bt_headset_hfp.xml
new file mode 100644
index 0000000..ceeef19
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_headset_hfp.xml
@@ -0,0 +1,27 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,1c-4.97,0 -9,4.03 -9,9v7c0,1.66 1.34,3 3,3h3v-8H5v-2c0,-3.87
+            3.13,-7 7,-7s7,3.13 7,7v2h-4v8h4v1h-7v2h6c1.66,0 3,-1.34 3,-3V10c0,-4.97 -4.03,-9
+            -9,-9z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/drawable/ic_bt_misc_hid.xml b/packages/SettingsLib/res/drawable/ic_bt_misc_hid.xml
new file mode 100644
index 0000000..67b42ae
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_misc_hid.xml
@@ -0,0 +1,26 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M15,7.5V2H9v5.5l3,3 3,-3zM7.5,9H2v6h5.5l3,-3 -3,-3zM9,16.5V22h6v-5.5l-3,-3
+            -3,3zM16.5,9l-3,3 3,3H22V9h-5.5z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/drawable/ic_bt_network_pan.xml b/packages/SettingsLib/res/drawable/ic_bt_network_pan.xml
new file mode 100644
index 0000000..c5ab01c
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_network_pan.xml
@@ -0,0 +1,30 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M14.24,12.01l2.32,2.32c0.28,-0.72 0.44,-1.51 0.44,-2.33 0,-0.82
+            -0.16,-1.59 -0.43,-2.31l-2.33,2.32zM19.53,6.71l-1.26,1.26c0.63,1.21 0.98,2.57
+            0.98,4.02s-0.36,2.82 -0.98,4.02l1.2,1.2c0.97,-1.54 1.54,-3.36 1.54,-5.31 -0.01,-1.89
+            -0.55,-3.67 -1.48,-5.19zM15.71,7.71L10,2L9,2v7.59L4.41,5 3,6.41 8.59,12 3,17.59 4.41,19
+            9,14.41L9,22h1l5.71,-5.71 -4.3,-4.29
+            4.3,-4.29zM11,5.83l1.88,1.88L11,9.59L11,5.83zM12.88,16.29L11,18.17v-3.76l1.88,1.88z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/drawable/ic_bt_pointing_hid.xml b/packages/SettingsLib/res/drawable/ic_bt_pointing_hid.xml
new file mode 100644
index 0000000..821618d
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_bt_pointing_hid.xml
@@ -0,0 +1,26 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M13,1.07L13,9h7c0,-4.08 -3.05,-7.44 -7,-7.93zM4,15c0,4.42
+            3.58,8 8,8s8,-3.58 8,-8v-4L4,11v4zM11,1.07C7.05,1.56 4,4.92 4,9h7L11,1.07z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/drawable/ic_lockscreen_ime.xml b/packages/SettingsLib/res/drawable/ic_lockscreen_ime.xml
new file mode 100644
index 0000000..4aa8569
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_lockscreen_ime.xml
@@ -0,0 +1,26 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0"
+    android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M20,5L4,5c-1.1,0 -1.99,0.9 -1.99,2L2,17c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9
+            2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM11,8h2v2h-2L11,8zM11,11h2v2h-2v-2zM8,8h2v2L8,10L8,8zM8,11h2v2L8,13v-2zM7,13L5,13v-2h2v2zM7,10L5,10L5,8h2v2zM16,17L8,17v-2h8v2zM16,13h-2v-2h2v2zM16,10h-2L14,8h2v2zM19,13h-2v-2h2v2zM19,10h-2L17,8h2v2z"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SettingsLib/res/layout/settings_with_drawer.xml b/packages/SettingsLib/res/layout/settings_with_drawer.xml
index 67296a6..a68a44e 100644
--- a/packages/SettingsLib/res/layout/settings_with_drawer.xml
+++ b/packages/SettingsLib/res/layout/settings_with_drawer.xml
@@ -41,6 +41,11 @@
                 android:background="?android:attr/colorPrimary" />
         </FrameLayout>
         <FrameLayout
+            android:id="@+id/content_header_container"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            style="?android:attr/actionBarStyle" />
+        <FrameLayout
             android:id="@+id/content_frame"
             android:layout_width="match_parent"
             android:layout_height="fill_parent"
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index eae49c4..04617a1 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Laat skynliggings toe"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Laat skynliggings toe"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Aktiveer aansigkenmerkinspeksie"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Gebruik eerder die DHCP-kliënt van Lollipop af as die nuwe Android DHCP-kliënt."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Hou mobiele data altyd aktief, selfs wanneer Wi‑Fi aktief is (vir vinnige netwerkwisseling)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Laat USB-ontfouting toe?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-ontfouting is net vir ontwikkelingsdoeleindes bedoel. Gebruik dit om data te kopieer tussen jou rekenaar en jou toestel, programme op jou toestel te installeer sonder kennisgewing en om loglêerdata te lees."</string>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index 4fd4259..1e02ac4 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"አስቂኝ ሥፍራዎችን ፍቀድ"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"አስቂኝ ሥፍራዎችን ፍቀድ"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"የእይታ አይነታ ምርመራን አንቃ"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ከአዲሱ የAndroid DHCP ደንበኛ ይልቅ የLollipop DHCP ደንበኛውን ይጠቀሙ።"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ምንም እንኳን Wi‑Fi ንቁ ቢሆንም የሞባይል ውሂብን ንቁ እንደሆነ አቆይ (ለፈጣን የአውታረ መረብ ቅይይር)።"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"የUSB ማረሚያ ይፈቀድ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"የUSB አድስ ለግንባታ አላማ ብቻ የታሰበ ነው። ከኮምፒዩተርህ ወደ መሳሪያህ ውሂብ ለመገልበጥ፣ መሣሪያህ ላይ ያለ ማሳወቂያ መተግበሪያዎችን መጫን፣ እና ማስታወሻ ውሂብ ማንበብ ለመጠቀም ይቻላል።"</string>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 246880c..028aa05 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"السماح بمواقع وهمية"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"السماح بمواقع وهمية"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"تمكين فحص سمة العرض"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"‏يمكنك استخدام برنامج DHCP من Lollipop بدلاً من برنامج DHCP الجديد على Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"‏اجعل بيانات الجوّال نشطة دائمًا، حتى عندما يكون اتصال Wi‑Fi نشطًا (لتبديل الشبكة بسرعة)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"‏هل تريد السماح بتصحيح أخطاء USB؟"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"‏تم تصميم تصحيح أخطاء USB لأغراض التطوير فقط. يمكن استخدامه لنسخ البيانات بين الكمبيوتر والجهاز، وتثبيت التطبيقات على جهازك بدون تنبيه، وقراءة بيانات السجل."</string>
diff --git a/packages/SettingsLib/res/values-az-rAZ/strings.xml b/packages/SettingsLib/res/values-az-rAZ/strings.xml
index 0caeea0..7af4c02 100644
--- a/packages/SettingsLib/res/values-az-rAZ/strings.xml
+++ b/packages/SettingsLib/res/values-az-rAZ/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Sınaq yerləşmələrə icazə verin"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Sınaq yerləşmələrə icazə verin"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Atribut inspeksiyasına baxışa icazə verin"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Android DHCP klienti əvəzinə Lollipopdan DHCP klient istifadə edin."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Hətta Wi‑Fi aktiv olanda da mobil datanı həmişə aktiv saxlayın (sürətli şəbəkək keçidi üçün)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB debaq funksiyasına icazə verilsin?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB sazlanması yalnız inkişaf məqsədlidir. Kompüteriniz və cihazınız arasında datanı kopyalamaq üçün ondan istifadə edin, bildiriş olmadan tətbiqləri cihazınıza quraşdırın və qeydiyyat datasını oxuyun."</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index a61462d..e8621b2 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -91,7 +91,7 @@
     <string name="tether_settings_title_bluetooth" msgid="355855408317564420">"Bluetooth privezivanje"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Povezivanje sa internetom"</string>
     <string name="tether_settings_title_all" msgid="8356136101061143841">"Povezivanje i prenosni hotspot"</string>
-    <string name="managed_user_title" msgid="8109605045406748842">"Sve radne aplikacije"</string>
+    <string name="managed_user_title" msgid="8101244883654409696">"Profil za posao"</string>
     <string name="user_guest" msgid="8475274842845401871">"Gost"</string>
     <string name="unknown" msgid="1592123443519355854">"Nepoznato"</string>
     <string name="running_process_item_user_label" msgid="3129887865552025943">"Korisnik: <xliff:g id="USER_NAME">%1$s</xliff:g>"</string>
@@ -123,8 +123,6 @@
     <string name="tts_engine_settings_button" msgid="1030512042040722285">"Pokreni podešavanja mašine"</string>
     <string name="tts_engine_preference_section_title" msgid="448294500990971413">"Željena mašina"</string>
     <string name="tts_general_section_title" msgid="4402572014604490502">"Opšte"</string>
-    <string name="tts_reset_speech_pitch_title" msgid="5789394019544785915">"Resetujte visinu tona govora"</string>
-    <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"Resetujte visinu tona kojom se tekst izgovara na podrazumevanu."</string>
   <string-array name="tts_rate_entries">
     <item msgid="6695494874362656215">"Veoma sporo"</item>
     <item msgid="4795095314303559268">"Sporo"</item>
@@ -167,6 +165,7 @@
     <string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogući detaljniju evidenciju za Wi‑Fi"</string>
     <string name="wifi_aggressive_handover" msgid="9194078645887480917">"Agresivan prelaz sa Wi‑Fi mreže na mobilnu"</string>
     <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Uvek dozvoli skeniranje Wi‑Fi-ja u romingu"</string>
+    <string name="legacy_dhcp_client" msgid="694426978909127287">"Koristi zastareli DHCP klijent"</string>
     <string name="mobile_data_always_on" msgid="7745605759775320362">"Podaci za mobilne uređaje su uvek aktivni"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Onemogući glavno podešavanje jačine zvuka"</string>
     <string name="wifi_display_certification_summary" msgid="1155182309166746973">"Prikaz opcija za sertifikaciju bežičnog ekrana"</string>
@@ -275,8 +274,8 @@
     <string name="inactive_app_active_summary" msgid="4174921824958516106">"Aktivna. Dodirnite da biste je deaktivirali."</string>
     <string name="runningservices_settings_title" msgid="8097287939865165213">"Pokrenute usluge"</string>
     <string name="runningservices_settings_summary" msgid="854608995821032748">"Prikaz i kontrola trenutno pokrenutih usluga"</string>
-    <string name="enable_webview_multiprocess" msgid="3352660896640797330">"Višeprocesni WebView"</string>
-    <string name="enable_webview_multiprocess_desc" msgid="2485604010404197724">"Pokrećite WebView prikazivače zasebno"</string>
+    <string name="enable_webview_multiprocess" msgid="3405948012467585908">"Omogući višeprocesni WebView"</string>
+    <string name="enable_webview_multiprocess_desc" msgid="852226124223847283">"Pokrećite WebView prikazivače u okviru izolovanog procesa."</string>
     <string name="select_webview_provider_title" msgid="4628592979751918907">"Primena WebView-a"</string>
     <string name="select_webview_provider_dialog_title" msgid="4370551378720004872">"Podesite primenu WebView-a"</string>
     <string name="select_webview_provider_toast_text" msgid="5466970498308266359">"Ovaj izbor više nije važeći. Pokušajte ponovo."</string>
@@ -324,11 +323,6 @@
     <string name="enabled_by_admin" msgid="2386503803463071894">"Omogućio je administrator"</string>
     <string name="disabled_by_admin" msgid="3669999613095206948">"Onemogućio je administrator"</string>
     <string name="home" msgid="3256884684164448244">"Početna za Podešavanja"</string>
-  <string-array name="battery_labels">
-    <item msgid="8494684293649631252">"0%"</item>
-    <item msgid="8934126114226089439">"50%"</item>
-    <item msgid="1286113608943010849">"100%"</item>
-  </string-array>
     <string name="charge_length_format" msgid="8978516217024434156">"Pre <xliff:g id="ID_1">%1$s</xliff:g>"</string>
     <string name="remaining_length_format" msgid="7886337596669190587">"Još <xliff:g id="ID_1">%1$s</xliff:g>"</string>
     <string name="screen_zoom_summary_small" msgid="5867245310241621570">"Mali"</string>
diff --git a/packages/SettingsLib/res/values-be-rBY/arrays.xml b/packages/SettingsLib/res/values-be-rBY/arrays.xml
index 9ac862b7..63b8b9b 100644
--- a/packages/SettingsLib/res/values-be-rBY/arrays.xml
+++ b/packages/SettingsLib/res/values-be-rBY/arrays.xml
@@ -128,12 +128,12 @@
     <item msgid="1340692776955662664">"Выклікаць стэк на glGetError"</item>
   </string-array>
   <string-array name="show_non_rect_clip_entries">
-    <item msgid="993742912147090253">"Выключана"</item>
+    <item msgid="993742912147090253">"Адключана"</item>
     <item msgid="675719912558941285">"Намаляваць непрамавугольную вобласць кліпа сінім колерам"</item>
     <item msgid="1064373276095698656">"Вылучыце выпрабаваныя каманды малявання зялёным колерам"</item>
   </string-array>
   <string-array name="track_frame_time_entries">
-    <item msgid="2193584639058893150">"Выключана"</item>
+    <item msgid="2193584639058893150">"Адключана"</item>
     <item msgid="2751513398307949636">"На экране ў выглядзе слупкоў"</item>
     <item msgid="1851438178120770973">"У абалонцы adb dumpsys gfxinfo"</item>
   </string-array>
diff --git a/packages/SettingsLib/res/values-be-rBY/strings.xml b/packages/SettingsLib/res/values-be-rBY/strings.xml
index 5d4d688..a8abb49 100644
--- a/packages/SettingsLib/res/values-be-rBY/strings.xml
+++ b/packages/SettingsLib/res/values-be-rBY/strings.xml
@@ -23,7 +23,7 @@
     <string name="wifi_fail_to_scan" msgid="1265540342578081461">"Не атрымлiваецца выканаць сканаванне для сетак"</string>
     <string name="wifi_security_none" msgid="7985461072596594400">"Няма"</string>
     <string name="wifi_remembered" msgid="4955746899347821096">"Захавана"</string>
-    <string name="wifi_disabled_generic" msgid="4259794910584943386">"Адключана"</string>
+    <string name="wifi_disabled_generic" msgid="4259794910584943386">"Адключаная"</string>
     <string name="wifi_disabled_network_failure" msgid="2364951338436007124">"Збой канфігурацыі IP"</string>
     <string name="wifi_disabled_wifi_failure" msgid="3081668066612876581">"Збой падлучэння Wi-Fi"</string>
     <string name="wifi_disabled_password_failure" msgid="8659805351763133575">"Праблема аўтэнтыфікацыі"</string>
@@ -71,7 +71,7 @@
     <string name="bluetooth_hid_profile_summary_use_for" msgid="232727040453645139">"Выкарыстоўваць для ўводу"</string>
     <string name="bluetooth_pairing_accept" msgid="6163520056536604875">"Падлучыць"</string>
     <string name="bluetooth_pairing_accept_all_caps" msgid="6061699265220789149">"СПАЛУЧЫЦЬ"</string>
-    <string name="bluetooth_pairing_decline" msgid="4185420413578948140">"Скасаваць"</string>
+    <string name="bluetooth_pairing_decline" msgid="4185420413578948140">"Адмена"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="4982239145676394429">"Спалучэнне дае доступ да вашых кантактаў і гісторыі выклікаў пры падлучэнні."</string>
     <string name="bluetooth_pairing_error_message" msgid="3748157733635947087">"Не атрымалася падключыцца да прылады <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
     <string name="bluetooth_pairing_pin_error_message" msgid="8337234855188925274">"Не атрымалася спалучыцца з прыладай <xliff:g id="DEVICE_NAME">%1$s</xliff:g>, таму што PIN-код або пароль няправiльныя."</string>
@@ -91,14 +91,14 @@
     <string name="tether_settings_title_bluetooth" msgid="355855408317564420">"Bluetooth-мадэм"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Мадэм"</string>
     <string name="tether_settings_title_all" msgid="8356136101061143841">"Мадэм і партатыўны хотспот"</string>
-    <string name="managed_user_title" msgid="8109605045406748842">"Усе працоўныя праграмы"</string>
+    <string name="managed_user_title" msgid="8101244883654409696">"Рабочы профіль"</string>
     <string name="user_guest" msgid="8475274842845401871">"Госць"</string>
     <string name="unknown" msgid="1592123443519355854">"Невядома"</string>
     <string name="running_process_item_user_label" msgid="3129887865552025943">"Карыстальнiк: <xliff:g id="USER_NAME">%1$s</xliff:g>"</string>
     <string name="launch_defaults_some" msgid="313159469856372621">"Некат. параметры па змаўч. усталяваныя"</string>
     <string name="launch_defaults_none" msgid="4241129108140034876">"Параметры па змаўчанні не ўсталяваныя"</string>
     <string name="tts_settings" msgid="8186971894801348327">"Налады Text-to-speech"</string>
-    <string name="tts_settings_title" msgid="1237820681016639683">"Сінтэз маўлення"</string>
+    <string name="tts_settings_title" msgid="1237820681016639683">"Выводзіць праз Text-to-speech"</string>
     <string name="tts_default_rate_title" msgid="6030550998379310088">"Хуткасць гаворкі"</string>
     <string name="tts_default_rate_summary" msgid="4061815292287182801">"Хуткасць, з якой кажуць тэкст"</string>
     <string name="tts_default_pitch_title" msgid="6135942113172488671">"Тон"</string>
@@ -123,8 +123,6 @@
     <string name="tts_engine_settings_button" msgid="1030512042040722285">"Запуск налад модулю"</string>
     <string name="tts_engine_preference_section_title" msgid="448294500990971413">"Выбраны модуль"</string>
     <string name="tts_general_section_title" msgid="4402572014604490502">"Агульныя"</string>
-    <string name="tts_reset_speech_pitch_title" msgid="5789394019544785915">"Скід вышыні голасу падчас маўлення"</string>
-    <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"Скінуць вышыню голасу, з якой прагаворваецца тэкст, да стандартнай."</string>
   <string-array name="tts_rate_entries">
     <item msgid="6695494874362656215">"Вельмі павольна"</item>
     <item msgid="4795095314303559268">"Павольна"</item>
@@ -139,7 +137,7 @@
     <string name="choose_profile" msgid="8229363046053568878">"Выбраць профіль"</string>
     <string name="category_personal" msgid="1299663247844969448">"Асабісты"</string>
     <string name="category_work" msgid="8699184680584175622">"Рабочы"</string>
-    <string name="development_settings_title" msgid="215179176067683667">"Параметры распрацоўшчыка"</string>
+    <string name="development_settings_title" msgid="215179176067683667">"Опцыі распрацоўшчыка"</string>
     <string name="development_settings_enable" msgid="542530994778109538">"Уключыць параметры распрацоўшчыка"</string>
     <string name="development_settings_summary" msgid="1815795401632854041">"Налада параметраў для распрацоўкі прыкладанняў"</string>
     <string name="development_settings_not_available" msgid="4308569041701535607">"Параметры распрацоўшчыка недаступныя для гэтага карыстальніка"</string>
@@ -167,6 +165,7 @@
     <string name="wifi_verbose_logging" msgid="4203729756047242344">"Уключыць падрабязны журнал Wi‑Fi"</string>
     <string name="wifi_aggressive_handover" msgid="9194078645887480917">"Агрэсіўны пераход з Wi‑Fi на маб. сетку"</string>
     <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Заўсёды дазваляць роўмінгавае сканіраванне Wi‑Fi"</string>
+    <string name="legacy_dhcp_client" msgid="694426978909127287">"Выкарыстоўваць кліент DHCP ранейшых версій"</string>
     <string name="mobile_data_always_on" msgid="7745605759775320362">"Перадача даных мабільнай сувязі заўсёды актыўна"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Адключыць абсалютны гук"</string>
     <string name="wifi_display_certification_summary" msgid="1155182309166746973">"Паказаць опцыі сертыфікацыі бесправаднога дысплея"</string>
@@ -226,7 +225,7 @@
     <string name="enable_opengl_traces_title" msgid="6790444011053219871">"Уключэнне слядоў OpenGL"</string>
     <string name="usb_audio_disable_routing" msgid="8114498436003102671">"Адключыць аўдыёмаршрутызацыю USB"</string>
     <string name="usb_audio_disable_routing_summary" msgid="980282760277312264">"Адкл. аўт. перанакір. на перыфер. USB-прыл. аўдыё"</string>
-    <string name="debug_layout" msgid="5981361776594526155">"Паказаць межы макета"</string>
+    <string name="debug_layout" msgid="5981361776594526155">"Паказаць межы размяшчэння"</string>
     <string name="debug_layout_summary" msgid="2001775315258637682">"Паказаць межы кліпу, палі і г. д."</string>
     <string name="force_rtl_layout_all_locales" msgid="2259906643093138978">"Прымусовая раскладка справа налева"</string>
     <string name="force_rtl_layout_all_locales_summary" msgid="9192797796616132534">"Прымусовая раскладка экрана справа налева для ўсіх рэгіянальных налад"</string>
@@ -237,12 +236,12 @@
     <string name="force_msaa" msgid="7920323238677284387">"Прымусовае выкананне 4x MSAA"</string>
     <string name="force_msaa_summary" msgid="9123553203895817537">"Уключыць 4x MSAA у прыкладаннях з OpenGL ES 2.0"</string>
     <string name="show_non_rect_clip" msgid="505954950474595172">"Адладка аперацый непрамавугольнага кліпа"</string>
-    <string name="track_frame_time" msgid="6146354853663863443">"Профіль рэндэрынгу GPU"</string>
+    <string name="track_frame_time" msgid="6146354853663863443">"Апрацоўка профілю GPU"</string>
     <string name="window_animation_scale_title" msgid="6162587588166114700">"Маштаб анімацыі акна"</string>
     <string name="transition_animation_scale_title" msgid="387527540523595875">"Маштаб перадачы анімацыі"</string>
     <string name="animator_duration_scale_title" msgid="3406722410819934083">"Шкала працягласці анiматара"</string>
     <string name="overlay_display_devices_title" msgid="5364176287998398539">"Мадэляванне другасных дысплеяў"</string>
-    <string name="debug_applications_category" msgid="4206913653849771549">"Праграмы"</string>
+    <string name="debug_applications_category" msgid="4206913653849771549">"Прыкладаннi"</string>
     <string name="immediately_destroy_activities" msgid="1579659389568133959">"Не захоўваць дзеянні"</string>
     <string name="immediately_destroy_activities_summary" msgid="3592221124808773368">"Знішч. кож.дзеянне, як толькі карыст.пакідае яго"</string>
     <string name="app_process_limit_title" msgid="4280600650253107163">"Ліміт фонавага працэсу"</string>
@@ -275,8 +274,8 @@
     <string name="inactive_app_active_summary" msgid="4174921824958516106">"Актыўная. Краніце, каб пераключыць."</string>
     <string name="runningservices_settings_title" msgid="8097287939865165213">"Запушчаныя службы"</string>
     <string name="runningservices_settings_summary" msgid="854608995821032748">"Прагляд запушчаных службаў i кіраванне iмi"</string>
-    <string name="enable_webview_multiprocess" msgid="3352660896640797330">"Шматпрацэсны WebView"</string>
-    <string name="enable_webview_multiprocess_desc" msgid="2485604010404197724">"Запусціць апрацоўшчыкі WebView асобна"</string>
+    <string name="enable_webview_multiprocess" msgid="3405948012467585908">"Уключыць шматпрацэсны WebView"</string>
+    <string name="enable_webview_multiprocess_desc" msgid="852226124223847283">"Запусціць апрацоўшчыкі WebView у ізаляваным працэсе."</string>
     <string name="select_webview_provider_title" msgid="4628592979751918907">"Рэалізацыя WebView"</string>
     <string name="select_webview_provider_dialog_title" msgid="4370551378720004872">"Наладзіць рэалізацыю WebView"</string>
     <string name="select_webview_provider_toast_text" msgid="5466970498308266359">"Гэты варыянт больш не даступны. Паспрабуйце яшчэ раз."</string>
@@ -324,11 +323,6 @@
     <string name="enabled_by_admin" msgid="2386503803463071894">"Уключана адміністратарам"</string>
     <string name="disabled_by_admin" msgid="3669999613095206948">"Адключана адміністратарам"</string>
     <string name="home" msgid="3256884684164448244">"Галоўная старонка налад"</string>
-  <string-array name="battery_labels">
-    <item msgid="8494684293649631252">"0 %"</item>
-    <item msgid="8934126114226089439">"50 %"</item>
-    <item msgid="1286113608943010849">"100 %"</item>
-  </string-array>
     <string name="charge_length_format" msgid="8978516217024434156">"<xliff:g id="ID_1">%1$s</xliff:g> таму назад"</string>
     <string name="remaining_length_format" msgid="7886337596669190587">"Засталося <xliff:g id="ID_1">%1$s</xliff:g>"</string>
     <string name="screen_zoom_summary_small" msgid="5867245310241621570">"Маленькі"</string>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index efc88ca..138f318 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Разрешаване на измислени местоположения"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Разрешаване на измислени местоположения"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Актив. на инспектирането на атрибутите за преглед"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Използване на клиентската програма за DHCP от Lollipop вместо новата програма на Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Мобилните данни са активни винаги – дори когато функцията за Wi‑Fi е включена (за бързо превключване между мрежите)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Разрешаване на отстраняването на грешки през USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Отстраняването на грешки през USB е предназначено само за програмни цели. Използвайте го за копиране на данни между компютъра и устройството си, за инсталиране на приложения на устройството си без известяване и за четене на регистрационни данни."</string>
diff --git a/packages/SettingsLib/res/values-bn-rBD/strings.xml b/packages/SettingsLib/res/values-bn-rBD/strings.xml
index 3717643..d8cd85cb 100644
--- a/packages/SettingsLib/res/values-bn-rBD/strings.xml
+++ b/packages/SettingsLib/res/values-bn-rBD/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"নকল অবস্থানের অনুমতি দিন"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"মক অবস্থানগুলি মঞ্জুর করুন"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"অ্যাট্রিবিউট পরিদর্শন দেখা সক্ষম করুন"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"নতুন Android DHCP ক্লায়েন্টের পরিবর্তে Lollipop এর থেকে DHCP ক্লায়েন্ট ব্যবহার করুন৷"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ওয়াই-ফাই সক্রিয় থাকার সময়েও (দ্রুত নেটওয়ার্কে পাল্টানোর জন্য) সর্বদা মোবাইল ডেটা সক্রিয় রাখুন।"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB ডিবাগিং মঞ্জুর করবেন?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB ডিবাগিং কেবলমাত্র বিকাশ করার উদ্দেশ্যে। আপনার কম্পিউটার এবং আপনার ডিভাইসের মধ্যে ডেটা অনুলিপি করতে এটি ব্যবহার করুন, বিজ্ঞপ্তি ছাড়া আপনার ডিভাইসে অ্যাপ্লিকেশানগুলি ইনস্টল করুন এবং ডেটা লগ পড়ুন।"</string>
diff --git a/packages/SettingsLib/res/values-bs-rBA/strings.xml b/packages/SettingsLib/res/values-bs-rBA/strings.xml
index 28e3507..9589b62 100644
--- a/packages/SettingsLib/res/values-bs-rBA/strings.xml
+++ b/packages/SettingsLib/res/values-bs-rBA/strings.xml
@@ -91,7 +91,7 @@
     <string name="tether_settings_title_bluetooth" msgid="355855408317564420">"Dijeljenje Bluetooth veze"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Dijeljenje veze"</string>
     <string name="tether_settings_title_all" msgid="8356136101061143841">"Dijeljenje internetske veze i prijenosna pristupna tačka"</string>
-    <string name="managed_user_title" msgid="8109605045406748842">"Sve radne aplikacije"</string>
+    <string name="managed_user_title" msgid="8101244883654409696">"Profil za Work"</string>
     <string name="user_guest" msgid="8475274842845401871">"Gost"</string>
     <string name="unknown" msgid="1592123443519355854">"Nepoznato"</string>
     <string name="running_process_item_user_label" msgid="3129887865552025943">"Korisnik: <xliff:g id="USER_NAME">%1$s</xliff:g>"</string>
@@ -123,8 +123,6 @@
     <string name="tts_engine_settings_button" msgid="1030512042040722285">"Pokreni postavke programa"</string>
     <string name="tts_engine_preference_section_title" msgid="448294500990971413">"Željeni program"</string>
     <string name="tts_general_section_title" msgid="4402572014604490502">"Opće"</string>
-    <string name="tts_reset_speech_pitch_title" msgid="5789394019544785915">"Postavite visinu glasa"</string>
-    <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"Visinu glasa koji izgovara tekst postavite na podrazumjevanu."</string>
   <string-array name="tts_rate_entries">
     <item msgid="6695494874362656215">"Veoma sporo"</item>
     <item msgid="4795095314303559268">"Sporo"</item>
@@ -167,6 +165,7 @@
     <string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogućiti Wi-Fi Verbose zapisivanje"</string>
     <string name="wifi_aggressive_handover" msgid="9194078645887480917">"Agresivni Wi-Fi u mobilnoj primopredaji"</string>
     <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Uvijek dopustiti Wi-Fi lutajuće skeniranje"</string>
+    <string name="legacy_dhcp_client" msgid="694426978909127287">"Koristi zastareli DHCP klijent"</string>
     <string name="mobile_data_always_on" msgid="7745605759775320362">"Mobilni podaci uvijek aktivni"</string>
     <string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Onemogućite apsolutnu jačinu zvuka"</string>
     <string name="wifi_display_certification_summary" msgid="1155182309166746973">"Pokaži opcije za certifikaciju Bežičnog prikaza"</string>
@@ -275,8 +274,8 @@
     <string name="inactive_app_active_summary" msgid="4174921824958516106">"Aktivno. Dodirnite za promjenu opcije."</string>
     <string name="runningservices_settings_title" msgid="8097287939865165213">"Pokrenute usluge"</string>
     <string name="runningservices_settings_summary" msgid="854608995821032748">"Prikažite trenutno pokrenute usluge i upravljajte njima"</string>
-    <string name="enable_webview_multiprocess" msgid="3352660896640797330">"Višeprocesni WebView"</string>
-    <string name="enable_webview_multiprocess_desc" msgid="2485604010404197724">"Pokreni odvojeno WebView rendere"</string>
+    <string name="enable_webview_multiprocess" msgid="3405948012467585908">"Omogućiti višeprocesni WebView"</string>
+    <string name="enable_webview_multiprocess_desc" msgid="852226124223847283">"Pokrenite WebView operatera u izolovanom procesu."</string>
     <string name="select_webview_provider_title" msgid="4628592979751918907">"Postavljanje WebViewa"</string>
     <string name="select_webview_provider_dialog_title" msgid="4370551378720004872">"Podesi WebView"</string>
     <string name="select_webview_provider_toast_text" msgid="5466970498308266359">"Ovaj izbor više ne vrijedi. Pokušajte ponovo."</string>
@@ -324,11 +323,6 @@
     <string name="enabled_by_admin" msgid="2386503803463071894">"Omogućio administrator"</string>
     <string name="disabled_by_admin" msgid="3669999613095206948">"Onemogućio je administrator"</string>
     <string name="home" msgid="3256884684164448244">"Postavke početne stranice"</string>
-  <string-array name="battery_labels">
-    <item msgid="8494684293649631252">"0%"</item>
-    <item msgid="8934126114226089439">"50%"</item>
-    <item msgid="1286113608943010849">"100%"</item>
-  </string-array>
     <string name="charge_length_format" msgid="8978516217024434156">"prije <xliff:g id="ID_1">%1$s</xliff:g>"</string>
     <string name="remaining_length_format" msgid="7886337596669190587">"Još otprilike <xliff:g id="ID_1">%1$s</xliff:g>"</string>
     <string name="screen_zoom_summary_small" msgid="5867245310241621570">"Malo"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 2487313..ec3718e 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Ubicacions simulades"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permet les ubicacions simulades"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Inspecció d\'atributs de visualització"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utilitza el client DHCP de Lollipop en lloc del nou client DHCP d\'Android"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantén les dades mòbils sempre actives, fins i tot quan la Wi‑Fi està activada (per canviar de xarxa ràpidament)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Voleu permetre la depuració USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"La depuració USB només està indicada per a activitats de desenvolupament. Fes-la servir intercanviar dades entre l\'ordinador i el dispositiu, per instal·lar aplicacions al dispositiu sense rebre notificacions i per llegir dades de registre."</string>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 42c7bdf..71ef930 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Povolit simulované polohy"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Povolit simulované polohy"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Kontrola atributu zobrazení"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Namísto nového klientu DHCP Android použít klient DHCP z verze Lollipop."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mobilní data budou vždy ponechána aktivní, i když bude aktivní Wi-Fi (za účelem rychlého přepínání sítí)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Povolit ladění USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Ladění prostřednictvím rozhraní USB je určeno pouze pro účely vývoje. Použijte je ke kopírování dat mezi počítačem a zařízením, instalaci aplikací do zařízení bez upozornění a čtení dat protokolů."</string>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 8f8d7a6..3685684 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Imiterede placeringer"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Tillad imiterede placeringer"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Aktivér visning af attributinspektion"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Brug DHCP-klienten fra Lollipop i stedet for den nye DHCP-klient i Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Hold altid mobildata aktiveret, selv når Wi-Fi er aktiveret (for at skifte hurtigt mellem netværk)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Vil du tillade USB-fejlretning?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-fejlretning er kun beregnet til udvikling og kan bruges til at kopiere data mellem din computer og enheden, installere apps på enheden uden meddelelser og læse logdata."</string>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index 169d6b0..2773a34 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Simulierte Standorte"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Simulierte Standorte zulassen"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Inspektion der Anzeigeattribute aktivieren"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"DHCP-Client von Lollipop statt des neuen Android-DHCP-Clients verwenden"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Die mobile Datennutzung bleibt auch dann aktiviert, wenn WLAN aktiviert ist. Dies dient einem schnelleren Wechsel zwischen Netzwerken."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB-Debugging zulassen?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-Debugging ist nur für Entwicklungszwecke vorgesehen. Damit kannst du Daten zwischen deinem Computer und deinem Gerät kopieren, Apps auf deinem Gerät ohne Benachrichtigung installieren und Protokolldaten lesen."</string>
@@ -284,8 +283,8 @@
     <string name="convert_to_file_encryption_enabled" msgid="2861258671151428346">"Wechseln…"</string>
     <string name="convert_to_file_encryption_done" msgid="7859766358000523953">"Dateiverschlüsselung wird bereits verwendet."</string>
     <string name="title_convert_fbe" msgid="1263622876196444453">"Zu Dateiverschlüsselung wechseln"</string>
-    <string name="convert_to_fbe_warning" msgid="6139067817148865527">"Stelle von Datenpartitions- auf dateibasierte Verschlüsselung um.\n !!Achtung!! Dadurch werden alle deine Daten gelöscht.\n Es handelt sich um eine Alphaversion, die möglicherweise nicht korrekt funktioniert.\n Wähle \"Wischen und wechseln…\" aus, um fortzufahren."</string>
-    <string name="button_convert_fbe" msgid="5152671181309826405">"Wischen und wechseln…"</string>
+    <string name="convert_to_fbe_warning" msgid="6139067817148865527">"Du möchtest von Datenpartitions- zur dateibasierten Verschlüsselung wechseln.\nAchtung! Dadurch werden alle deine Daten gelöscht.\nEs handelt sich um eine Alphaversion, die möglicherweise nicht korrekt funktioniert.\nWähle \"Löschen und wechseln…\" aus, um fortzufahren."</string>
+    <string name="button_convert_fbe" msgid="5152671181309826405">"Löschen und wechseln…"</string>
     <string name="picture_color_mode" msgid="4560755008730283695">"Farbmodus für Bilder"</string>
     <string name="picture_color_mode_desc" msgid="1141891467675548590">"sRGB verwenden"</string>
     <string name="daltonizer_mode_disabled" msgid="7482661936053801862">"Deaktiviert"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index c525145..1c54833 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Να επιτρέπονται ψευδείς τοποθεσίες"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Να επιτρέπονται ψευδείς τοποθεσίες"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Ενεργοποίηση του ελέγχου χαρακτηριστικών προβολής"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Χρήση εφαρμογής-πελάτη DHCP παλαιού τύπου από το Lollipop αντί για τη νέα εφαρμογή-πελάτη DHCP Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Τα δεδομένα κινητής τηλεφωνίας να διατηρούνται πάντα ενεργά, ακόμα και όταν είναι ενεργό το Wi-Fi (για γρήγορη εναλλαγή δικτύου)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Να επιτρέπεται ο εντοπισμός σφαλμάτων USB;"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Ο εντοπισμός σφαλμάτων USB προορίζεται μόνο για σκοπούς προγραμματισμού. Χρησιμοποιήστε τον για αντιγραφή δεδομένων μεταξύ του υπολογιστή και της συσκευής σας, για την εγκατάσταση εφαρμογών στη συσκευή σας χωρίς προειδοποίηση και για την ανάγνωση δεδομένων καταγραφής."</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index 05fc9db..012e279 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Allow mock locations"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Allow mock locations"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Enable view attribute inspection"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Use the DHCP client from Lollipop instead of the new Android DHCP client."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Always keep mobile data active, even when Wi‑Fi is active (for fast network switching)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Allow USB debugging?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB debugging is intended for development purposes only. Use it to copy data between your computer and your device, install apps on your device without notification and read log data."</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index 05fc9db..012e279 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Allow mock locations"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Allow mock locations"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Enable view attribute inspection"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Use the DHCP client from Lollipop instead of the new Android DHCP client."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Always keep mobile data active, even when Wi‑Fi is active (for fast network switching)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Allow USB debugging?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB debugging is intended for development purposes only. Use it to copy data between your computer and your device, install apps on your device without notification and read log data."</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index 05fc9db..012e279 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Allow mock locations"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Allow mock locations"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Enable view attribute inspection"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Use the DHCP client from Lollipop instead of the new Android DHCP client."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Always keep mobile data active, even when Wi‑Fi is active (for fast network switching)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Allow USB debugging?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB debugging is intended for development purposes only. Use it to copy data between your computer and your device, install apps on your device without notification and read log data."</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 2fd5e9b..2e21bb1 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Ubicaciones de prueba"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permitir ubicaciones de prueba"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Habilitar inspección de atributos de vista"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Usar el cliente DHCP de Lollipop en lugar del nuevo cliente DHCP de Android"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Siempre mantén los datos móviles activos, incluso cuando esté activada la conexión Wi‑Fi (para cambiar de red de forma rápida)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"¿Permitir depuración por USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"La depuración por USB solo está indicada para actividades de programación. Úsala para copiar datos entre tu computadora y el dispositivo, para instalar aplicaciones en el dispositivo sin recibir notificaciones y para leer datos de registro."</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index c6cddd9..19e7c27 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Ubicaciones simuladas"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permitir ubicaciones simuladas"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Inspección de atributos de vista"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utiliza el cliente DHCP de Lollipop en lugar del nuevo cliente DHCP de Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantén los datos móviles siempre activos, aunque la conexión Wi‑Fi esté activada (para cambiar de red rápidamente)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"¿Permitir depuración por USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"La depuración por USB solo está indicada para actividades de desarrollo. Puedes utilizarla para intercambiar datos entre el ordenador y el dispositivo, para instalar aplicaciones en el dispositivo sin recibir notificaciones y para leer datos de registro."</string>
diff --git a/packages/SettingsLib/res/values-et-rEE/strings.xml b/packages/SettingsLib/res/values-et-rEE/strings.xml
index cda3d9f..90638e5 100644
--- a/packages/SettingsLib/res/values-et-rEE/strings.xml
+++ b/packages/SettingsLib/res/values-et-rEE/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Luba võltsasukohti"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Luba võltsasukohti"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Luba kuva atribuudi hindamine"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Kasutage uue Androidi DHCP-kliendi asemel Lollipopi DHCP-klienti."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Hoidke mobiilne andmeside alati aktiivsena, isegi kui WiFi on aktiivne (võrkude kiireks vahetamiseks)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Luban USB silumise?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-silumine on mõeldud ainult arendamiseks. Kasutage seda andmete kopeerimiseks oma arvuti ja seadme vahel, seadmesse rakenduste installimiseks ilma teatisteta ning logiandmete lugemiseks."</string>
diff --git a/packages/SettingsLib/res/values-eu-rES/strings.xml b/packages/SettingsLib/res/values-eu-rES/strings.xml
index 76f7798..f03856b 100644
--- a/packages/SettingsLib/res/values-eu-rES/strings.xml
+++ b/packages/SettingsLib/res/values-eu-rES/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Onartu kokapen faltsuak"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Onartu kokapen faltsuak"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Gaitu ikuspegiaren atributuak ikuskatzeko aukera"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Erabili Lollipop bertsioko DHCP bezeroa eta ez Android DHCP bezero berria."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantendu mugikorreko datuak beti aktibo, baita Wi-Fi konexioa aktibo dagoenean ere (sarez bizkor aldatu ahal izateko)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB arazketa onartu?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB arazketa garapen-xedeetarako soilik dago diseinatuta. Erabil ezazu ordenagailuaren eta gailuaren artean datuak kopiatzeko, aplikazioak gailuan jakinarazi gabe instalatzeko eta erregistro-datuak irakurtzeko."</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 8729ffd..4a02b33 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"مکان‌های کاذب مجاز هستند"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"مکان‌های کاذب مجاز هستند"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"فعال کردن بازبینی ویژگی بازدید"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"‏به جای کلاینت Android DHCP جدید، از کلاینت Lollipop DHCP استفاده کنید."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"‏داده سلولی همیشه فعال نگه داشته می‌شود، حتی وقتی Wi-Fi فعال است (برای جابه‌جایی سریع شبکه)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"‏اشکال‌زدایی USB انجام شود؟"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"‏اشکال‌زدایی USB فقط برای اهداف برنامه‌نویسی در نظر گرفته شده است. از آن برای رونوشت‌برداری داده بین رایانه و دستگاهتان، نصب برنامه‌ها در دستگاهتان بدون اعلان و خواندن داده‌های گزارش استفاده کنید."</string>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index 5c4287a..bb53056 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Salli sijaintien imitointi"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Salli sijaintien imitointi"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Ota attribuuttinäkymän tarkistus käyttöön"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Käytä Lollipopin DHCP-asiakassovellusta Androidin uuden DHCP-asiakassovelluksen sijasta."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Pidä mobiilidata aina käytössä, vaikka Wi-Fi olisi aktiivinen. Tämä mahdollistaa nopeamman vaihtelun verkkojen välillä."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Sallitaanko USB-vianetsintä?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-vianetsintä on tarkoitettu vain kehittäjien käyttöön. Sen avulla voidaan kopioida tietoja tietokoneesi ja laitteesi välillä, asentaa laitteeseesi sovelluksia ilmoittamatta siitä sinulle ja lukea lokitietoja."</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 6f7982d..b5bb68c 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Autoriser les positions fictives"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Autoriser les positions fictives"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Activer l\'inspection d\'attribut d\'affichage"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utiliser le client DHCP de Lollipop au lieu du nouveau client DHCP Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Toujours garder les données cellulaires actives, même lorsque le Wi-Fi est activé (pour la commutation rapide entre les réseaux)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Autoriser le débogage USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Le débogage USB est conçu uniquement pour le développement. Utilisez-le pour copier des données entre votre ordinateur et votre appareil, installer des applications sur votre appareil sans notification et lire les données de journal."</string>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index a72ecd6..456fea1 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Positions fictives"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Autoriser les positions fictives"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Activer inspect. attribut affich."</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utiliser le client DHCP de Lollipop au lieu du nouveau client DHCP Android"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Maintenir l\'état actif des données mobiles, même lorsque le Wi‑Fi est actif (pour changer rapidement de réseau)"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Autoriser le débogage USB ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Le débogage USB est conçu uniquement pour le développement. Utilisez-le pour copier des données entre votre ordinateur et votre appareil, installer des applications sur votre appareil sans notification et lire les données de journal."</string>
diff --git a/packages/SettingsLib/res/values-gl-rES/strings.xml b/packages/SettingsLib/res/values-gl-rES/strings.xml
index 8fb4431..9545f19 100644
--- a/packages/SettingsLib/res/values-gl-rES/strings.xml
+++ b/packages/SettingsLib/res/values-gl-rES/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Permitir localizacións falsas"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permite localizacións falsas"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Activar a inspección de atributos de visualización"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utiliza o cliente DHCP de Lollipop en lugar do novo cliente DHCP de Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantén sempre os datos móbiles activos, aínda que a wifi estea activada (para un rápido cambio de rede)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Queres permitir a depuración USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"A depuración de erros USB está deseñada unicamente para fins de programación. Utilízaa para copiar datos entre o ordenador e o dispositivo, instalar aplicacións no dispositivo sen enviar notificacións e ler os datos do rexistro."</string>
diff --git a/packages/SettingsLib/res/values-gu-rIN/strings.xml b/packages/SettingsLib/res/values-gu-rIN/strings.xml
index fcb3968..905ca43 100644
--- a/packages/SettingsLib/res/values-gu-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-gu-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"મોક સ્થાનોની મંજૂરી આપો"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"મોક સ્થાનોની મંજૂરી આપો"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"લક્ષણ નિરીક્ષણ જોવાનું સક્ષમ કરો"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"નવા Android DHCP ક્લાઇન્ટને બદલે Lollipop પરના DHCP ક્લાઇન્ટનો ઉપયોગ કરો."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi‑Fi  સક્રિય હોય ત્યારે પણ, હંમેશા મોબાઇલ ડેટાને સક્રિય રાખો (ઝડપી નેટવર્ક સ્વિચિંગ માટે)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB ડિબગિંગને મંજૂરી આપીએ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB ડિબગીંગ ફક્ત વિકાસ હેતુઓ માટે જ બનાવાયેલ છે. તેનો ઉપયોગ તમારા કમ્પ્યુટર અને તમારા ઉપકરણ વચ્ચે ડેટાને કૉપિ કરવા, સૂચના વગર તમારા ઉપકરણ પર ઍપ્લિકેશનો ઇન્સ્ટોલ કરવા અને લૉગ ડેટા વાંચવા માટે કરો."</string>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 65338cc..93fbb9c 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"कृत्रिम स्‍थानों को अनुमति दें"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"कृत्रिम स्‍थानों को अनुमति दें"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"दृश्य विशेषता निरीक्षण सक्षम करें"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"नए Android DHCP क्‍लाइंट के बजाय Lollipop के DHCP क्‍लाइंट का उपयोग करें."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"वाई-फ़ाई के सक्रिय रहने पर भी, हमेशा मोबाइल डेटा सक्रिय रखें (तेज़ी से नेटवर्क स्विच करने के लिए)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB डीबग करने की अनुमति दें?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB डीबग डीबग करने का उद्देश्‍य केवल विकास है. इसका उपयोग आपके कंप्‍यूटर और आपके डिवाइस के बीच डेटा की प्रतिलिपि बनाने, बिना नोटिफिकेशन के आपके डिवाइस पर ऐप्स इंस्‍टॉल करने और लॉग डेटा पढ़ने के लिए करें."</string>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index 974af2c..d6a7c1d 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Dopusti probne lokacije"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Dopusti probne lokacije"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Omogući pregled atributa prikaza"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Upotrebljavajte DHCP klijent iz Lollipopa umjesto novog Android DHCP klijenta."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Neka mobilni podaci uvijek budu aktivni, čak i kada je Wi‑Fi aktivan (za brzo prebacivanje s jedne na drugu mrežu)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Omogućiti otklanjanje pogrešaka putem USB-a?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Otklanjanje pogrešaka putem USB-a namijenjeno je samo u razvojne svrhe. Može se upotrijebiti za kopiranje podataka s računala na uređaj i obrnuto, instalaciju aplikacija na uređaju bez obavijesti i za čitanje dnevničkih zapisa."</string>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index 059a8bb..6ea9ae5 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Helyutánzatok engedélyezése"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Helyutánzatok engedélyezése"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Nézetattribútum vizsgálatának engedélyezése"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"A Lollipop DHCP-kliensének használata az új androidos DHCP-kliens helyett."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"A mobiladat-kapcsolat mindig maradjon aktív, még akkor is, ha a Wi‑Fi aktív (a gyors hálózatváltás érdekében)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Engedélyezi az USB hibakeresést?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Az USB hibakeresés fejlesztési célokat szolgál. Használhatja adatok másolására a számítógép és a készülék között, alkalmazások a készülékre való értesítés nélküli telepítésére és naplózási adatok olvasására."</string>
diff --git a/packages/SettingsLib/res/values-hy-rAM/strings.xml b/packages/SettingsLib/res/values-hy-rAM/strings.xml
index 70118de..e48fe31 100644
--- a/packages/SettingsLib/res/values-hy-rAM/strings.xml
+++ b/packages/SettingsLib/res/values-hy-rAM/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Թույատրել կեղծ տեղադրությունները"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Թույլ տալ կեղծ տեղադրություններ"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Միացնել ցուցադրման հատկանիշների ստուգումը"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Օգտագործել Lollipop-ի DHCP ծրագիրը՝ նոր Android DHCP ծրագրի փոխարեն:"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Միշտ ակտիվացրած պահել բջջային տվյալները, նույնիսկ Wi‑Fi-ը միացրած ժամանակ (ցանցերի միջև արագ փոխարկման համար):"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Թույլատրե՞լ USB-ի վրիպազերծումը:"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB վրիպազերծումը միայն ծրագրավորման նպատակների համար է: Օգտագործեք այն ձեր համակարգչից տվյալները ձեր սարք պատճենելու համար, առանց ծանուցման ձեր սարքի վրա ծրագրեր տեղադրելու և տվյալների մատյանը ընթերցելու համար:"</string>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index acbbb4c..c50c983 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Mengizinkan lokasi palsu"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Mengizinkan lokasi palsu"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Aktifkan inspeksi atribut tampilan"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Gunakan klien DHCP dari Lollipop alih-alih klien DHCP Android baru."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Selalu aktifkan data seluler, meski Wi-Fi aktif (agar jaringan beralih dengan cepat)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Izinkan melakukan debug USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Debugging USB dimaksudkan untuk tujuan pengembangan saja. Gunakan untuk menyalin data antara komputer dan perangkat Anda, memasang apl pada perangkat tanpa notifikasi, dan membaca data log."</string>
diff --git a/packages/SettingsLib/res/values-is-rIS/strings.xml b/packages/SettingsLib/res/values-is-rIS/strings.xml
index 4bfc0a6..09f962f 100644
--- a/packages/SettingsLib/res/values-is-rIS/strings.xml
+++ b/packages/SettingsLib/res/values-is-rIS/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Leyfa gervistaðsetningar"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Leyfa gervistaðsetningar"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Virkja yfirlit skoðunar eiginda"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Nota gamla DHCP-biðlarann úr Lollipop í staðinn fyrir nýja Android DHCP-biðlarann."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Hafa alltaf kveikt á farsímagögnum, líka þegar kveikt er á Wi-Fi (til að skipta megi hratt milli kerfa)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Leyfa USB-villuleit?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-villuleit er aðeins ætluð til nota í þróunarskyni. Hana má nota til að afrita gögn á milli tölvu og tækis, setja forrit upp í tækinu án tilkynninga og lesa annálagögn."</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index 959b661..b9462bf 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Posizioni fittizie"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Consenti posizioni fittizie"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Attiva controllo attributi visualizzazione"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utilizza il client DHCP di Lollipop anziché il nuovo client DHCP Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mantieni sempre i dati cellulare attivi, anche se il Wi‑Fi è attivo (per un passaggio fra reti rapido)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Consentire debug USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Il debug USB è solo a scopo di sviluppo. Utilizzalo per copiare dati tra il computer e il dispositivo, per installare applicazioni sul tuo dispositivo senza notifica e per leggere i dati dei log."</string>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index 44016ef..b48f15c8 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"אפשר מיקומים מדומים"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"אפשר מיקומים מדומים"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"אפשר בדיקת תכונת תצוגה"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"‏השתמש בלקוח DHCP של Lollipop במקום לקוח DHCP החדש של Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"‏השאר את הנתונים לנייד פעילים תמיד, גם כש-Wi‑Fi פעיל (למעבר מהיר בין רשתות)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"‏לאפשר ניפוי באגים של USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"‏ניפוי באגים באמצעות USB מיועד למטרות פיתוח בלבד. השתמש בו להעתקת נתונים בין המחשב והמכשיר שלך, להתקנת אפליקציות במכשיר ללא התראה ולקריאת נתוני יומן."</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 12c5e25..b43013c 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"擬似ロケーションを許可"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"擬似ロケーションを許可する"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"表示属性検査を有効にする"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"新しいAndroid DHCPクライアントの代わりにLollipopのDHCPクライアントを使用します。"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi‑Fiが(ネットワークの自動切り替えで)ONのときでもモバイルデータが常にONになります。"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USBデバッグを許可しますか?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USBデバッグは開発専用に設計されています。パソコンと端末の間でデータをコピーする場合や、アプリを通知なしで端末にインストールする場合、ログデータを読み取る場合に使用できます。"</string>
diff --git a/packages/SettingsLib/res/values-ka-rGE/strings.xml b/packages/SettingsLib/res/values-ka-rGE/strings.xml
index 5ac2382..50e09f1 100644
--- a/packages/SettingsLib/res/values-ka-rGE/strings.xml
+++ b/packages/SettingsLib/res/values-ka-rGE/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ფიქტიური მდებარეობების დაშვება"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"ფიქტიური მდებარეობების დაშვება"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"ნახვის ატრიბუტის ინსპექტირების ჩართვა"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ახალი Android DHCP კლიენტის ნაცვლად, Lollipop-ის DHCP კლიენტის გამოყენება."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"მობილური მოწყობილობის მონაცემები ყოველთვის აქტიური დარჩეს, მაშინაც კი, როდესაც Wi-Fi აქტიურია (ქსელის სწრაფი გადართვისთვის)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"ჩაირთოს USB გამართვა?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB გამართვა განკუთვნილია მხოლოდ დეველოპერული მიზნებისთვის. გამოიყენეთ კომპიუტერსა და თქვენ მოწყობილობას შორის მონაცემების გადასატანად, თქვენ მოწყობილობაზე აპების შეტყობინების გარეშე დასაყენებლად და ჟურნალის მონაცემების წასაკითხად."</string>
diff --git a/packages/SettingsLib/res/values-kk-rKZ/strings.xml b/packages/SettingsLib/res/values-kk-rKZ/strings.xml
index ab5e338..d163386 100644
--- a/packages/SettingsLib/res/values-kk-rKZ/strings.xml
+++ b/packages/SettingsLib/res/values-kk-rKZ/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Жасанды аймақтарға рұқсат беру"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Жасанды аймақтарды пайдалануға рұқсат беру"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Көру төлсипатын тексеруді қосу"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Жаңа Android DHCP клиентінің орнына Lollipop ішіндегі DHCP клиентін пайдалану"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi‑Fi қосулы кезде де ұялы деректерді белсенді етіп ұстау (желіні жылдам ауыстыру үшін)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB жөндеулеріне рұқсат берілсін бе?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB жөндеу дамыту мақсаттарына ғана арналған. Оны компьютер және құрылғы арасында дерек көшіру, құрылғыға ескертусіз қолданба орнату және тіркелім деректерін оқу үшін қолданыңыз."</string>
diff --git a/packages/SettingsLib/res/values-km-rKH/strings.xml b/packages/SettingsLib/res/values-km-rKH/strings.xml
index 30b7f7a..7585447a 100644
--- a/packages/SettingsLib/res/values-km-rKH/strings.xml
+++ b/packages/SettingsLib/res/values-km-rKH/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ឲ្យ​ក្លែង​ទីតាំង"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"អនុញ្ញាត​ទីតាំង​ក្លែងក្លាយ"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"បើក​ការ​ត្រួតពិនិត្យ​គុណ​លក្ខណៈ​ទិដ្ឋភាព"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ប្រើម៉ាស៊ីនកូន DHCP ចេញពី Lollipop ជំនួសឲ្យម៉ាស៊ីនកូន Android DHCP ថ្មី។"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"រក្សាទិន្នន័យចល័តឲ្យសកម្មជានិច្ច បើទោះបីជា Wi‑Fi សកម្មក៏ដោយ (សម្រាប់ការប្តូរបណ្តាញដែលមានល្បឿនលឿន)។"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"អនុញ្ញាត​ការ​កែ​កំហុស​យូអេសប៊ី?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"ការ​កែ​កំហុស​​យូអេសប៊ី​គឺ​សម្រាប់​តែ​ការ​អភិវឌ្ឍ​ប៉ុណ្ណោះ។ ប្រើ​វា​ដើម្បី​ចម្លង​ទិន្នន័យ​រវាង​កុំព្យូទ័រ និង​ឧបករណ៍​របស់​អ្នក ដំឡើង​កម្មវិធី​ក្នុង​ឧបករណ៍​របស់​អ្នក​ដោយ​មិន​ជូន​ដំណឹង និង​អាន​ទិន្នន័យ​កំណត់ហេតុ។"</string>
diff --git a/packages/SettingsLib/res/values-kn-rIN/strings.xml b/packages/SettingsLib/res/values-kn-rIN/strings.xml
index 9b322c8..8f0d4ff 100644
--- a/packages/SettingsLib/res/values-kn-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-kn-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ಅಣಕು ಸ್ಥಾನಗಳನ್ನು ಅನುಮತಿಸು"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"ಅಣಕು ಸ್ಥಾನಗಳನ್ನು ಅನುಮತಿಸು"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"ವೀಕ್ಷಣೆ ಆಟ್ರಿಬ್ಯೂಟ್ ಪರಿಶೀಲನೆ"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ಹೊಸ Android DHCP ಕ್ಲೈಂಟ್ ಬದಲಾಗಿ Lollipop ನಿಂದ DHCP ಕ್ಲೈಂಟ್ ಬಳಸಿ."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ವೈ-ಫೈ ಸಕ್ರಿಯವಾಗಿರುವಾಗಲೂ, ಯಾವಾಗಲೂ ಮೊಬೈಲ್‌ ಡೇಟಾ ಸಕ್ರಿಯವಾಗಿರಿಸಿ (ವೇಗವಾಗಿ ನೆಟ್‌ವರ್ಕ್‌ ಬದಲಾಯಿಸಲು)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB ಡೀಬಗ್ ಮಾಡುವಿಕೆಯನ್ನು ಅನುಮತಿಸುವುದೇ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB ಡೀಬಗ್ ಮಾಡುವಿಕೆಯು ಅಭಿವೃದ್ಧಿ ಉದ್ದೇಶಗಳಿಗೆ ಮಾತ್ರ ಆಗಿದೆ. ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್ ಮತ್ತು ನಿಮ್ಮ ಸಾಧನದ ನಡುವೆ ಡೇಟಾವನ್ನು ನಕಲಿಸಲು, ಅಧಿಸೂಚನೆ ಇಲ್ಲದೆ ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಸ್ಥಾಪಿಸಲು ಮತ್ತು ಲಾಗ್ ಡೇಟಾ ಓದಲು ಅದನ್ನು ಬಳಸಿ."</string>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index dace41b..157a93d 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"모의 위치 허용"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"모의 위치 허용"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"보기 속성 검사 사용"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"새로운 Android DHCP 클라이언트 대신 Lollipop의 DHCP 클라이언트 사용"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi‑Fi가 활성화되어 있을 때에도 빠른 네트워크 전환을 위하여 항상 모바일 데이터를 활성 상태로 유지합니다."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB 디버깅을 허용하시겠습니까?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB 디버깅은 개발용으로만 설계되었습니다. 이 기능을 사용하면 컴퓨터와 기기 간에 데이터를 복사하고 알림 없이 기기에 앱을 설치하며 로그 데이터를 읽을 수 있습니다."</string>
diff --git a/packages/SettingsLib/res/values-ky-rKG/strings.xml b/packages/SettingsLib/res/values-ky-rKG/strings.xml
index 5bc08ac..0ecc03e 100644
--- a/packages/SettingsLib/res/values-ky-rKG/strings.xml
+++ b/packages/SettingsLib/res/values-ky-rKG/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Жасалма жайгашкан жерди көрсөтүүгө уруксат берилсин"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Жасалма жайгашкан жерди көрсөтүүгө уруксат берилсин"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Аттрибут текшерүүсүнүн көрүнүшүн иштетүү"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Жаңы Android DHCP кардарынын ордуна Lollipop\'тон DHCP кардарын колдонуңуз."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi-Fi иштеп турганда да дайындар мобилдик тармак аркылуу өткөрүлө берсин (тармактар ортосунда тезирээк которулуу үчүн)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB аркылуу жөндөөгө уруксат берилсинби?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-жөндөө - өндүрүү максатында гана  түзүлгөн. Аны компүтериңиз менен түзмөгүңүздүн ортосунда берилиштерди алмашуу, түзмөгүңүзгө колдонмолорду эскертүүсүз орнотуу жана лог берилиштерин окуу үчүн колдонсоңуз болот."</string>
diff --git a/packages/SettingsLib/res/values-lo-rLA/strings.xml b/packages/SettingsLib/res/values-lo-rLA/strings.xml
index 6e13c9f..9c999a1 100644
--- a/packages/SettingsLib/res/values-lo-rLA/strings.xml
+++ b/packages/SettingsLib/res/values-lo-rLA/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ອະນຸຍາດໃຫ້ຈຳລອງຕຳແໜ່ງ"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"ອະນຸຍາດໃຫ້ຈຳລອງຕຳແໜ່ງ"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"ເປີດ​ນຳ​ໃຊ້​ການກວດ​ສອບ​ຄຸນ​ສົມ​ບັດ​ມຸມມອງ"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ໃຊ້​ລູກ​ຄ້າ DHCP ຈາກ Lollipop ແທນ​ລູກ​ຄ້າ Android DHCP ໃໝ່."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ໃຫ້​ຂໍ້​ມູນ​ມື​ຖື​ເປີດ​ຢູ່​ສະ​ເໝີ, ແມ້​ແຕ່​ເມື່ອ Wi‑Fi ເປີດ​ຢູ່ (ສຳ​ລັບ​ການ​ສະ​ຫຼັບ​ເຄືອ​ຂ່າຍ​ໄວ)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"ອະນຸຍາດໃຫ້ດີບັ໊ກຜ່ານ USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"ການດີບັ໊ກຜ່ານ USB ແມ່ນມີຈຸດປະສົງເພື່ອການພັດທະນາເທົ່ານັ້ນ. ມັນສາມາດໃຊ້ເພື່ອສຳເນົາຂໍ້ມູນລະຫວ່າງຄອມພິວເຕີ ແລະອຸປະກອນຂອງທ່ານ, ຕິດຕັ້ງແອັບຯໂດຍບໍ່ຜ່ານການແຈ້ງເຕືອນ ແລະອ່ານຂໍ້ມູນການບັນທຶກ."</string>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index d409366..7ab915f 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Leisti imituoti vietas"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Leisti imituoti vietas"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Įgalinti peržiūros atributų tikrinimą"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"DHCP kliento programos iš „Lollipop“ versijos naudojimas vietoje naujos „Android“ DHCP kliento programos."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Visada suaktyvinti mobiliojo ryšio duomenis, net kai aktyvus „Wi‑Fi“ ryšys (kad būtų galima greitai perjungti tinklą)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Leisti USB perkrovimą?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB derinimas skirtas naudoti tik kūrimo tikslais. Jis gali būti naudojamas norint kopijuoti duomenis iš kompiuterio į įrenginį ir atvirkščiai, įdiegti programas įrenginyje be pranešimo ir skaityti žurnalo duomenis."</string>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index 7dfd9ac..3bd4def 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Atļaut neīstas vietas"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Atļaut neīstas vietas"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Iespējot atribūtu pārbaudi"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Lietot DHCP klientu no operētājsistēmas Lollipop, nevis jauno Android DHCP klientu."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mobilo datu savienojums būs vienmēr aktīvs, pat ja būs aktīvs Wi-Fi savienojums (ātrai ierīces pārslēgšanai uz citu tīklu)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Vai atļaut USB atkļūdošanu?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB atkļūdošana ir paredzēta tikai ar izstrādi saistītām darbībām. Izmantojiet to datu kopēšanai no datora uz ierīci un pretēji, lietotņu instalēšanai ierīcē bez paziņojumiem un žurnāla datu lasīšanai."</string>
diff --git a/packages/SettingsLib/res/values-mk-rMK/strings.xml b/packages/SettingsLib/res/values-mk-rMK/strings.xml
index 7d6e43b..58c0cbf 100644
--- a/packages/SettingsLib/res/values-mk-rMK/strings.xml
+++ b/packages/SettingsLib/res/values-mk-rMK/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Овозможи лажни локации"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Овозможи лажни локации"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Овозможете проверка на атрибутот на приказот"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Користете го клиентот на DHCP од Lollipop наместо новиот клиент на DHCP на Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Секогаш држи го активен мобилниот интернет, дури и при активно Wi-Fi (за брзо префрлување мрежа)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Овозможи отстранување грешки на УСБ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Отстранувањето грешки на УСБ е наменето само за целите на развој. Користете го за копирање податоци меѓу вашиот компјутер и вашиот уред, за инсталирање апликации на вашиот уред без известување и за читање евиденција на податоци."</string>
diff --git a/packages/SettingsLib/res/values-ml-rIN/strings.xml b/packages/SettingsLib/res/values-ml-rIN/strings.xml
index 17b42e9..87c66e2 100644
--- a/packages/SettingsLib/res/values-ml-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-ml-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"വ്യാജ ലൊക്കേഷനുകൾ അനുവദിക്കുക"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"വ്യാജ ലൊക്കേഷനുകൾ അനുവദിക്കുക"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"ആട്രിബ്യൂട്ട് പരിശോധന കാണൽ സജീവമാക്കൂ"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"പുതിയ Android DHCP ക്ലയന്റിനുപകരം Lollipop-ൽ നിന്ന് DHCP ക്ലയന്റ് ഉപയോഗിക്കുക."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"വൈഫൈ സജീവമാണെങ്കിലും, മൊബൈൽ ഡാറ്റ സജീവമായി നിർത്തുക (വേഗത്തിൽ നെറ്റ്‌വർക്ക് മാറുന്നതിനായി)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB ഡീബഗ്ഗുചെയ്യാൻ അനുവദിക്കണോ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB ഡീബഗ്ഗിംഗ് വികസന ആവശ്യകതകൾക്ക് മാത്രമുള്ളതാണ്. നിങ്ങളുടെ കമ്പ്യൂട്ടറിനും ഉപകരണത്തിനുമിടയിൽ ഡാറ്റ പകർത്തുന്നതിനും അറിയിപ്പില്ലാതെ തന്നെ നിങ്ങളുടെ ഉപകരണത്തിൽ അപ്ലിക്കേഷനുകൾ ഇൻസ്‌റ്റാളുചെയ്യുന്നതിനും ലോഗ് ഡാറ്റ റീഡുചെയ്യുന്നതിനും ഇത് ഉപയോഗിക്കുക."</string>
diff --git a/packages/SettingsLib/res/values-mn-rMN/strings.xml b/packages/SettingsLib/res/values-mn-rMN/strings.xml
index 359c041..da28495d 100644
--- a/packages/SettingsLib/res/values-mn-rMN/strings.xml
+++ b/packages/SettingsLib/res/values-mn-rMN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Хуурамч байршлыг зөвшөөрөх"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Хуурамч байршлыг зөвшөөрөх"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Харах тохируулгын шалгалтыг идэвхжүүлэх"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Шинэ Андройд DHCP харилцагчийн оронд Lollipop-ийн DHCP харилцагчийг хэрэглэ."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi‑Fi идэвхтэй байхад ч гэсэн гар утасны датаг идэвхтэй байлгадаг (сүлжээг түргэн солихын тулд)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB дебаг хийхийг зөвшөөрөх үү?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB дебаг нь зөвхөн хөгжүүлэлтийн зорилготой. Үүнийг өөрийн компьютер болон төхөөрөмжийн хооронд өгөгдөл хуулах, өөрийн төхөөрөмж дээр мэдэгдэлгүйгээр аппликешн суулгах, лог датаг унших зэрэгт ашиглаж болно."</string>
diff --git a/packages/SettingsLib/res/values-mr-rIN/strings.xml b/packages/SettingsLib/res/values-mr-rIN/strings.xml
index 1d5dc19..4462814 100644
--- a/packages/SettingsLib/res/values-mr-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-mr-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"बनावट स्थानांना अनुमती द्या"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"बनावट स्थानांना अनुमती द्या"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"दृश्‍य विशेषता तपासणी सक्षम करा"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"नवीन Android DHCP क्लायंट ऐवजी Lollipop वरून DHCP क्लायंटचा वापर करा."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"जरी वाय-फाय सक्रिय असले तरीही, नेहमी मोबाईल डेटा सक्रिय ठेवा (जलद नेटवर्क स्विच करण्यासाठी)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB डीबग करण्यास अनुमती द्यायची?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB डीबग करण्याचा हेतू फक्त विकासाच्या उद्देशांसाठी आहे. याचा वापर आपला संगणक आणि आपले डिव्हाइस यांच्या दरम्यान डेटा कॉपी करण्यासाठी करा, सूचनेशिवाय आपल्या डिव्हाइसवर अॅप्स स्थापित करा आणि लॉग डेटा वाचा."</string>
diff --git a/packages/SettingsLib/res/values-ms-rMY/strings.xml b/packages/SettingsLib/res/values-ms-rMY/strings.xml
index 8809f71..cbb67b3 100644
--- a/packages/SettingsLib/res/values-ms-rMY/strings.xml
+++ b/packages/SettingsLib/res/values-ms-rMY/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Benarkan lokasi olokan"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Benarkan lokasi olokan"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Dayakan pemeriksaan atribut paparan"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Gunakan pelanggan DHCP daripada Lollipop bukannya pelanggan DHCP Android baharu."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Pastikan data mudah alih sentiasa aktif, walaupun Wi-Fi aktif (untuk penukaran rangkaian yang pantas)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Benarkan penyahpepijatan USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Penyahpepijatan USB adalah dimaksudkan untuk tujuan pembangunan sahaja. Gunakannya untuk menyalin data antara komputer dan peranti anda, memasang aplikasi pada peranti anda tanpa pemberitahuan, dan membaca data log."</string>
diff --git a/packages/SettingsLib/res/values-my-rMM/strings.xml b/packages/SettingsLib/res/values-my-rMM/strings.xml
index d035e13..561691d 100644
--- a/packages/SettingsLib/res/values-my-rMM/strings.xml
+++ b/packages/SettingsLib/res/values-my-rMM/strings.xml
@@ -71,7 +71,7 @@
     <string name="bluetooth_hid_profile_summary_use_for" msgid="232727040453645139">"ထည့်သွင်းရန်အသုံးပြုသည်"</string>
     <string name="bluetooth_pairing_accept" msgid="6163520056536604875">"အတူတွဲပါ"</string>
     <string name="bluetooth_pairing_accept_all_caps" msgid="6061699265220789149">"ချိတ်တွဲရန်"</string>
-    <string name="bluetooth_pairing_decline" msgid="4185420413578948140">"မလုပ်တော့ပါ"</string>
+    <string name="bluetooth_pairing_decline" msgid="4185420413578948140">"မလုပ်တော့"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="4982239145676394429">"ချိတ်တွဲမှုက ချိတ်ဆက်ထားလျှင် သင်၏ အဆက်အသွယ်များ နှင့် ခေါ်ဆိုမှု မှတ်တမ်းကို ရယူခွင့် ပြုသည်။"</string>
     <string name="bluetooth_pairing_error_message" msgid="3748157733635947087">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>နှင့် တွဲချိတ်မရပါ"</string>
     <string name="bluetooth_pairing_pin_error_message" msgid="8337234855188925274">"ပင်နံပါတ် သို့မဟုတ် ဖြတ်သန်းခွင့်ကီးမမှန်ကန်သောကြောင့်<xliff:g id="DEVICE_NAME">%1$s</xliff:g>နှင့် တွဲချိတ်မရပါ။"</string>
@@ -159,8 +159,8 @@
     <string name="oem_unlock_enable_summary" msgid="4720281828891618376">"အစပြုခြင်းကိရိယာအား သော့ဖွင့်ရန် ခွင့်ပြုမည်"</string>
     <string name="confirm_enable_oem_unlock_title" msgid="4802157344812385674">"OEM သော့ဖွင့်ခြင်း ခွင့်ပြုမလား?"</string>
     <string name="confirm_enable_oem_unlock_text" msgid="5517144575601647022">"သတိပေးချက်: ဤချိန်ညှိချက်ဖွင့်ထားလျှင်၊ ဤစက်ပစ္စည်းပေါ်တွင် စက်ပစ္စည်းကာကွယ်သည့် အထူးပြုလုပ်ချက် အလုပ်လုပ်မည်မဟုတ်ပါ။"</string>
-    <string name="mock_location_app" msgid="7966220972812881854">"တည်နေရာအတုပြု အက်ပ် ရွေးရန်"</string>
-    <string name="mock_location_app_not_set" msgid="809543285495344223">"တည်နေရာအတုပြ အက်ပ် သတ်မှတ်ထားခြင်းမရှိပါ"</string>
+    <string name="mock_location_app" msgid="7966220972812881854">"တည်နေရာအတုပြု အက်ပ်ရွေးရန်"</string>
+    <string name="mock_location_app_not_set" msgid="809543285495344223">"တည်နေရာအတုပြ အက်ပ်သတ်မှတ်ထားခြင်းမရှိပါ"</string>
     <string name="mock_location_app_set" msgid="8966420655295102685">"တည်နေရာအတုပြ အက်ပ်- <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="debug_networking_category" msgid="7044075693643009662">"ကွန်ရက်လုပ်ငန်း"</string>
     <string name="wifi_display_certification" msgid="8611569543791307533">"ကြိုးမဲ့ပြသမှု အသိအမှတ်ပြုလက်မှတ်"</string>
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ပုံစံတုတည်နေရာများကို ခွင့်ပြုရန်"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"ပုံစံတုတည်နေရာများကို ခွင့်ပြုရန်"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"အရည်အချင်းများ စူးစမ်းမှု မြင်ကွင်းကို ဖွင့်ပေးရန်"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Android DHCP ကလိုင်းယင့် အသစ် အစား Lollipop မှ DHCP ကလိုင်းယင့်အား သုံးပါ။"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ဝိုင်ဖိုင်ဖွင့်ထားလျှင်တောင် မိုဘိုင်းဒေတာအမြဲတမ်းဖွင့်မည် (မြန်ဆန်သည့် ကွန်ရက် ပြောင်းခြင်းအတွက်)။"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB ပြသနာရှာခြင်း ခွင့်ပြုပါမလား?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USBအမှားရှားခြင်းမှာ ဆော့ဝဲလ်ရေးသားရန်အတွက်သာ ရည်ရွယ်ပါသည်။ သင့်ကွန်ပြုတာနှင့်သင့်စက်ကြားတွင် ဒေတာများကိုကူးယူရန်၊ အကြောင်းမကြားပဲနှင့် သင့်စက်အတွင်းသို့ အပလီကေးရှင်းများထည့်သွင်းခြင်းနှင့် ဒေတာမှတ်တမ်းများဖတ်ရန်အတွက် အသုံးပြုပါ"</string>
@@ -242,7 +241,7 @@
     <string name="transition_animation_scale_title" msgid="387527540523595875">"သက်ဝင်အသွင်ပြောင်းခြင်း"</string>
     <string name="animator_duration_scale_title" msgid="3406722410819934083">"လှုပ်ရှားမှုကြာချိန်စကေး"</string>
     <string name="overlay_display_devices_title" msgid="5364176287998398539">"ဆင့်ပွားမျက်နှာပြင်များအသွင်ဆောင်သည်"</string>
-    <string name="debug_applications_category" msgid="4206913653849771549">"အပလီကေးရှင်းများ"</string>
+    <string name="debug_applications_category" msgid="4206913653849771549">"အက်ပ်များ"</string>
     <string name="immediately_destroy_activities" msgid="1579659389568133959">"ဆောင်ရွက်မှုများကို မသိမ်းထားပါနှင့်"</string>
     <string name="immediately_destroy_activities_summary" msgid="3592221124808773368">"အသုံးပြုသူထွက်ခွါသွားသည်နှင့် လုပ်ဆောင်ချက်များကို ဖျက်ပစ်မည်"</string>
     <string name="app_process_limit_title" msgid="4280600650253107163">"နောက်ခံလုပ်ငန်းစဉ်ကန့်သတ်ခြင်း"</string>
@@ -270,7 +269,7 @@
     <item msgid="8280754435979370728">"မျက်လုံးမှတွေ့ရသည့် သဘာဝအရောင်"</item>
     <item msgid="5363960654009010371">"ဒီဂျစ်တယ်အကြောင်းအရာအတွက် ပြင်ဆင်ထားသည့် အရောင်များ"</item>
   </string-array>
-    <string name="inactive_apps_title" msgid="1317817863508274533">"အလုပ်မလုပ်သော အက်ပ် များ"</string>
+    <string name="inactive_apps_title" msgid="1317817863508274533">"အလုပ်မလုပ်သော အက်ပ်များ"</string>
     <string name="inactive_app_inactive_summary" msgid="5091363706699855725">"ပွင့်မနေပါ။ ပြောင်းရန်တို့ပါ။"</string>
     <string name="inactive_app_active_summary" msgid="4174921824958516106">"ပွင့်နေသည်။ ပြောင်းရန်တို့ပါ။"</string>
     <string name="runningservices_settings_title" msgid="8097287939865165213">"အလုပ်လုပ်နေသောဝန်ဆောင်မှုများ"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index 1c13fc3..eff9070 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -98,7 +98,7 @@
     <string name="launch_defaults_some" msgid="313159469856372621">"Noen standardvalg er angitt"</string>
     <string name="launch_defaults_none" msgid="4241129108140034876">"Ingen standardvalg er angitt"</string>
     <string name="tts_settings" msgid="8186971894801348327">"Talesyntese-kontroller"</string>
-    <string name="tts_settings_title" msgid="1237820681016639683">"Tekst-til-tale"</string>
+    <string name="tts_settings_title" msgid="1237820681016639683">"Tekst til tale"</string>
     <string name="tts_default_rate_title" msgid="6030550998379310088">"Talehastighet"</string>
     <string name="tts_default_rate_summary" msgid="4061815292287182801">"Hvor raskt teksten leses"</string>
     <string name="tts_default_pitch_title" msgid="6135942113172488671">"Stemmeleie"</string>
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Tillat simulert posisjon"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Tillat bruk av simulerte GPS-koordinater"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Slå på inspeksjon av visningsattributt"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Bruk DHCP-klienten fra Lollipop i stedet for den nye DHCP-klienten for Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Ha alltid mobildata slått på, selv når Wi-Fi er aktiv (for hurtig nettverksbytting)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Tillate USB-feilsøking?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-feilsøking er bare ment for utviklingsformål. Bruk det til å kopiere data mellom datamaskinen og enheten, installere apper på enheten uten varsel og lese loggdata."</string>
diff --git a/packages/SettingsLib/res/values-ne-rNP/strings.xml b/packages/SettingsLib/res/values-ne-rNP/strings.xml
index f8ba831..db13926 100644
--- a/packages/SettingsLib/res/values-ne-rNP/strings.xml
+++ b/packages/SettingsLib/res/values-ne-rNP/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"नक्कली स्थानहरूलाई अनुमति दिनुहोस्"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"नक्कली स्थानहरूलाई अनुमति दिनुहोस्"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"दृष्टिकोण विशेषता निरीक्षण सक्षम पार्नुहोस्"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"नयाँ Android DHCP ग्राहकको सट्टा Lollipop बाट DHCP ग्राहक प्रयोग गर्नुहोस्।"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi-Fi सक्रिय हुँदा पनि मोबाइल डेटा सधैँ सक्रिय राख्नुहोस् (द्रूत नेटवर्क स्विच गर्नको लागि)।"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB डिबग गर्न लागि अनुमति दिने हो?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"युएसबी डिबगिङ विकास प्रयोजनका लागि मात्र निर्मित हुन्छ। यसलाई तपाईँको कम्प्युटर र तपाईँको उपकरणका बीच डेटा प्रतिलिपि गर्न, बिना सूचना तपाईँको उपकरणमा अनुप्रयोगहरू स्थापना गर्न र लग डेटा पढ्नका लागि प्रयोग गर्नुहोस्।"</string>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index b080131..3bb0005 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Neplocaties toestaan"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Neplocaties toestaan"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Inspectie van weergavekenmerk inschakelen"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"De DHCP-client van Lollipop gebruiken in plaats van de nieuwe Android DHCP-client."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mobiele gegevens altijd actief houden, ook als wifi actief is (voor sneller schakelen tussen netwerken)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB-foutopsporing toestaan?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-foutopsporing is alleen bedoeld voor ontwikkeldoeleinden. Het kan worden gebruikt om gegevens te kopiëren tussen je computer en je apparaat, apps zonder melding op je apparaat te installeren en loggegevens te lezen."</string>
diff --git a/packages/SettingsLib/res/values-pa-rIN/arrays.xml b/packages/SettingsLib/res/values-pa-rIN/arrays.xml
index 42cc9f2..fd7eb67 100644
--- a/packages/SettingsLib/res/values-pa-rIN/arrays.xml
+++ b/packages/SettingsLib/res/values-pa-rIN/arrays.xml
@@ -22,7 +22,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
   <string-array name="wifi_status">
     <item msgid="1922181315419294640"></item>
-    <item msgid="8934131797783724664">"ਸਕੈਨ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..."</item>
+    <item msgid="8934131797783724664">"ਸਕੈਨ ਕਰ ਰਿਹਾ ਹੈ..."</item>
     <item msgid="8513729475867537913">"ਕਨੈਕਟ ਕਰ ਰਿਹਾ ਹੈ…"</item>
     <item msgid="515055375277271756">"ਪ੍ਰਮਾਣਿਤ ਕਰ ਰਿਹਾ ਹੈ…"</item>
     <item msgid="1943354004029184381">"IP ਪਤਾ ਪ੍ਰਾਪਤ ਕਰ ਰਿਹਾ ਹੈ..."</item>
@@ -36,7 +36,7 @@
   </string-array>
   <string-array name="wifi_status_with_ssid">
     <item msgid="7714855332363650812"></item>
-    <item msgid="8878186979715711006">"ਸਕੈਨ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..."</item>
+    <item msgid="8878186979715711006">"ਸਕੈਨ ਕਰ ਰਿਹਾ ਹੈ..."</item>
     <item msgid="355508996603873860">"<xliff:g id="NETWORK_NAME">%1$s</xliff:g> ਨਾਲ ਕਨੈਕਟ ਕਰ ਰਿਹਾ ਹੈ…"</item>
     <item msgid="554971459996405634">"<xliff:g id="NETWORK_NAME">%1$s</xliff:g> ਨਾਲ ਪ੍ਰਮਾਣਿਤ ਕਰ ਰਿਹਾ ਹੈ…"</item>
     <item msgid="7928343808033020343">"<xliff:g id="NETWORK_NAME">%1$s</xliff:g> ਤੋਂ IP ਪਤਾ ਪ੍ਰਾਪਤ ਕਰ ਰਿਹਾ ਹੈ…"</item>
diff --git a/packages/SettingsLib/res/values-pa-rIN/strings.xml b/packages/SettingsLib/res/values-pa-rIN/strings.xml
index f2bb190..0670bf8 100644
--- a/packages/SettingsLib/res/values-pa-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-pa-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ਨਕਲੀ ਨਿਰਧਾਰਿਤ ਸਥਾਨਾਂ ਦੀ ਆਗਿਆ ਦਿਓ"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"ਨਕਲੀ ਨਿਰਧਾਰਿਤ ਸਥਾਨਾਂ ਦੀ ਆਗਿਆ ਦਿਓ"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"ਗੁਣ ਛਾਣਬੀਣ ਦੇਖੋ ਨੂੰ ਸਮਰੱਥ ਬਣਾਓ"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ਨਵੇਂ Android DHCP ਕਲਾਈਂਟ ਦੀ ਬਜਾਇ Lollipop ਦਾ DHCP ਕਲਾਈਂਟ ਵਰਤੋ।"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ਹਮੇਸ਼ਾ ਮੋਬਾਈਲ ਡੇਟਾ ਨੂੰ ਕਿਰਿਆਸ਼ੀਲ ਰੱਖੋ ਭਾਵੇਂ Wi‑Fi ਕਿਰਿਆਸ਼ੀਲ ਹੋਵੇ (ਤੇਜ਼ ਨੈੱਟਵਰਕ ਸਵਿੱਚਿੰਗ ਲਈ)।"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"ਕੀ USB ਡੀਬਗਿੰਗ ਦੀ ਆਗਿਆ ਦੇਣੀ ਹੈ?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB ਡੀਬਗਿੰਗ ਕੇਵਲ ਵਿਕਾਸ ਮੰਤਵਾਂ ਲਈ ਹੁੰਦੀ ਹੈ। ਇਸਨੂੰ ਆਪਣੇ ਕੰਪਿਊਟਰ ਅਤੇ ਆਪਣੀ ਡੀਵਾਈਸ ਵਿਚਕਾਰ ਡੈਟਾ ਕਾਪੀ ਕਰਨ ਲਈ ਵਰਤੋ, ਸੂਚਨਾ ਦੇ ਬਿਨਾਂ ਆਪਣੀ ਡੀਵਾਈਸ ਤੇ ਐਪਸ ਇੰਸਟੌਲ ਕਰੋ ਅਤੇ ਲੌਗ ਡੈਟਾ ਪੜ੍ਹੋ।"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index c72f0c6..3339f8e 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Pozorowanie lokalizacji"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Zezwalaj na pozorowanie lokalizacji"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Inspekcja wyświetlania atrybutu"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Użyj klienta DHCP z Lollipop zamiast nowego klienta DHCP Androida"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Nie wyłączaj transmisji danych przez sieć komórkową, nawet gdy aktywne jest połączenie Wi-Fi (aby szybko przełączać sieci)"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Czy zezwalać na debugowanie USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Debugowanie USB jest przeznaczone wyłącznie do celów programistycznych. Może służyć do kopiowania danych między komputerem a urządzeniem, instalowania aplikacji na urządzeniu bez powiadamiania, a także odczytu danych dziennika."</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index d01ddb7..afa5a50 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Permitir locais fictícios"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permitir locais fictícios"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Ativar visualiz. insp. atributo"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Usar cliente DHCP do Lollipop, em vez do novo cliente DHCP do Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Sempre manter dados móveis ativos, mesmo quando o Wi-Fi estiver ativado (para troca rápida de rede)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Permitir a depuração USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"A depuração USB serve apenas para fins de desenvolvimento. Use-a para copiar dados entre o computador e o dispositivo, instalar apps no seu aparelho sem notificação e ler dados de registro."</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index 8e05d8c..6efd782 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Permitir locais fictícios"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permitir locais fictícios"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Ativar a inspeção do atributo de visualização"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Utilizar o cliente DHCP do Lollipop em vez do novo cliente DHCP do Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Manter sempre os dados móveis ativados, mesmo quando o Wi‑Fi estiver ativado (para mudança de rede rápida)"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Permitir depuração USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"A depuração USB é utilizada apenas para fins de programação. Utilize-a para copiar dados entre o computador e o aparelho, instalar aplicações no aparelho sem notificação e ler dados de registo."</string>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index d01ddb7..afa5a50 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Permitir locais fictícios"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permitir locais fictícios"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Ativar visualiz. insp. atributo"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Usar cliente DHCP do Lollipop, em vez do novo cliente DHCP do Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Sempre manter dados móveis ativos, mesmo quando o Wi-Fi estiver ativado (para troca rápida de rede)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Permitir a depuração USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"A depuração USB serve apenas para fins de desenvolvimento. Use-a para copiar dados entre o computador e o dispositivo, instalar apps no seu aparelho sem notificação e ler dados de registro."</string>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index c8587ef..20f746d 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Permiteți locațiile fictive"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Permiteți locațiile fictive"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Activați inspectarea atributelor de vizualizare"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Folosiți clientul DHCP din Lollipop în locul noului client Android DHCP."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Păstrați întotdeauna conexiunea de date mobile activată, chiar și atunci când funcția Wi‑Fi este activată (pentru comutarea rapidă între rețele)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Permiteți depanarea USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Depanarea USB are exclusiv scopuri de dezvoltare. Utilizați-o pentru a copia date de pe computer pe dispozitiv, pentru a instala aplicații pe dispozitiv fără notificare și pentru a citi datele din jurnale."</string>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index 5721a8d..ca85c14 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Фиктивные местоположения"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Разрешить использование фиктивных местоположений"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Включить проверку атрибутов"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Использовать DHCP-клиент для Android 5.0, а не для новой версии."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Не отключать передачу данных по мобильной сети даже при активном Wi-Fi-подключении (для быстрого переключения между сетями)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Разрешить отладку USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Отладка по USB – это режим, который позволяет использовать ваше устройство как внешний накопитель: перемещать файлы (с компьютера и на компьютер), напрямую устанавливать приложения, а также просматривать системные журналы."</string>
diff --git a/packages/SettingsLib/res/values-si-rLK/strings.xml b/packages/SettingsLib/res/values-si-rLK/strings.xml
index 0087352..0374b4da 100644
--- a/packages/SettingsLib/res/values-si-rLK/strings.xml
+++ b/packages/SettingsLib/res/values-si-rLK/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"ව්‍යාජ ස්ථානයන්ට අවසර දෙන්න"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"ව්‍යාජ ස්ථාන අනුමත කරන්න"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"උපලක්ෂණ පරික්ෂාව බැලීම සබල කරන්න"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"නව Android DHCP සේවාලාභියා වෙනුවට Lollipop වෙතින් DHCP සේවාලාභියා භාවිත කරන්න."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Wi‑Fi අක්‍රිය විට පවා, සැම විටම ජංගම දත්ත ක්‍රියාකාරීව තබන්න (අවසන් ජාල මාරුව සඳහා)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB දෝශාවේක්ෂණයට ඉඩ දෙන්නද?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB දෝශාවේක්ෂණය සංවර්ධන කටයුතු සඳහා පමණක් යොදාගැනේ. එය ඔබගේ පරිගණකය සහ ඔබගේ උපාංගය අතර දත්ත පිටපත් කිරීමට පමණක් භාවිතා කරන්න, ඔබගේ උපාංගය මත දැනුම්දීම් රහිතව යෙදුම් ස්ථාපනය කරන්න, සහ ලොග් දත්ත කියවන්න."</string>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index a791a1e..43514b7 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Povoliť simulované polohy"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Povoliť simulované polohy"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Kontrola atribútov zobrazenia"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Použitie klienta DHCP z verzie Lollipop namiesto nového klienta Android DHCP."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Vždy ponechávať mobilné dáta aktívne, dokonca aj pri aktívnej sieti Wi‑Fi (na rýchle prepínanie sietí)"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Povoliť ladenie cez USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Ladenie prostredníctvom USB je určené iba na účely vývoja. Použite ho na kopírovanie dát medzi počítačom a zariadením, inštaláciu aplikácií do zariadenia bez upozornenia a čítanie údajov denníka."</string>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index 25972d0..76e14cf 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Dovoli lažne lokacije"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Dovoli lažne lokacije"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Omogoči pregled atributa pogleda"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Uporaba odjemalca DHCP za Lollipop namesto novega odjemalca DHCP za Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Prenos podatkov v mobilnih omrežjih je vedno aktiven – tudi ko je aktivna povezava Wi-Fi (za hiter preklop med omrežji)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Ali dovolite odpravljanje težav s povezavo USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Odpravljanje težav s povezavo USB je namenjeno samo za razvoj. Lahko ga uporabljate za kopiranje podatkov med računalnikom in napravo, nameščanje aplikacij v napravo brez obveščanja in branje podatkov v dnevniku."</string>
diff --git a/packages/SettingsLib/res/values-sq-rAL/strings.xml b/packages/SettingsLib/res/values-sq-rAL/strings.xml
index 4ab5025..7056ea4 100644
--- a/packages/SettingsLib/res/values-sq-rAL/strings.xml
+++ b/packages/SettingsLib/res/values-sq-rAL/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Lejo vendndodhje të simuluara"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Lejo vendndodhje të simuluara"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Aktivizo shikimin e inspektimit të atributeve"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Përdor klientin DHCP nga Lollipop në vend të klientit të ri DHCP të Androidit."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mbaji të dhënat celulare gjithmonë aktive edhe kur Wi‑Fi është aktiv (për ndërrim të shpejtë të rrjetit)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Të lejohet korrigjimi i USB-së?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Korrigjuesi i USB-së është vetëm për qëllime zhvillimore. Përdore për të kopjuar të dhëna mes kompjuterit dhe pajisjes tënde, për të instaluar aplikacione në pajisjen tënde pa asnjë njoftim si dhe për të lexuar të dhënat e ditarit."</string>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index 9858580..7e2f887 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Дозволи лажне локације"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Дозволи лажне локације"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Омогући проверу атрибута за преглед"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Користите DHCP клијент из Lollipop-а уместо новог Android DHCP клијента."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Нека подаци за мобилне уређаје увек буду активни, чак и када је Wi‑Fi активан (ради брзе промене мреже)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Дозволи отклањање USB грешака?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Отклањање USB грешака намењено је само за сврхе програмирања. Користите га за копирање података са рачунара на уређај и обрнуто, инсталирање апликација на уређају без обавештења и читање података из евиденције."</string>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 45b1b6c..4145d57 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Tillåt skenplatser"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Tillåt skenplatser"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Aktivera inspektion av visningsattribut"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Använd DHCP-klienten från Lollipop i stället för den nya Android DHCP-klienten."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Håll alltid mobildata aktiverad, även när Wi-Fi är aktiverat (så att du snabbt kan byta mellan nätverk)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Ska USB-felsökning tillåtas?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB-felsökning ska endast användas i utvecklingssyfte. Använd den för att kopiera data mellan datorn och enheten, installera appar på enheten utan meddelanden och läsa loggdata."</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 89545f9..1c8c810 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Ruhusu maeneo ya jaribio"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Ruhusu maeneo ya majaribio"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Washa ukaguzi wa sifa ya onyesho"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Tumia kiteja cha DHCP kutoka Lollipop badala ya kiteja kipya cha DHCP cha Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Washa kila wakati data ya kifaa cha mkononi, hata kama Wi-Fi inatumika (katika uzimaji wa haraka wa mtandao)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Ruhusu utatuaji USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Ueuaji wa USB umekusudiwa kwa malengo ya utengenezaji tu. Itumi kunakili data kati ya kompyuta yako na kifaa chako, kusanidi programu kwa kifaa chako bila arifa, na kusoma data ya rajisi."</string>
diff --git a/packages/SettingsLib/res/values-ta-rIN/strings.xml b/packages/SettingsLib/res/values-ta-rIN/strings.xml
index 75a69a5..6b0e378 100644
--- a/packages/SettingsLib/res/values-ta-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-ta-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"போலி இருப்பிடங்களை அனுமதி"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"போலி இருப்பிடங்களை அனுமதி"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"காட்சி பண்புக்கூறு சோதனையை இயக்கு"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"புதிய Android DHCP க்ளையன்ட்டிற்குப் பதிலாக, Lollipop இலிருந்து DHCP க்ளையன்ட்டைப் பயன்படுத்தவும்."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"வைஃபை இயங்கும் போதும் (வேகமான நெட்வொர்க் மாற்றத்திற்கு), மொபைல் தரவை எப்போதும் இயக்கத்தில் வைக்கும்."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB பிழைத்திருத்தத்தை அனுமதிக்கவா?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB பிழைத்திருத்தம் மேம்படுத்தல் நோக்கங்களுக்காக மட்டுமே. அதை உங்கள் கணினி மற்றும் சாதனத்திற்கு இடையில் தரவை நகலெடுக்கவும், அறிவிப்பு இல்லாமல் உங்கள் சாதனத்தில் பயன்பாடுகளை நிறுவவும், பதிவு தரவைப் படிக்கவும் பயன்படுத்தவும்."</string>
diff --git a/packages/SettingsLib/res/values-te-rIN/strings.xml b/packages/SettingsLib/res/values-te-rIN/strings.xml
index 5a7a7ae..2b054db 100644
--- a/packages/SettingsLib/res/values-te-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-te-rIN/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"అనుకృత స్థానాలను అనుమతించు"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"అనుకృత స్థానాలను అనుమతించు"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"వీక్షణ లక్షణ పర్యవేక్షణను ప్రారంభించు"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"కొత్త Android DHCP క్లయింట్‌కి బదులుగా Lollipop నుండి DHCP క్లయింట్‌ను ఉపయోగించండి."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"ఎల్లప్పుడూ మొబైల్ డేటాను సక్రియంగా ఉంచు, Wi‑Fi సక్రియంగా ఉన్నా కూడా (వేగవంతమైన నెట్‌వర్క్ మార్పు కోసం)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB డీబగ్గింగ్‌ను అనుమతించాలా?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB డీబగ్గింగ్ అనేది అభివృద్ధి ప్రయోజనాల కోసం మాత్రమే ఉద్దేశించబడింది. మీ కంప్యూటర్ మరియు మీ పరికరం మధ్య డేటాను కాపీ చేయడానికి, నోటిఫికేషన్ లేకుండా మీ పరికరంలో అనువర్తనాలను ఇన్‌స్టాల్ చేయడానికి మరియు లాగ్ డేటాను చదవడానికి దీన్ని ఉపయోగించండి."</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index d7fe2b6..f250c7d 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"อนุญาตให้จำลองตำแหน่ง"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"อนุญาตให้จำลองตำแหน่ง"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"เปิดใช้การตรวจสอบแอตทริบิวต์มุมมอง"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"ใช้ไคลเอ็นต์ DHCP จาก Lollipop แทนไคลเอ็นต์ DHCP ใหม่บน Android"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"เปิดใช้ข้อมูลมือถืออยู่เสมอ แม้ในเวลาที่ใช้งาน Wi-Fi อยู่ (สำหรับสวิตชิงเครือข่ายความเร็วสูง)"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"อนุญาตให้แก้ไขข้อบกพร่อง USB หรือไม่"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"การแก้ไขข้อบกพร่อง USB มีไว้เพื่อการพัฒนาเท่านั้น ให้ใช้การแก้ไขนี้เพื่อคัดลอกข้อมูลระหว่างคอมพิวเตอร์และอุปกรณ์ ติดตั้งแอปพลิเคชันบนอุปกรณ์โดยไม่มีการแจ้งเตือน และอ่านข้อมูลบันทึก"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 2cd6813..8ec9b253 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Payagan ang mga kunwaring lokasyon"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Payagan ang mga kunwaring lokasyon"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"I-enable ang pagsisiyasat sa attribute na view"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Gamitin ang DHCP client mula sa Lollipop sa halip na ang bagong Android DHCP client."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Palaging panatilihing aktibo ang mobile data, kahit na aktibo ang Wi‑Fi (para sa mabilis na paglipat ng network)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Payagan ang pag-debug ng USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Ang pag-debug ng USB ay nilalayon para sa mga layuning pagpapabuti lamang. Gamitin ito upang kumopya ng data sa pagitan ng iyong computer at iyong device, mag-install ng apps sa iyong device nang walang notification, at magbasa ng data ng log."</string>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index ceb1292..d31793a 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Sahte konumlara izin ver"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Sahte konumlara izin ver"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Görünüm özelliği incelemeyi etkinleştir"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Yeni Android DHCP istemcisi yerine Lollipop DHCP istemcisini kullan."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Kablosuz bağlantı etkin bile olsa mobil veri kullanımını her zaman etkin tut (ağlar arasında hızlı geçiş yapmak için)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB hata ayıklamasına izin verilsin mi?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB hata ayıklaması yalnızca geliştirme amaçlıdır. Verileri bilgisayarınızla cihazınız arasında kopyalamak, bildirim göndermeksizin uygulamaları cihazınıza yüklemek ve günlük verilerini okumak için kullanın."</string>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index 44c9be7..fa30b39 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Фіктивні місцезнаходження"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Дозв. фіктивні місцезн."</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Увімкнути оцінку атрибуції переглядів"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Використовувати клієнт DHCP з Lollipop, а не новий клієнт DHCP з Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Не вимикати мобільний Інтернет, навіть якщо ввімкнено Wi‑Fi (щоб швидше переходити між мережами)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Дозвол. налагодж. USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Налагодження USB застосовується лише з метою розробки. Його можна використовувати для копіювання даних між комп’ютером і пристроєм, встановлення програм на вашому пристрої без сповіщення та читання даних журналу."</string>
diff --git a/packages/SettingsLib/res/values-ur-rPK/strings.xml b/packages/SettingsLib/res/values-ur-rPK/strings.xml
index 6490204..e62e8ca 100644
--- a/packages/SettingsLib/res/values-ur-rPK/strings.xml
+++ b/packages/SettingsLib/res/values-ur-rPK/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"فرضی مقامات کی اجازت دیں"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"فرضی مقامات کی اجازت دیں"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"منظر انتساب کے معائنہ کو فعال کریں"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"‏نئے Android DHCP کلائنٹ کی بجائے Lollipop کا DHCP کلائنٹ استعمال کریں۔"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"‏Wi‑Fi فعال ہونے پر بھی موبائل ڈیٹا کو ہمیشہ فعال رکھیں (تیزی سے نیٹ ورک سوئچ کرنے کیلئے)۔"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"‏USB ڈیبگ کرنے کی اجازت دیں؟"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"‏USB ڈیبگ کرنا صرف ڈیولپمنٹ کے مقاصد کیلئے ہے۔ اپنے کمپیوٹر اور اپنے آلہ کے درمیان ڈیٹا کاپی کرنے کیلئے اسے استعمال کریں، بغیر اطلاع کے اپنے آلہ پر ایپس انسٹال کریں اور لاگ ڈیٹا پڑھیں۔"</string>
diff --git a/packages/SettingsLib/res/values-uz-rUZ/strings.xml b/packages/SettingsLib/res/values-uz-rUZ/strings.xml
index bd0cc8c..35e3e88 100644
--- a/packages/SettingsLib/res/values-uz-rUZ/strings.xml
+++ b/packages/SettingsLib/res/values-uz-rUZ/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Qo‘lbola joylashuvlarga ruxsat berish"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Joylashuv emulyatsiyasiga ruxsat berish"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Alomatlar tekshiruvini yoqish"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Yangi Android DHCP mijoz-dasturi o‘rniga Lollipop tizimi DHCP mijoz-dasturidan foydalanilsin."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Mobil internet har doim yoniq tursin, hatto Wi-Fi yoniq bo‘lsa ham (bir tarmoqdan ikkinchisiga tezroq o‘tish uchun)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"USB orqali nosozliklarni tuzatishga ruxsat berilsinmi?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB orqali nosozliklarni tuzatish faqat dasturlash maqsadlarida yoqiladi. Undan ma‘lumotlarni qurilmangiz va kompyuter o‘rtasida ko‘chirish, ilovalarni xabarnomasiz o‘rnatish va jurnal ma‘lumotlarini o‘qish uchun foydalaniladi."</string>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index c6b47fd..1fd9874 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Cho phép vị trí mô phỏng"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Cho phép vị trí mô phỏng"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Cho phép kiểm tra thuộc tính của chế độ xem"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Sử dụng ứng dụng DHCP từ Lollipop thay vì ứng dụng DHCP mới của Android."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Luôn giữ cho dữ liệu di động hoạt động, ngay cả khi Wi-Fi đang hoạt động (để chuyển đổi mạng nhanh)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Cho phép gỡ lỗi USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Gỡ lỗi USB chỉ dành cho mục đích phát triển. Hãy sử dụng tính năng này để sao chép dữ liệu giữa máy tính và thiết bị của bạn, cài đặt ứng dụng trên thiết bị của bạn mà không thông báo và đọc dữ liệu nhật ký."</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index 6b4c453..e82693c 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -132,8 +132,8 @@
     <item msgid="164347302621392996">"快"</item>
     <item msgid="5794028588101562009">"较快"</item>
     <item msgid="7163942783888652942">"非常快"</item>
-    <item msgid="7831712693748700507">"迅速"</item>
-    <item msgid="5194774745031751806">"很迅速"</item>
+    <item msgid="7831712693748700507">"超快"</item>
+    <item msgid="5194774745031751806">"极快"</item>
     <item msgid="9085102246155045744">"最快"</item>
   </string-array>
     <string name="choose_profile" msgid="8229363046053568878">"选择个人资料"</string>
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"允许模拟位置"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"允许模拟位置"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"启用视图属性检查功能"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"使用 Lollipop 的 DHCP 客户端,而不是新的 Android DHCP 客户端。"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"始终开启移动数据网络,即使 WLAN 网络已开启(便于快速切换网络)。"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"是否允许USB调试?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB调试仅适用于开发工作。该功能可用于在您的计算机和设备之间复制数据、在您的设备上安装应用而不发送通知以及读取日志数据。"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index c8cb2d9..3161540 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"允許模擬位置"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"允許模擬位置"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"啟用檢視屬性檢查"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"使用 Lollipop 的 DHCP 用戶端,而不是新的 Android DHCP 用戶端。"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"即使 Wi‑Fi 已啟用,仍永遠啟用流動數據 (可快速切換網絡)。"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"允許 USB 偵錯嗎?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB 偵錯是針對應用程式開發而設計的功能,可讓您在電腦與裝置間複製資料、不用通知即可在裝置上安裝應用程式,以及讀取記錄資料。"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 75f9758..dbadc0a 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"允許模擬位置"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"允許模擬位置"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"啟用檢視屬性檢查"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"使用 Lollipop 的 DHCP 用戶端,不使用新型 Android DHCP 用戶端。"</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"即使 Wi‑Fi 連線已啟用,一律將行動數據連線保持啟用狀態 (以便快速切換網路)。"</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"允許 USB 偵錯嗎?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"USB 偵錯是針對應用程式開發而設計的功能,可讓您複製電腦和裝置中的資料、不需經由通知即可在裝置上安裝應用程式,以及讀取記錄資料。"</string>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 1217183..895ce63 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -180,7 +180,6 @@
     <string name="allow_mock_location" msgid="2787962564578664888">"Vumela izindawo mbumbulu"</string>
     <string name="allow_mock_location_summary" msgid="317615105156345626">"Vumela izindawo mbumbulu"</string>
     <string name="debug_view_attributes" msgid="6485448367803310384">"Nika amandla ukubuka"</string>
-    <string name="legacy_dhcp_client_summary" msgid="163383566317652040">"Sebenzisa iklayenti le-DHCP kusukela ku-Lollipop esikhundleni seklayenti elisha le-Android DHCP."</string>
     <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Hlala ugcine idatha yeselula isebenza, nanoma i-Wi-Fi isebenza (ngokushintshwa kwenethiwekhi okusheshayo)."</string>
     <string name="adb_warning_title" msgid="6234463310896563253">"Vumela ukulungisa iphutha le-USB?"</string>
     <string name="adb_warning_message" msgid="7316799925425402244">"Ukulungisa iphutha le-USB kuhloselwe izinjongo zokuthuthukisa kuphela. Ingasebenziselwa ukukopisha idatha phakathi kwekhompyutha yakho nedivaysi yakho, faka izinhlelo zokusebenza kwidivaysi yakho ngaphandle kwesaziso, bese ufunda idatha yefayela lokungena."</string>
diff --git a/packages/SettingsLib/res/values/colors.xml b/packages/SettingsLib/res/values/colors.xml
index 796273d..02b7ea6 100644
--- a/packages/SettingsLib/res/values/colors.xml
+++ b/packages/SettingsLib/res/values/colors.xml
@@ -17,5 +17,5 @@
 <resources>
     <color name="disabled_text_color">#66000000</color> <!-- 38% black -->
 
-    <color name="usage_graph_dots">#455A64</color>
+    <color name="usage_graph_dots">@*android:color/tertiary_device_default_settings</color>
 </resources>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 89c46d7..97121e9 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -448,8 +448,6 @@
     <string name="allow_mock_location_summary">Allow mock locations</string>
     <!-- Setting Checkbox title whether to enable view attribute inspection -->
     <string name="debug_view_attributes">Enable view attribute inspection</string>
-    <!-- Setting Checkbox summary whether to use DHCP client from Lollipop (Android 5.0) [CHAR LIMIT=130] -->
-    <string name="legacy_dhcp_client_summary">Use the DHCP client from Lollipop instead of the new Android DHCP client.</string>
     <string name="mobile_data_always_on_summary">Always keep mobile data active, even when Wi\u2011Fi is active (for fast network switching).</string>
     <!-- Title of warning dialog about the implications of enabling USB debugging -->
     <string name="adb_warning_title">Allow USB debugging?</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java b/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
index ff1c866..b04948b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
@@ -22,6 +22,9 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.os.Build;
+import android.telephony.PhoneNumberUtils;
+import android.telephony.SubscriptionInfo;
+import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 import android.text.format.DateFormat;
 import android.util.Log;
@@ -37,6 +40,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import static android.content.Context.TELEPHONY_SERVICE;
+
 public class DeviceInfoUtils {
     private static final String TAG = "DeviceInfoUtils";
 
@@ -169,4 +174,40 @@
         }
     }
 
+    public static String getFormattedPhoneNumber(Context context, SubscriptionInfo subscriptionInfo) {
+        String formattedNumber = null;
+        if (subscriptionInfo != null) {
+            final TelephonyManager telephonyManager =
+                    (TelephonyManager) context.getSystemService(TELEPHONY_SERVICE);
+            final String rawNumber =
+                    telephonyManager.getLine1Number(subscriptionInfo.getSubscriptionId());
+            if (!TextUtils.isEmpty(rawNumber)) {
+                formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
+            }
+
+        }
+        return formattedNumber;
+    }
+
+    public static String getFormattedPhoneNumbers(Context context,
+            List<SubscriptionInfo> subscriptionInfo) {
+        StringBuilder sb = new StringBuilder();
+        if (subscriptionInfo != null) {
+            final TelephonyManager telephonyManager =
+                    (TelephonyManager) context.getSystemService(TELEPHONY_SERVICE);
+            final int count = subscriptionInfo.size();
+            for (int i = 0; i < count; i++) {
+                final String rawNumber = telephonyManager.getLine1Number(
+                        subscriptionInfo.get(i).getSubscriptionId());
+                if (!TextUtils.isEmpty(rawNumber)) {
+                    sb.append(PhoneNumberUtils.formatNumber(rawNumber));
+                    if (i < count - 1) {
+                        sb.append("\n");
+                    }
+                }
+            }
+        }
+        return sb.toString();
+    }
+
 }
diff --git a/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java b/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
index 320cd58..5791168 100644
--- a/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
@@ -24,6 +24,7 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources.Theme;
+import android.content.res.TypedArray;
 import android.net.Uri;
 import android.text.TextUtils;
 import android.util.Log;
@@ -156,16 +157,15 @@
         return intent;
     }
 
-    private static void addIntentParameters(Context context, Intent intent, String backupContext) {
+    public static void addIntentParameters(Context context, Intent intent, String backupContext) {
         if (!intent.hasExtra(EXTRA_CONTEXT)) {
             // Insert some context if none exists.
             intent.putExtra(EXTRA_CONTEXT, backupContext);
         }
         intent.putExtra(EXTRA_THEME, 1 /* Light, dark action bar */);
-        Theme theme = context.getTheme();
-        TypedValue typedValue = new TypedValue();
-        theme.resolveAttribute(android.R.attr.colorPrimary, typedValue, true);
-        intent.putExtra(EXTRA_PRIMARY_COLOR, context.getColor(typedValue.resourceId));
+        TypedArray array = context.obtainStyledAttributes(new int[]{android.R.attr.colorPrimary});
+        intent.putExtra(EXTRA_PRIMARY_COLOR, array.getColor(0, 0));
+        array.recycle();
     }
 
     /**
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index d98f1a4..548ddf8 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -1,5 +1,6 @@
 package com.android.settingslib;
 
+import android.annotation.ColorInt;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
@@ -8,12 +9,14 @@
 import android.content.pm.UserInfo;
 import android.content.pm.Signature;
 import android.content.res.Resources;
+import android.content.res.TypedArray;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.drawable.Drawable;
 import android.net.ConnectivityManager;
 import android.os.BatteryManager;
 import android.os.UserManager;
+import android.print.PrintManager;
 import com.android.internal.util.UserIcons;
 import com.android.settingslib.drawable.UserIconDrawable;
 
@@ -154,6 +157,14 @@
         return statusString;
     }
 
+    @ColorInt
+    public static int getColorAccent(Context context) {
+        TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.colorAccent});
+        @ColorInt int colorAccent = ta.getColor(0, 0);
+        ta.recycle();
+        return colorAccent;
+    }
+
     /**
      * Determine whether a package is a "system package", in which case certain things (like
      * disabling notifications or disabling the package altogether) should be disallowed.
@@ -175,7 +186,8 @@
                         && sSystemSignature[0].equals(getFirstSignature(pkg)))
                 || pkg.packageName.equals(sPermissionControllerPackageName)
                 || pkg.packageName.equals(sServicesSystemSharedLibPackageName)
-                || pkg.packageName.equals(sSharedSystemSharedLibPackageName);
+                || pkg.packageName.equals(sSharedSystemSharedLibPackageName)
+                || pkg.packageName.equals(PrintManager.PRINT_SPOOLER_PACKAGE_NAME);
     }
 
     private static Signature getFirstSignature(PackageInfo pkg) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index c075703..a879d16f 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -809,7 +809,9 @@
             // No separate prompt is displayed after pairing.
             if (getPhonebookPermissionChoice() == CachedBluetoothDevice.ACCESS_UNKNOWN) {
                 if (mDevice.getBluetoothClass().getDeviceClass()
-                        == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
+                        == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE ||
+                    mDevice.getBluetoothClass().getDeviceClass()
+                        == BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET) {
                     setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
                 } else {
                     setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java b/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
index 37e3c53..6658c14 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
@@ -41,8 +41,10 @@
 import android.view.Window;
 import android.view.WindowManager.LayoutParams;
 import android.widget.AdapterView;
+import android.widget.FrameLayout;
 import android.widget.ListView;
 import android.widget.Toolbar;
+
 import com.android.settingslib.R;
 import com.android.settingslib.applications.InterestingConfigChanges;
 
@@ -68,6 +70,7 @@
     private final List<CategoryListener> mCategoryListeners = new ArrayList<>();
 
     private SettingsDrawerAdapter mDrawerAdapter;
+    private FrameLayout mContentHeaderContainer;
     private DrawerLayout mDrawerLayout;
     private boolean mShowingMenu;
 
@@ -84,6 +87,7 @@
             requestWindowFeature(Window.FEATURE_NO_TITLE);
         }
         super.setContentView(R.layout.settings_with_drawer);
+        mContentHeaderContainer = (FrameLayout) findViewById(R.id.content_header_container);
         mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
         if (mDrawerLayout == null) {
             return;
@@ -180,6 +184,13 @@
         }
     }
 
+    public void setContentHeaderView(View headerView) {
+        mContentHeaderContainer.removeAllViews();
+        if (headerView != null) {
+            mContentHeaderContainer.addView(headerView);
+        }
+    }
+
     @Override
     public void setContentView(@LayoutRes int layoutResID) {
         final ViewGroup parent = (ViewGroup) findViewById(R.id.content_frame);
@@ -272,6 +283,13 @@
         }
     }
 
+    public HashMap<Pair<String, String>, Tile> getTileCache() {
+        if (sTileCache == null) {
+            getDashboardCategories();
+        }
+        return sTileCache;
+    }
+
     public void onProfileTileOpen() {
         finish();
     }
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
index 418b138..b9c758c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
@@ -302,7 +302,7 @@
         return false;
     }
 
-    private static final Comparator<Tile> TILE_COMPARATOR =
+    public static final Comparator<Tile> TILE_COMPARATOR =
             new Comparator<Tile>() {
         @Override
         public int compare(Tile lhs, Tile rhs) {
diff --git a/packages/SettingsProvider/res/values-be-rBY/strings.xml b/packages/SettingsProvider/res/values-be-rBY/strings.xml
index 3a8557c..c164ac7 100644
--- a/packages/SettingsProvider/res/values-be-rBY/strings.xml
+++ b/packages/SettingsProvider/res/values-be-rBY/strings.xml
@@ -19,5 +19,5 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="4567566098528588863">"Сховішча налад"</string>
+    <string name="app_label" msgid="4567566098528588863">"Захоўванне налад"</string>
 </resources>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 978ca94..108814e 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -216,4 +216,7 @@
 
     <!-- Default setting for ability to add users from the lock screen -->
     <bool name="def_add_users_from_lockscreen">false</bool>
+
+    <!-- Default setting for disallow oem unlock. -->
+    <bool name="def_oem_unlock_disallow">false</bool>
 </resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 774be60..950c7d3 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -2074,7 +2074,7 @@
         }
 
         private final class UpgradeController {
-            private static final int SETTINGS_VERSION = 127;
+            private static final int SETTINGS_VERSION = 128;
 
             private final int mUserId;
 
@@ -2329,6 +2329,18 @@
                     currentVersion = 127;
                 }
 
+                if (currentVersion == 127) {
+                    // Version 127: Disable OEM unlock setting by default on some devices.
+                    final SettingsState globalSettings = getGlobalSettingsLocked();
+                    String defaultOemUnlockDisabled = (getContext().getResources()
+                            .getBoolean(R.bool.def_oem_unlock_disallow) ? "1" : "0");
+                    globalSettings.insertSettingLocked(
+                            Settings.Global.OEM_UNLOCK_DISALLOWED,
+                            defaultOemUnlockDisabled,
+                            SettingsState.SYSTEM_PACKAGE_NAME);
+                    currentVersion = 128;
+                }
+
                 // vXXX: Add new settings above this point.
 
                 // Return the current version.
diff --git a/packages/Shell/res/values-b+sr+Latn/strings.xml b/packages/Shell/res/values-b+sr+Latn/strings.xml
index 185b690..fe80c22 100644
--- a/packages/Shell/res/values-b+sr+Latn/strings.xml
+++ b/packages/Shell/res/values-b+sr+Latn/strings.xml
@@ -25,11 +25,12 @@
     <string name="bugreport_finished_text" product="default" msgid="8353769438382138847">"Dodirnite da biste delili izveštaj o grešci"</string>
     <string name="bugreport_finished_pending_screenshot_text" product="watch" msgid="1474435374470177193">"Dodirnite za deljenje izveštaja o grešci bez snimka ekrana ili sačekajte da se napravi snimak ekrana"</string>
     <string name="bugreport_finished_pending_screenshot_text" product="default" msgid="1474435374470177193">"Dodirnite za deljenje izveštaja o grešci bez snimka ekrana ili sačekajte da se napravi snimak ekrana"</string>
-    <string name="bugreport_confirm" msgid="5917407234515812495">"Izveštaji o greškama sadrže podatke iz različitih sistemskih datoteka evidencije, koji obuhvataju lične i privatne podatke (poput korišćenja aplikacija i podataka o lokaciji). Delite izveštaje o greškama samo sa aplikacijama i ljudima u koje imate poverenja."</string>
-    <string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"Ne prikazuj ponovo"</string>
+    <!-- no translation found for bugreport_confirm (5917407234515812495) -->
+    <skip />
+    <!-- no translation found for bugreport_confirm_dont_repeat (6179945398364357318) -->
+    <skip />
     <string name="bugreport_storage_title" msgid="5332488144740527109">"Izveštaji o greškama"</string>
     <string name="bugreport_unreadable_text" msgid="586517851044535486">"Datoteka izveštaja o grešci ne može da se pročita"</string>
-    <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"Dodavanje detalja izveštaja o grešci u zip datoteku nije uspelo"</string>
     <string name="bugreport_unnamed" msgid="2800582406842092709">"neimenovano"</string>
     <string name="bugreport_info_action" msgid="2158204228510576227">"Detalji"</string>
     <string name="bugreport_screenshot_action" msgid="8677781721940614995">"Snimci ekrana"</string>
diff --git a/packages/Shell/res/values-be-rBY/strings.xml b/packages/Shell/res/values-be-rBY/strings.xml
index fb29fbc..fc5a3b2 100644
--- a/packages/Shell/res/values-be-rBY/strings.xml
+++ b/packages/Shell/res/values-be-rBY/strings.xml
@@ -25,11 +25,12 @@
     <string name="bugreport_finished_text" product="default" msgid="8353769438382138847">"Дакраніцеся, каб абагуліць сваю справаздачу пра памылку"</string>
     <string name="bugreport_finished_pending_screenshot_text" product="watch" msgid="1474435374470177193">"Краніце, каб абагуліць справаздачу пра памылку без здымка экрана, або чакайце атрымання здымка."</string>
     <string name="bugreport_finished_pending_screenshot_text" product="default" msgid="1474435374470177193">"Краніце, каб абагуліць справаздачу пра памылку без здымка экрана, або чакайце атрымання здымка."</string>
-    <string name="bugreport_confirm" msgid="5917407234515812495">"Справаздачы пра памылкі ўтрымліваюць даныя з розных файлаў журналаў сістэмы, якія могуць уключаць даныя, што вы лічыце канфідэнцыяльнымі (напрыклад, пра выкарыстанне праграм і даныя аб месцазнаходжанні). Абагульвайце справаздачы пра памылкі толькі з тымі людзьмі і праграмамі, якім вы давяраеце."</string>
-    <string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"Не паказваць зноў"</string>
+    <!-- no translation found for bugreport_confirm (5917407234515812495) -->
+    <skip />
+    <!-- no translation found for bugreport_confirm_dont_repeat (6179945398364357318) -->
+    <skip />
     <string name="bugreport_storage_title" msgid="5332488144740527109">"Справадзачы пра памылкі"</string>
     <string name="bugreport_unreadable_text" msgid="586517851044535486">"Немагчыма прачытаць файл справаздачы пра памылкі"</string>
-    <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"Не атрымалася дадаць падрабязную інфармацыю справаздачы пра памылку ў файл архіва"</string>
     <string name="bugreport_unnamed" msgid="2800582406842092709">"без назвы"</string>
     <string name="bugreport_info_action" msgid="2158204228510576227">"Падрабязнасці"</string>
     <string name="bugreport_screenshot_action" msgid="8677781721940614995">"Здымак экрана"</string>
diff --git a/packages/Shell/res/values-bs-rBA/strings.xml b/packages/Shell/res/values-bs-rBA/strings.xml
index 80dddb5..c37b4ee 100644
--- a/packages/Shell/res/values-bs-rBA/strings.xml
+++ b/packages/Shell/res/values-bs-rBA/strings.xml
@@ -25,11 +25,12 @@
     <string name="bugreport_finished_text" product="default" msgid="8353769438382138847">"Dodirnite da biste podijelili izvještaj o grešci"</string>
     <string name="bugreport_finished_pending_screenshot_text" product="watch" msgid="1474435374470177193">"Dodirnite da podijelite izveštaj o greškama bez snimka ekrana ili sačekajte da snimak bude gotov"</string>
     <string name="bugreport_finished_pending_screenshot_text" product="default" msgid="1474435374470177193">"Dodirnite da podijelite izveštaj o greškama bez snimka ekrana ili sačekajte da snimak bude gotov"</string>
-    <string name="bugreport_confirm" msgid="5917407234515812495">"Izvještaji o greškama sadrže podatke iz raznih zapisnika sistema koji mogu sadržavati lične i privatne informacije koje smatrate osjetljivima (poput podataka o upotrebi aplikacije ili podataka o lokaciji). Izvještaje o greškama dijelite samo sa aplikacijama i osobama kojima vjerujete."</string>
-    <string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"Ne prikazuj opet"</string>
+    <!-- no translation found for bugreport_confirm (5917407234515812495) -->
+    <skip />
+    <!-- no translation found for bugreport_confirm_dont_repeat (6179945398364357318) -->
+    <skip />
     <string name="bugreport_storage_title" msgid="5332488144740527109">"Izvještaji o greškama"</string>
     <string name="bugreport_unreadable_text" msgid="586517851044535486">"Nije moguće pročitati izvještaj o grešci"</string>
-    <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"Dodavanje izvještaja o greškama u zip datoteku nije uspjelo"</string>
     <string name="bugreport_unnamed" msgid="2800582406842092709">"neimenovano"</string>
     <string name="bugreport_info_action" msgid="2158204228510576227">"Detalji"</string>
     <string name="bugreport_screenshot_action" msgid="8677781721940614995">"Snimak ekrana"</string>
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index eadb4bf..20b562c 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -165,6 +165,9 @@
     <!-- the ability to rename notifications posted by other apps -->
     <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
 
+    <!-- shortcut manager -->
+    <uses-permission android:name="android.permission.RESET_SHORTCUT_MANAGER_THROTTLING" />
+
     <application
         android:name=".SystemUIApplication"
         android:persistent="true"
diff --git a/packages/SystemUI/res/color/notification_guts_buttons.xml b/packages/SystemUI/res/color/notification_guts_buttons.xml
index c211e43..3b8d59b 100644
--- a/packages/SystemUI/res/color/notification_guts_buttons.xml
+++ b/packages/SystemUI/res/color/notification_guts_buttons.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_checked="true"
-          android:color="@*android:color/material_deep_teal_500" />
+          android:color="?android:attr/colorAccent" />
     <item android:color="@android:color/black"
           android:alpha=".54" />
 </selector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/color/qs_detail_empty.xml b/packages/SystemUI/res/color/qs_detail_empty.xml
new file mode 100644
index 0000000..4be39c7
--- /dev/null
+++ b/packages/SystemUI/res/color/qs_detail_empty.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.14" android:color="@*android:color/quaternary_device_default_settings" />
+</selector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/night_mode_settings.xml b/packages/SystemUI/res/color/qs_detail_progress_track.xml
similarity index 67%
rename from packages/SystemUI/res/layout/night_mode_settings.xml
rename to packages/SystemUI/res/color/qs_detail_progress_track.xml
index 3725e78..c56382e 100644
--- a/packages/SystemUI/res/layout/night_mode_settings.xml
+++ b/packages/SystemUI/res/color/qs_detail_progress_track.xml
@@ -13,12 +13,8 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <include layout="@layout/switch_bar" />
-
-</LinearLayout>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <!-- I really don't want to define this, but the View that uses this asset uses both the
+         light and dark accent colors. -->
+    <item android:alpha="0.6" android:drawable="@*android:color/accent_device_default_light" />
+</selector>
diff --git a/packages/SystemUI/res/color/qs_user_detail_avatar_frame.xml b/packages/SystemUI/res/color/qs_user_detail_avatar_frame.xml
index 20251c2..344859c 100644
--- a/packages/SystemUI/res/color/qs_user_detail_avatar_frame.xml
+++ b/packages/SystemUI/res/color/qs_user_detail_avatar_frame.xml
@@ -17,6 +17,6 @@
   -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_activated="true" android:color="@color/current_user_border_color" />
+    <item android:state_activated="true" android:color="?android:attr/colorAccent" />
     <item android:color="@android:color/transparent" />
 </selector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/color/qs_user_detail_name.xml b/packages/SystemUI/res/color/qs_user_detail_name.xml
index 35c7a4f..e262209 100644
--- a/packages/SystemUI/res/color/qs_user_detail_name.xml
+++ b/packages/SystemUI/res/color/qs_user_detail_name.xml
@@ -17,7 +17,7 @@
   -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_activated="true" android:color="@color/current_user_border_color" />
+    <item android:state_activated="true" android:color="?android:attr/colorAccent" />
     <item android:state_enabled="false" android:color="@color/qs_tile_disabled_color" />
     <item android:color="#66ffffff" /> <!-- 40% white -->
 </selector>
\ No newline at end of file
diff --git a/packages/DocumentsUI/res/values/attrs.xml b/packages/SystemUI/res/color/screen_pinning_nav_icon_highlight_outer.xml
similarity index 73%
copy from packages/DocumentsUI/res/values/attrs.xml
copy to packages/SystemUI/res/color/screen_pinning_nav_icon_highlight_outer.xml
index 9e13001..5370f7a 100644
--- a/packages/DocumentsUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/color/screen_pinning_nav_icon_highlight_outer.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2016 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,8 +13,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<resources>
-    <declare-styleable name="DocumentsTheme">
-        <attr name="colorActionMode" format="color"/>
-    </declare-styleable>
-</resources>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:alpha="0.25" android:color="?android:attr/colorAccent" />
+</selector>
diff --git a/packages/SystemUI/res/drawable/brightness_mirror_background.xml b/packages/SystemUI/res/drawable/brightness_mirror_background.xml
index e901e40..0c69d89 100644
--- a/packages/SystemUI/res/drawable/brightness_mirror_background.xml
+++ b/packages/SystemUI/res/drawable/brightness_mirror_background.xml
@@ -15,5 +15,5 @@
   ~ limitations under the License
   -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <solid android:color="@color/system_primary_color" />
+    <solid android:color="?android:attr/colorPrimary" />
 </shape>
diff --git a/packages/SystemUI/res/drawable/fab_background.xml b/packages/SystemUI/res/drawable/fab_background.xml
deleted file mode 100644
index 7f23f2b..0000000
--- a/packages/SystemUI/res/drawable/fab_background.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-        android:color="@color/fab_ripple">
-    <item>
-        <shape>
-            <solid android:color="@color/fab_shape" />
-        </shape>
-    </item>
-</ripple>
diff --git a/packages/SystemUI/res/drawable/ic_brightness_thumb.xml b/packages/SystemUI/res/drawable/ic_brightness_thumb.xml
index dc978fe..24ac018 100644
--- a/packages/SystemUI/res/drawable/ic_brightness_thumb.xml
+++ b/packages/SystemUI/res/drawable/ic_brightness_thumb.xml
@@ -20,7 +20,7 @@
         android:viewportHeight="24.0">
     <path
         android:pathData="m18.250000,12.000000a6.250000,6.250000 0.000000,1.000000 1.000000,-12.500000 0.000000,6.250000 6.250000,0.000000 1.000000,1.000000 12.500000,0.000000z"
-        android:fillColor="@color/system_primary_color" />
+        android:fillColor="?android:attr/colorPrimary" />
     <path
         android:fillColor="#FFFFFFFF"
         android:pathData="M20.000000,8.700000L20.000000,4.000000L15.300000,4.000000L12.000000,0.700000 8.700000,4.000000L4.000000,4.000000L4.000000,8.700000L0.700000,12.000000 4.000000,15.300000L4.000000,20.000000L8.700000,20.000000L12.000000,23.299999 15.300000,20.000000L20.000000,20.000000L20.000000,15.300000L23.299999,12.000000 20.000000,8.700000zM12.000000,18.000000C8.700000,18.000000 6.000000,15.300000 6.000000,12.000000 6.000000,8.700000 8.700000,6.000000 12.000000,6.000000c3.300000,0.000000 6.000000,2.700000 6.000000,6.000000 0.000000,3.300000 -2.700000,6.000000 -6.000000,6.000000zM12.000000,8.000000c-2.200000,0.000000 -4.000000,1.800000 -4.000000,4.000000 0.000000,2.200000 1.800000,4.000000 4.000000,4.000000 2.200000,0.000000 4.000000,-1.800000 4.000000,-4.000000 0.000000,-2.200000 -1.800000,-4.000000 -4.000000,-4.000000z"/>
diff --git a/packages/SystemUI/res/drawable/ic_night_mode_disabled.xml b/packages/SystemUI/res/drawable/ic_mode_edit.xml
similarity index 66%
rename from packages/SystemUI/res/drawable/ic_night_mode_disabled.xml
rename to packages/SystemUI/res/drawable/ic_mode_edit.xml
index 010815a..8a73686 100644
--- a/packages/SystemUI/res/drawable/ic_night_mode_disabled.xml
+++ b/packages/SystemUI/res/drawable/ic_mode_edit.xml
@@ -14,11 +14,11 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24.0dp"
-        android:height="24.0dp"
+        android:width="20.0dp"
+        android:height="20.0dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
-        android:fillColor="#4DFFFFFF"
-        android:pathData="M20.71,5.63l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0.0l-3.12,3.12 -1.93,-1.91 -1.41,1.41 1.42,1.42L3.0,16.25L3.0,21.0l4.75,0.0l8.92,-8.92 1.42,1.42 1.41,-1.41 -1.92,-1.92 3.12,-3.12c0.4,0.0 0.4,-1.0 0.01,-1.42zM6.92,19.0L5.0,17.08l8.06,-8.06 1.92,1.92L6.92,19.0z"/>
+        android:fillColor="#FFFFFF"
+        android:pathData="M3.0,17.25L3.0,21.0l3.75,0.0L17.81,9.94l-3.75,-3.75L3.0,17.25zM20.71,7.04c0.39,-0.3 0.39,-1.02 0.0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0.0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_night_mode.xml b/packages/SystemUI/res/drawable/ic_night_mode.xml
deleted file mode 100644
index caa7a47..0000000
--- a/packages/SystemUI/res/drawable/ic_night_mode.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-    Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24.0dp"
-        android:height="24.0dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M20.71,5.63l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0.0l-3.12,3.12 -1.93,-1.91 -1.41,1.41 1.42,1.42L3.0,16.25L3.0,21.0l4.75,0.0l8.92,-8.92 1.42,1.42 1.41,-1.41 -1.92,-1.92 3.12,-3.12c0.4,0.0 0.4,-1.0 0.01,-1.42zM6.92,19.0L5.0,17.08l8.06,-8.06 1.92,1.92L6.92,19.0z"/>
-</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_branded_vpn.xml b/packages/SystemUI/res/drawable/ic_qs_branded_vpn.xml
new file mode 100644
index 0000000..736a04a
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_branded_vpn.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="12.0dp"
+        android:height="12.0dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#4DFFFFFF"
+        android:pathData="M12.700000,10.000000c-0.800000,-2.300000 -3.000000,-4.000000 -5.700000,-4.000000c-3.300000,0.000000 -6.000000,2.700000 -6.000000,6.000000s2.700000,6.000000 6.000000,6.000000c2.600000,0.000000 4.800000,-1.700000 5.700000,-4.000000L17.000000,14.000000l0.000000,4.000000l4.000000,0.000000l0.000000,-4.000000l2.000000,0.000000l0.000000,-4.000000L12.700000,10.000000zM7.000000,14.000000c-1.100000,0.000000 -2.000000,-0.900000 -2.000000,-2.000000c0.000000,-1.100000 0.900000,-2.000000 2.000000,-2.000000s2.000000,0.900000 2.000000,2.000000C9.000000,13.100000 8.100000,14.000000 7.000000,14.000000z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml b/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml
new file mode 100644
index 0000000..258bd0f
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml
@@ -0,0 +1,37 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="18.0dp"
+    android:height="24dp"
+    android:viewportWidth="36.0"
+    android:viewportHeight="36.0">
+
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M6.797,13.334h1.231v1.522H6.797v2.509h-1.62v-2.509H1.101l-0.039-1.157l4.069-7.643h1.666V13.334z
+M2.648,13.334h2.53V8.721L5.137,8.713L4.984,9.148L2.648,13.334z" />
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M16.155,15.836c-0.269,0.439-0.695,0.832-1.282,1.177c-0.587,0.344-1.344,0.517-2.271,0.517
+c-1.151,0-2.098-0.432-2.841-1.294c-0.744-0.862-1.115-1.978-1.115-3.345v-2.36c0-1.367,0.359-2.481,1.077-3.343
+c0.719-0.863,1.643-1.293,2.772-1.293c1.132,0,2.017,0.331,2.649,0.994c0.633,0.663,0.941,1.528,0.924,2.594l-0.021,0.047h-1.545
+c0-0.638-0.171-1.15-0.513-1.538c-0.341-0.389-0.831-0.583-1.469-0.583c-0.674,0-1.217,0.292-1.63,0.877
+c-0.413,0.585-0.619,1.328-0.619,2.229v2.375c0,0.912,0.215,1.662,0.645,2.25c0.431,0.587,0.992,0.881,1.684,0.881
+c0.522,0,0.935-0.068,1.238-0.205c0.304-0.138,0.533-0.305,0.688-0.502v-2.338h-2.041v-1.413h3.668V15.836z" />
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M19.366,14.701v-2.232h-2.25v-1.541h2.25V8.695h1.5v2.232h2.256v1.541h-2.256v2.232H19.366z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_settings_20dp.xml b/packages/SystemUI/res/drawable/ic_settings_20dp.xml
new file mode 100644
index 0000000..3170f86
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_settings_20dp.xml
@@ -0,0 +1,24 @@
+<!--
+    Copyright (C) 2016 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="20dp"
+    android:height="20dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:pathData="M19.4,13.0c0.0,-0.3 0.1,-0.6 0.1,-1.0s0.0,-0.7 -0.1,-1.0l2.1,-1.7c0.2,-0.2 0.2,-0.4 0.1,-0.6l-2.0,-3.5C19.5,5.1 19.3,5.0 19.0,5.1l-2.5,1.0c-0.5,-0.4 -1.1,-0.7 -1.7,-1.0l-0.4,-2.6C14.5,2.2 14.2,2.0 14.0,2.0l-4.0,0.0C9.8,2.0 9.5,2.2 9.5,2.4L9.1,5.1C8.5,5.3 8.0,5.7 7.4,6.1L5.0,5.1C4.7,5.0 4.5,5.1 4.3,5.3l-2.0,3.5C2.2,8.9 2.3,9.2 2.5,9.4L4.6,11.0c0.0,0.3 -0.1,0.6 -0.1,1.0s0.0,0.7 0.1,1.0l-2.1,1.7c-0.2,0.2 -0.2,0.4 -0.1,0.6l2.0,3.5C4.5,18.9 4.7,19.0 5.0,18.9l2.5,-1.0c0.5,0.4 1.1,0.7 1.7,1.0l0.4,2.6c0.0,0.2 0.2,0.4 0.5,0.4l4.0,0.0c0.2,0.0 0.5,-0.2 0.5,-0.4l0.4,-2.6c0.6,-0.3 1.2,-0.6 1.7,-1.0l2.5,1.0c0.2,0.1 0.5,0.0 0.6,-0.2l2.0,-3.5c0.1,-0.2 0.1,-0.5 -0.1,-0.6L19.4,13.0zM12.0,15.5c-1.9,0.0 -3.5,-1.6 -3.5,-3.5s1.6,-3.5 3.5,-3.5s3.5,1.6 3.5,3.5S13.9,15.5 12.0,15.5z"
+        android:fillColor="#ffffffff" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/notification_header_bg.xml b/packages/SystemUI/res/drawable/notification_header_bg.xml
deleted file mode 100644
index 1f46502..0000000
--- a/packages/SystemUI/res/drawable/notification_header_bg.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2014 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight" >
-    <item android:drawable="@color/system_secondary_color"/>
-</ripple>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/qs_background_primary.xml b/packages/SystemUI/res/drawable/qs_background_primary.xml
index 1bf7d4c..8ea9e06 100644
--- a/packages/SystemUI/res/drawable/qs_background_primary.xml
+++ b/packages/SystemUI/res/drawable/qs_background_primary.xml
@@ -15,6 +15,6 @@
 -->
 <inset xmlns:android="http://schemas.android.com/apk/res/android">
     <shape>
-        <solid android:color="@color/system_primary_color"/>
+        <solid android:color="?android:attr/colorPrimary"/>
     </shape>
 </inset>
diff --git a/packages/SystemUI/res/drawable/qs_customizer_background.xml b/packages/SystemUI/res/drawable/qs_customizer_background.xml
index d90f820..12d8016 100644
--- a/packages/SystemUI/res/drawable/qs_customizer_background.xml
+++ b/packages/SystemUI/res/drawable/qs_customizer_background.xml
@@ -15,5 +15,5 @@
 -->
 <transition xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:drawable="@color/qs_detail_transition" />
-    <item android:drawable="@color/system_primary_color" />
+    <item android:drawable="?android:attr/colorPrimary" />
 </transition>
diff --git a/packages/SystemUI/res/drawable/qs_detail_background.xml b/packages/SystemUI/res/drawable/qs_detail_background.xml
index 692cd44..84c793f 100644
--- a/packages/SystemUI/res/drawable/qs_detail_background.xml
+++ b/packages/SystemUI/res/drawable/qs_detail_background.xml
@@ -15,5 +15,5 @@
 -->
 <transition xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:drawable="@color/qs_detail_transition" />
-    <item android:drawable="@color/system_primary_color" />
+    <item android:drawable="?android:attr/colorPrimary" />
 </transition>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/quick_header_bg.xml b/packages/SystemUI/res/drawable/quick_header_bg.xml
index d45d673..920e6f5 100644
--- a/packages/SystemUI/res/drawable/quick_header_bg.xml
+++ b/packages/SystemUI/res/drawable/quick_header_bg.xml
@@ -17,5 +17,5 @@
 
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
     android:color="?android:attr/colorControlHighlight" >
-    <item android:drawable="@color/system_primary_color"/>
+    <item android:drawable="?android:attr/colorPrimary"/>
 </ripple>
diff --git a/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml b/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml
index 354b8bd..1303bdb 100644
--- a/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml
+++ b/packages/SystemUI/res/drawable/screen_pinning_bg_circ.xml
@@ -19,7 +19,7 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="oval" >
 
-    <solid android:color="@color/system_accent_color" />
+    <solid android:color="?android:attr/colorAccent" />
 
     <size
         android:height="@dimen/screen_pinning_nav_highlight_size"
diff --git a/packages/SystemUI/res/drawable/stat_sys_branded_vpn.xml b/packages/SystemUI/res/drawable/stat_sys_branded_vpn.xml
new file mode 100644
index 0000000..a86e5b9
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_branded_vpn.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="17.0dp"
+        android:height="17.0dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M12.700000,10.000000c-0.800000,-2.300000 -3.000000,-4.000000 -5.700000,-4.000000c-3.300000,0.000000 -6.000000,2.700000 -6.000000,6.000000s2.700000,6.000000 6.000000,6.000000c2.600000,0.000000 4.800000,-1.700000 5.700000,-4.000000L17.000000,14.000000l0.000000,4.000000l4.000000,0.000000l0.000000,-4.000000l2.000000,0.000000l0.000000,-4.000000L12.700000,10.000000zM7.000000,14.000000c-1.100000,0.000000 -2.000000,-0.900000 -2.000000,-2.000000c0.000000,-1.100000 0.900000,-2.000000 2.000000,-2.000000s2.000000,0.900000 2.000000,2.000000C9.000000,13.100000 8.100000,14.000000 7.000000,14.000000z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g_plus.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g_plus.xml
new file mode 100644
index 0000000..17a4394
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g_plus.xml
@@ -0,0 +1,37 @@
+<!--
+     Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="15dp"
+    android:height="20dp"
+    android:viewportWidth="36"
+    android:viewportHeight="36">
+
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M6.797,13.334h1.231v1.522H6.797v2.509h-1.62v-2.509H1.101l-0.039-1.157l4.069-7.643h1.666V13.334z
+M2.648,13.334h2.53V8.721L5.137,8.713L4.984,9.148L2.648,13.334z" />
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M16.155,15.836c-0.269,0.439-0.695,0.832-1.282,1.177c-0.587,0.344-1.344,0.517-2.271,0.517
+c-1.151,0-2.098-0.432-2.841-1.294c-0.744-0.862-1.115-1.978-1.115-3.345v-2.36c0-1.367,0.359-2.481,1.077-3.343
+c0.719-0.863,1.643-1.293,2.772-1.293c1.132,0,2.017,0.331,2.649,0.994c0.633,0.663,0.941,1.528,0.924,2.594l-0.021,0.047h-1.545
+c0-0.638-0.171-1.15-0.513-1.538c-0.341-0.389-0.831-0.583-1.469-0.583c-0.674,0-1.217,0.292-1.63,0.877
+c-0.413,0.585-0.619,1.328-0.619,2.229v2.375c0,0.912,0.215,1.662,0.645,2.25c0.431,0.587,0.992,0.881,1.684,0.881
+c0.522,0,0.935-0.068,1.238-0.205c0.304-0.138,0.533-0.305,0.688-0.502v-2.338h-2.041v-1.413h3.668V15.836z" />
+    <path
+        android:fillColor="#FFFFFF"
+        android:pathData="M19.366,14.701v-2.232h-2.25v-1.541h2.25V8.695h1.5v2.232h2.256v1.541h-2.256v2.232H19.366z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/switchbar_background.xml b/packages/SystemUI/res/drawable/switchbar_background.xml
index 8d97c46..fb59633 100644
--- a/packages/SystemUI/res/drawable/switchbar_background.xml
+++ b/packages/SystemUI/res/drawable/switchbar_background.xml
@@ -16,6 +16,6 @@
 
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
     android:color="?android:attr/colorControlHighlight">
-    <item android:drawable="@color/switch_bar_background" />
+    <item android:drawable="?android:attr/colorSecondary" />
 </ripple>
 
diff --git a/packages/SystemUI/res/drawable/volume_dialog_background.xml b/packages/SystemUI/res/drawable/volume_dialog_background.xml
index e98bfb8..d6adea9 100644
--- a/packages/SystemUI/res/drawable/volume_dialog_background.xml
+++ b/packages/SystemUI/res/drawable/volume_dialog_background.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android" >
-    <solid android:color="@color/system_primary_color" />
+    <solid android:color="?android:attr/colorPrimary" />
 </shape>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/zen_introduction_message_background.xml b/packages/SystemUI/res/drawable/zen_introduction_message_background.xml
index 352fb57..e5b41a3 100644
--- a/packages/SystemUI/res/drawable/zen_introduction_message_background.xml
+++ b/packages/SystemUI/res/drawable/zen_introduction_message_background.xml
@@ -17,6 +17,6 @@
 
       <corners android:radius="@dimen/borderless_button_radius" />
 
-      <solid android:color="@color/zen_introduction_message_background" />
+      <solid android:color="?android:attr/colorAccent" />
 
 </shape>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout-sw410dp/status_bar_alarm_group.xml b/packages/SystemUI/res/layout-sw410dp/status_bar_alarm_group.xml
index ba5c0aa..a726161 100644
--- a/packages/SystemUI/res/layout-sw410dp/status_bar_alarm_group.xml
+++ b/packages/SystemUI/res/layout-sw410dp/status_bar_alarm_group.xml
@@ -20,7 +20,7 @@
     android:id="@+id/date_time_alarm_group"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginTop="8dp"
+    android:layout_marginTop="16dp"
     android:layout_marginStart="16dp"
     android:gravity="start"
     android:orientation="vertical">
@@ -62,7 +62,8 @@
     <com.android.systemui.statusbar.AlphaOptimizedButton
         android:id="@+id/alarm_status"
         android:layout_width="wrap_content"
-        android:layout_height="20dp"
+        android:layout_height="wrap_content"
+        android:minHeight="20dp"
         android:paddingTop="3dp"
         android:drawablePadding="8dp"
         android:drawableStart="@drawable/ic_access_alarms_small"
diff --git a/packages/SystemUI/res/layout/calibrate_sliders.xml b/packages/SystemUI/res/layout/calibrate_sliders.xml
deleted file mode 100644
index 0dec8a1..0000000
--- a/packages/SystemUI/res/layout/calibrate_sliders.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:paddingTop="8dp"
-    android:paddingBottom="8dp"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:id="@+id/r_group"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingTop="4dp"
-        android:paddingBottom="4dp"
-        android:orientation="horizontal">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/color_modification_r"
-            android:gravity="center"
-            android:textAppearance="?android:attr/textAppearanceMedium" />
-
-        <SeekBar android:id="@*android:id/seekbar"
-            android:layout_marginStart="16dp"
-            android:layout_gravity="center_vertical"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/g_group"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingTop="4dp"
-        android:paddingBottom="4dp"
-        android:orientation="horizontal">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/color_modification_g"
-            android:gravity="center"
-            android:textAppearance="?android:attr/textAppearanceMedium" />
-
-        <SeekBar android:id="@*android:id/seekbar"
-            android:layout_marginStart="16dp"
-            android:layout_gravity="center_vertical"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/b_group"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingTop="4dp"
-        android:paddingBottom="4dp"
-        android:orientation="horizontal">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/color_modification_b"
-            android:gravity="center"
-            android:textAppearance="?android:attr/textAppearanceMedium" />
-
-        <SeekBar android:id="@*android:id/seekbar"
-            android:layout_marginStart="16dp"
-            android:layout_gravity="center_vertical"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1" />
-    </LinearLayout>
-
-</LinearLayout>
diff --git a/packages/SystemUI/res/layout/keyboard_shortcut_app_item.xml b/packages/SystemUI/res/layout/keyboard_shortcut_app_item.xml
index 52cab72..69e52c5 100644
--- a/packages/SystemUI/res/layout/keyboard_shortcut_app_item.xml
+++ b/packages/SystemUI/res/layout/keyboard_shortcut_app_item.xml
@@ -53,5 +53,6 @@
             android:layout_alignParentEnd="true"
             android:textSize="14sp"
             android:scrollHorizontally="false"
-            android:layout_centerVertical="true"/>
+            android:layout_centerVertical="true"
+            android:focusable="true"/>
 </RelativeLayout>
diff --git a/packages/SystemUI/res/layout/keyboard_shortcuts_key_icon_view.xml b/packages/SystemUI/res/layout/keyboard_shortcuts_key_icon_view.xml
index 5db6789..a3901d0 100644
--- a/packages/SystemUI/res/layout/keyboard_shortcuts_key_icon_view.xml
+++ b/packages/SystemUI/res/layout/keyboard_shortcuts_key_icon_view.xml
@@ -21,4 +21,4 @@
         android:padding="@dimen/ksh_item_padding"
         android:layout_marginStart="@dimen/ksh_item_margin_start"
         android:scaleType="fitXY"
-        android:background="@drawable/ksh_key_item_background"/>
+        android:background="@drawable/ksh_key_item_background" />
diff --git a/packages/SystemUI/res/layout/keyboard_shortcuts_key_view.xml b/packages/SystemUI/res/layout/keyboard_shortcuts_key_view.xml
index 31a8773..b06f7fc 100644
--- a/packages/SystemUI/res/layout/keyboard_shortcuts_key_view.xml
+++ b/packages/SystemUI/res/layout/keyboard_shortcuts_key_view.xml
@@ -23,4 +23,5 @@
           android:textColor="@color/ksh_key_item_color"
           android:singleLine="true"
           android:gravity="center"
-          android:textSize="@dimen/ksh_item_text_size"/>
+          android:textSize="@dimen/ksh_item_text_size"
+          android:textAllCaps="true"/>
diff --git a/packages/SystemUI/res/layout/notification_guts.xml b/packages/SystemUI/res/layout/notification_guts.xml
index d09c42b..e84ed23 100644
--- a/packages/SystemUI/res/layout/notification_guts.xml
+++ b/packages/SystemUI/res/layout/notification_guts.xml
@@ -26,7 +26,8 @@
         android:orientation="vertical"
         android:paddingStart="@*android:dimen/notification_content_margin_start"
         android:paddingEnd="8dp"
-        android:background="@color/notification_guts_bg_color">
+        android:background="@color/notification_guts_bg_color"
+        android:theme="@*android:style/Theme.DeviceDefault.Light">
 
     <!-- header -->
     <LinearLayout
@@ -145,8 +146,8 @@
                     android:focusable="true"
                     android:background="#00ffffff"
                     android:progressBackgroundTint="@color/notification_guts_secondary_slider_color"
-                    android:thumbTint="@color/notification_guts_slider_color"
-                    android:progressTint="@color/notification_guts_slider_color"
+                    android:thumbTint="?android:attr/colorAccent"
+                    android:progressTint="?android:attr/colorAccent"
                     style="@android:style/Widget.Material.SeekBar.Discrete"
                     android:tickMarkTint="@android:color/black" />
 
diff --git a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
index ee55ec2..8b6060f 100644
--- a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
+++ b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
@@ -37,19 +37,6 @@
             android:importantForAccessibility="yes"
             android:focusable="true" />
 
-        <TextView
-            android:id="@android:id/edit"
-            style="@style/QSBorderlessButton"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="end"
-            android:minWidth="88dp"
-            android:textAppearance="@style/TextAppearance.QS.DetailButton"
-            android:textColor="#64FFFFFF"
-            android:focusable="true"
-            android:text="@string/qs_edit"
-            android:contentDescription="@string/accessibility_quick_settings_edit"/>
-
     </FrameLayout>
 
 </com.android.systemui.qs.PagedTileLayout>
diff --git a/packages/SystemUI/res/layout/qs_panel.xml b/packages/SystemUI/res/layout/qs_panel.xml
index 751f181..26c7339 100644
--- a/packages/SystemUI/res/layout/qs_panel.xml
+++ b/packages/SystemUI/res/layout/qs_panel.xml
@@ -26,7 +26,7 @@
     <com.android.systemui.qs.QSPanel
             android:id="@+id/quick_settings_panel"
             android:background="#0000"
-            android:layout_marginTop="@dimen/status_bar_header_height"
+            android:layout_marginTop="80dp"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:paddingBottom="8dp" />
diff --git a/packages/SystemUI/res/layout/qs_user_detail_item.xml b/packages/SystemUI/res/layout/qs_user_detail_item.xml
index 58fc069..8c6c7cf 100644
--- a/packages/SystemUI/res/layout/qs_user_detail_item.xml
+++ b/packages/SystemUI/res/layout/qs_user_detail_item.xml
@@ -28,6 +28,7 @@
         android:minHeight="112dp"
         android:clipChildren="false"
         android:clipToPadding="false"
+        android:focusable="true"
         android:background="@drawable/ripple_drawable"
         systemui:activatedFontFamily="sans-serif-medium">
 
@@ -65,4 +66,4 @@
                 android:visibility="gone" />
     </LinearLayout>
 
-</com.android.systemui.qs.tiles.UserDetailItemView>
\ No newline at end of file
+</com.android.systemui.qs.tiles.UserDetailItemView>
diff --git a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
index f65a667..3b8b909 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
@@ -37,13 +37,14 @@
         android:clipToPadding="false"
         android:orientation="horizontal"
         android:layout_alignParentEnd="true"
-        android:layout_marginTop="28dp"
+        android:layout_marginTop="4dp"
         android:layout_marginEnd="12dp">
 
         <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
             android:layout_width="48dp"
             android:layout_height="48dp"
             android:layout_alignParentEnd="true"
+            android:focusable="true"
             android:background="@drawable/ripple_drawable" >
             <ImageView android:id="@+id/multi_user_avatar"
                 android:layout_width="@dimen/multi_user_avatar_expanded_size"
@@ -52,6 +53,18 @@
                 android:scaleType="centerInside"/>
         </com.android.systemui.statusbar.phone.MultiUserSwitch>
 
+        <com.android.systemui.statusbar.AlphaOptimizedImageView
+            android:id="@android:id/edit"
+            android:layout_width="48dp"
+            android:layout_height="48dp"
+            android:clipToPadding="false"
+            android:clickable="true"
+            android:focusable="true"
+            android:src="@drawable/ic_mode_edit"
+            android:background="?android:attr/selectableItemBackgroundBorderless"
+            android:contentDescription="@string/accessibility_quick_settings_edit"
+            android:padding="14dp" />
+
         <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
             android:id="@+id/settings_button_container"
             android:layout_width="48dp"
@@ -64,7 +77,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:background="@drawable/ripple_drawable"
-                android:src="@drawable/ic_settings"
+                android:src="@drawable/ic_settings_20dp"
                 android:contentDescription="@string/accessibility_quick_settings_settings" />
             <com.android.systemui.statusbar.AlphaOptimizedImageView android:id="@+id/tuner_icon"
                 android:layout_width="match_parent"
@@ -98,7 +111,7 @@
         android:layout_alignParentTop="true"
         android:paddingStart="16dp"
         android:paddingEnd="16dp"
-        android:paddingTop="8dp"
+        android:paddingTop="2dp"
         android:visibility="gone"
         android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
         android:text="@*android:string/emergency_calls_only"
@@ -116,7 +129,7 @@
         android:id="@+id/quick_qs_panel"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="28dp"
+        android:layout_marginTop="52dp"
         android:layout_marginStart="12dp"
         android:layout_marginEnd="12dp"
         android:layout_alignParentEnd="true"
diff --git a/packages/SystemUI/res/layout/screen_pinning_request.xml b/packages/SystemUI/res/layout/screen_pinning_request.xml
index fea45cc..d55ba94 100644
--- a/packages/SystemUI/res/layout/screen_pinning_request.xml
+++ b/packages/SystemUI/res/layout/screen_pinning_request.xml
@@ -21,7 +21,8 @@
     android:layout_height="wrap_content"
     android:gravity="bottom|center_horizontal"
     android:layoutDirection="ltr"
-    android:orientation="vertical" >
+    android:orientation="vertical"
+    android:theme="@android:style/Theme.DeviceDefault.Light">
 
     <include
         android:layout_width="@dimen/screen_pinning_request_width"
@@ -32,7 +33,7 @@
         android:id="@+id/spacer"
         android:layout_width="@dimen/screen_pinning_request_width"
         android:layout_height="18dp"
-        android:background="@color/screen_pinning_request_bg" />
+        android:background="?android:attr/colorAccent" />
 
     <include
         android:layout_width="@dimen/screen_pinning_request_width"
diff --git a/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml b/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml
index 60112be..e3662f17 100644
--- a/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml
+++ b/packages/SystemUI/res/layout/screen_pinning_request_buttons.xml
@@ -28,7 +28,7 @@
     android:id="@+id/screen_pinning_buttons"
     android:layout_width="match_parent"
     android:layout_height="@dimen/screen_pinning_request_button_height"
-    android:background="@color/screen_pinning_request_bg" >
+    android:background="?android:attr/colorAccent">
 
     <View
         android:layout_width="@dimen/screen_pinning_request_side_width"
@@ -42,7 +42,8 @@
         android:layout_height="@dimen/screen_pinning_request_button_height"
         android:layout_weight="0"
         android:paddingStart="@dimen/screen_pinning_request_frame_padding"
-        android:paddingEnd="@dimen/screen_pinning_request_frame_padding" >
+        android:paddingEnd="@dimen/screen_pinning_request_frame_padding"
+        android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent">
 
         <ImageView
             android:id="@+id/screen_pinning_back_bg_light"
diff --git a/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml b/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml
index ebad7a4..3649ffb 100644
--- a/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml
+++ b/packages/SystemUI/res/layout/screen_pinning_request_buttons_land.xml
@@ -25,8 +25,8 @@
     android:id="@+id/screen_pinning_buttons"
     android:layout_height="match_parent"
     android:layout_width="@dimen/screen_pinning_request_button_height"
-    android:background="@color/screen_pinning_request_bg"
-    android:orientation="vertical" >
+    android:background="?android:attr/colorAccent"
+    android:orientation="vertical">
 
     <View
         android:layout_height="@dimen/screen_pinning_request_side_width"
@@ -82,7 +82,8 @@
         android:id="@+id/screen_pinning_back_group"
         android:layout_height="@dimen/screen_pinning_request_button_width"
         android:layout_width="@dimen/screen_pinning_request_button_height"
-        android:layout_weight="0" >
+        android:layout_weight="0"
+        android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent">
 
         <ImageView
             android:id="@+id/screen_pinning_back_bg_light"
diff --git a/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml b/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml
index e6c22d4..ec16991 100644
--- a/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml
+++ b/packages/SystemUI/res/layout/screen_pinning_request_land_phone.xml
@@ -20,7 +20,8 @@
     android:layout_height="@dimen/screen_pinning_request_width"
     android:layout_width="wrap_content"
     android:gravity="right|center_vertical"
-    android:orientation="horizontal" >
+    android:orientation="horizontal"
+    android:theme="@android:style/Theme.DeviceDefault.Light">
 
     <include
         android:layout_width="360dp"
diff --git a/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml b/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml
index df957f4..cdad94b 100644
--- a/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml
+++ b/packages/SystemUI/res/layout/screen_pinning_request_text_area.xml
@@ -20,8 +20,8 @@
     android:id="@+id/screen_pinning_text_area"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:background="@color/screen_pinning_request_bg"
-    android:gravity="center_vertical" >
+    android:background="?android:attr/colorAccent"
+    android:gravity="center_vertical">
 
     <TextView
         android:id="@+id/screen_pinning_title"
diff --git a/packages/SystemUI/res/layout/status_bar_alarm_group.xml b/packages/SystemUI/res/layout/status_bar_alarm_group.xml
index f94b727..701b621 100644
--- a/packages/SystemUI/res/layout/status_bar_alarm_group.xml
+++ b/packages/SystemUI/res/layout/status_bar_alarm_group.xml
@@ -20,7 +20,7 @@
     android:id="@+id/date_time_alarm_group"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginTop="8dp"
+    android:layout_marginTop="16dp"
     android:layout_marginStart="16dp"
     android:gravity="start"
     android:orientation="vertical">
@@ -60,7 +60,8 @@
     <com.android.systemui.statusbar.AlphaOptimizedButton
         android:id="@+id/alarm_status"
         android:layout_width="wrap_content"
-        android:layout_height="20dp"
+        android:layout_height="wrap_content"
+        android:minHeight="20dp"
         android:paddingTop="3dp"
         android:drawablePadding="8dp"
         android:drawableStart="@drawable/ic_access_alarms_small"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
deleted file mode 100644
index c5cd65e..0000000
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
-**
-**     http://www.apache.org/licenses/LICENSE-2.0 
-**
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
-** limitations under the License.
--->
-
-<!-- Extends RelativeLayout -->
-<com.android.systemui.statusbar.phone.StatusBarHeaderView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:systemui="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/header"
-    android:layout_width="@dimen/notification_panel_width"
-    android:layout_height="@dimen/status_bar_header_height"
-    android:layout_gravity="@integer/notification_panel_layout_gravity"
-    android:baselineAligned="false"
-    android:elevation="4dp"
-    android:background="@drawable/notification_header_bg"
-    android:clickable="true"
-    android:focusable="true"
-    >
-
-    <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
-        android:layout_width="@dimen/multi_user_switch_width_collapsed"
-        android:layout_height="@dimen/status_bar_header_height"
-        android:layout_alignParentEnd="true"
-        android:background="@drawable/ripple_drawable" >
-        <ImageView android:id="@+id/multi_user_avatar"
-            android:layout_width="@dimen/multi_user_avatar_expanded_size"
-            android:layout_height="@dimen/multi_user_avatar_expanded_size"
-            android:layout_gravity="center"
-            android:scaleType="centerInside"/>
-    </com.android.systemui.statusbar.phone.MultiUserSwitch>
-
-    <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
-        android:id="@+id/settings_button_container"
-        android:layout_width="48dp"
-        android:layout_height="@dimen/status_bar_header_height"
-        android:clipChildren="false"
-        android:clipToPadding="false"
-        android:layout_toStartOf="@id/multi_user_switch">
-
-        <com.android.systemui.statusbar.phone.SettingsButton android:id="@+id/settings_button"
-            style="@android:style/Widget.Material.Button.Borderless"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@drawable/ripple_drawable"
-            android:src="@drawable/ic_settings"
-            android:contentDescription="@string/accessibility_desc_settings" />
-        <com.android.systemui.statusbar.AlphaOptimizedImageView android:id="@+id/tuner_icon"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:paddingStart="36dp"
-            android:tint="#4DFFFFFF"
-            android:tintMode="src_in"
-            android:visibility="invisible"
-            android:src="@drawable/tuner" />
-
-    </com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
-
-    <LinearLayout android:id="@+id/system_icons_super_container"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/status_bar_header_height"
-        android:layout_toStartOf="@id/multi_user_switch"
-        android:layout_alignWithParentIfMissing="true"
-        android:layout_marginStart="16dp"
-        android:background="@drawable/ripple_drawable"
-        android:paddingEnd="4dp" >
-        <FrameLayout android:id="@+id/system_icons_container"
-            android:layout_width="wrap_content"
-            android:layout_height="@dimen/status_bar_height"
-            android:layout_gravity="center_vertical"
-            >
-            <include layout="@layout/system_icons" />
-        </FrameLayout>
-        <TextView android:id="@+id/battery_level"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:layout_marginStart="@dimen/header_battery_margin_expanded"
-            android:paddingEnd="@dimen/battery_level_padding_end"
-            android:textColor="#ffffff"
-            android:textSize="@dimen/battery_level_text_size"
-            android:importantForAccessibility="noHideDescendants"/>
-    </LinearLayout>
-
-    <TextView
-        android:id="@+id/header_emergency_calls_only"
-        android:layout_height="@dimen/status_bar_header_height"
-        android:layout_width="wrap_content"
-        android:layout_alignParentStart="true"
-        android:layout_toStartOf="@id/system_icons_super_container"
-        android:paddingStart="16dp"
-        android:paddingEnd="16dp"
-        android:visibility="gone"
-        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
-        android:text="@*android:string/emergency_calls_only"
-        android:singleLine="true"
-        android:gravity="center_vertical" />
-
-    <FrameLayout
-        android:id="@+id/date_group"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="@dimen/clock_collapsed_bottom_margin"
-        android:layout_alignParentBottom="true">
-        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_collapsed"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="16dp"
-            android:singleLine="true"
-            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
-            android:layout_below="@id/clock"
-            systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm"
-            />
-
-        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_expanded"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="16dp"
-            android:singleLine="true"
-            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
-            android:layout_below="@id/clock"
-            systemui:datePattern="eeeeMMMMd"
-            />
-    </FrameLayout>
-
-    <include layout="@layout/split_clock_view"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_above="@id/date_group"
-        android:id="@+id/clock"
-        />
-
-    <com.android.systemui.statusbar.AlphaOptimizedButton android:id="@+id/alarm_status"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_toEndOf="@id/date_group"
-        android:layout_marginBottom="4dp"
-        android:drawablePadding="6dp"
-        android:drawableStart="@drawable/ic_access_alarms_small"
-        android:textColor="#64ffffff"
-        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
-        android:paddingEnd="6dp"
-        android:paddingStart="6dp"
-        android:paddingTop="16dp"
-        android:paddingBottom="16dp"
-        android:background="?android:attr/selectableItemBackground"
-        android:visibility="gone"
-        />
-
-    <include
-        android:id="@+id/qs_detail_header"
-        layout="@layout/qs_detail_header"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        />
-
-    <com.android.systemui.statusbar.AlphaOptimizedImageView
-        android:id="@+id/qs_detail_header_progress"
-        android:src="@drawable/indeterminate_anim"
-        android:alpha="0"
-        android:background="@color/qs_detail_progress_track"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        />
-
-    <TextView
-        android:id="@+id/header_debug_info"
-        android:visibility="invisible"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
-        android:fontFamily="sans-serif-condensed"
-        android:textSize="11dp"
-        android:textStyle="bold"
-        android:textColor="#00A040"
-        android:padding="2dp"
-        />
-
-</com.android.systemui.statusbar.phone.StatusBarHeaderView>
diff --git a/packages/SystemUI/res/layout/switch_bar.xml b/packages/SystemUI/res/layout/switch_bar.xml
index f98de96..41cdb78 100644
--- a/packages/SystemUI/res/layout/switch_bar.xml
+++ b/packages/SystemUI/res/layout/switch_bar.xml
@@ -22,7 +22,8 @@
     android:paddingStart="16dp"
     android:paddingEnd="16dp"
     android:clickable="true"
-    android:gravity="center">
+    android:gravity="center"
+    android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent">
 
     <TextView android:id="@+id/switch_text"
         android:layout_height="wrap_content"
@@ -42,7 +43,6 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
-        android:background="@null"
-        android:theme="@style/ThemeOverlay.SwitchBar" />
+        android:background="@null" />
 
 </LinearLayout>
diff --git a/packages/SystemUI/res/layout/tile_listing.xml b/packages/SystemUI/res/layout/tile_listing.xml
deleted file mode 100644
index 9ab62ca..0000000
--- a/packages/SystemUI/res/layout/tile_listing.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ** Copyright 2015, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License"); 
- ** you may not use this file except in compliance with the License. 
- ** You may obtain a copy of the License at 
- **
- **     http://www.apache.org/licenses/LICENSE-2.0 
- **
- ** Unless required by applicable law or agreed to in writing, software 
- ** distributed under the License is distributed on an "AS IS" BASIS, 
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- ** See the License for the specific language governing permissions and 
- ** limitations under the License.
- -->
-
- <LinearLayout
-     xmlns:android="http://schemas.android.com/apk/res/android"
-     android:layout_width="match_parent"
-     android:layout_height="wrap_content"
-     android:background="@drawable/qs_background_primary"
-     android:paddingBottom="20dp"
-     android:orientation="vertical">
-
-     <LinearLayout
-         android:layout_width="match_parent"
-         android:layout_height="wrap_content"
-         android:background="@drawable/notification_header_bg"
-         android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-         android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-         android:paddingTop="10dp"
-         android:paddingBottom="10dp"
-         android:orientation="horizontal">
-         <ImageView
-             android:id="@android:id/icon"
-             android:layout_width="36dp"
-             android:layout_height="36dp" />
-         <TextView
-             android:id="@android:id/title"
-             android:paddingStart="10dp"
-             android:textColor="@android:color/white"
-             android:textAppearance="?android:attr/textAppearanceSmall"
-             android:layout_width="wrap_content"
-             android:layout_height="wrap_content"
-             android:layout_gravity="center_vertical" />
-     </LinearLayout>
-
-     <GridLayout
-         android:id="@+id/tile_grid"
-         android:layout_width="match_parent"
-         android:layout_height="wrap_content"
-         android:columnCount="4" />
-
- </LinearLayout>
diff --git a/packages/SystemUI/res/layout/tuner_qs.xml b/packages/SystemUI/res/layout/tuner_qs.xml
deleted file mode 100644
index 9a51e0c..0000000
--- a/packages/SystemUI/res/layout/tuner_qs.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<com.android.systemui.tuner.AutoScrollView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/system_secondary_color" >
-    <LinearLayout
-        android:id="@+id/all_details"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-        android:gravity="center"
-        android:orientation="vertical">
-
-        <View
-            android:background="@color/qs_tile_divider"
-            android:layout_width="match_parent"
-            android:layout_height="2dp" />
-
-        <FrameLayout
-            android:id="@+id/remove_target"
-            android:layout_width="105dp"
-            android:layout_height="@dimen/qs_tile_height" />
-
-        <FrameLayout
-            android:id="@+id/add_target"
-            android:layout_width="105dp"
-            android:layout_height="@dimen/qs_tile_height" />
-    </LinearLayout>
-</com.android.systemui.tuner.AutoScrollView>
diff --git a/packages/SystemUI/res/layout/volume_dialog.xml b/packages/SystemUI/res/layout/volume_dialog.xml
index d3f2a25..68395cd 100644
--- a/packages/SystemUI/res/layout/volume_dialog.xml
+++ b/packages/SystemUI/res/layout/volume_dialog.xml
@@ -20,16 +20,14 @@
     android:layout_height="wrap_content"
     android:layout_marginBottom="@dimen/volume_dialog_margin_bottom"
     android:background="@drawable/volume_dialog_background"
-    android:translationZ="4dp"
-    android:paddingTop="8dp">
+    android:translationZ="4dp" >
 
     <LinearLayout
         android:id="@+id/volume_dialog_content"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical"
-        android:paddingBottom="8dp"
-        android:paddingStart="8dp"
+        android:paddingTop="@dimen/volume_dialog_collapsed_padding_top"
         android:animateLayoutChanges="true" >
 
         <!-- volume rows added and removed here! :-) -->
@@ -52,6 +50,8 @@
             android:src="@drawable/ic_volume_collapse_animation"
             tools:ignore="RtlHardcoded"
             android:layout_alignParentEnd="true"
-            android:layout_alignParentTop="true"/>
+            android:layout_alignParentTop="true"
+            android:layout_marginTop="@dimen/volume_expander_margin_top"
+            android:layout_marginEnd="@dimen/volume_expander_margin_end"/>
 
 </RelativeLayout>
diff --git a/packages/SystemUI/res/layout/volume_dialog_row.xml b/packages/SystemUI/res/layout/volume_dialog_row.xml
index be05a3a..a30fc43 100644
--- a/packages/SystemUI/res/layout/volume_dialog_row.xml
+++ b/packages/SystemUI/res/layout/volume_dialog_row.xml
@@ -13,14 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<RelativeLayout
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
+    android:layout_height="@dimen/volume_row_height"
     android:clipChildren="false"
     android:clipToPadding="false"
     android:id="@+id/volume_dialog_row"
-    android:paddingEnd="@dimen/volume_button_size" >
+    android:paddingEnd="@dimen/volume_dialog_padding_end"
+    android:orientation="vertical"
+    android:paddingBottom="@dimen/volume_row_padding_bottom" >
 
     <TextView
         android:id="@+id/volume_row_header"
@@ -29,32 +31,28 @@
         android:ellipsize="end"
         android:maxLines="1"
         android:textAppearance="@style/TextAppearance.Volume.Header"
-        android:paddingBottom="0dp"
-        android:paddingEnd="12dp"
-        android:paddingStart="12dp"
-        android:paddingTop="4dp"
-        android:visibility="gone" />
+        android:paddingStart="@dimen/volume_row_header_padding_start" />
 
-    <com.android.keyguard.AlphaOptimizedImageButton
-        android:id="@+id/volume_row_icon"
-        style="@style/VolumeButtons"
-        android:layout_width="@dimen/volume_button_size"
-        android:layout_height="@dimen/volume_button_size"
-        android:layout_below="@id/volume_row_header"
-        android:soundEffectsEnabled="false" />
+    <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/volume_row_slider_height"
+            android:orientation="horizontal"
+            android:paddingStart="@dimen/volume_row_padding_start" >
+        <com.android.keyguard.AlphaOptimizedImageButton
+                android:id="@+id/volume_row_icon"
+                style="@style/VolumeButtons"
+                android:layout_width="@dimen/volume_button_size"
+                android:layout_height="@dimen/volume_button_size"
+                android:soundEffectsEnabled="false" />
 
-    <SeekBar
-        android:id="@+id/volume_row_slider"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignBottom="@+id/volume_row_icon"
-        android:layout_alignWithParentIfMissing="true"
-        android:layout_below="@id/volume_row_header"
-        android:layout_toEndOf="@id/volume_row_icon"
-        android:layout_toStartOf="@+id/volume_settings_button"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:paddingEnd="8dp"
-        android:paddingStart="8dp" />
+        <SeekBar
+                android:id="@+id/volume_row_slider"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_alignWithParentIfMissing="true"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:paddingStart="@dimen/volume_row_slider_padding_start"/>
+    </LinearLayout>
 
-</RelativeLayout>
\ No newline at end of file
+</LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/volume_zen_footer.xml b/packages/SystemUI/res/layout/volume_zen_footer.xml
index f30023d..ea26bba 100644
--- a/packages/SystemUI/res/layout/volume_zen_footer.xml
+++ b/packages/SystemUI/res/layout/volume_zen_footer.xml
@@ -78,7 +78,7 @@
         android:paddingStart="15dp"
         android:paddingEnd="15dp"
         android:text="@string/volume_zen_end_now"
-        android:textColor="@color/system_accent_color"
+        android:textColor="?android:attr/colorAccent"
         android:textAppearance="@style/TextAppearance.QS.DetailButton" />
 
 </com.android.systemui.volume.ZenFooter>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/zen_mode_panel.xml b/packages/SystemUI/res/layout/zen_mode_panel.xml
index 906b867..c0be676 100644
--- a/packages/SystemUI/res/layout/zen_mode_panel.xml
+++ b/packages/SystemUI/res/layout/zen_mode_panel.xml
@@ -40,7 +40,8 @@
         android:layout_marginEnd="16dp"
         android:paddingTop="8dp"
         android:paddingBottom="8dp"
-        android:background="@drawable/zen_introduction_message_background" >
+        android:background="@drawable/zen_introduction_message_background"
+        android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent.Light">
 
         <ImageView
             android:id="@+id/zen_introduction_confirm"
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index d9138ef..710be7a 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Swerwing"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is die volumedialoog"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tik om die oorspronklike terug te stel."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Jy gebruik tans jou werkprofiel"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Bel"</item>
+    <item msgid="5997713001067658559">"Stelsel"</item>
+    <item msgid="7858983209929864160">"Laat toestel lui"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Wekker"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tik om te ontdemp."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tik om op vibreer te stel. Toeganklikheidsdienste kan dalk gedemp wees."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tik om te demp. Toeganklikheidsdienste kan dalk gedemp wees."</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 69d6642..7e0cfef 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"ኤል ቲ ኢ"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ውሂብን በማዛወር ላይ"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> የድምጽ መጠን መገናኛው ነው"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"የመጀመሪያውን ወደነበረበት ለመመለስ መታ ያድርጉ።"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"የስራ መገለጫዎን እየተጠቀሙ ነው"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ደውል"</item>
+    <item msgid="5997713001067658559">"ሥርዓት"</item>
+    <item msgid="7858983209929864160">"ጥሪ"</item>
+    <item msgid="1850038478268896762">"ማህደረመረጃ"</item>
+    <item msgid="8265110906352372092">"ማንቂያ"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ብሉቱዝ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s። ድምጸ-ከል ለማድረግ መታ ያድርጉ"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s። ወደ ንዝረት ለማቀናበር መታ ያድርጉ። የተደራሽነት አገልግሎቶች ድምጸ-ከል ሊደረግባቸው ይችላል።"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s። ድምጸ-ከል ለማድረግ መታ ያድርጉ። የተደራሽነት አገልግሎቶች ድምጸ-ከል ሊደረግባቸው ይችላል።"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index d7962de..7ef02c1 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -147,6 +147,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"شبكة الجيل الثالث"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"‏شبكة 3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"شبكة الجيل الرابع"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"شبكة الجيل الرابع أو أحدث"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"تجوال"</string>
@@ -442,6 +443,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> هو مربع حوار مستوى الصوت"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"انقر لاستعادة النسخة الأصلية."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"أنت تستخدم ملفك الشخصي للعمل"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"الاتصال"</item>
+    <item msgid="5997713001067658559">"النظام"</item>
+    <item msgid="7858983209929864160">"الرنين"</item>
+    <item msgid="1850038478268896762">"الوسائط"</item>
+    <item msgid="8265110906352372092">"المنبه"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"البلوتوث"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"‏%1$s. انقر لإلغاء التجاهل."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"‏%1$s. انقر للتعيين على الاهتزاز. قد يتم تجاهل خدمات إمكانية الوصول."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"‏%1$s. انقر للتجاهل. قد يتم تجاهل خدمات إمكانية الوصول."</string>
diff --git a/packages/SystemUI/res/values-az-rAZ/strings.xml b/packages/SystemUI/res/values-az-rAZ/strings.xml
index acb58cef..a081e0a 100644
--- a/packages/SystemUI/res/values-az-rAZ/strings.xml
+++ b/packages/SystemUI/res/values-az-rAZ/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Rominq"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> proqramı səs səviyyəsi dialoqudur"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Orijinalı bərpa etmək üçün tıklayın."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"İş profilinizi istifadə edirsiniz"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Çağrı"</item>
+    <item msgid="5997713001067658559">"Sistem"</item>
+    <item msgid="7858983209929864160">"Zəng"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Siqnal"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Səsli etmək üçün tıklayın."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Vibrasiyanı ayarlamaq üçün tıklayın. Əlçatımlılıq xidmətləri səssiz edilmiş ola bilər."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Səssiz etmək üçün tıklayın. Əlçatımlılıq xidmətləri səssiz edilmiş ola bilər."</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index f944e4b..ec2af9c 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -72,7 +72,7 @@
     <string name="screenshot_saving_title" msgid="8242282144535555697">"Čuvanje snimka ekrana..."</string>
     <string name="screenshot_saving_text" msgid="2419718443411738818">"Snimak ekrana se čuva."</string>
     <string name="screenshot_saved_title" msgid="6461865960961414961">"Snimak ekrana je napravljen."</string>
-    <string name="screenshot_saved_text" msgid="2685605830386712477">"Dodirnite da biste videli snimak ekrana."</string>
+    <string name="screenshot_saved_text" msgid="1152839647677558815">"Dodirnite da biste videli snimak ekrana."</string>
     <string name="screenshot_failed_title" msgid="705781116746922771">"Nije moguće napraviti snimak ekrana."</string>
     <string name="screenshot_failed_to_save_unknown_text" msgid="7887826345701753830">"Došlo je do problema pri čuvanju snimka ekrana."</string>
     <string name="screenshot_failed_to_save_text" msgid="2592658083866306296">"Čuvanje snimka ekrana nije uspelo zbog ograničenog memorijskog prostora."</string>
@@ -119,7 +119,6 @@
     <string name="accessibility_data_signal_full" msgid="2708384608124519369">"Signal za podatke je najjači."</string>
     <string name="accessibility_wifi_name" msgid="7202151365171148501">"Povezani ste sa <xliff:g id="WIFI">%s</xliff:g>."</string>
     <string name="accessibility_bluetooth_name" msgid="8441517146585531676">"Povezani ste sa <xliff:g id="BLUETOOTH">%s</xliff:g>."</string>
-    <string name="accessibility_cast_name" msgid="4026393061247081201">"Povezani smo sa uređajem <xliff:g id="CAST">%s</xliff:g>."</string>
     <string name="accessibility_no_wimax" msgid="4329180129727630368">"Nema WiMAX signala."</string>
     <string name="accessibility_wimax_one_bar" msgid="4170994299011863648">"WiMAX signal ima jednu crtu."</string>
     <string name="accessibility_wimax_two_bars" msgid="9176236858336502288">"WiMAX signal ima dve crte."</string>
@@ -150,16 +149,12 @@
     <string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
     <string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
     <string name="accessibility_no_sim" msgid="8274017118472455155">"Nema SIM kartice."</string>
-    <string name="accessibility_cell_data" msgid="7080312242791850520">"Podaci za mobilne uređaje"</string>
-    <string name="accessibility_cell_data_on" msgid="4310018593519761767">"Podaci za mobilne uređaje su uključeni"</string>
     <string name="accessibility_cell_data_off" msgid="8000803571751407635">"Podaci za mobilne uređaje su isključeni"</string>
     <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Bluetooth privezivanje."</string>
     <string name="accessibility_airplane_mode" msgid="834748999790763092">"Režim rada u avionu."</string>
     <string name="accessibility_no_sims" msgid="3957997018324995781">"Nema SIM kartice."</string>
     <string name="accessibility_carrier_network_change_mode" msgid="4017301580441304305">"Promena mreže mobilnog operatera."</string>
-    <string name="accessibility_battery_details" msgid="7645516654955025422">"Otvori detalje o bateriji"</string>
     <string name="accessibility_battery_level" msgid="7451474187113371965">"Baterija je na <xliff:g id="NUMBER">%d</xliff:g> posto."</string>
-    <string name="accessibility_battery_level_charging" msgid="1147587904439319646">"Baterija se puni, <xliff:g id="BATTERY_PERCENTAGE">%d</xliff:g> procenata."</string>
     <string name="accessibility_settings_button" msgid="799583911231893380">"Sistemska podešavanja."</string>
     <string name="accessibility_notifications_button" msgid="4498000369779421892">"Obaveštenja."</string>
     <string name="accessibility_remove_notification" msgid="3603099514902182350">"Obriši obaveštenje."</string>
@@ -197,11 +192,9 @@
     <string name="accessibility_quick_settings_dnd_priority_on" msgid="1448402297221249355">"Podešavanje Ne uznemiravaj je uključeno, samo prioritetni prekidi."</string>
     <string name="accessibility_quick_settings_dnd_none_on" msgid="6882582132662613537">"Podešavanje Ne uznemiravaj je uključeno, potpuna tišina."</string>
     <string name="accessibility_quick_settings_dnd_alarms_on" msgid="9152834845587554157">"Podešavanje Ne uznemiravaj je uključeno, samo alarmi."</string>
-    <string name="accessibility_quick_settings_dnd" msgid="6607873236717185815">"Ne uznemiravaj."</string>
     <string name="accessibility_quick_settings_dnd_off" msgid="2371832603753738581">"Podešavanje Ne uznemiravaj je isključeno."</string>
     <string name="accessibility_quick_settings_dnd_changed_off" msgid="898107593453022935">"Podešavanje Ne uznemiravaj je isključeno."</string>
     <string name="accessibility_quick_settings_dnd_changed_on" msgid="4483780856613561039">"Podešavanje Ne uznemiravaj je uključeno."</string>
-    <string name="accessibility_quick_settings_bluetooth" msgid="6341675755803320038">"Bluetooth."</string>
     <string name="accessibility_quick_settings_bluetooth_off" msgid="2133631372372064339">"Bluetooth je isključen."</string>
     <string name="accessibility_quick_settings_bluetooth_on" msgid="7681999166216621838">"Bluetooth je uključen."</string>
     <string name="accessibility_quick_settings_bluetooth_connecting" msgid="6953242966685343855">"Bluetooth se povezuje."</string>
@@ -246,11 +239,6 @@
     <string name="accessibility_location_active" msgid="2427290146138169014">"Ima aktivnih zahteva za lokaciju"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Obriši sva obaveštenja."</string>
     <string name="notification_group_overflow_indicator" msgid="1863231301642314183">"i još <xliff:g id="NUMBER">%s</xliff:g>"</string>
-    <plurals name="notification_group_overflow_description" formatted="false" msgid="4579313201268495404">
-      <item quantity="one">Još <xliff:g id="NUMBER_1">%s</xliff:g> obaveštenje u grupi.</item>
-      <item quantity="few">Još <xliff:g id="NUMBER_1">%s</xliff:g> obaveštenja u grupi.</item>
-      <item quantity="other">Još <xliff:g id="NUMBER_1">%s</xliff:g> obaveštenja u grupi.</item>
-    </plurals>
     <string name="status_bar_notification_inspect_item_title" msgid="5668348142410115323">"Podešavanja obaveštenja"</string>
     <string name="status_bar_notification_app_settings_title" msgid="5525260160341558869">"Podešavanja za <xliff:g id="APP_NAME">%s</xliff:g>"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran će se automatski rotirati."</string>
@@ -260,7 +248,7 @@
     <string name="accessibility_rotation_lock_on_landscape_changed" msgid="3135965553707519743">"Ekran je sada zaključan u vertikalnom položaju."</string>
     <string name="accessibility_rotation_lock_on_portrait_changed" msgid="8922481981834012126">"Ekran je sada zaključan u horizontalnom položaju."</string>
     <string name="dessert_case" msgid="1295161776223959221">"Vitrina sa poslasticama"</string>
-    <string name="start_dreams" msgid="5640361424498338327">"Čuvar ekrana"</string>
+    <string name="start_dreams" msgid="7219575858348719790">"Sanjarenje"</string>
     <string name="ethernet_label" msgid="7967563676324087464">"Eternet"</string>
     <string name="quick_settings_dnd_label" msgid="8735855737575028208">"Ne uznemiravaj"</string>
     <string name="quick_settings_dnd_priority_label" msgid="483232950670692036">"Samo prioritetni prekidi"</string>
@@ -272,8 +260,6 @@
     <string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nije dostupan nijedan upareni uređaj"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Osvetljenost"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatska rotacija"</string>
-    <string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatsko rotiranje ekrana"</string>
-    <string name="accessibility_quick_settings_rotation_value" msgid="1428962304214992318">"Podesi na <xliff:g id="ID_1">%s</xliff:g>"</string>
     <string name="quick_settings_rotation_locked_label" msgid="6359205706154282377">"Rotacija je zaključana"</string>
     <string name="quick_settings_rotation_locked_portrait_label" msgid="5102691921442135053">"Vertikalni prikaz"</string>
     <string name="quick_settings_rotation_locked_landscape_label" msgid="8553157770061178719">"Horizontalni prikaz"</string>
@@ -292,7 +278,6 @@
     <string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Veza nije uspostavljena"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nema mreže"</string>
     <string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi je isključen"</string>
-    <string name="quick_settings_wifi_on_label" msgid="7607810331387031235">"Wi-Fi je uključen"</string>
     <string name="quick_settings_wifi_detail_empty_text" msgid="269990350383909226">"Nije dostupna nijedna Wi-Fi mreža"</string>
     <string name="quick_settings_cast_title" msgid="7709016546426454729">"Prebacivanje"</string>
     <string name="quick_settings_casting" msgid="6601710681033353316">"Prebacivanje"</string>
@@ -328,7 +313,6 @@
     <string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikacija <xliff:g id="APP">%s</xliff:g> je onemogućena u bezbednom režimu."</string>
     <string name="recents_stack_action_button_label" msgid="6593727103310426253">"Obriši sve"</string>
     <string name="recents_incompatible_app_message" msgid="5075812958564082451">"Aplikacija ne podržava podeljeni ekran"</string>
-    <string name="recents_drag_hint_message" msgid="2649739267073203985">"Prevucite ovde da biste koristili razdeljeni ekran"</string>
     <string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Podeli horizontalno"</string>
     <string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Podeli vertikalno"</string>
     <string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Prilagođeno deljenje"</string>
@@ -346,7 +330,7 @@
     <string name="zen_silence_introduction" msgid="3137882381093271568">"Ovo blokira SVE zvukove i vibracije uključujući alarme, muziku, video snimke i igre."</string>
     <string name="keyguard_more_overflow_text" msgid="9195222469041601365">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="1288875699658819755">"Manje hitna obaveštenja su u nastavku"</string>
-    <string name="notification_tap_again" msgid="7590196980943943842">"Dodirnite ponovo da biste otvorili"</string>
+    <string name="notification_tap_again" msgid="8524949573675922138">"Dodirnite ponovo da biste otvorili"</string>
     <string name="keyguard_unlock" msgid="8043466894212841998">"Prevucite nagore da biste otključali"</string>
     <string name="phone_hint" msgid="4872890986869209950">"Prevucite od ikone za telefon"</string>
     <string name="voice_hint" msgid="8939888732119726665">"Prevucite od ikone za glasovnu pomoć"</string>
@@ -424,7 +408,7 @@
     <string name="accessibility_volume_expand" msgid="5946812790999244205">"Proširi"</string>
     <string name="accessibility_volume_collapse" msgid="3609549593031810875">"Skupi"</string>
     <string name="screen_pinning_title" msgid="3273740381976175811">"Ekran je zakačen"</string>
-    <string name="screen_pinning_description" msgid="7238941806855968768">"Na ovaj način se ovo stalno prikazuje dok ga ne otkačite. Dodirnite i zadržite Nazad da biste ga otkačili."</string>
+    <string name="screen_pinning_description" msgid="3577937698406151604">"Zbog toga se on stalno prikazuje dok ga ne otkačite. Dodirnite i zadržite Nazad da biste ga otkačili."</string>
     <string name="screen_pinning_positive" msgid="3783985798366751226">"Važi"</string>
     <string name="screen_pinning_negative" msgid="3741602308343880268">"Ne, hvala"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Želite li da sakrijete <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
@@ -434,13 +418,11 @@
     <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Dozvoli"</string>
     <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Odbij"</string>
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je dijalog za jačinu zvuka"</string>
-    <string name="volumeui_notification_text" msgid="8819536904234337445">"Dodirnite da biste vratili original."</string>
+    <string name="volumeui_notification_text" msgid="1826889705095768656">"Dodirnite da biste vratili original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Koristite profil za Work"</string>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Dodirnite da biste uključili zvuk."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Dodirnite da biste podesili na vibraciju. Zvuk usluga pristupačnosti će možda biti isključen."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Dodirnite da biste isključili zvuk. Zvuk usluga pristupačnosti će možda biti isključen."</string>
-    <string name="volume_dialog_accessibility_shown_message" msgid="1834631467074259998">"Kontrole za jačinu zvuka (%s) su prikazane. Prevucite nagore da biste ih odbacili."</string>
-    <string name="volume_dialog_accessibility_dismissed_message" msgid="51543526013711399">"Kontrole za jačinu zvuka su sakrivene"</string>
     <string name="system_ui_tuner" msgid="708224127392452018">"Tjuner za korisnički interfejs sistema"</string>
     <string name="show_battery_percentage" msgid="5444136600512968798">"Prikazuj ugrađeni procenat baterije"</string>
     <string name="show_battery_percentage_summary" msgid="3215025775576786037">"Prikazivanje nivoa napunjenosti baterije u procentima unutar ikone na statusnoj traci kada se baterija ne puni"</string>
@@ -485,24 +467,19 @@
     <string name="block" msgid="2734508760962682611">"Blokiraj sva obaveštenja"</string>
     <string name="do_not_silence" msgid="6878060322594892441">"Ne isključuj zvuk"</string>
     <string name="do_not_silence_block" msgid="4070647971382232311">"Ne isključuju zvuk niti blokiraj"</string>
-    <string name="tuner_full_importance_settings" msgid="3207312268609236827">"Napredne kontrole za obaveštenja"</string>
-    <string name="tuner_full_importance_settings_on" msgid="7545060756610299966">"Uključeno"</string>
-    <string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"Isključeno"</string>
-    <string name="power_notification_controls_description" msgid="4372459941671353358">"Pomoću naprednih kontrola za obaveštenja možete da podesite nivo važnosti od 0. do 5. za obaveštenja aplikacije. \n\n"<b>"5. nivo"</b>" \n– Prikazuju se u vrhu liste obaveštenja \n- Dozvoli prekid režima celog ekrana \n– Uvek zaviruj \n\n"<b>"4. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Uvek zaviruj \n\n"<b>"3. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Nikada ne zaviruj \n\n"<b>"2. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Nikada ne zaviruj \n– Nikada ne proizvodi zvuk ili vibraciju \n\n"<b>"1. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Nikada ne zaviruj \n– Nikada ne proizvodi zvuk ili vibraciju \n– Sakrij na zaključanom ekranu i statusnoj traci \n– Prikazuju se u dnu liste obaveštenja \n\n"<b>"0. nivo"</b>" \n– Blokiraj sva obaveštenja iz aplikacije"</string>
-    <string name="user_unspecified_importance" msgid="361613856933432117">"Važnost: Automatski"</string>
-    <string name="blocked_importance" msgid="5035073235408414397">"Važnost: 0. nivo"</string>
-    <string name="min_importance" msgid="560779348928574878">"Važnost: 1. nivo"</string>
-    <string name="low_importance" msgid="7571498511534140">"Važnost: 2. nivo"</string>
-    <string name="default_importance" msgid="7609889614553354702">"Važnost: 3. nivo"</string>
-    <string name="high_importance" msgid="3441537905162782568">"Važnost: 4. nivo"</string>
-    <string name="max_importance" msgid="4880179829869865275">"Važnost: 5. nivo"</string>
-    <string name="notification_importance_user_unspecified" msgid="2868359605125272874">"Aplikacija određuje važnost svakog obaveštenja."</string>
-    <string name="notification_importance_blocked" msgid="4237497046867398057">"Nikada ne prikazuj obaveštenja iz ove aplikacije"</string>
-    <string name="notification_importance_min" msgid="7844224511187027155">"Bez prekida režima celog ekrana, zavirivanja, zvuka ili vibracije. Sakrij na zaključanom ekranu i statusnoj traci."</string>
-    <string name="notification_importance_low" msgid="7950291702044409847">"Bez prekida režima celog ekrana, zavirivanja, zvuka ili vibracije."</string>
-    <string name="notification_importance_default" msgid="5924405820269074915">"Bez prekida režima celog ekrana ili zavirivanja."</string>
-    <string name="notification_importance_high" msgid="1729480727023990427">"Uvek zaviruj. Bez prekida režima celog ekrana."</string>
-    <string name="notification_importance_max" msgid="2508384624461849111">"Uvek zaviruj i dozvoli prekid režima celog ekrana."</string>
+    <string name="tuner_full_importance_settings" msgid="8103289238676424226">"Prikaži kompletna podešavanja važnosti"</string>
+    <string name="blocked_importance" msgid="5198578988978234161">"Blokirana"</string>
+    <string name="min_importance" msgid="1901894910809414782">"Veoma mala važnost"</string>
+    <string name="low_importance" msgid="4109929986107147930">"Mala važnost"</string>
+    <string name="default_importance" msgid="8192107689995742653">"Uobičajena važnost"</string>
+    <string name="high_importance" msgid="1527066195614050263">"Velika važnost"</string>
+    <string name="max_importance" msgid="5089005872719563894">"Važnost: hitno"</string>
+    <string name="notification_importance_blocked" msgid="2397192642657872872">"Ova obaveštenja se nikada ne prikazuju"</string>
+    <string name="notification_importance_min" msgid="1938190340516905748">"Prikazuju se u dnu liste obaveštenja bez zvuka"</string>
+    <string name="notification_importance_low" msgid="3657252049508213048">"Ova obaveštenja se prikazuju bez zvuka"</string>
+    <string name="notification_importance_default" msgid="4466466472622442175">"Dozvolite da ova obaveštenja emituju zvuk"</string>
+    <string name="notification_importance_high" msgid="2135428926525093825">"Nakratko se prikazuju na ekranu i emituju zvuk"</string>
+    <string name="notification_importance_max" msgid="5806278962376556491">"Prikazuju se u vrhu liste obaveštenja, nakratko se prikazuju na ekranu i emituju zvuk"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"Još podešavanja"</string>
     <string name="notification_done" msgid="5279426047273930175">"Gotovo"</string>
     <string name="notification_gear_accessibility" msgid="94429150213089611">"Kontrole obaveštenja za aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
@@ -617,16 +594,10 @@
   </string-array>
     <string name="other" msgid="4060683095962566764">"Drugo"</string>
     <string name="accessibility_divider" msgid="5903423481953635044">"Razdelnik podeljenog ekrana"</string>
-    <string name="accessibility_action_divider_left_full" msgid="2801570521881574972">"Režim celog ekrana za levi ekran"</string>
-    <string name="accessibility_action_divider_left_70" msgid="3612060638991687254">"Levi ekran 70%"</string>
-    <string name="accessibility_action_divider_left_50" msgid="1248083470322193075">"Levi ekran 50%"</string>
-    <string name="accessibility_action_divider_left_30" msgid="543324403127069386">"Levi ekran 30%"</string>
-    <string name="accessibility_action_divider_right_full" msgid="4639381073802030463">"Režim celog ekrana za donji ekran"</string>
-    <string name="accessibility_action_divider_top_full" msgid="5357010904067731654">"Režim celog ekrana za gornji ekran"</string>
-    <string name="accessibility_action_divider_top_70" msgid="5090779195650364522">"Gornji ekran 70%"</string>
-    <string name="accessibility_action_divider_top_50" msgid="6385859741925078668">"Gornji ekran 50%"</string>
-    <string name="accessibility_action_divider_top_30" msgid="6201455163864841205">"Gornji ekran 30%"</string>
-    <string name="accessibility_action_divider_bottom_full" msgid="301433196679548001">"Režim celog ekrana za donji ekran"</string>
+    <string name="accessibility_action_divider_move_down" msgid="704893304141890042">"Pomeri nadole"</string>
+    <string name="accessibility_action_divider_move_up" msgid="4580103171609248006">"Pomeri nagore"</string>
+    <string name="accessibility_action_divider_move_left" msgid="9218189832115847253">"Pomeri ulevo"</string>
+    <string name="accessibility_action_divider_move_right" msgid="4671522715182567972">"Pomeri udesno"</string>
     <string name="accessibility_qs_edit_tile_label" msgid="8374924053307764245">"<xliff:g id="POSITION">%1$d</xliff:g>. pozicija, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dvaput dodirnite da biste izmenili."</string>
     <string name="accessibility_qs_edit_add_tile_label" msgid="8133209638023882667">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dvaput dodirnite da biste dodali."</string>
     <string name="accessibility_qs_edit_position_label" msgid="5055306305919289819">"<xliff:g id="POSITION">%1$d</xliff:g>. pozicija. Dvaput dodirnite da biste izabrali."</string>
@@ -636,17 +607,9 @@
     <string name="accessibility_qs_edit_tile_removed" msgid="8584304916627913440">"Pločica <xliff:g id="TILE_NAME">%1$s</xliff:g> je uklonjena"</string>
     <string name="accessibility_qs_edit_tile_moved" msgid="4343693412689365038">"Pločica <xliff:g id="TILE_NAME">%1$s</xliff:g> je premeštena na <xliff:g id="POSITION">%2$d</xliff:g>. poziciju"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="8073587401747016103">"Uređivač za Brza podešavanja."</string>
-    <string name="accessibility_desc_notification_icon" msgid="8352414185263916335">"Obaveštenja za <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="5914261505436217520">"Aplikacija možda neće funkcionisati sa podeljenim ekranom."</string>
     <string name="dock_non_resizeble_failed_to_dock_text" msgid="3871617304250207291">"Aplikacija ne podržava podeljeni ekran."</string>
-    <string name="accessibility_quick_settings_settings" msgid="6132460890024942157">"Otvori Podešavanja."</string>
-    <string name="accessibility_quick_settings_expand" msgid="2375165227880477530">"Otvori Brza podešavanja."</string>
-    <string name="accessibility_quick_settings_collapse" msgid="1792625797142648105">"Zatvori Brza podešavanja."</string>
-    <string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Alarm je podešen."</string>
-    <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"Prijavljeni ste kao <xliff:g id="ID_1">%s</xliff:g>"</string>
-    <string name="accessibility_quick_settings_no_internet" msgid="31890692343084075">"Nema interneta."</string>
-    <string name="accessibility_quick_settings_open_details" msgid="4230931801728005194">"Otvori detalje."</string>
-    <string name="accessibility_quick_settings_open_settings" msgid="7806613775728380737">"Otvori podešavanja za <xliff:g id="ID_1">%s</xliff:g>."</string>
-    <string name="accessibility_quick_settings_edit" msgid="7839992848995240393">"Izmeni redosled podešavanja."</string>
-    <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"<xliff:g id="ID_1">%1$d</xliff:g>. strana od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
+    <string name="accessibility_quick_settings_expand" msgid="4982484435775933070">"Proširi Brza podešavanja."</string>
+    <!-- no translation found for accessibility_quick_settings_page (5032979051755200721) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings_tv.xml b/packages/SystemUI/res/values-b+sr+Latn/strings_tv.xml
index 8b01a83..d026d2c 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings_tv.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings_tv.xml
@@ -24,10 +24,7 @@
     <string name="pip_play" msgid="674145557658227044">"Pusti"</string>
     <string name="pip_pause" msgid="8412075640017218862">"Pauziraj"</string>
     <string name="pip_hold_home" msgid="340086535668778109"><b>"POČETNI EKRAN"</b>" kont. PIP"</string>
-    <string name="pip_onboarding_title" msgid="7850436557670253991">"Slika u slici"</string>
-    <string name="pip_onboarding_description" msgid="4028124563309465267">"Na ovaj način će video biti prikazan dok ne pustite neki drugi. Pritisnite i zadržite "<b>"POČETNA"</b>" da biste ga kontrolisali."</string>
+    <string name="pip_onboarding_description" msgid="2882896641362814195">"Pritisnite i zadržite dugme POČETNI EKRAN da biste kontrolisali PIP"</string>
     <string name="pip_onboarding_button" msgid="3957426748484904611">"Važi"</string>
     <string name="recents_tv_dismiss" msgid="3555093879593377731">"Odbaci"</string>
-  <string-array name="recents_tv_blacklist_array">
-  </string-array>
 </resources>
diff --git a/packages/SystemUI/res/values-be-rBY/strings.xml b/packages/SystemUI/res/values-be-rBY/strings.xml
index 12ba0cd..71e3cb18 100644
--- a/packages/SystemUI/res/values-be-rBY/strings.xml
+++ b/packages/SystemUI/res/values-be-rBY/strings.xml
@@ -53,8 +53,8 @@
     <string name="bluetooth_tethered" msgid="7094101612161133267">"Прывязаныя праз Bluetooth"</string>
     <string name="status_bar_input_method_settings_configure_input_methods" msgid="3504292471512317827">"Налада метадаў уводу"</string>
     <string name="status_bar_use_physical_keyboard" msgid="7551903084416057810">"Фізічная клавіятура"</string>
-    <string name="usb_device_permission_prompt" msgid="834698001271562057">"Дазволіць праграме <xliff:g id="APPLICATION">%1$s</xliff:g> атрымлiваць доступ да прылады USB?"</string>
-    <string name="usb_accessory_permission_prompt" msgid="5171775411178865750">"Дазволіць праграме <xliff:g id="APPLICATION">%1$s</xliff:g> доступ да USB-аксесуара?"</string>
+    <string name="usb_device_permission_prompt" msgid="834698001271562057">"Дазволіць праыкладанню <xliff:g id="APPLICATION">%1$s</xliff:g> атрымлiваць доступ да прылады USB?"</string>
+    <string name="usb_accessory_permission_prompt" msgid="5171775411178865750">"Дазволіць прыкладанню <xliff:g id="APPLICATION">%1$s</xliff:g> доступ да прылады USB?"</string>
     <string name="usb_device_confirm_prompt" msgid="5161205258635253206">"Адкрыць <xliff:g id="ACTIVITY">%1$s</xliff:g>, калі гэтая USB-прылада падлучаная?"</string>
     <string name="usb_accessory_confirm_prompt" msgid="3808984931830229888">"Адкрыць <xliff:g id="ACTIVITY">%1$s</xliff:g>, калі гэтая USB-прылада падлучаная?"</string>
     <string name="usb_accessory_uri_prompt" msgid="513450621413733343">"Няма ўсталяв. прыкл. для працы з гэтай прыл. USB. Больш падраб. пра гэтую прыл.: <xliff:g id="URL">%1$s</xliff:g>"</string>
@@ -73,7 +73,7 @@
     <string name="screenshot_saving_title" msgid="8242282144535555697">"Захаванне скрыншота..."</string>
     <string name="screenshot_saving_text" msgid="2419718443411738818">"Скрыншот захаваны."</string>
     <string name="screenshot_saved_title" msgid="6461865960961414961">"Скрыншот зроблены"</string>
-    <string name="screenshot_saved_text" msgid="2685605830386712477">"Дакраніцеся, каб прагледзець здымак экрана."</string>
+    <string name="screenshot_saved_text" msgid="1152839647677558815">"Націсніце, каб прагледзець скрыншот"</string>
     <string name="screenshot_failed_title" msgid="705781116746922771">"Не атрымалася зрабiць скрыншот."</string>
     <string name="screenshot_failed_to_save_unknown_text" msgid="7887826345701753830">"Падчас захавання скрыншота адбылася памылка."</string>
     <string name="screenshot_failed_to_save_text" msgid="2592658083866306296">"Немагчыма захаваць здымак экрана, бо мала месца ў памяці."</string>
@@ -98,7 +98,7 @@
     <string name="voice_assist_label" msgid="3956854378310019854">"адкрыць галасавую дапамогу"</string>
     <string name="camera_label" msgid="7261107956054836961">"адкрыць камеру"</string>
     <string name="recents_caption_resize" msgid="3517056471774958200">"Выберыце новы макет заданняў"</string>
-    <string name="cancel" msgid="6442560571259935130">"Скасаваць"</string>
+    <string name="cancel" msgid="6442560571259935130">"Адмяніць"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Кнопка сумяшчальнасці маштаба."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Маштабаванне малых элементаў для большага экрана."</string>
     <string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth-сувязь."</string>
@@ -120,7 +120,6 @@
     <string name="accessibility_data_signal_full" msgid="2708384608124519369">"Поўны сігнал перадачы дадзеных."</string>
     <string name="accessibility_wifi_name" msgid="7202151365171148501">"Падключаны да <xliff:g id="WIFI">%s</xliff:g>."</string>
     <string name="accessibility_bluetooth_name" msgid="8441517146585531676">"Падлучаны да <xliff:g id="BLUETOOTH">%s</xliff:g>."</string>
-    <string name="accessibility_cast_name" msgid="4026393061247081201">"Ёсць падключэнне да <xliff:g id="CAST">%s</xliff:g>."</string>
     <string name="accessibility_no_wimax" msgid="4329180129727630368">"Няма сiгналу WiMAX."</string>
     <string name="accessibility_wimax_one_bar" msgid="4170994299011863648">"Адзiн слупок сiгналу WiMAX."</string>
     <string name="accessibility_wimax_two_bars" msgid="9176236858336502288">"Два слупкi сiгналу WiMAX."</string>
@@ -136,7 +135,7 @@
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Тры слупкi."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Сігнал поўны."</string>
     <string name="accessibility_desc_on" msgid="2385254693624345265">"Уключана."</string>
-    <string name="accessibility_desc_off" msgid="6475508157786853157">"Выключана."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Адключана."</string>
     <string name="accessibility_desc_connected" msgid="8366256693719499665">"Падключана."</string>
     <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Падлучэнне."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
@@ -151,18 +150,14 @@
     <string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
     <string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
     <string name="accessibility_no_sim" msgid="8274017118472455155">"Няма SIM-карты."</string>
-    <string name="accessibility_cell_data" msgid="7080312242791850520">"Сотавая перадача даных"</string>
-    <string name="accessibility_cell_data_on" msgid="4310018593519761767">"Сотавая перадача даных уключана"</string>
     <string name="accessibility_cell_data_off" msgid="8000803571751407635">"Мабільная перадача даных адключана"</string>
     <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Сувязь па Bluetooth."</string>
     <string name="accessibility_airplane_mode" msgid="834748999790763092">"Рэжым палёту."</string>
     <string name="accessibility_no_sims" msgid="3957997018324995781">"Няма SIM-карты."</string>
     <string name="accessibility_carrier_network_change_mode" msgid="4017301580441304305">"Змяненне аператара сеткі."</string>
-    <string name="accessibility_battery_details" msgid="7645516654955025422">"Паказаць падрабязную інфармацыю пра акумулятар"</string>
     <!-- String.format failed for translation -->
     <!-- no translation found for accessibility_battery_level (7451474187113371965) -->
     <skip />
-    <string name="accessibility_battery_level_charging" msgid="1147587904439319646">"Зарадка акумулятара, працэнтаў: <xliff:g id="BATTERY_PERCENTAGE">%d</xliff:g>."</string>
     <string name="accessibility_settings_button" msgid="799583911231893380">"Сістэмныя налады."</string>
     <string name="accessibility_notifications_button" msgid="4498000369779421892">"Апавяшчэнні."</string>
     <string name="accessibility_remove_notification" msgid="3603099514902182350">"Выдаліць апавяшчэнне."</string>
@@ -200,11 +195,9 @@
     <string name="accessibility_quick_settings_dnd_priority_on" msgid="1448402297221249355">"Рэжым «Не турбаваць» укл., толькі прыярытэтныя."</string>
     <string name="accessibility_quick_settings_dnd_none_on" msgid="6882582132662613537">"Рэжым «Не турбаваць» укл., поўная цішыня."</string>
     <string name="accessibility_quick_settings_dnd_alarms_on" msgid="9152834845587554157">"Рэжым «Не турбаваць» укл., толькі будзільнікі."</string>
-    <string name="accessibility_quick_settings_dnd" msgid="6607873236717185815">"Не турбаваць."</string>
     <string name="accessibility_quick_settings_dnd_off" msgid="2371832603753738581">"Рэжым «Не турбаваць» выкл."</string>
     <string name="accessibility_quick_settings_dnd_changed_off" msgid="898107593453022935">"Рэжым «Не турбаваць» выкл."</string>
     <string name="accessibility_quick_settings_dnd_changed_on" msgid="4483780856613561039">"Рэжым «Не турбаваць» укл."</string>
-    <string name="accessibility_quick_settings_bluetooth" msgid="6341675755803320038">"Bluetooth."</string>
     <string name="accessibility_quick_settings_bluetooth_off" msgid="2133631372372064339">"Bluetooth выключаны."</string>
     <string name="accessibility_quick_settings_bluetooth_on" msgid="7681999166216621838">"Bluetooth уключаны."</string>
     <string name="accessibility_quick_settings_bluetooth_connecting" msgid="6953242966685343855">"Bluetooth падлучаецца."</string>
@@ -249,12 +242,6 @@
     <string name="accessibility_location_active" msgid="2427290146138169014">"Ёсць актыўныя запыты пра месцазнаходжанне"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Выдалiць усе апавяшчэннi."</string>
     <string name="notification_group_overflow_indicator" msgid="1863231301642314183">"+ <xliff:g id="NUMBER">%s</xliff:g>"</string>
-    <plurals name="notification_group_overflow_description" formatted="false" msgid="4579313201268495404">
-      <item quantity="one">Яшчэ <xliff:g id="NUMBER_1">%s</xliff:g> апавяшчэнне ўнутры.</item>
-      <item quantity="few">Яшчэ <xliff:g id="NUMBER_1">%s</xliff:g> апавяшчэнні ўнутры.</item>
-      <item quantity="many">Яшчэ <xliff:g id="NUMBER_1">%s</xliff:g> апавяшчэнняў унутры.</item>
-      <item quantity="other">Яшчэ <xliff:g id="NUMBER_1">%s</xliff:g> апавяшчэння ўнутры.</item>
-    </plurals>
     <string name="status_bar_notification_inspect_item_title" msgid="5668348142410115323">"Налады апавяшчэнняў"</string>
     <string name="status_bar_notification_app_settings_title" msgid="5525260160341558869">"Налады <xliff:g id="APP_NAME">%s</xliff:g>"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран паварочваецца аўтаматычна."</string>
@@ -264,7 +251,7 @@
     <string name="accessibility_rotation_lock_on_landscape_changed" msgid="3135965553707519743">"Цяпер экран заблакіраваны ў альбомнай арыентацыі."</string>
     <string name="accessibility_rotation_lock_on_portrait_changed" msgid="8922481981834012126">"Цяпер экран заблакiраваны ў кніжнай арыентацыі."</string>
     <string name="dessert_case" msgid="1295161776223959221">"Вітрына з дэсертамі"</string>
-    <string name="start_dreams" msgid="5640361424498338327">"Экранная застаўка"</string>
+    <string name="start_dreams" msgid="7219575858348719790">"Мроi"</string>
     <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_dnd_label" msgid="8735855737575028208">"Не турбаваць"</string>
     <string name="quick_settings_dnd_priority_label" msgid="483232950670692036">"Толькі прыярытэтныя"</string>
@@ -276,8 +263,6 @@
     <string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Няма даступных спалучаных прылад"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркасць"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Аўтапаварот"</string>
-    <string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Аўтаматычны паварот экрана"</string>
-    <string name="accessibility_quick_settings_rotation_value" msgid="1428962304214992318">"Усталявана на <xliff:g id="ID_1">%s</xliff:g>"</string>
     <string name="quick_settings_rotation_locked_label" msgid="6359205706154282377">"Паварот заблакіраваны"</string>
     <string name="quick_settings_rotation_locked_portrait_label" msgid="5102691921442135053">"Кніжная арыентацыя"</string>
     <string name="quick_settings_rotation_locked_landscape_label" msgid="8553157770061178719">"Альбомная арыентацыя"</string>
@@ -296,7 +281,6 @@
     <string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Няма падключэння"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Няма сеткi"</string>
     <string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi адключаны"</string>
-    <string name="quick_settings_wifi_on_label" msgid="7607810331387031235">"Wi-Fi уключаны"</string>
     <string name="quick_settings_wifi_detail_empty_text" msgid="269990350383909226">"Няма даступнай сеткі Wi-Fi"</string>
     <string name="quick_settings_cast_title" msgid="7709016546426454729">"Трансляцыя"</string>
     <string name="quick_settings_casting" msgid="6601710681033353316">"Ідзе перадача"</string>
@@ -323,7 +307,7 @@
     <string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ліміт <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
     <string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Папярэджанне: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
     <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Рэжым працы"</string>
-    <string name="recents_empty_message" msgid="808480104164008572">"Няма нядаўніх элементаў"</string>
+    <string name="recents_empty_message" msgid="808480104164008572">"Няма апошніх элементаў"</string>
     <string name="recents_empty_message_dismissed_all" msgid="2791312568666558651">"Вы ачысцілі усё"</string>
     <string name="recents_app_info_button_label" msgid="2890317189376000030">"Звесткі аб праграме"</string>
     <string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"замацаванне экрана"</string>
@@ -332,7 +316,6 @@
     <string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> адключана ў бяспечным рэжыме."</string>
     <string name="recents_stack_action_button_label" msgid="6593727103310426253">"Ачысціць усё"</string>
     <string name="recents_incompatible_app_message" msgid="5075812958564082451">"Праграма не падтрымлівае функцыю дзялення экрана"</string>
-    <string name="recents_drag_hint_message" msgid="2649739267073203985">"Перацягніце сюды, каб перайсці ў рэжым падзеленага экрана"</string>
     <string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Падзяліць гарызантальна"</string>
     <string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Падзяліць вертыкальна"</string>
     <string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Падзяліць іншым чынам"</string>
@@ -350,8 +333,7 @@
     <string name="zen_silence_introduction" msgid="3137882381093271568">"Гэта заблакіруе ЎСЕ гукі і вібрацыі, у тым ліку ад будзільнікаў, музыкі, відэа і гульняў."</string>
     <string name="keyguard_more_overflow_text" msgid="9195222469041601365">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="1288875699658819755">"Менш тэрміновыя апавяшчэнні ніжэй"</string>
-    <!-- no translation found for notification_tap_again (7590196980943943842) -->
-    <skip />
+    <string name="notification_tap_again" msgid="8524949573675922138">"Краніце яшчэ раз, каб адкрыць"</string>
     <string name="keyguard_unlock" msgid="8043466894212841998">"Правядзіце пальцам уверх, каб разблакіраваць"</string>
     <string name="phone_hint" msgid="4872890986869209950">"Тэлефон: правядзіце пальцам ад значка"</string>
     <string name="voice_hint" msgid="8939888732119726665">"Галасавая дапамога: правядзіце пальцам ад значка"</string>
@@ -389,7 +371,7 @@
     <string name="user_logout_notification_text" msgid="3350262809611876284">"Выканаць выхад бягучага карыстальніка"</string>
     <string name="user_logout_notification_action" msgid="1195428991423425062">"ВЫКАНАЦЬ ВЫХАД КАРЫСТАЛЬНІКА"</string>
     <string name="user_add_user_title" msgid="4553596395824132638">"Дадаць новага карыстальніка?"</string>
-    <string name="user_add_user_message_short" msgid="2161624834066214559">"Пасля стварэння профіля яго трэба наладзіць.\n\nЛюбы карыстальнік прылады можа абнаўляць праграмы ўсіх іншых карыстальнікаў."</string>
+    <string name="user_add_user_message_short" msgid="2161624834066214559">"Калі вы дадаяце новага карыстальніка, ён павінен наладзіць свой раздзел.\n\nЛюбы карыстальнік можа абнаўляць праграмы для ўсіх астатніх карыстальнікаў."</string>
     <string name="user_remove_user_title" msgid="4681256956076895559">"Выдаліць карыстальніка?"</string>
     <string name="user_remove_user_message" msgid="1453218013959498039">"Усе праграмы і даныя гэтага карыстальніка будуць выдалены."</string>
     <string name="user_remove_user_remove" msgid="7479275741742178297">"Выдаліць"</string>
@@ -429,7 +411,7 @@
     <string name="accessibility_volume_expand" msgid="5946812790999244205">"Разгарнуць"</string>
     <string name="accessibility_volume_collapse" msgid="3609549593031810875">"Згарнуць"</string>
     <string name="screen_pinning_title" msgid="3273740381976175811">"Экран замацаваны"</string>
-    <string name="screen_pinning_description" msgid="7238941806855968768">"Будзе паказвацца, пакуль не адмацуеце. Дакраніцеся і ўтрымлівайце кнопку \"Назад\", каб адмацаваць."</string>
+    <string name="screen_pinning_description" msgid="3577937698406151604">"Будзе паказвацца, пакуль не адмацуеце. Дакраніцеся і ўтрымлівайце кнопку «Назад», каб адмацаваць."</string>
     <string name="screen_pinning_positive" msgid="3783985798366751226">"Зразумела"</string>
     <string name="screen_pinning_negative" msgid="3741602308343880268">"Не, дзякуй"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Схаваць <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
@@ -437,15 +419,13 @@
     <string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Схаваць"</string>
     <string name="volumeui_prompt_message" msgid="918680947433389110">"<xliff:g id="APP_NAME">%1$s</xliff:g> хоча быць дыялогам гучнасці."</string>
     <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Дазволіць"</string>
-    <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Адмовіць"</string>
+    <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Адхiлiць"</string>
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> з\'яўляецца дыялогам гучнасці"</string>
-    <string name="volumeui_notification_text" msgid="8819536904234337445">"Дакраніцеся, каб аднавіць арыгінал."</string>
+    <string name="volumeui_notification_text" msgid="1826889705095768656">"Націсніце, каб аднавіць арыгінал."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Вы выкарыстоўваеце свой працоўны профіль"</string>
-    <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Дакраніцеся, каб уключыць гук."</string>
-    <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Дакраніцеся, каб уключыць вібрацыю. Можа быць адключаны гук службаў спецыяльных магчымасцей."</string>
-    <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Дакраніцеся, каб адключыць гук. Можа быць адключаны гук службаў спецыяльных магчымасцей."</string>
-    <string name="volume_dialog_accessibility_shown_message" msgid="1834631467074259998">"Паказваецца наступная колькасць рэгулятараў гучнасці: %s. Правядзіце пальцам уверх, каб закрыць іх."</string>
-    <string name="volume_dialog_accessibility_dismissed_message" msgid="51543526013711399">"Рэгулятары гучнасці схаваны"</string>
+    <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Краніце, каб уключыць гук."</string>
+    <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Краніце, каб уключыць вібрацыю. Можа быць адключаны гук службаў спецыяльных магчымасцей."</string>
+    <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Краніце, каб адключыць гук. Можа быць адключаны гук службаў спецыяльных магчымасцей."</string>
     <string name="system_ui_tuner" msgid="708224127392452018">"Наладка сістэмнага інтэрфейсу карыстальніка"</string>
     <string name="show_battery_percentage" msgid="5444136600512968798">"Паказваць працэнт зараду акумулятара"</string>
     <string name="show_battery_percentage_summary" msgid="3215025775576786037">"Паказваць працэнт узроўню акумулятара ўнутры значка панэлі стану, калі ён не зараджаецца"</string>
@@ -490,24 +470,19 @@
     <string name="block" msgid="2734508760962682611">"Блакіраваць усе апавяшчэнні"</string>
     <string name="do_not_silence" msgid="6878060322594892441">"Не адключаць гук"</string>
     <string name="do_not_silence_block" msgid="4070647971382232311">"Не адключаць гук і не блакіраваць"</string>
-    <string name="tuner_full_importance_settings" msgid="3207312268609236827">"Пашыранае кіраванне апавяшчэннямі"</string>
-    <string name="tuner_full_importance_settings_on" msgid="7545060756610299966">"Уключана"</string>
-    <string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"Выключана"</string>
-    <string name="power_notification_controls_description" msgid="4372459941671353358">"З дапамогай пашыранага кіравання апавяшчэннямі вы можаце задаваць узровень важнасці апавяшчэнняў праграмы ад 0 да 5. \n\n"<b>"Узровень 5"</b>" \n- Паказваць уверсе спіса апавяшчэнняў \n- Дазваляць перапыняць рэжым поўнага экрана \n- Заўсёды дазваляць кароткі паказ \n\n"<b>"Узровень 4"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Заўсёды дазваляць кароткі паказ \n\n"<b>"Узровень 3"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Ніколі не дазваляць кароткі паказ \n\n"<b>"Узровень 2"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Ніколі не дазваляць кароткі паказ \n- Ніколі не прайграваць гук і не вібрыраваць \n\n"<b>"Узровень 1"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Ніколі не дазваляць кароткі паказ \n- Ніколі не прайграваць гук і не вібрыраваць \n- Хаваць з экрана блакіроўкі і панэлі стану \n- Паказваць унізе спіса апавяшчэнняў \n\n"<b>"Узровень 0"</b>" \n- Блакіраваць усе апавяшчэнні ад праграмы"</string>
-    <string name="user_unspecified_importance" msgid="361613856933432117">"Важнасць: аўтаматычна"</string>
-    <string name="blocked_importance" msgid="5035073235408414397">"Важнасць: узровень 0"</string>
-    <string name="min_importance" msgid="560779348928574878">"Важнасць: узровень 1"</string>
-    <string name="low_importance" msgid="7571498511534140">"Важнасць: узровень 2"</string>
-    <string name="default_importance" msgid="7609889614553354702">"Важнасць: узровень 3"</string>
-    <string name="high_importance" msgid="3441537905162782568">"Важнасць: узровень 4"</string>
-    <string name="max_importance" msgid="4880179829869865275">"Важнасць: узровень 5"</string>
-    <string name="notification_importance_user_unspecified" msgid="2868359605125272874">"Праграма вызначае важнасць кожнага апавяшчэння."</string>
-    <string name="notification_importance_blocked" msgid="4237497046867398057">"Ніколі не паказваць апавяшчэнні ад гэтай праграмы."</string>
-    <string name="notification_importance_min" msgid="7844224511187027155">"Не перап. рэжым поўн. экр., не дазв. карот. паказ, гук або вібр. Хаваць з экр. блак. і панэлі стану."</string>
-    <string name="notification_importance_low" msgid="7950291702044409847">"Не перапыняць рэжым поўнага экрана, не дазваляць кароткі паказ, прайгранне гуку або вібрацыю."</string>
-    <string name="notification_importance_default" msgid="5924405820269074915">"Не перапыняць рэжым поўнага экрана і не дазваляць кароткі паказ."</string>
-    <string name="notification_importance_high" msgid="1729480727023990427">"Заўсёды дазваляць кароткі паказ. Не перапыняць рэжым поўнага экрана."</string>
-    <string name="notification_importance_max" msgid="2508384624461849111">"Заўсёды дазваляць кароткі паказ, дазваляць перапыняць рэжым поўнага экрана."</string>
+    <string name="tuner_full_importance_settings" msgid="8103289238676424226">"Паказаць поўны спіс налад важнасці"</string>
+    <string name="blocked_importance" msgid="5198578988978234161">"Заблакiравана"</string>
+    <string name="min_importance" msgid="1901894910809414782">"Мінімальная важнасць"</string>
+    <string name="low_importance" msgid="4109929986107147930">"Нізкая важнасць"</string>
+    <string name="default_importance" msgid="8192107689995742653">"Звычайная важнасць"</string>
+    <string name="high_importance" msgid="1527066195614050263">"Высокая важнасць"</string>
+    <string name="max_importance" msgid="5089005872719563894">"Пільная важнасць"</string>
+    <string name="notification_importance_blocked" msgid="2397192642657872872">"Ніколі не паказваць гэтыя апавяшчэнні"</string>
+    <string name="notification_importance_min" msgid="1938190340516905748">"Бязгучна паказваць унізе спіса апавяшчэнняў"</string>
+    <string name="notification_importance_low" msgid="3657252049508213048">"Паказваць гэтыя апавяшчэнні бязгучна"</string>
+    <string name="notification_importance_default" msgid="4466466472622442175">"Дазволіць гэтым апавяшчэнням прайграваць гукі"</string>
+    <string name="notification_importance_high" msgid="2135428926525093825">"Хутка паказаць на экране і дазволіць прайграванне гуку"</string>
+    <string name="notification_importance_max" msgid="5806278962376556491">"Паказваць уверсе спіса апавяшчэнняў, хутка паказаць на экране і дазволіць прайграванне гуку"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"Дадатковыя налады"</string>
     <string name="notification_done" msgid="5279426047273930175">"Гатова"</string>
     <string name="notification_gear_accessibility" msgid="94429150213089611">"Элементы кантролю апавяшчэнняў <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
@@ -515,7 +490,7 @@
     <string name="night_mode" msgid="3540405868248625488">"Начны рэжым"</string>
     <string name="calibrate_display" msgid="5974642573432039217">"Каліброўка дысплэя"</string>
     <string name="night_mode_on" msgid="5597545513026541108">"Уключана"</string>
-    <string name="night_mode_off" msgid="8035605276956057508">"Выключана"</string>
+    <string name="night_mode_off" msgid="8035605276956057508">"Адключана"</string>
     <string name="turn_on_automatically" msgid="4167565356762016083">"Уключаць аўтаматычна"</string>
     <string name="turn_on_auto_summary" msgid="2190994512406701520">"Пераключэнне ў начны рэжым у залежнасці ад канкрэтнай мясцовасці і часу сутак"</string>
     <string name="when_night_mode_on" msgid="2969436026899172821">"Калі ўключаны Начны рэжым"</string>
@@ -585,7 +560,7 @@
     <string name="accessibility_data_saver_on" msgid="8454111686783887148">"Эканомія трафіку ўключана"</string>
     <string name="accessibility_data_saver_off" msgid="8841582529453005337">"Эканомія трафіку адключана"</string>
     <string name="switch_bar_on" msgid="1142437840752794229">"Уключана"</string>
-    <string name="switch_bar_off" msgid="8803270596930432874">"Выключана"</string>
+    <string name="switch_bar_off" msgid="8803270596930432874">"Адключана"</string>
     <string name="nav_bar" msgid="1993221402773877607">"Панэль навігацыі"</string>
     <string name="start" msgid="6873794757232879664">"Пачатак"</string>
     <string name="center" msgid="4327473927066010960">"Цэнтр"</string>
@@ -605,7 +580,7 @@
     <string name="keycode" msgid="7335281375728356499">"Код клавішы"</string>
     <string name="keycode_description" msgid="1403795192716828949">"Кнопка Код клавішы дазваляе дадаваць клавішы ў Панэль навігацыі. Пры націску гэтай кнопкі эмулюецца выбраная клавіша. Спачатку трэба выбраць клавішу для кнопкі, а потым відарыс, які будзе паказвацца на кнопцы."</string>
     <string name="select_keycode" msgid="7413765103381924584">"Выберыце клавішу клавіятуры"</string>
-    <string name="preview" msgid="9077832302472282938">"Перадпрагляд"</string>
+    <string name="preview" msgid="9077832302472282938">"Папярэдні прагляд"</string>
     <string name="drag_to_add_tiles" msgid="7058945779098711293">"Перацягніце, каб дадаць пліткі"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"Перацягніце сюды, каб выдаліць"</string>
     <string name="qs_edit" msgid="2232596095725105230">"Рэдагаваць"</string>
@@ -622,16 +597,10 @@
   </string-array>
     <string name="other" msgid="4060683095962566764">"Іншае"</string>
     <string name="accessibility_divider" msgid="5903423481953635044">"Раздзяляльнік падзеленага экрана"</string>
-    <string name="accessibility_action_divider_left_full" msgid="2801570521881574972">"Левы экран – поўнаэкранны рэжым"</string>
-    <string name="accessibility_action_divider_left_70" msgid="3612060638991687254">"Левы экран – 70%"</string>
-    <string name="accessibility_action_divider_left_50" msgid="1248083470322193075">"Левы экран – 50%"</string>
-    <string name="accessibility_action_divider_left_30" msgid="543324403127069386">"Левы экран – 30%"</string>
-    <string name="accessibility_action_divider_right_full" msgid="4639381073802030463">"Правы экран – поўнаэкранны рэжым"</string>
-    <string name="accessibility_action_divider_top_full" msgid="5357010904067731654">"Верхні экран – поўнаэкранны рэжым"</string>
-    <string name="accessibility_action_divider_top_70" msgid="5090779195650364522">"Верхні экран – 70%"</string>
-    <string name="accessibility_action_divider_top_50" msgid="6385859741925078668">"Верхні экран – 50%"</string>
-    <string name="accessibility_action_divider_top_30" msgid="6201455163864841205">"Верхні экран – 30%"</string>
-    <string name="accessibility_action_divider_bottom_full" msgid="301433196679548001">"Ніжні экран – поўнаэкранны рэжым"</string>
+    <string name="accessibility_action_divider_move_down" msgid="704893304141890042">"Перамясціць уніз"</string>
+    <string name="accessibility_action_divider_move_up" msgid="4580103171609248006">"Перамясціць уверх"</string>
+    <string name="accessibility_action_divider_move_left" msgid="9218189832115847253">"Перамясціць улева"</string>
+    <string name="accessibility_action_divider_move_right" msgid="4671522715182567972">"Перамясціць управа"</string>
     <string name="accessibility_qs_edit_tile_label" msgid="8374924053307764245">"Месца: <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Краніце двойчы, каб рэдагаваць."</string>
     <string name="accessibility_qs_edit_add_tile_label" msgid="8133209638023882667">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Краніце двойчы, каб дадаць."</string>
     <string name="accessibility_qs_edit_position_label" msgid="5055306305919289819">"Месца: <xliff:g id="POSITION">%1$d</xliff:g>. Краніце двойчы, каб выбраць."</string>
@@ -641,17 +610,9 @@
     <string name="accessibility_qs_edit_tile_removed" msgid="8584304916627913440">"Плітка <xliff:g id="TILE_NAME">%1$s</xliff:g> выдалена"</string>
     <string name="accessibility_qs_edit_tile_moved" msgid="4343693412689365038">"<xliff:g id="TILE_NAME">%1$s</xliff:g> перамешчана ў наступнае месца: <xliff:g id="POSITION">%2$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="8073587401747016103">"Рэдактар хуткіх налад."</string>
-    <string name="accessibility_desc_notification_icon" msgid="8352414185263916335">"Апавяшчэнне <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="5914261505436217520">"Праграма можа не працаваць у рэжыме дзялення экрана."</string>
     <string name="dock_non_resizeble_failed_to_dock_text" msgid="3871617304250207291">"Праграма не падтрымлівае функцыю дзялення экрана."</string>
-    <string name="accessibility_quick_settings_settings" msgid="6132460890024942157">"Адкрыць налады."</string>
-    <string name="accessibility_quick_settings_expand" msgid="2375165227880477530">"Адкрыць хуткія налады."</string>
-    <string name="accessibility_quick_settings_collapse" msgid="1792625797142648105">"Закрыць хуткія налады."</string>
-    <string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Будзільнік пастаўлены."</string>
-    <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"Вы ўвайшлі як <xliff:g id="ID_1">%s</xliff:g>"</string>
-    <string name="accessibility_quick_settings_no_internet" msgid="31890692343084075">"Няма інтэрнэту."</string>
-    <string name="accessibility_quick_settings_open_details" msgid="4230931801728005194">"Паказаць падрабязную інфармацыю."</string>
-    <string name="accessibility_quick_settings_open_settings" msgid="7806613775728380737">"Адкрыць налады <xliff:g id="ID_1">%s</xliff:g>."</string>
-    <string name="accessibility_quick_settings_edit" msgid="7839992848995240393">"Змяніць парадак налад."</string>
-    <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Старонка <xliff:g id="ID_1">%1$d</xliff:g> з <xliff:g id="ID_2">%2$d</xliff:g>"</string>
+    <string name="accessibility_quick_settings_expand" msgid="4982484435775933070">"Разгарнуць хуткія налады."</string>
+    <!-- no translation found for accessibility_quick_settings_page (5032979051755200721) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-be-rBY/strings_tv.xml b/packages/SystemUI/res/values-be-rBY/strings_tv.xml
index 4b871a6..dab7938 100644
--- a/packages/SystemUI/res/values-be-rBY/strings_tv.xml
+++ b/packages/SystemUI/res/values-be-rBY/strings_tv.xml
@@ -24,10 +24,7 @@
     <string name="pip_play" msgid="674145557658227044">"Прайграць"</string>
     <string name="pip_pause" msgid="8412075640017218862">"Прыпыніць"</string>
     <string name="pip_hold_home" msgid="340086535668778109">"Утрым. "<b>"HOME"</b>" для кір. PIP"</string>
-    <string name="pip_onboarding_title" msgid="7850436557670253991">"Відарыс у відарысе"</string>
-    <string name="pip_onboarding_description" msgid="4028124563309465267">"Гэта дазваляе захоўваць ваша відэа ў полі зроку, пакуль вы не пачняце прайграванне іншага. Націсніце і ўтрымлівайце "<b>"HOME"</b>" для кіравання."</string>
+    <string name="pip_onboarding_description" msgid="2882896641362814195">"Націсніце і ўтрымлівайце кнопку HOME для кіравання PIP"</string>
     <string name="pip_onboarding_button" msgid="3957426748484904611">"Зразумела"</string>
     <string name="recents_tv_dismiss" msgid="3555093879593377731">"Адхіліць"</string>
-  <string-array name="recents_tv_blacklist_array">
-  </string-array>
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 8d7e8da..d313af1 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роуминг"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> изпълнява ролята на диалоговия прозорец за силата на звука"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Докоснете, за да се възстанови първоначалната стойност."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Използвате служебния си потребителски профил"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Обаждане"</item>
+    <item msgid="5997713001067658559">"Система"</item>
+    <item msgid="7858983209929864160">"Позвъняване"</item>
+    <item msgid="1850038478268896762">"Мултимедия"</item>
+    <item msgid="8265110906352372092">"Будилник"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Докоснете, за да включите отново звука."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Докоснете, за да зададете вибриране. Възможно е звукът на услугите за достъпност да бъде заглушен."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Докоснете, за да заглушите звука. Възможно е звукът на услугите за достъпност да бъде заглушен."</string>
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn-rBD/strings.xml
index e32fb06..9d8b351 100644
--- a/packages/SystemUI/res/values-bn-rBD/strings.xml
+++ b/packages/SystemUI/res/values-bn-rBD/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"রোমিং"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> হল ভলিউম ডায়লগ"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"আসলটি পুনঃস্থাপন করতে আলতো চাপ দিন৷"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"আপনি আপনার কাজের প্রোফাইল ব্যবহার করছেন"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"কল করুন"</item>
+    <item msgid="5997713001067658559">"সিস্টেম"</item>
+    <item msgid="7858983209929864160">"রিং"</item>
+    <item msgid="1850038478268896762">"মিডিয়া"</item>
+    <item msgid="8265110906352372092">"অ্যালার্ম"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ব্লুটুথ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s। সশব্দ করতে আলতো চাপুন।"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s। কম্পন এ সেট করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে নিঃশব্দ করা হতে পারে।"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s। নিঃশব্দ করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে নিঃশব্দ করা হতে পারে।"</string>
diff --git a/packages/SystemUI/res/values-bs-rBA/strings.xml b/packages/SystemUI/res/values-bs-rBA/strings.xml
index c0b8985..d0590e9 100644
--- a/packages/SystemUI/res/values-bs-rBA/strings.xml
+++ b/packages/SystemUI/res/values-bs-rBA/strings.xml
@@ -72,7 +72,7 @@
     <string name="screenshot_saving_title" msgid="8242282144535555697">"Spašavanje snimka ekrana..."</string>
     <string name="screenshot_saving_text" msgid="2419718443411738818">"Spašavanje snimka ekrana u toku."</string>
     <string name="screenshot_saved_title" msgid="6461865960961414961">"Ekran snimljen."</string>
-    <string name="screenshot_saved_text" msgid="2685605830386712477">"Dodirnite za prikaz snimka ekrana."</string>
+    <string name="screenshot_saved_text" msgid="1152839647677558815">"Dodirnite za prikaz snimka ekrana."</string>
     <string name="screenshot_failed_title" msgid="705781116746922771">"Došlo je do greške prilikom snimanja ekrana."</string>
     <string name="screenshot_failed_to_save_unknown_text" msgid="7887826345701753830">"Došlo je do problema prilikom spašavanja snimka ekrana."</string>
     <string name="screenshot_failed_to_save_text" msgid="2592658083866306296">"Snimak ekrana se ne može sačuvati zbog manjka prostora za pohranu."</string>
@@ -97,7 +97,7 @@
     <string name="voice_assist_label" msgid="3956854378310019854">"otvori glasovnu pomoć"</string>
     <string name="camera_label" msgid="7261107956054836961">"otvori kameru"</string>
     <string name="recents_caption_resize" msgid="3517056471774958200">"Izaberite novi raspored zadataka"</string>
-    <string name="cancel" msgid="6442560571259935130">"Otkaži"</string>
+    <string name="cancel" msgid="6442560571259935130">"Prekini"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Dugme za uvećavanje u slučaju nekompatibilnosti."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Uvećani prikaz manjeg ekrana na većem ekranu."</string>
     <string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth je povezan."</string>
@@ -119,7 +119,6 @@
     <string name="accessibility_data_signal_full" msgid="2708384608124519369">"Signal za prijenos podataka pun."</string>
     <string name="accessibility_wifi_name" msgid="7202151365171148501">"Povezan na <xliff:g id="WIFI">%s</xliff:g>."</string>
     <string name="accessibility_bluetooth_name" msgid="8441517146585531676">"Povezan na <xliff:g id="BLUETOOTH">%s</xliff:g>."</string>
-    <string name="accessibility_cast_name" msgid="4026393061247081201">"Povezan na <xliff:g id="CAST">%s</xliff:g>."</string>
     <string name="accessibility_no_wimax" msgid="4329180129727630368">"Nema WiMAX signala."</string>
     <string name="accessibility_wimax_one_bar" msgid="4170994299011863648">"WiMAX signal na jednoj crtici."</string>
     <string name="accessibility_wimax_two_bars" msgid="9176236858336502288">"WiMAX signal na dvije crtice."</string>
@@ -150,16 +149,12 @@
     <string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
     <string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
     <string name="accessibility_no_sim" msgid="8274017118472455155">"Nema SIM kartice."</string>
-    <string name="accessibility_cell_data" msgid="7080312242791850520">"Mobilni podaci"</string>
-    <string name="accessibility_cell_data_on" msgid="4310018593519761767">"Prijenos mobilnih podataka uključen"</string>
     <string name="accessibility_cell_data_off" msgid="8000803571751407635">"Mobilni podaci isključeni"</string>
     <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Dijeljenje Bluetooth veze."</string>
     <string name="accessibility_airplane_mode" msgid="834748999790763092">"Način rada u avionu."</string>
     <string name="accessibility_no_sims" msgid="3957997018324995781">"Nema SIM kartice."</string>
     <string name="accessibility_carrier_network_change_mode" msgid="4017301580441304305">"Promjena mreže operatera."</string>
-    <string name="accessibility_battery_details" msgid="7645516654955025422">"Otvori detalje o potrošnji baterije"</string>
     <string name="accessibility_battery_level" msgid="7451474187113371965">"Baterija na <xliff:g id="NUMBER">%d</xliff:g> posto."</string>
-    <string name="accessibility_battery_level_charging" msgid="1147587904439319646">"Punjenje baterije, <xliff:g id="BATTERY_PERCENTAGE">%d</xliff:g> procenata."</string>
     <string name="accessibility_settings_button" msgid="799583911231893380">"Postavke sistema."</string>
     <string name="accessibility_notifications_button" msgid="4498000369779421892">"Obavještenja."</string>
     <string name="accessibility_remove_notification" msgid="3603099514902182350">"Ukloniti obavještenje."</string>
@@ -197,11 +192,9 @@
     <string name="accessibility_quick_settings_dnd_priority_on" msgid="1448402297221249355">"Opcija Ne ometaj je uključena, čut će se samo prioritetna obavještenja."</string>
     <string name="accessibility_quick_settings_dnd_none_on" msgid="6882582132662613537">"Opcija Ne ometaj je uključena, potpuna tišina."</string>
     <string name="accessibility_quick_settings_dnd_alarms_on" msgid="9152834845587554157">"Opcija Ne ometaj je uključena, čut će se samo alarmi."</string>
-    <string name="accessibility_quick_settings_dnd" msgid="6607873236717185815">"Ne ometaj."</string>
     <string name="accessibility_quick_settings_dnd_off" msgid="2371832603753738581">"Opcija Ne ometaj je isključena."</string>
     <string name="accessibility_quick_settings_dnd_changed_off" msgid="898107593453022935">"Opcija Ne ometaj je isključena."</string>
     <string name="accessibility_quick_settings_dnd_changed_on" msgid="4483780856613561039">"Opcija Ne ometaj je uključena."</string>
-    <string name="accessibility_quick_settings_bluetooth" msgid="6341675755803320038">"Bluetooth."</string>
     <string name="accessibility_quick_settings_bluetooth_off" msgid="2133631372372064339">"Bluetooth isključen."</string>
     <string name="accessibility_quick_settings_bluetooth_on" msgid="7681999166216621838">"Bluetooth uključen."</string>
     <string name="accessibility_quick_settings_bluetooth_connecting" msgid="6953242966685343855">"Bluetooth se povezuje."</string>
@@ -246,11 +239,6 @@
     <string name="accessibility_location_active" msgid="2427290146138169014">"Aktiviran je zahtjev za lokaciju"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Uklanjanje svih obavještenja."</string>
     <string name="notification_group_overflow_indicator" msgid="1863231301642314183">"+ <xliff:g id="NUMBER">%s</xliff:g>"</string>
-    <plurals name="notification_group_overflow_description" formatted="false" msgid="4579313201268495404">
-      <item quantity="one">Još <xliff:g id="NUMBER_1">%s</xliff:g> obavještenje unutra.</item>
-      <item quantity="few">Još <xliff:g id="NUMBER_1">%s</xliff:g> obavještenja unutra.</item>
-      <item quantity="other">Još <xliff:g id="NUMBER_1">%s</xliff:g> obavještenja unutra.</item>
-    </plurals>
     <string name="status_bar_notification_inspect_item_title" msgid="5668348142410115323">"Postavke obavještenja"</string>
     <string name="status_bar_notification_app_settings_title" msgid="5525260160341558869">"Postavke aplikacije <xliff:g id="APP_NAME">%s</xliff:g>"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran će se automatski rotirati."</string>
@@ -260,7 +248,7 @@
     <string name="accessibility_rotation_lock_on_landscape_changed" msgid="3135965553707519743">"Ekran je sada zaključan u vodoravnom položaju."</string>
     <string name="accessibility_rotation_lock_on_portrait_changed" msgid="8922481981834012126">"Ekran je sada zaključan u uspravnom položaju."</string>
     <string name="dessert_case" msgid="1295161776223959221">"Slika sa desertima"</string>
-    <string name="start_dreams" msgid="5640361424498338327">"Čuvar ekrana"</string>
+    <string name="start_dreams" msgid="7219575858348719790">"Sanjarenje"</string>
     <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
     <string name="quick_settings_dnd_label" msgid="8735855737575028208">"Ne ometaj"</string>
     <string name="quick_settings_dnd_priority_label" msgid="483232950670692036">"Samo prioritetni prekidi"</string>
@@ -272,8 +260,6 @@
     <string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nema dostupnih uparenih uređaja"</string>
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Osvjetljenje"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatsko rotiranje"</string>
-    <string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatsko rotiranje ekrana"</string>
-    <string name="accessibility_quick_settings_rotation_value" msgid="1428962304214992318">"Postaviti način rada: <xliff:g id="ID_1">%s</xliff:g>"</string>
     <string name="quick_settings_rotation_locked_label" msgid="6359205706154282377">"Rotiranje je zaključano"</string>
     <string name="quick_settings_rotation_locked_portrait_label" msgid="5102691921442135053">"Uspravno"</string>
     <string name="quick_settings_rotation_locked_landscape_label" msgid="8553157770061178719">"Vodoravno"</string>
@@ -292,7 +278,6 @@
     <string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nije povezano"</string>
     <string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nema mreže"</string>
     <string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi isključen"</string>
-    <string name="quick_settings_wifi_on_label" msgid="7607810331387031235">"Wi-Fi uključen"</string>
     <string name="quick_settings_wifi_detail_empty_text" msgid="269990350383909226">"Nema dostupnih Wi-Fi mreža"</string>
     <string name="quick_settings_cast_title" msgid="7709016546426454729">"Prebacivanje"</string>
     <string name="quick_settings_casting" msgid="6601710681033353316">"Prebacivanje"</string>
@@ -328,7 +313,6 @@
     <string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> je onemogućena u sigurnom načinu rada."</string>
     <string name="recents_stack_action_button_label" msgid="6593727103310426253">"Obriši sve"</string>
     <string name="recents_incompatible_app_message" msgid="5075812958564082451">"Aplikacija ne podržava dijeljenje ekrana."</string>
-    <string name="recents_drag_hint_message" msgid="2649739267073203985">"Povucite ovdje za korištenje podijeljenog ekrana"</string>
     <string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Podjela po horizontali"</string>
     <string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Podjela po vertikali"</string>
     <string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Prilagođena podjela"</string>
@@ -346,8 +330,7 @@
     <string name="zen_silence_introduction" msgid="3137882381093271568">"Ovim se blokiraju SVI zvukovi i vibracije, uključujući alarme, muziku, video zapise i igre."</string>
     <string name="keyguard_more_overflow_text" msgid="9195222469041601365">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="1288875699658819755">"Prikaži manje važna obavještenja ispod"</string>
-    <!-- no translation found for notification_tap_again (7590196980943943842) -->
-    <skip />
+    <string name="notification_tap_again" msgid="8524949573675922138">"Dodirnite ponovo da otvorite"</string>
     <string name="keyguard_unlock" msgid="8043466894212841998">"Prevucite prema gore da otključate"</string>
     <string name="phone_hint" msgid="4872890986869209950">"Prevucite preko ikone da otvorite telefon"</string>
     <string name="voice_hint" msgid="8939888732119726665">"Prevucite preko ikone za glasovnu pomoć"</string>
@@ -425,7 +408,7 @@
     <string name="accessibility_volume_expand" msgid="5946812790999244205">"Proširi"</string>
     <string name="accessibility_volume_collapse" msgid="3609549593031810875">"Skupi"</string>
     <string name="screen_pinning_title" msgid="3273740381976175811">"Ekran je prikačen"</string>
-    <string name="screen_pinning_description" msgid="7238941806855968768">"Ovim ekran ostaje prikazan dok ga ne otkačite. Da biste ga otkačili dodirnite i držite Nazad."</string>
+    <string name="screen_pinning_description" msgid="3577937698406151604">"Ovim ekran ostaje prikazan dok ga ne otkačite. Da biste ga otkačili dodirnite i držite Nazad."</string>
     <string name="screen_pinning_positive" msgid="3783985798366751226">"Jasno mi je"</string>
     <string name="screen_pinning_negative" msgid="3741602308343880268">"Ne, hvala"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Želite li sakriti <xliff:g id="TILE_LABEL">%1$s</xliff:g>?"</string>
@@ -435,15 +418,13 @@
     <string name="volumeui_prompt_allow" msgid="7954396902482228786">"Dozvoli"</string>
     <string name="volumeui_prompt_deny" msgid="5720663643411696731">"Odbij"</string>
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je dijaloški okvir za jačinu zvuka"</string>
-    <string name="volumeui_notification_text" msgid="8819536904234337445">"Dodirnite za povrat originala."</string>
+    <string name="volumeui_notification_text" msgid="1826889705095768656">"Dodirnite da vratite original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Koristite svoj profil za posao"</string>
     <!-- String.format failed for translation -->
     <!-- no translation found for volume_stream_content_description_unmute (4436631538779230857) -->
     <skip />
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Dodirnite za postavljanje vibracije. Zvukovi usluga pristupačnosti mogu biti isključeni."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Dodirnite da isključite zvuk. Zvukovi usluga pristupačnosti mogu biti isključeni."</string>
-    <string name="volume_dialog_accessibility_shown_message" msgid="1834631467074259998">"Prikazane kontrole jačine zvuka za: %s. Prevucite prema gore za odbacivanje."</string>
-    <string name="volume_dialog_accessibility_dismissed_message" msgid="51543526013711399">"Kontrole jačine zvuka sakrivene"</string>
     <string name="system_ui_tuner" msgid="708224127392452018">"Podešavač za korisničko sučelje sistema"</string>
     <string name="show_battery_percentage" msgid="5444136600512968798">"Prikaži ugrađeni postotak baterije"</string>
     <string name="show_battery_percentage_summary" msgid="3215025775576786037">"Prikazuje postotak nivoa baterije unutar ikone na statusnoj traci kada se baterija ne puni"</string>
@@ -488,24 +469,19 @@
     <string name="block" msgid="2734508760962682611">"Blokiraj sva obavještenja"</string>
     <string name="do_not_silence" msgid="6878060322594892441">"Nemoj utišati"</string>
     <string name="do_not_silence_block" msgid="4070647971382232311">"Nemoj utišati ili blokirati"</string>
-    <string name="tuner_full_importance_settings" msgid="3207312268609236827">"Kontrole obavještenja o napajanju"</string>
-    <string name="tuner_full_importance_settings_on" msgid="7545060756610299966">"Uključeno"</string>
-    <string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"Isključeno"</string>
-    <string name="power_notification_controls_description" msgid="4372459941671353358">"Uz kontrolu obavještenja o napajanju, možete postaviti nivo značaja obavještenja iz aplikacije, i to od nivoa 0 do 5. \n\n"<b>"Nivo 5"</b>" \n- Prikaži na vrhu liste obavještenja \n- Dopusti prekid prikaza cijelog ekrana \n- Uvijek izviruj \n\n"<b>"Nvio 4"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Uvijek izviruj \n\n"<b>"Nivo 3"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Nikad ne izviruj \n\n"<b>"Nivo 2"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Nikad ne izviruj \n- Nikada ne puštaj zvuk ili vibraciju \n\n"<b>"Nivo 1"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Nikada ne izviruj \n- Nikada ne puštaj zvuk ili vibraciju \n- Sakrij sa ekrana za zaključavanje i statusne trake \n- Prikaži na dnu liste obavještenja \n\n"<b>"Nivo 0"</b>" \n- Blokiraj sva obavještenja iz aplikacije"</string>
-    <string name="user_unspecified_importance" msgid="361613856933432117">"Značaj: Automatski"</string>
-    <string name="blocked_importance" msgid="5035073235408414397">"Značaj: Nivo 0"</string>
-    <string name="min_importance" msgid="560779348928574878">"Značaj: Nivo 1"</string>
-    <string name="low_importance" msgid="7571498511534140">"Značaj: Nivo 2"</string>
-    <string name="default_importance" msgid="7609889614553354702">"Značaj: Nivo 3"</string>
-    <string name="high_importance" msgid="3441537905162782568">"Značaj: Nivo 4"</string>
-    <string name="max_importance" msgid="4880179829869865275">"Značaj: Nivo 5"</string>
-    <string name="notification_importance_user_unspecified" msgid="2868359605125272874">"Aplikacija određuje važnost svakog obavještenja."</string>
-    <string name="notification_importance_blocked" msgid="4237497046867398057">"Nikad ne prikazuj obavještenja iz ove aplikacije"</string>
-    <string name="notification_importance_min" msgid="7844224511187027155">"Bez prekidanja prikaza cijelog ekrana, izvirivanja, zvuka ili vibracije. Sakriti sa ekrana za zaključavanje i statusne trake."</string>
-    <string name="notification_importance_low" msgid="7950291702044409847">"Bez prekidanja prikaza cijelog ekrana, izvirivanja, zvuka ili vibracije."</string>
-    <string name="notification_importance_default" msgid="5924405820269074915">"Bez izvirivanja ili prekidanja prikaza cijelog ekrana."</string>
-    <string name="notification_importance_high" msgid="1729480727023990427">"Uvijek izviruj. Bez prekidanja prikaza cijelog ekrana."</string>
-    <string name="notification_importance_max" msgid="2508384624461849111">"Uvijek izviruj i dopusti prekid prikaza cijelog ekrana."</string>
+    <string name="tuner_full_importance_settings" msgid="8103289238676424226">"Prikaži kompletne postavke za određivanje značaja"</string>
+    <string name="blocked_importance" msgid="5198578988978234161">"Blokirano"</string>
+    <string name="min_importance" msgid="1901894910809414782">"Minimalni značaj"</string>
+    <string name="low_importance" msgid="4109929986107147930">"Mali značaj"</string>
+    <string name="default_importance" msgid="8192107689995742653">"Normalan značaj"</string>
+    <string name="high_importance" msgid="1527066195614050263">"Visok značaj"</string>
+    <string name="max_importance" msgid="5089005872719563894">"Hitan značaj"</string>
+    <string name="notification_importance_blocked" msgid="2397192642657872872">"Nikada ne prikazuj ova obavještenja"</string>
+    <string name="notification_importance_min" msgid="1938190340516905748">"Nečujno prikaži na dnu spiska obavještenja"</string>
+    <string name="notification_importance_low" msgid="3657252049508213048">"Nečujno prikaži ova obavještenja"</string>
+    <string name="notification_importance_default" msgid="4466466472622442175">"Dozvolite zvuk na ovim obavještenjima"</string>
+    <string name="notification_importance_high" msgid="2135428926525093825">"Kratko prikaži na ekranu i dozvoli zvuk"</string>
+    <string name="notification_importance_max" msgid="5806278962376556491">"Prikaži na vrhu liste obavještenja, kratko prikaži na ekranu i dozvoli zvuk"</string>
     <string name="notification_more_settings" msgid="816306283396553571">"Više postavki"</string>
     <string name="notification_done" msgid="5279426047273930175">"Gotovo"</string>
     <string name="notification_gear_accessibility" msgid="94429150213089611">"Kontrole <xliff:g id="APP_NAME">%1$s</xliff:g> obavještenja"</string>
@@ -604,7 +580,7 @@
     <string name="keycode_description" msgid="1403795192716828949">"Dugmad za kodiranje tipki omogućavaju da se tipke sa tipkovnice dodaju u navigacionu traku. Kada se pritisnu, oni oponašaju izabranu tipku tastature. Kao prvo, tipka mora biti izabrana za dugme, a nakon toga se bira slika koja će biti prikazana na njemu."</string>
     <string name="select_keycode" msgid="7413765103381924584">"Odaberite dugme na tastaturi"</string>
     <string name="preview" msgid="9077832302472282938">"Pregledaj"</string>
-    <string name="drag_to_add_tiles" msgid="7058945779098711293">"Povucite da dodate polja"</string>
+    <string name="drag_to_add_tiles" msgid="7058945779098711293">"Povucite da biste dodali polja"</string>
     <string name="drag_to_remove_tiles" msgid="3361212377437088062">"Prevucite ovdje za uklanjanje"</string>
     <string name="qs_edit" msgid="2232596095725105230">"Uredi"</string>
     <string name="tuner_time" msgid="6572217313285536011">"Vrijeme"</string>
@@ -620,16 +596,10 @@
   </string-array>
     <string name="other" msgid="4060683095962566764">"Ostalo"</string>
     <string name="accessibility_divider" msgid="5903423481953635044">"Razdjelnik ekrana"</string>
-    <string name="accessibility_action_divider_left_full" msgid="2801570521881574972">"Lijevo cijeli ekran"</string>
-    <string name="accessibility_action_divider_left_70" msgid="3612060638991687254">"Lijevo 70%"</string>
-    <string name="accessibility_action_divider_left_50" msgid="1248083470322193075">"Lijevo 50%"</string>
-    <string name="accessibility_action_divider_left_30" msgid="543324403127069386">"Lijevo 30%"</string>
-    <string name="accessibility_action_divider_right_full" msgid="4639381073802030463">"Desno cijeli ekran"</string>
-    <string name="accessibility_action_divider_top_full" msgid="5357010904067731654">"Gore cijeli ekran"</string>
-    <string name="accessibility_action_divider_top_70" msgid="5090779195650364522">"Gore 70%"</string>
-    <string name="accessibility_action_divider_top_50" msgid="6385859741925078668">"Gore 50%"</string>
-    <string name="accessibility_action_divider_top_30" msgid="6201455163864841205">"Gore 30%"</string>
-    <string name="accessibility_action_divider_bottom_full" msgid="301433196679548001">"Dole cijeli ekran"</string>
+    <string name="accessibility_action_divider_move_down" msgid="704893304141890042">"Pomjeri dolje"</string>
+    <string name="accessibility_action_divider_move_up" msgid="4580103171609248006">"Pomjeri gore"</string>
+    <string name="accessibility_action_divider_move_left" msgid="9218189832115847253">"Pomjeri lijevo"</string>
+    <string name="accessibility_action_divider_move_right" msgid="4671522715182567972">"Pomjeri desno"</string>
     <string name="accessibility_qs_edit_tile_label" msgid="8374924053307764245">"Pozicija <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dvaput dodirnite za uređivanje."</string>
     <string name="accessibility_qs_edit_add_tile_label" msgid="8133209638023882667">"<xliff:g id="TILE_NAME">%1$s</xliff:g> Dvaput dodirnite za dodavanje."</string>
     <string name="accessibility_qs_edit_position_label" msgid="5055306305919289819">"Pozicija <xliff:g id="POSITION">%1$d</xliff:g>. Dvaput dodirnite za odabir."</string>
@@ -639,17 +609,9 @@
     <string name="accessibility_qs_edit_tile_removed" msgid="8584304916627913440">"<xliff:g id="TILE_NAME">%1$s</xliff:g> je uklonjen"</string>
     <string name="accessibility_qs_edit_tile_moved" msgid="4343693412689365038">"<xliff:g id="TILE_NAME">%1$s</xliff:g> je premješten na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string>
     <string name="accessibility_desc_quick_settings_edit" msgid="8073587401747016103">"Uređivanje brzih postavki"</string>
-    <string name="accessibility_desc_notification_icon" msgid="8352414185263916335">"<xliff:g id="ID_1">%1$s</xliff:g> obavještenje: <xliff:g id="ID_2">%2$s</xliff:g>"</string>
     <string name="dock_forced_resizable" msgid="5914261505436217520">"Aplikacija možda neće raditi na podijeljenom ekranu"</string>
     <string name="dock_non_resizeble_failed_to_dock_text" msgid="3871617304250207291">"Aplikacija ne podržava dijeljenje ekrana."</string>
-    <string name="accessibility_quick_settings_settings" msgid="6132460890024942157">"Otvori postavke."</string>
-    <string name="accessibility_quick_settings_expand" msgid="2375165227880477530">"Otvoriti brze postavke."</string>
-    <string name="accessibility_quick_settings_collapse" msgid="1792625797142648105">"Zatvoriti brze postavke."</string>
-    <string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Alarm postavljen."</string>
-    <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"Prijavljeni ste kao <xliff:g id="ID_1">%s</xliff:g>"</string>
-    <string name="accessibility_quick_settings_no_internet" msgid="31890692343084075">"Nema internet veze."</string>
-    <string name="accessibility_quick_settings_open_details" msgid="4230931801728005194">"Otvori detalje."</string>
-    <string name="accessibility_quick_settings_open_settings" msgid="7806613775728380737">"Otvori postavke za: <xliff:g id="ID_1">%s</xliff:g>."</string>
-    <string name="accessibility_quick_settings_edit" msgid="7839992848995240393">"Urediti raspored postavki."</string>
-    <string name="accessibility_quick_settings_page" msgid="5032979051755200721">"Stranica <xliff:g id="ID_1">%1$d</xliff:g> od <xliff:g id="ID_2">%2$d</xliff:g>"</string>
+    <string name="accessibility_quick_settings_expand" msgid="4982484435775933070">"Proširite brze postavke."</string>
+    <!-- no translation found for accessibility_quick_settings_page (5032979051755200721) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-bs-rBA/strings_tv.xml b/packages/SystemUI/res/values-bs-rBA/strings_tv.xml
index 40347dc..65c0982 100644
--- a/packages/SystemUI/res/values-bs-rBA/strings_tv.xml
+++ b/packages/SystemUI/res/values-bs-rBA/strings_tv.xml
@@ -20,14 +20,14 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="pip_close" msgid="3480680679023423574">"Zatvori PIP"</string>
-    <string name="pip_fullscreen" msgid="8604643018538487816">"Cijeli ekran"</string>
-    <string name="pip_play" msgid="674145557658227044">"Pokreni"</string>
-    <string name="pip_pause" msgid="8412075640017218862">"Pauziraj"</string>
+    <!-- no translation found for pip_fullscreen (8604643018538487816) -->
+    <skip />
+    <!-- no translation found for pip_play (674145557658227044) -->
+    <skip />
+    <!-- no translation found for pip_pause (8412075640017218862) -->
+    <skip />
     <string name="pip_hold_home" msgid="340086535668778109">"Za kontr. PIP držite "<b>"HOME"</b></string>
-    <string name="pip_onboarding_title" msgid="7850436557670253991">"Slika u slici"</string>
-    <string name="pip_onboarding_description" msgid="4028124563309465267">"Ovim videozapis ostaje prikazan sve dok pokrenete sljedeći. Pritisnite i držite "<b>" POČETAK "</b>" za kontrole PIP-a."</string>
+    <string name="pip_onboarding_description" msgid="2882896641362814195">"Za kontrolu PIP, pritisnite i držite dugme POČETAK"</string>
     <string name="pip_onboarding_button" msgid="3957426748484904611">"Jasno mi je"</string>
     <string name="recents_tv_dismiss" msgid="3555093879593377731">"Odbaci"</string>
-  <string-array name="recents_tv_blacklist_array">
-  </string-array>
 </resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 789fdc3..a3054f2 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Itinerància"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> és el diàleg de volum"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Toca la notificació per restaurar el valor original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Estàs utilitzant el perfil professional"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Truca"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Fes sonar"</item>
+    <item msgid="1850038478268896762">"Multimèdia"</item>
+    <item msgid="8265110906352372092">"Alarma"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Toca per activar el so."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Toca per activar la vibració. Pot ser que els serveis d\'accessibilitat se silenciïn."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Toca per silenciar el so. Pot ser que els serveis d\'accessibilitat se silenciïn."</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 68ce2cb..e29cd82 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -440,6 +441,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je dialog hlasitosti"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Klepnutím obnovíte původní nastavení."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Používáte pracovní profil"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Hovor"</item>
+    <item msgid="5997713001067658559">"Systém"</item>
+    <item msgid="7858983209929864160">"Prozvonit"</item>
+    <item msgid="1850038478268896762">"Média"</item>
+    <item msgid="8265110906352372092">"Budík"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Klepnutím zapnete zvuk."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Klepnutím aktivujete režim vibrací. Služby přístupnosti mohou být ztlumeny."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Klepnutím vypnete zvuk. Služby přístupnosti mohou být ztlumeny."</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 603d1e0..d0dcdc7 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"Over 4G"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> er dialogboksen for lydstyrke"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tryk for at gendanne det oprindelige."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Du bruger din arbejdsprofil"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Opkald"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Ring"</item>
+    <item msgid="1850038478268896762">"Medier"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tryk for at slå lyden til."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tryk for at konfigurere til at vibrere. Tilgængelighedstjenester kan blive deaktiveret."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tryk for at slå lyden fra. Lyden i tilgængelighedstjenester kan blive slået fra."</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 47040db..e6fe48c 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> regelt die Lautstärke."</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tippe, um das Original wiederherzustellen."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Du verwendest dein Arbeitsprofil."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Anruf"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Klingeln lassen"</item>
+    <item msgid="1850038478268896762">"Medien"</item>
+    <item msgid="8265110906352372092">"Wecker"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Zum Aufheben der Stummschaltung tippen."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tippen, um Vibrieren festzulegen. Bedienungshilfen werden unter Umständen stummgeschaltet."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Zum Stummschalten tippen. Bedienungshilfen werden unter Umständen stummgeschaltet."</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 0c3c6ff..4c0e760 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Περιαγωγή"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"Η εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> αποτελεί το παράθυρο διαλόγου ελέγχου έντασης"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Πατήστε για να επαναφέρετε την αρχική μορφή της εικόνας."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Χρησιμοποιείτε το προφίλ εργασίας σας"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Κλήση"</item>
+    <item msgid="5997713001067658559">"Σύστημα"</item>
+    <item msgid="7858983209929864160">"Ήχος κλήσης"</item>
+    <item msgid="1850038478268896762">"Μέσα"</item>
+    <item msgid="8265110906352372092">"Ξυπνητήρι"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Πατήστε για κατάργηση σίγασης."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Πατήστε για ενεργοποιήσετε τη δόνηση. Οι υπηρεσίες προσβασιμότητας ενδέχεται να τεθούν σε σίγαση."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Πατήστε για σίγαση. Οι υπηρεσίες προσβασιμότητας ενδέχεται να τεθούν σε σίγαση."</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 2ede279..3530761 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is the volume dialogue"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tap to restore the original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"You\'re using your work profile"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Call"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Ring"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tap to unmute."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tap to set to vibrate. Accessibility services may be muted."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tap to mute. Accessibility services may be muted."</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 2ede279..3530761 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is the volume dialogue"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tap to restore the original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"You\'re using your work profile"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Call"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Ring"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tap to unmute."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tap to set to vibrate. Accessibility services may be muted."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tap to mute. Accessibility services may be muted."</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 2ede279..3530761 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is the volume dialogue"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tap to restore the original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"You\'re using your work profile"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Call"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Ring"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tap to unmute."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tap to set to vibrate. Accessibility services may be muted."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tap to mute. Accessibility services may be muted."</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index cd08f34..de7832f 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> es el cuadro de diálogo de volumen."</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Presiona para restablecer el original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Estás usando tu perfil de trabajo"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Llamar"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Hacer sonar"</item>
+    <item msgid="1850038478268896762">"Multimedia"</item>
+    <item msgid="8265110906352372092">"Alarma"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Presiona para dejar de silenciar."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Presiona para establecer el modo vibración. Es posible que los servicios de accesibilidad estén silenciados."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Presiona para silenciar. Es posible que los servicios de accesibilidad estén silenciados."</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 5e0fa43e..e078865 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5 G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Itinerancia"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> es el cuadro de diálogo de volumen"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Toca para restaurar el original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Estás usando tu perfil de trabajo"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Llamar"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Hacer sonar"</item>
+    <item msgid="1850038478268896762">"Multimedia"</item>
+    <item msgid="8265110906352372092">"Alarma"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Toca para activar el sonido."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Toca para poner el dispositivo en vibración. Los servicios de accesibilidad pueden silenciarse."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Toca para silenciar. Los servicios de accesibilidad pueden silenciarse."</string>
diff --git a/packages/SystemUI/res/values-et-rEE/strings.xml b/packages/SystemUI/res/values-et-rEE/strings.xml
index 405d351..b0b56c5 100644
--- a/packages/SystemUI/res/values-et-rEE/strings.xml
+++ b/packages/SystemUI/res/values-et-rEE/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Rändlus"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> on helitugevuse dialoog"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Puudutage originaali taastamiseks."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Kasutate oma tööprofiili"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Helistamine"</item>
+    <item msgid="5997713001067658559">"Süsteem"</item>
+    <item msgid="7858983209929864160">"Helin"</item>
+    <item msgid="1850038478268896762">"Meedia"</item>
+    <item msgid="8265110906352372092">"Äratus"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Puudutage vaigistuse tühistamiseks."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Puudutage värinarežiimi määramiseks. Juurdepääsetavuse teenused võidakse vaigistada."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Puudutage vaigistamiseks. Juurdepääsetavuse teenused võidakse vaigistada."</string>
diff --git a/packages/SystemUI/res/values-eu-rES/strings.xml b/packages/SystemUI/res/values-eu-rES/strings.xml
index d8e3446..5308811 100644
--- a/packages/SystemUI/res/values-eu-rES/strings.xml
+++ b/packages/SystemUI/res/values-eu-rES/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Ibiltaritza"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> da bolumenaren leihoa"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Sakatu jatorrizkora leheneratzeko."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Work profila erabiltzen ari zara"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Deitu"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Tonua"</item>
+    <item msgid="1850038478268896762">"Multimedia-edukia"</item>
+    <item msgid="8265110906352372092">"Alarma"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth konexioa"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Sakatu audioa aktibatzeko."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Sakatu dardara ezartzeko. Baliteke erabilerraztasun-eginbideen audioa desaktibatzea."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Sakatu audioa desaktibatzeko. Baliteke erabilerraztasun-eginbideen audioa desaktibatzea."</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 7c77d59..cfe8078 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+‎"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"رومینگ"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> کنترل‌کننده صدا است"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"برای بازیابی نسخه اصلی ضربه بزنید."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"درحال استفاده از نمایه کاری‌تان هستید"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"تماس"</item>
+    <item msgid="5997713001067658559">"سیستم"</item>
+    <item msgid="7858983209929864160">"تماس"</item>
+    <item msgid="1850038478268896762">"رسانه"</item>
+    <item msgid="8265110906352372092">"هشدار"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"بلوتوث"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"‏%1$s. برای باصدا کردن ضربه بزنید."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"‏%1$s. برای تنظیم روی لرزش ضربه بزنید. ممکن است سرویس‌های دسترس‌پذیری بی‌صدا شوند."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"‏%1$s. برای بی‌صدا کردن ضربه بزنید. ممکن است سرویس‌های دسترس‌پذیری بی‌صدا شوند."</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 3ae25e1..2a0f8d4 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> on äänenvoimakkuusvalinta."</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Palauta alkuperäinen napauttamalla."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Käytät työprofiilia."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Soita"</item>
+    <item msgid="5997713001067658559">"Järjestelmä"</item>
+    <item msgid="7858983209929864160">"Soittoääni"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Herätys"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Poista mykistys koskettamalla."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Siirry värinätilaan koskettamalla. Myös esteettömyyspalvelut saattavat mykistyä."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Mykistä koskettamalla. Myös esteettömyyspalvelut saattavat mykistyä."</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 9aa176f..2cde9b72 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3G+"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Itinérance"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> correspond à la boîte de dialogue du volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Touchez pour restaurer l\'original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Vous utilisez votre profil professionnel."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Appeler"</item>
+    <item msgid="5997713001067658559">"Système"</item>
+    <item msgid="7858983209929864160">"Sonnerie"</item>
+    <item msgid="1850038478268896762">"Multimédia"</item>
+    <item msgid="8265110906352372092">"Alarme"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Touchez pour réactiver le son."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Touchez pour activer les vibrations. Il est possible de couper le son des services d\'accessibilité."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Touchez pour couper le son. Il est possible de couper le son des services d\'accessibilité."</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index b6c08ca..585d439 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3G+"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Itinérance"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> correspond à la boîte de dialogue du volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Appuyez pour rétablir la version d\'origine."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Vous utilisez votre profil professionnel."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Appeler"</item>
+    <item msgid="5997713001067658559">"Système"</item>
+    <item msgid="7858983209929864160">"Faire sonner"</item>
+    <item msgid="1850038478268896762">"Multimédia"</item>
+    <item msgid="8265110906352372092">"Alarme"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Appuyez pour ne plus ignorer."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Appuyez pour mettre en mode vibreur. Vous pouvez ignorer les services d\'accessibilité."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Appuyez pour ignorer. Vous pouvez ignorer les services d\'accessibilité."</string>
diff --git a/packages/SystemUI/res/values-gl-rES/strings.xml b/packages/SystemUI/res/values-gl-rES/strings.xml
index c18bae7..6274e36 100644
--- a/packages/SystemUI/res/values-gl-rES/strings.xml
+++ b/packages/SystemUI/res/values-gl-rES/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Itinerancia"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é o cadro de diálogo de volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Toca para restaurar o orixinal."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Estás usando o perfil de traballo"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Chamar"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Facer soar"</item>
+    <item msgid="1850038478268896762">"Multimedia"</item>
+    <item msgid="8265110906352372092">"Alarma"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Toca para activar o son."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Toca para establecer a vibración. Pódense silenciar os servizos de accesibilidade."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Toca para silenciar. Pódense silenciar os servizos de accesibilidade."</string>
diff --git a/packages/SystemUI/res/values-gu-rIN/strings.xml b/packages/SystemUI/res/values-gu-rIN/strings.xml
index 8c00ebd..a992f8e 100644
--- a/packages/SystemUI/res/values-gu-rIN/strings.xml
+++ b/packages/SystemUI/res/values-gu-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"રોમિંગ"</string>
@@ -344,8 +345,7 @@
     <string name="zen_silence_introduction" msgid="3137882381093271568">"એલાર્મ્સ, સંગીત, વિડિઓઝ અને રમતો સહિત તમામ ધ્વનિઓ અને વાઇબ્રેશન્સને આ અવરોધિત કરે છે."</string>
     <string name="keyguard_more_overflow_text" msgid="9195222469041601365">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="1288875699658819755">"નીચે ઓછી તાકીદની સૂચનાઓ"</string>
-    <!-- no translation found for notification_tap_again (7590196980943943842) -->
-    <skip />
+    <string name="notification_tap_again" msgid="7590196980943943842">"ખોલવા માટે ફરીથી ટૅપ કરો"</string>
     <string name="keyguard_unlock" msgid="8043466894212841998">"અનલૉક કરવા માટે ઉપર સ્વાઇપ કરો"</string>
     <string name="phone_hint" msgid="4872890986869209950">"ફોન માટે આયકનમાંથી સ્વાઇપ કરો"</string>
     <string name="voice_hint" msgid="8939888732119726665">"વૉઇસ સહાય માટે આયકનમાંથી સ્વાઇપ કરો"</string>
@@ -435,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> એ વૉલ્યૂમ સંવાદ છે"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"મૂળને પુનઃસ્થાપિત કરવા માટે ટૅપ કરો."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"તમે તમારી કાર્ય પ્રોફાઇલનો ઉપયોગ કરી રહ્યાં છો"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"કૉલ કરો"</item>
+    <item msgid="5997713001067658559">"સિસ્ટમ"</item>
+    <item msgid="7858983209929864160">"રિંગ કરો"</item>
+    <item msgid="1850038478268896762">"મીડિયા"</item>
+    <item msgid="8265110906352372092">"એલાર્મ"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. અનમ્યૂટ કરવા માટે ટૅપ કરો."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. વાઇબ્રેટ પર સેટ કરવા માટે ટૅપ કરો. ઍક્સેસિબિલિટી સેવાઓ મ્યૂટ કરવામાં આવી શકે છે."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. મ્યૂટ કરવા માટે ટૅપ કરો. ઍક્સેસિબિલિટી સેવાઓ મ્યૂટ કરવામાં આવી શકે છે."</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 983faed9..a92dc93 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"रोमिंग"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> वॉल्यूम संवाद है"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"मूल को पुन: स्थापित करने के लिए टैप करें."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"आप अपनी कार्य प्रोफ़ाइल का उपयोग कर रहे हैं"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"कॉल करें"</item>
+    <item msgid="5997713001067658559">"सिस्‍टम"</item>
+    <item msgid="7858983209929864160">"रिंग करें"</item>
+    <item msgid="1850038478268896762">"मीडिया"</item>
+    <item msgid="8265110906352372092">"अलार्म"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ब्लूटूथ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. अनम्यूट करने के लिए टैप करें."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. कंपन पर सेट करने के लिए टैप करें. एक्सेस-योग्यता सेवाएं म्यूट हो सकती हैं."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. म्यूट करने के लिए टैप करें. एक्सेस-योग्यता सेवाएं म्यूट हो सकती हैं."</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index e1afb4d..07fc68a 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -144,6 +144,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G i više"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> predstavlja dijaloški okvir za upravljanje glasnoćom"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Dodirnite da biste vratili izvornik."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Upotrebljavate radni profil"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Poziv"</item>
+    <item msgid="5997713001067658559">"Sustav"</item>
+    <item msgid="7858983209929864160">"Zvonjenje"</item>
+    <item msgid="1850038478268896762">"Mediji"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Dodirnite da biste uključili zvuk."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Dodirnite da biste postavili na vibraciju. Usluge pristupačnosti možda neće imati zvuk."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Dodirnite da biste isključili zvuk. Usluge pristupačnosti možda neće imati zvuk."</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index ca2ca61..8fa6757 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Barangolás"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"A(z) <xliff:g id="APP_NAME">%1$s</xliff:g> alkalmazás kezeli a hangerőt"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Koppintson az eredeti visszaállításához."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"A munkaprofilt használja"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Hívás"</item>
+    <item msgid="5997713001067658559">"Rendszer"</item>
+    <item msgid="7858983209929864160">"Csörgetés"</item>
+    <item msgid="1850038478268896762">"Média"</item>
+    <item msgid="8265110906352372092">"Ébresztő"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Koppintson a némítás megszüntetéséhez."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Koppintson a rezgés beállításához. Előfordulhat, hogy a kisegítő lehetőségek szolgáltatásai le vannak némítva."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Koppintson a némításhoz. Előfordulhat, hogy a kisegítő lehetőségek szolgáltatásai le vannak némítva."</string>
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index 5d01d15..f1c3eba 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Ռոումինգ"</string>
@@ -423,7 +424,7 @@
     <string name="accessibility_volume_collapse" msgid="3609549593031810875">"Կոծկել"</string>
     <string name="screen_pinning_title" msgid="3273740381976175811">"Էկրանն ամրացված է"</string>
     <string name="screen_pinning_description" msgid="7238941806855968768">"Էկրանը կմնա տեսադաշտում, մինչև այն ապամրացնեք: Ապամրացնելու համար հպեք և պահեք Հետ կոճակը:"</string>
-    <string name="screen_pinning_positive" msgid="3783985798366751226">"Հասկանալի է"</string>
+    <string name="screen_pinning_positive" msgid="3783985798366751226">"Եղավ"</string>
     <string name="screen_pinning_negative" msgid="3741602308343880268">"Ոչ, շնորհակալություն"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"Թաքցնե՞լ <xliff:g id="TILE_LABEL">%1$s</xliff:g>-ը:"</string>
     <string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Այն դարձյալ կհայտնվի, երբ նորից միացնեք կարգավորումներում:"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>-ը ձայնի ուժգնության երկխոսության հավելված է"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Հպեք՝ բնօրինակը վերականգնելու համար:"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Դուք օգտագործում եք ձեր աշխատանքային պրոֆիլը"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Զանգել"</item>
+    <item msgid="5997713001067658559">"Համակարգ"</item>
+    <item msgid="7858983209929864160">"Զանգ"</item>
+    <item msgid="1850038478268896762">"Մեդիա"</item>
+    <item msgid="8265110906352372092">"Զարթուցիչ"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s: Հպեք՝ ձայնը միացնելու համար:"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s: Հպեք՝ թրթռումը միացնելու համար: Մատչելիության ծառայությունների ձայնը կարող է անջատվել:"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s: Հպեք՝ ձայնն անջատելու համար: Մատչելիության ծառայությունների ձայնը կարող է անջատվել:"</string>
@@ -464,7 +477,7 @@
     <string name="tuner_warning_title" msgid="7094689930793031682">"Զվարճանք մեկ՝ որոշակի մարդու համար"</string>
     <string name="tuner_warning" msgid="8730648121973575701">"Համակարգի ՕՄ-ի ընդունիչը հնարավորություն է տալիս հարմարեցնել Android-ի օգտվողի միջերեսը: Այս փորձնական գործառույթները կարող են հետագա թողարկումների մեջ փոփոխվել, խափանվել կամ ընդհանրապես չհայտնվել: Եթե շարունակում եք, զգուշացեք:"</string>
     <string name="tuner_persistent_warning" msgid="8597333795565621795">"Այս փորձնական գործառույթները կարող են հետագա թողարկումների մեջ փոփոխվել, խափանվել կամ ընդհանրապես չհայտնվել: Եթե շարունակում եք, զգուշացեք:"</string>
-    <string name="got_it" msgid="2239653834387972602">"Հասկանալի է"</string>
+    <string name="got_it" msgid="2239653834387972602">"Եղավ"</string>
     <string name="tuner_toast" msgid="603429811084428439">"Համակարգի ՕՄ-ի ընդունիչը ավելացվել է կարգավորումներին"</string>
     <string name="remove_from_settings" msgid="8389591916603406378">"Հեռացնել կարգավորումներից"</string>
     <string name="remove_from_settings_prompt" msgid="6069085993355887748">"Հեռացնե՞լ Համակարգի ՕՄ-ի ընդունիչը կարգավորումներից և չօգտվել այլևս նրա գործառույթներից:"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 293cd00..1678e64 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> adalah dialog volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Ketuk untuk memulihkan aslinya."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Anda menggunakan profil kerja"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Telepon"</item>
+    <item msgid="5997713001067658559">"Sistem"</item>
+    <item msgid="7858983209929864160">"Dering"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Ketuk untuk menyuarakan."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Ketuk untuk menyetel agar bergetar. Layanan aksesibilitas mungkin dibisukan."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Ketuk untuk membisukan. Layanan aksesibilitas mungkin dibisukan."</string>
diff --git a/packages/SystemUI/res/values-is-rIS/strings.xml b/packages/SystemUI/res/values-is-rIS/strings.xml
index 05e6256..d298eb4 100644
--- a/packages/SystemUI/res/values-is-rIS/strings.xml
+++ b/packages/SystemUI/res/values-is-rIS/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Reiki"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> er hljóðstyrksvalmyndin"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Ýttu til að færa í upprunalegt horf."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Þú ert að nota vinnusniðið"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Hringja"</item>
+    <item msgid="5997713001067658559">"Kerfi"</item>
+    <item msgid="7858983209929864160">"Hringing"</item>
+    <item msgid="1850038478268896762">"Margmiðlun"</item>
+    <item msgid="8265110906352372092">"Vekjari"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Ýttu til að hætta að þagga."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Ýttu til að stilla á titring. Hugsanlega verður slökkt á hljóði aðgengisþjónustu."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Ýttu til að þagga. Hugsanlega verður slökkt á hljóði aðgengisþjónustu."</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index e8aacd5..0fd8fdc 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> rappresenta la finestra di dialogo relativa al volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tocca per ripristinare l\'originale."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Stai utilizzando il profilo di lavoro"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Chiamata"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Suoneria"</item>
+    <item msgid="1850038478268896762">"Contenuti multimediali"</item>
+    <item msgid="8265110906352372092">"Sveglia"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tocca per riattivare l\'audio."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tocca per attivare la vibrazione. L\'audio dei servizi di accessibilità può essere disattivato."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tocca per disattivare l\'audio. L\'audio dei servizi di accessibilità può essere disattivato."</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 2f1393e..40ce8e6 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"+4G"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"נדידה"</string>
@@ -438,6 +439,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> הוא תיבת הדו-שיח של עוצמת הקול"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"הקש כדי לשחזר את המקור."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"אתה משתמש בפרופיל העבודה שלך"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"שיחה"</item>
+    <item msgid="5997713001067658559">"מערכת"</item>
+    <item msgid="7858983209929864160">"השמע צלצול"</item>
+    <item msgid="1850038478268896762">"מדיה"</item>
+    <item msgid="8265110906352372092">"התראה"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"‏%1$s. הקש כדי לבטל את ההשתקה."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"‏%1$s. הקש כדי להגדיר רטט. ייתכן ששירותי הנגישות מושתקים."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"‏%1$s. הקש כדי להשתיק. ייתכן ששירותי הנגישות מושתקים."</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 39b9ea7..eaeeec4 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ローミング中"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>を音量ダイアログとして使用"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"タップすると元に戻ります。"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"仕事用プロファイルを使用しています"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"通話"</item>
+    <item msgid="5997713001067658559">"システム"</item>
+    <item msgid="7858983209929864160">"着信音"</item>
+    <item msgid="1850038478268896762">"メディア"</item>
+    <item msgid="8265110906352372092">"アラーム"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s。タップしてミュートを解除します。"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s。タップしてバイブレーションに設定します。ユーザー補助機能サービスがミュートされる場合があります。"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s。タップしてミュートします。ユーザー補助機能サービスがミュートされる場合があります。"</string>
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka-rGE/strings.xml
index 378b36c..222e24b 100644
--- a/packages/SystemUI/res/values-ka-rGE/strings.xml
+++ b/packages/SystemUI/res/values-ka-rGE/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5გბ"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"როუმინგი"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ხმოვან დიალოგშია"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"შეეხეთ ორიგინალის აღსადგენად."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"თქვენ სამსახურის პროფილს იყენებთ"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"დარეკვა"</item>
+    <item msgid="5997713001067658559">"სისტემა"</item>
+    <item msgid="7858983209929864160">"ზარი"</item>
+    <item msgid="1850038478268896762">"მედია"</item>
+    <item msgid="8265110906352372092">"მაღვიძარა"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. შეეხეთ დადუმების გასაუქმებლად."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. შეეხეთ ვიბრაციაზე დასაყენებლად. შეიძლება დადუმდეს მარტივი წვდომის სერვისებიც."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. შეეხეთ დასადუმებლად. შეიძლება დადუმდეს მარტივი წვდომის სერვისებიც."</string>
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings.xml b/packages/SystemUI/res/values-kk-rKZ/strings.xml
index 1e1544b..a07513a 100644
--- a/packages/SystemUI/res/values-kk-rKZ/strings.xml
+++ b/packages/SystemUI/res/values-kk-rKZ/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3Г"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5Г"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4Г"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"ҰМД"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA (кодтармен бөлінген бірнеше қол жетімділік)"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роуминг"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> — көлем диалогтық терезесі"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Бастапқы қалпына келтіру үшін түртіңіз."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Сіз жұмыс профиліңізді пайдаланып жатырсыз"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Қоңырау шалу"</item>
+    <item msgid="5997713001067658559">"Жүйе"</item>
+    <item msgid="7858983209929864160">"Шылдырлау"</item>
+    <item msgid="1850038478268896762">"Мультимeдиа"</item>
+    <item msgid="8265110906352372092">"Дабыл"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Дыбысын қосу үшін түртіңіз."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Діріл режимін орнату үшін түртіңіз. Арнайы мүмкіндік қызметтерінің дыбысы өшуі мүмкін."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Дыбысын өшіру үшін түртіңіз. Арнайы мүмкіндік қызметтерінің дыбысы өшуі мүмкін."</string>
diff --git a/packages/SystemUI/res/values-km-rKH/strings.xml b/packages/SystemUI/res/values-km-rKH/strings.xml
index 84d3470..1f2a988 100644
--- a/packages/SystemUI/res/values-km-rKH/strings.xml
+++ b/packages/SystemUI/res/values-km-rKH/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"រ៉ូ​មីង"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> គឺជាប្រអប់សម្លេង"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"ប៉ះដើម្បីស្តារច្បាប់ដើម"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"អ្នកកំពុងប្រើប្រវត្តិរូបការងាររបស់អ្នក"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ហៅ"</item>
+    <item msgid="5997713001067658559">"ប្រព័ន្ធ"</item>
+    <item msgid="7858983209929864160">"រោទ៍"</item>
+    <item msgid="1850038478268896762">"មេឌៀ"</item>
+    <item msgid="8265110906352372092">"ម៉ោងរោទ៍"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ប៊្លូធូស"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s។ ប៉ះដើម្បីបើកសំឡេង។"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s។ ប៉ះដើម្បីកំណត់ឲ្យញ័រ។ សេវាកម្មលទ្ធភាពប្រើប្រាស់អាចនឹងត្រូវបានបិទសំឡេង។"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s។ ប៉ះដើម្បីបិទសំឡេង។ សេវាកម្មលទ្ធភាពប្រើប្រាស់អាចនឹងត្រូវបានបិទសំឡេង។"</string>
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index ed48bcb..ce085ce 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ರೋಮಿಂಗ್"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ವಾಲ್ಯೂಮ್ ಸಂವಾದವಾಗಿದೆ"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"ಮೂಲಕ್ಕೆ ಮರುಸ್ಥಾಪಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"ನಿಮ್ಮ ಕೆಲಸದ ಪ್ರೊಫೈಲ್‌ ಅನ್ನು ನೀವು ಬಳಸುತ್ತಿರುವಿರಿ"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ಕರೆಮಾಡಿ"</item>
+    <item msgid="5997713001067658559">"ಸಿಸ್ಟಂ"</item>
+    <item msgid="7858983209929864160">"ಉಂಗುರ"</item>
+    <item msgid="1850038478268896762">"ಮಾಧ್ಯಮ"</item>
+    <item msgid="8265110906352372092">"ಅಲಾರಮ್"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ಬ್ಲೂಟೂತ್‌"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. ಅನ್‌ಮ್ಯೂಟ್‌ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. ಕಂಪನಕ್ಕೆ ಹೊಂದಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ. ಪ್ರವೇಶಿಸುವಿಕೆ ಸೇವೆಗಳನ್ನು ಮ್ಯೂಟ್‌ ಮಾಡಬಹುದು."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. ಮ್ಯೂಟ್ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ. ಪ್ರವೇಶಿಸುವಿಕೆ ಸೇವೆಗಳನ್ನು ಮ್ಯೂಟ್‌ ಮಾಡಬಹುದು."</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 5c46e00..8aec874 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G 이상"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"로밍"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>은(는) 볼륨 대화입니다."</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"원본을 복원하려면 탭하세요."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"직장 프로필을 사용하고 있습니다."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"통화"</item>
+    <item msgid="5997713001067658559">"시스템"</item>
+    <item msgid="7858983209929864160">"벨 울리기"</item>
+    <item msgid="1850038478268896762">"미디어"</item>
+    <item msgid="8265110906352372092">"알람"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"블루투스"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. 탭하여 음소거를 해제하세요."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. 탭하여 진동으로 설정하세요. 접근성 서비스가 음소거될 수 있습니다."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. 탭하여 음소거로 설정하세요. 접근성 서비스가 음소거될 수 있습니다."</string>
diff --git a/packages/SystemUI/res/values-ky-rKG/strings.xml b/packages/SystemUI/res/values-ky-rKG/strings.xml
index 46fed8b..cc88276 100644
--- a/packages/SystemUI/res/values-ky-rKG/strings.xml
+++ b/packages/SystemUI/res/values-ky-rKG/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роуминг"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> үндү катуулатуу диалогу"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Үндүн баштапкы деңгээлин калыбына келтирүү үчүн таптап коюңуз."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Жумуш профилиңизди колдонуп жатасыз"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Чалуу"</item>
+    <item msgid="5997713001067658559">"Тутум"</item>
+    <item msgid="7858983209929864160">"Шыңгыратуу"</item>
+    <item msgid="1850038478268896762">"Мультимедия"</item>
+    <item msgid="8265110906352372092">"Ойготкуч"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Үнүн чыгаруу үчүн таптап коюңуз."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Дирилдөөгө коюу үчүн таптап коюңуз. Атайын мүмкүнчүлүктөр кызматынын үнүн өчүрүп койсо болот."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Үнүн өчүрүү үчүн таптап коюңуз. Атайын мүмкүнчүлүктөр кызматынын үнүн өчүрүп койсо болот."</string>
diff --git a/packages/SystemUI/res/values-lo-rLA/strings.xml b/packages/SystemUI/res/values-lo-rLA/strings.xml
index f8aea26..f692329 100644
--- a/packages/SystemUI/res/values-lo-rLA/strings.xml
+++ b/packages/SystemUI/res/values-lo-rLA/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ໂຣມມິງ"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ແມ່ນ​ໜ້າ​ຕ່າງ​ລະ​ດັບ​ສຽງ"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"ແຕະເພື່ອກູ້ຕົ້ນສະບັບຄືນມາ."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"ທ່ານກຳລັງໃຊ້ໂປຣໄຟລ໌ບ່ອນເຮັດວຽກຂອງທ່ານ"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ໂທ"</item>
+    <item msgid="5997713001067658559">"ລະບົບ"</item>
+    <item msgid="7858983209929864160">"​ເຕືອນ​ດ້ວຍ​ສຽງ"</item>
+    <item msgid="1850038478268896762">"ມີເດຍ"</item>
+    <item msgid="8265110906352372092">"ໂມງປຸກ"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. ແຕະເພື່ອເຊົາປິດສຽງ."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. ແຕະເພື່ອຕັ້ງເປັນສັ່ນ. ບໍລິການຊ່ວຍເຂົ້າເຖິງອາດຖືກປິດສຽງໄວ້."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. ແຕະເພື່ອປິດສຽງ. ບໍລິການຊ່ວຍເຂົ້າເຖິງອາດຖືກປິດສຽງໄວ້."</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index a40bef9..fef7077 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Tarptinklinis ryšys"</string>
@@ -438,6 +439,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"„<xliff:g id="APP_NAME">%1$s</xliff:g>“ yra garsumo valdymo dialogo langas"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Palieskite, kad atkurtumėte originalą."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Naudojate darbo profilį"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Skambinti"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Skambinti"</item>
+    <item msgid="1850038478268896762">"Medija"</item>
+    <item msgid="8265110906352372092">"Signalas"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Palieskite, kad įjungtumėte garsą."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Palieskite, kad nustatytumėte vibravimą. Gali būti nutildytos pritaikymo neįgaliesiems paslaugos."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Palieskite, kad nutildytumėte. Gali būti nutildytos pritaikymo neįgaliesiems paslaugos."</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index d5b29c4..e977e1c 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -144,6 +144,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Viesabonēšana"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ir skaļuma dialoglodziņš"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Pieskarieties, lai atjaunotu sākotnējo saturu."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Jūs izmantojat darba profilu."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Zvans"</item>
+    <item msgid="5997713001067658559">"Sistēma"</item>
+    <item msgid="7858983209929864160">"Zvanīt"</item>
+    <item msgid="1850038478268896762">"Multivide"</item>
+    <item msgid="8265110906352372092">"Signāls"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Pieskarieties, lai ieslēgtu skaņu."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Pieskarieties, lai iestatītu uz vibrozvanu. Var tikt izslēgti pieejamības pakalpojumu signāli."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Pieskarieties, lai izslēgtu skaņu. Var tikt izslēgti pieejamības pakalpojumu signāli."</string>
diff --git a/packages/SystemUI/res/values-mk-rMK/strings.xml b/packages/SystemUI/res/values-mk-rMK/strings.xml
index f4dd7bc..bc7a1c1 100644
--- a/packages/SystemUI/res/values-mk-rMK/strings.xml
+++ b/packages/SystemUI/res/values-mk-rMK/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роаминг"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> е дијалог за јачина на звук"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Допрете за да го вратите оригиналот."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Го користите работниот профил"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Повикај"</item>
+    <item msgid="5997713001067658559">"Систем"</item>
+    <item msgid="7858983209929864160">"Ѕвони"</item>
+    <item msgid="1850038478268896762">"Аудио-визуелни содржини"</item>
+    <item msgid="8265110906352372092">"Аларм"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Допрете за да вклучите звук."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Допрете за да поставите на вибрации. Можеби ќе се исклучи звукот на услугите за достапност."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Допрете за да исклучите звук. Можеби ќе се исклучи звукот на услугите за достапност."</string>
diff --git a/packages/SystemUI/res/values-ml-rIN/strings.xml b/packages/SystemUI/res/values-ml-rIN/strings.xml
index 7178b29..c78e2e3 100644
--- a/packages/SystemUI/res/values-ml-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ml-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"റോമിംഗ്"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g>, വോളിയം ഡയലോഗാണ്"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"ഒറിജിനൽ പുനഃസ്ഥാപിക്കാൻ ടാപ്പുചെയ്യുക."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"നിങ്ങൾ ഉപയോഗിക്കുന്നത് ഔദ്യോഗിക പ്രൊഫൈലാണ്"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"വിളിക്കുക"</item>
+    <item msgid="5997713001067658559">"സിസ്‌റ്റം"</item>
+    <item msgid="7858983209929864160">"റിംഗുചെയ്യുക"</item>
+    <item msgid="1850038478268896762">"മീഡിയ"</item>
+    <item msgid="8265110906352372092">"അലാറം"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ബ്ലൂടൂത്ത്"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. അൺമ്യൂട്ടുചെയ്യുന്നതിന് ടാപ്പുചെയ്യുക."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. വൈബ്രേറ്റിലേക്ക് സജ്ജമാക്കുന്നതിന് ടാപ്പുചെയ്യുക. പ്രവേശനക്ഷമതാ സേവനങ്ങൾ മ്യൂട്ടുചെയ്യപ്പെട്ടേക്കാം."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. മ്യൂട്ടുചെയ്യുന്നതിന് ടാപ്പുചെയ്യുക. പ്രവേശനക്ഷമതാ സേവനങ്ങൾ മ്യൂട്ടുചെയ്യപ്പെട്ടേക്കാം."</string>
diff --git a/packages/SystemUI/res/values-mn-rMN/strings.xml b/packages/SystemUI/res/values-mn-rMN/strings.xml
index 296658b..0a24ae1 100644
--- a/packages/SystemUI/res/values-mn-rMN/strings.xml
+++ b/packages/SystemUI/res/values-mn-rMN/strings.xml
@@ -141,6 +141,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Рүүминг"</string>
@@ -432,6 +433,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> нь дууны диалог юм."</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Эх хувилбарыг сэргээхийн тулд дарна уу."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Та өөрийн ажлын профайлыг ашиглаж байна"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Дуудлага"</item>
+    <item msgid="5997713001067658559">"Систем"</item>
+    <item msgid="7858983209929864160">"Хонх дуугаргах"</item>
+    <item msgid="1850038478268896762">"Медиа"</item>
+    <item msgid="8265110906352372092">"Сэрүүлэг"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Дууг нь нээхийн тулд товшино уу."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Чичиргээнд тохируулахын тулд товшино уу. Хүртээмжийн үйлчилгээний дууг хаасан."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Дууг нь хаахын тулд товшино уу. Хүртээмжийн үйлчилгээний дууг хаасан."</string>
diff --git a/packages/SystemUI/res/values-mr-rIN/strings.xml b/packages/SystemUI/res/values-mr-rIN/strings.xml
index 1fb4beb..525bece 100644
--- a/packages/SystemUI/res/values-mr-rIN/strings.xml
+++ b/packages/SystemUI/res/values-mr-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"रोमिंग"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> हा व्हॉल्यूम संवाद आहे"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"मूळ पुनर्संचयित करण्यासाठी टॅप करा."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"आपण आपले कार्य प्रोफाईल वापरत आहात"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"कॉल करा"</item>
+    <item msgid="5997713001067658559">"सिस्टीम"</item>
+    <item msgid="7858983209929864160">"रिंग करा"</item>
+    <item msgid="1850038478268896762">"मीडिया"</item>
+    <item msgid="8265110906352372092">"अलार्म"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ब्लूटुथ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. सशब्द करण्यासाठी टॅप करा."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. कंपन सेट करण्यासाठी टॅप करा. प्रवेशयोग्यता सेवा नि:शब्द केल्या जाऊ शकतात."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. नि:शब्द करण्यासाठी टॅप करा. प्रवेशक्षमता सेवा नि:शब्द केल्या जाऊ शकतात."</string>
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms-rMY/strings.xml
index 8729ae8..4c55344 100644
--- a/packages/SystemUI/res/values-ms-rMY/strings.xml
+++ b/packages/SystemUI/res/values-ms-rMY/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Perayauan"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ialah dialog kelantangan"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Ketik untuk memulihkan yang asal."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Anda sedang menggunakan profil kerja"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Panggil"</item>
+    <item msgid="5997713001067658559">"Sistem"</item>
+    <item msgid="7858983209929864160">"Dering"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Penggera"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Ketik untuk menyahredam."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Ketik untuk menetapkan pada getar. Perkhidmatan kebolehaksesan mungkin diredamkan."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Ketik untuk meredam. Perkhidmatan kebolehaksesan mungkin diredamkan."</string>
diff --git a/packages/SystemUI/res/values-my-rMM/strings.xml b/packages/SystemUI/res/values-my-rMM/strings.xml
index 2522e39..b5ce1e6 100644
--- a/packages/SystemUI/res/values-my-rMM/strings.xml
+++ b/packages/SystemUI/res/values-my-rMM/strings.xml
@@ -20,9 +20,9 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"စနစ်၏UI"</string>
-    <string name="status_bar_clear_all_button" msgid="7774721344716731603">"ဖယ်ရှားရန်"</string>
+    <string name="status_bar_clear_all_button" msgid="7774721344716731603">"ရှင်းရန်"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"စာရင်းမှ ဖယ်မည်"</string>
-    <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"အပ်ပလီကေးရှင်း အချက်အလက်များ"</string>
+    <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"အက်ပ်အချက်အလက်များ"</string>
     <string name="status_bar_no_recent_apps" msgid="7374907845131203189">"သင်၏ မကြာမီက မျက်နှာပြင်များ ဒီမှာ ပေါ်လာကြမည်"</string>
     <string name="status_bar_accessibility_dismiss_recents" msgid="4576076075226540105">"လတ်တလောအပ်ပလီကေးရှင်းများအား ဖယ်ထုတ်မည်"</string>
     <plurals name="status_bar_accessibility_recent_apps" formatted="false" msgid="9138535907802238759">
@@ -96,7 +96,7 @@
     <string name="voice_assist_label" msgid="3956854378310019854">"အသံ အကူအညီအား ဖွင့်ရန်"</string>
     <string name="camera_label" msgid="7261107956054836961">"ကင်မရာ ဖွင့်ရန်"</string>
     <string name="recents_caption_resize" msgid="3517056471774958200">"အလုပ်သစ်စီစဥ်မှုကို ရွေးပါ။"</string>
-    <string name="cancel" msgid="6442560571259935130">"မလုပ်တော့ပါ"</string>
+    <string name="cancel" msgid="6442560571259935130">"မလုပ်တော့"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"အံ့ဝင်သောချုံ့ချဲ့ခလုတ်"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ဖန်သားပြင်ပေါ်တွင် အသေးမှအကြီးသို့ချဲ့ခြင်း"</string>
     <string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ဘလူးတုသ်ချိတ်ဆက်ထားမှု"</string>
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"မြန်နှုန်းမြင့်လိုင်း"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ကွန်ယက်ပြင်ပဒေတာအသုံးပြုခြင်း"</string>
@@ -319,7 +320,7 @@
     <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"အလုပ် မုဒ်"</string>
     <string name="recents_empty_message" msgid="808480104164008572">"မကြာမီကဖွင့်ထားသည်များ မရှိပါ"</string>
     <string name="recents_empty_message_dismissed_all" msgid="2791312568666558651">"သင်အားလုံးကို ရှင်းလင်းပြီးပါပြီ"</string>
-    <string name="recents_app_info_button_label" msgid="2890317189376000030">"အက်ပ် အင်ဖို"</string>
+    <string name="recents_app_info_button_label" msgid="2890317189376000030">"အက်ပ်အင်ဖို"</string>
     <string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"မျက်နှာပြင် ပင်ထိုးမှု"</string>
     <string name="recents_search_bar_label" msgid="8074997400187836677">"ရှာဖွေရန်"</string>
     <string name="recents_launch_error_message" msgid="2969287838120550506">"<xliff:g id="APP">%s</xliff:g> ကို မစနိုင်ပါ။"</string>
@@ -374,9 +375,9 @@
     <string name="guest_wipe_session_title" msgid="6419439912885956132">"ပြန်လာတာ ကြိုဆိုပါသည်၊ ဧည့်သည်!"</string>
     <string name="guest_wipe_session_message" msgid="8476238178270112811">"သင်သည် သင်၏ ချိတ်ဆက်မှုကို ဆက်ပြုလုပ် လိုပါသလား?"</string>
     <string name="guest_wipe_session_wipe" msgid="5065558566939858884">"အစမှ ပြန်စပါ"</string>
-    <string name="guest_wipe_session_dontwipe" msgid="1401113462524894716">"ဟုတ်ကဲ့၊ ဆက်လုပ်ပါ"</string>
+    <string name="guest_wipe_session_dontwipe" msgid="1401113462524894716">"ဆက်လုပ်ပါ"</string>
     <string name="guest_notification_title" msgid="1585278533840603063">"ဧည့်သည် အသုံးပြုသူ"</string>
-    <string name="guest_notification_text" msgid="335747957734796689">"App များနှင့် ဒေတာအား ဖျက်ရန်၊ တခဏသုံးစွဲသူအား ဖယ်ရှားပါ"</string>
+    <string name="guest_notification_text" msgid="335747957734796689">"အက်ပ်များနှင့် ဒေတာအား ဖျက်ရန်၊ တခဏသုံးစွဲသူအား ဖယ်ရှားပါ"</string>
     <string name="guest_notification_remove_action" msgid="8820670703892101990">"ဧည့်သည်ကို ဖယ်ထုတ်မည်"</string>
     <string name="user_logout_notification_title" msgid="1453960926437240727">"အသုံးပြုသူ ထွက်လိုက်ပါ"</string>
     <string name="user_logout_notification_text" msgid="3350262809611876284">"လက်ရှိ အသုံးပြုသူကို ထုတ်ပစ်ရန်"</string>
@@ -403,15 +404,15 @@
     <string name="disable_vpn" msgid="4435534311510272506">"VPN ကို ပိတ်ထားရန်"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN ကို အဆက်ဖြတ်ရန်"</string>
     <string name="monitoring_description_device_owned" msgid="5780988291898461883">"သင့်စက်ကိရိယာကို<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nမှစီမံခန့်ခွဲထားပါသည်။သင့်စီမံခန့်ခွဲသူသည် ကြိုတင်ပြင်ဆင်မှုများ၊စုပေါင်းဝင်ရောက်ခွင့်၊အက်ပလီကေးရှင်းများ၊သင့်စက်ကိရိယာနှင့်ဆက်နွယ်နေသောအချက်အလက်နှင့်သင့်စက်ကိရိယာ ရဲ့နေရာအချက်အလက်များကိုကြီးကြပ်စောင့်ကြည့်နိုင်ပါသည်။အသေးစိတ်သိရှိလိုပါကသင်၏စီမံခန့်ခွဲသူကိုဆက်သွယ်ပါ။"</string>
-    <string name="monitoring_description_vpn" msgid="4445150119515393526">"VPN ချိတ်ဆက်မှုပြုလုပ်ရန် အပ်ဖ်ကို သင်ခွင့်ပြုလိုက်သည်။ \n\n ဤအပ်ဖ်သည် အီးမေးလ်များ၊ အပ်ဖ်များနှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကိုယ်ရေးကိုယ်တာကွန်ရပ် လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်သည်။"</string>
+    <string name="monitoring_description_vpn" msgid="4445150119515393526">"VPN ချိတ်ဆက်မှုပြုလုပ်ရန် အက်ပ်ကို သင်ခွင့်ပြုလိုက်သည်။ \n\n ဤအက်ပ်သည် အီးမေးလ်များ၊ အက်ပ်များနှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လုပ်ဆောင်ချက်များကို စောင့်ကြည့်နိုင်သည်။"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="3090670777499161246">"သင့်စက်ကိရိယာကို<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n \n မှစီမံခန့်ခွဲထားပါသည်။သင့်စီမံခန့်ခွဲသူသည် ကြိုတင်ပြင်ဆင်မှုများ၊စုပေါင်းဝင်ရောက်ခွင့်၊အက်ပလီကေးရှင်းများ၊သင့်စက်ကိရိယာနှင့်ဆက်နွယ်နေသောအချက်အလက်နှင့်သင့်စက်ကိရိယာ ရဲ့နေရာအချက်အလက်များကိုကြီးကြပ်စောင့်ကြည့်နိုင်ပါသည်။ \n\n အီးမေးလ်များ၊အက်ပလီကေးရှင်းများနှင့် ဝက်ဘ်ဆိုက်များအပါအဝင်သင့်ကွန်ယက်လုပ်ဆောင်ချက်ကိုစောင့်ကြည့်နိုင်သည့် VPN ကိုချိတ်ဆက်ထားပြီဖြစ် သည်။\n\n အသေးစိတ်သိရှိလိုပါကသင်၏စီမံခန့်ခွဲသူကိုဆက်သွယ်ပါ။"</string>
-    <string name="monitoring_description_vpn_profile_owned" msgid="2054949132145039290">"သင့်အလုပ်ပရိုဖိုင်ကို <xliff:g id="ORGANIZATION">%1$s</xliff:g>မှ စီမံခန့်ခွဲပါသည်။ \n\nသင့်စီမံခန့်ခွဲသူသည် အီးမေးလ်များ၊ အပ်ဖ်များ၊ နှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်သည်။ \n\nပိုမိုသော သတင်းအချက်အလက်အတွက်၊ သင့်စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ။ \n\nသင်သည် VPN သို့လည်းဆက်သွယ်ထားပြီး၊ ၎င်းသည် သင့်ကွန်ရက်လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်ပါသည်။"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="2054949132145039290">"သင့်အလုပ်ပရိုဖိုင်ကို <xliff:g id="ORGANIZATION">%1$s</xliff:g>မှ စီမံခန့်ခွဲပါသည်။ \n\nသင့်စီမံခန့်ခွဲသူသည် အီးမေးလ်များ၊ အက်ပ်များ၊ နှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လုပ်ဆောက်ချက်ကို စောင့်ကြည့်နိုင်သည်။ \n\nအချက်အလက်များ ပိုမိုရယူရန် သင်၏ စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ။ \n\nသင်သည် VPN တစ်ခုသို့ပါ ချိတ်ဆက်ထားပြီး ၎င်းကပါ သင်၏ ကွန်ရက်လုပ်ဆောင်ချက်ကို စောင့်ကြည့်နိုင်ပါသည်။"</string>
     <string name="legacy_vpn_name" msgid="6604123105765737830">"VPN"</string>
-    <string name="monitoring_description_app" msgid="6259179342284742878">"သင်သည် <xliff:g id="APPLICATION">%1$s</xliff:g> သို့ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးများ၊ အပ်ဖ်များနှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လှုပ်ရှားမှုများကို စောင့်ကြည့်နိုင်သည်။"</string>
-    <string name="monitoring_description_app_personal" msgid="484599052118316268">"သင်သည် <xliff:g id="APPLICATION">%1$s</xliff:g> သို့ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်များ၊ အပ်ဖ်များနှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကိုယ်ရေးကိုယ်တာကွန်ရပ် လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်သည်။"</string>
-    <string name="monitoring_description_app_work" msgid="1754325860918060897">"သင့်အလုပ် ပရိုဖိုင်ကို <xliff:g id="ORGANIZATION">%1$s</xliff:g> မှစီမံခန့်ခွဲသည်။ ၎င်းကို <xliff:g id="APPLICATION">%2$s</xliff:g> သို့ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်များ၊ အပ်ဖ်များနှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကိုယ်ရေးကိုယ်တာကွန်ရပ် လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်သည်။ \n\nနောက်ထပ်အချက်အလက်များအတွက်၊ သင့်ကြီးကြပ်သူကို ဆက်သွယ်ပါ။"</string>
-    <string name="monitoring_description_app_personal_work" msgid="4946600443852045903">"သင့်အလုပ် ပရိုဖိုင်ကို <xliff:g id="ORGANIZATION">%1$s</xliff:g> မှစီမံခန့်ခွဲသည်။ ၎င်းကို <xliff:g id="APPLICATION_WORK">%2$s</xliff:g> သို့ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်များ၊ အပ်ဖ်များနှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကိုယ်ရေးကိုယ်တာကွန်ရပ် လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်သည်။ \n\n သင်သည်<xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g> ကိုလည်းချိတ်ဆက်ထားသည်၊ ၎င်းသည် သင့်ကိုယ်ရေးကိုယ်တာ ကွန်ရက် လှုပ်ရှားမှုများကို စောင့်ကြည့်နိုင်သည်။"</string>
-    <string name="monitoring_description_vpn_app_device_owned" msgid="4970443827043261703">"သင့်စက်ကိရိယာကို <xliff:g id="ORGANIZATION">%1$s</xliff:g> မှစီမံခန့်ခွဲပါသည်။ \n\n သင်စီမံခန့်ခွဲသူသည် ကြိုတင်ပြင်ဆင်မှုများ၊ စုပေါင်းဝင်ရောက်ခွင့်၊ အပ်ဖ်များ၊ သင့်ကိရိယာနှင့် သက်ဆိုင်သော ဒေတာ၊ နှင့် သင့်ကိရိယာ၏ တည်နေရာအချိက်အလက်များကို စောင့်ကြည့်ပြီး စီမံခန့်ခွဲနိုင်သည်။ \n\nသင်သည် <xliff:g id="APPLICATION">%2$s</xliff:g> သို့ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်းများ၊ အပ်ဖ်များ၊ နှင့် ဝက်ဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လှုပ်ရှားမှုကို စောင့်ကြည့်နိုင်သည်။ \n\nပိုမိုသော သတင်းအချက်အလက်အတွက်၊ သင့်စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ။"</string>
+    <string name="monitoring_description_app" msgid="6259179342284742878">"သင်သည် <xliff:g id="APPLICATION">%1$s</xliff:g> သို့ ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးများ၊ အက်ပ်များနှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လုပ်ဆောင်ချက်များကို စောင့်ကြည့်နိုင်သည်။"</string>
+    <string name="monitoring_description_app_personal" msgid="484599052118316268">"သင်သည် <xliff:g id="APPLICATION">%1$s</xliff:g> သို့ ချိတ်ဆက်ထားသည်။ ၎င်းသည် အီးမေးလ်များ၊ အက်ပ်များနှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လုပ်ဆောင်ချက်ကို စောင့်ကြည့်နိုင်သည်။"</string>
+    <string name="monitoring_description_app_work" msgid="1754325860918060897">"သင့်အလုပ်ပရိုဖိုင်ကို <xliff:g id="ORGANIZATION">%1$s</xliff:g> မှစီမံခန့်ခွဲသည်။ ၎င်းကို <xliff:g id="APPLICATION">%2$s</xliff:g> သို့ ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်များ၊ အက်ပ်များနှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်အလုပ်ကွန်ရက်လုပ်ဆောင်ချက်ကို စောင့်ကြည့်နိုင်သည်။ \n\nအချက်အလက်များ ပိုမိုရယူရန် သင်၏ စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ။"</string>
+    <string name="monitoring_description_app_personal_work" msgid="4946600443852045903">"သင့်အလုပ် ပရိုဖိုင်ကို <xliff:g id="ORGANIZATION">%1$s</xliff:g> မှစီမံခန့်ခွဲသည်။ ၎င်းကို <xliff:g id="APPLICATION_WORK">%2$s</xliff:g> သို့ ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်များ၊ အက်ပ်များနှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်အလုပ်ကွန်ရက်လုပ်ဆောင်ချက်ကို စောင့်ကြည့်နိုင်သည်။ \n\n သင်သည်<xliff:g id="APPLICATION_PERSONAL">%3$s</xliff:g> ကိုလည်း ချိတ်ဆက်ထားသည်၊ ၎င်းသည် သင့်ကိုယ်ပိုင်ကွန်ရက်လုပ်ဆောင်ချက်များကို စောင့်ကြည့်နိုင်သည်။"</string>
+    <string name="monitoring_description_vpn_app_device_owned" msgid="4970443827043261703">"သင့်စက်ကိရိယာကို <xliff:g id="ORGANIZATION">%1$s</xliff:g> မှစီမံခန့်ခွဲပါသည်။ \n\n စီမံခန့်ခွဲသူသည် ကြိုတင်ပြင်ဆင်မှုများ၊ စုပေါင်းဝင်ရောက်ခွင့်၊ အက်ပ်များ၊ သင့်ကိရိယာနှင့်သက်ဆိုင်သော ဒေတာနှင့် သင့်ကိရိယာ၏ တည်နေရာအချက်အလက်များကို စောင့်ကြည့်ပြီး စီမံခန့်ခွဲနိုင်သည်။ \n\nသင်သည် <xliff:g id="APPLICATION">%2$s</xliff:g> သို့ချိတ်ဆက်ထားသည်၊ ၎င်းသည် အီးမေးလ်များ၊ အက်ပ်များ၊ နှင့် ဝဘ်ဆိုက်များအပါအဝင် သင့်ကွန်ရက်လုပ်ဆောင်ချက်ကို စောင့်ကြည့်နိုင်သည်။ \n\nအချက်အလက်များ ပိုမိုရယူရန် သင်၏ စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ။"</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"သင်က လက်ဖြင့် သော့မဖွင့်မချင်း ကိရိယာမှာ သော့ပိတ်လျက် ရှိနေမည်"</string>
     <string name="hidden_notifications_title" msgid="7139628534207443290">"အကြောင်းကြားချက်များ မြန်မြန်ရရန်"</string>
     <string name="hidden_notifications_text" msgid="2326409389088668981">"မဖွင့်ခင် ၎င်းတို့ကို ကြည့်ပါ"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> သည် အသံဒိုင်ယာလော့ခ်ဖြစ်သည်"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"မူရင်းကိုပြန်ယူရန် တို့ပါ။"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"သင်သည် အလုပ်ပရိုဖိုင်းအား သုံးနေသည်"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ခေါ်ဆိုမှု"</item>
+    <item msgid="5997713001067658559">"စနစ်"</item>
+    <item msgid="7858983209929864160">"ဖုန်းခေါ်ဆိုမှု"</item>
+    <item msgid="1850038478268896762">"မီဒီယာ"</item>
+    <item msgid="8265110906352372092">"နှိုးစက်"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ဘလူးတုသ်"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s။ အသံပြန်ဖွင့်ရန် တို့ပါ။"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s။ တုန်ခါမှုကို သတ်မှတ်ရန် တို့ပါ။ အများသုံးစွဲနိုင်မှု ဝန်ဆောင်မှုများကို အသံပိတ်ထားနိုင်ပါသည်။"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s။ အသံပိတ်ရန် တို့ပါ။ အများသုံးစွဲနိုင်မှု ဝန်ဆောင်မှုများကို အသံပိတ်ထားနိုင်ပါသည်။"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index fc81c3c..ae6f71e 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> er volumdialogen"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Trykk for å gjenopprette originalen."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Du bruker jobbprofilen din"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Ring"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Varsellyd"</item>
+    <item msgid="1850038478268896762">"Medier"</item>
+    <item msgid="8265110906352372092">"Alarmen"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Trykk for å slå på lyden."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Trykk for å angi vibrasjon. Lyden kan bli slått av for tilgjengelighetstjenestene."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Trykk for å slå av lyden. Lyden kan bli slått av for tilgjengelighetstjenestene."</string>
diff --git a/packages/SystemUI/res/values-ne-rNP/strings.xml b/packages/SystemUI/res/values-ne-rNP/strings.xml
index 4f321cf..a099136 100644
--- a/packages/SystemUI/res/values-ne-rNP/strings.xml
+++ b/packages/SystemUI/res/values-ne-rNP/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"रोमिङ"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> भोल्यूम संवाद हो"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"मूललाई पुनर्स्थापना गर्न ट्याप गर्नुहोस्।"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"तपाईँले कार्य प्रोफाइल प्रयोग गर्दै हुनुहुन्छ"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"कल"</item>
+    <item msgid="5997713001067658559">"प्रणाली"</item>
+    <item msgid="7858983209929864160">"रिङटोन"</item>
+    <item msgid="1850038478268896762">"मिडिया"</item>
+    <item msgid="8265110906352372092">"अलार्म"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ब्लुटुथ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s। अनम्यूट गर्नका लागि ट्याप गर्नुहोस्।"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s। कम्पनमा सेट गर्नका लागि ट्याप गर्नुहोस्। पहुँच सम्बन्धी सेवाहरू म्यूट हुन सक्छन्।"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s। म्यूट गर्नका लागि ट्याप गर्नुहोस्। पहुँच सम्बन्धी सेवाहरू म्यूट हुन सक्छन्।"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 72f04bb..94636cc 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> is het volumedialoogvenster"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Tik om het origineel te herstellen."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"U gebruikt je werkprofiel"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Bellen"</item>
+    <item msgid="5997713001067658559">"Systeem"</item>
+    <item msgid="7858983209929864160">"Bellen"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tik om dempen op te heffen."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tik om in te stellen op trillen. Toegankelijkheidsservices kunnen zijn gedempt."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tik om te dempen. Toegankelijkheidsservices kunnen zijn gedempt."</string>
diff --git a/packages/SystemUI/res/values-pa-rIN/strings.xml b/packages/SystemUI/res/values-pa-rIN/strings.xml
index d9cb04f..7b67779 100644
--- a/packages/SystemUI/res/values-pa-rIN/strings.xml
+++ b/packages/SystemUI/res/values-pa-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ਰੋਮਿੰਗ"</string>
@@ -344,8 +345,7 @@
     <string name="zen_silence_introduction" msgid="3137882381093271568">"ਇਹ ਅਲਾਰਮ, ਸੰਗੀਤ, ਵੀਡੀਓਜ਼, ਅਤੇ ਗੇਮਸ ਸਮੇਤ, ਸਾਰੀਆਂ ਧੁਨੀਆਂ ਅਤੇ ਵਾਇਬ੍ਰੇਸ਼ਨ ਨੂੰ ਬਲੌਕ ਕਰਦਾ ਹੈ।"</string>
     <string name="keyguard_more_overflow_text" msgid="9195222469041601365">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="1288875699658819755">"ਹੇਠਾਂ ਘੱਟ ਲਾਜ਼ਮੀ ਸੂਚਨਾਵਾਂ"</string>
-    <!-- no translation found for notification_tap_again (7590196980943943842) -->
-    <skip />
+    <string name="notification_tap_again" msgid="7590196980943943842">"ਖੋਲ੍ਹਣ ਲਈ ਦੁਬਾਰਾ ਟੈਪ ਕਰੋ"</string>
     <string name="keyguard_unlock" msgid="8043466894212841998">"ਅਨਲੌਕ ਕਰਨ ਲਈ ਉੱਪਰ ਸਵਾਈਪ ਕਰੋ।"</string>
     <string name="phone_hint" msgid="4872890986869209950">"ਫ਼ੋਨ ਲਈ ਆਈਕਨ ਤੋਂ ਸਵਾਈਪ ਕਰੋ"</string>
     <string name="voice_hint" msgid="8939888732119726665">"ਵੌਇਸ ਅਸਿਸਟ ਲਈ ਆਈਕਨ ਤੋਂ ਸਵਾਈਪ ਕਰੋ"</string>
@@ -435,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ਵੋਲਯੂਮ ਡਾਇਲੌਗ ਹੈ"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"ਅਸਲ ਨੂੰ ਮੁੜ-ਬਹਾਲ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"ਤੁਸੀਂ ਆਪਣੀ ਕੰਮ ਪ੍ਰੋਫਾਈਲ ਵਰਤ ਰਹੇ ਹੋ"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ਕਾਲ ਕਰੋ"</item>
+    <item msgid="5997713001067658559">"ਸਿਸਟਮ"</item>
+    <item msgid="7858983209929864160">"ਰਿੰਗ ਕਰੋ"</item>
+    <item msgid="1850038478268896762">"ਮੀਡੀਆ"</item>
+    <item msgid="8265110906352372092">"ਅਲਾਰਮ"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"ਬਲੂਟੁੱਥ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s। ਅਣਮਿਊਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s। ਥਰਥਰਾਹਟ ਸੈੱਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ। ਪਹੁੰਚਯੋਗਤਾ ਸੇਵਾਵਾਂ ਮਿਊਟ ਹੋ ਸਕਦੀਆਂ ਹਨ।"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s। ਮਿਊਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ। ਪਹੁੰਚਯੋਗਤਾ ਸੇਵਾਵਾਂ ਮਿਊਟ ਹੋ ਸਕਦੀਆਂ ਹਨ।"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 3cf8294..59c1888 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -438,6 +439,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> steruje głośnością"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Kliknij, by przywrócić ustawienie początkowe."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Używasz profilu do pracy"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Połączenie"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Dzwonek"</item>
+    <item msgid="1850038478268896762">"Multimedia"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Kliknij, by wyłączyć wyciszenie."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Kliknij, by włączyć wibracje. Ułatwienia dostępu mogą być wyciszone."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Kliknij, by wyciszyć. Ułatwienia dostępu mogą być wyciszone."</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 6feea20..b9168104 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é a caixa de diálogo referente ao volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Toque para restaurar o original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Você está usando seu perfil de trabalho"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Chamar"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Tocar"</item>
+    <item msgid="1850038478268896762">"Mídia"</item>
+    <item msgid="8265110906352372092">"Alarme"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Toque para ativar o som."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Toque para configurar para vibrar. É possível que os serviços de acessibilidade sejam silenciados."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Toque para silenciar. É possível que os serviços de acessibilidade sejam silenciados."</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index c393400..144dbef 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é a caixa de diálogo do volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Toque para restaurar o original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Está a utilizar o seu perfil de trabalho"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Telefonar"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Tocar"</item>
+    <item msgid="1850038478268896762">"Multimédia"</item>
+    <item msgid="8265110906352372092">"Alarme"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Toque para reativar o som."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Toque para ativar a vibração. Os serviços de acessibilidade podem ser silenciados."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Toque para desativar o som. Os serviços de acessibilidade podem ser silenciados."</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 6feea20..b9168104 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> é a caixa de diálogo referente ao volume"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Toque para restaurar o original."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Você está usando seu perfil de trabalho"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Chamar"</item>
+    <item msgid="5997713001067658559">"Sistema"</item>
+    <item msgid="7858983209929864160">"Tocar"</item>
+    <item msgid="1850038478268896762">"Mídia"</item>
+    <item msgid="8265110906352372092">"Alarme"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Toque para ativar o som."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Toque para configurar para vibrar. É possível que os serviços de acessibilidade sejam silenciados."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Toque para silenciar. É possível que os serviços de acessibilidade sejam silenciados."</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 8c72f6a..523880d 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -144,6 +144,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -438,6 +439,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> afișează caseta de dialog pentru volum"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Atingeți pentru a restabili versiunea originală."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Acum folosiți profilul de serviciu"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Apel"</item>
+    <item msgid="5997713001067658559">"Sistem"</item>
+    <item msgid="7858983209929864160">"Sonerie"</item>
+    <item msgid="1850038478268896762">"Conținut media"</item>
+    <item msgid="8265110906352372092">"Alarmă"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Atingeți pentru a activa sunetul."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Atingeți pentru a seta vibrarea. Sunetul se poate dezactiva pentru serviciile de accesibilitate."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Atingeți pentru a dezactiva sunetul. Sunetul se poate dezactiva pentru serviciile de accesibilitate."</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 062ea48..60a3896 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роуминг"</string>
@@ -440,6 +441,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"Приложение <xliff:g id="APP_NAME">%1$s</xliff:g> назначено регулятором громкости"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Нажмите, чтобы восстановить оригинал"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Вы перешли в рабочий профиль"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Вызов"</item>
+    <item msgid="5997713001067658559">"Система"</item>
+    <item msgid="7858983209929864160">"Рингтон"</item>
+    <item msgid="1850038478268896762">"Мультимедиа"</item>
+    <item msgid="8265110906352372092">"Будильник"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Нажмите, чтобы включить звук."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Нажмите, чтобы включить вибрацию. Специальные возможности могут прекратить работу."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Нажмите, чтобы выключить звук. Специальные возможности могут прекратить работу."</string>
diff --git a/packages/SystemUI/res/values-si-rLK/strings.xml b/packages/SystemUI/res/values-si-rLK/strings.xml
index 90f75a6..bffb443 100644
--- a/packages/SystemUI/res/values-si-rLK/strings.xml
+++ b/packages/SystemUI/res/values-si-rLK/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"රෝමිං"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ධාරිතා සංවාදයයි"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"මුල් තත්ත්වය නැවත ප්‍රතිසාධනය කිරීමට තට්ටු කරන්න."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"ඔබ ඔබේ කාර්යාල පැතිකඩ භාවිත කරමින් සිටී"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"ඇමතුම"</item>
+    <item msgid="5997713001067658559">"පද්ධතිය"</item>
+    <item msgid="7858983209929864160">"නාද කරන්න"</item>
+    <item msgid="1850038478268896762">"මාධ්‍ය"</item>
+    <item msgid="8265110906352372092">"එලාමය"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"බ්ලූටූත්"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. නිහඬ කිරීම ඉවත් කිරීමට තට්ටු කරන්න."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. කම්පනය කිරීමට තට්ටු කරන්න. ප්‍රවේශ්‍යතා සේවා නිහඬ කළ හැකිය."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. නිහඬ කිරීමට තට්ටු කරන්න. ප්‍රවේශ්‍යතා සේවා නිහඬ කළ හැකිය."</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index f0537c3..95460f5 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -326,7 +327,7 @@
     <string name="recents_empty_message" msgid="808480104164008572">"Žiadne nedávne položky"</string>
     <string name="recents_empty_message_dismissed_all" msgid="2791312568666558651">"Vymazali ste všetko"</string>
     <string name="recents_app_info_button_label" msgid="2890317189376000030">"Informácie o aplikácii"</string>
-    <string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"pripnutie k obrazovke"</string>
+    <string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"pripnutie obrazovky"</string>
     <string name="recents_search_bar_label" msgid="8074997400187836677">"hľadať"</string>
     <string name="recents_launch_error_message" msgid="2969287838120550506">"Aplikáciu <xliff:g id="APP">%s</xliff:g> sa nepodarilo spustiť"</string>
     <string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikácia <xliff:g id="APP">%s</xliff:g> je v núdzovom režime zakázaná."</string>
@@ -440,6 +441,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je dialóg hlasitosti"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Klepnutím obnovíte pôvodnú verziu."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Používate svoj pracovný profil."</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Hovor"</item>
+    <item msgid="5997713001067658559">"Systém"</item>
+    <item msgid="7858983209929864160">"Zvonenie"</item>
+    <item msgid="1850038478268896762">"Médiá"</item>
+    <item msgid="8265110906352372092">"Budík"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Klepnutím zapnite zvuk."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Klepnutím aktivujte režim vibrovania. Služby dostupnosti je možné stlmiť."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Klepnutím vypnite zvuk. Služby dostupnosti je možné stlmiť."</string>
@@ -595,8 +608,8 @@
     <string name="add_button" msgid="4134946063432258161">"Pridať tlačidlo"</string>
     <string name="save" msgid="2311877285724540644">"Uložiť"</string>
     <string name="reset" msgid="2448168080964209908">"Obnoviť"</string>
-    <string name="no_home_title" msgid="1563808595146071549">"Tlačidlo Plocha sa nenašlo"</string>
-    <string name="no_home_message" msgid="5408485011659260911">"Ak chcete používať navigáciu v tomto zariadení, musíte použiť tlačidlo Plocha. Pred uložením pridajte tlačidlo Plocha."</string>
+    <string name="no_home_title" msgid="1563808595146071549">"Nenašlo sa tlačidlo plochy"</string>
+    <string name="no_home_message" msgid="5408485011659260911">"Ak chcete používať navigáciu v tomto zariadení, musíte použiť tlačidlo plochy. Pred uložením pridajte tlačidlo plochy."</string>
     <string name="adjust_button_width" msgid="6138616087197632947">"Upraviť šírku tlačidla"</string>
     <string name="clipboard" msgid="1313879395099896312">"Schránka"</string>
     <string name="clipboard_description" msgid="3819919243940546364">"Schránka umožňuje presunúť položky priamo do schránky. Ak ju máte k dispozícii, môžete ich z nej aj priamo vytiahnuť."</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 4eafc0b..f993f4d 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Gostovanje"</string>
@@ -440,6 +441,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> je pogovorno okno glede prostornine"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Dotaknite se, če želite obnoviti prvotno stanje."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Uporabljate delovni profil"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Klic"</item>
+    <item msgid="5997713001067658559">"Sistem"</item>
+    <item msgid="7858983209929864160">"Zvonjenje"</item>
+    <item msgid="1850038478268896762">"Predstavnost"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Dotaknite se, če želite vklopiti zvok."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Dotaknite se, če želite nastaviti vibriranje. V storitvah za ljudi s posebnimi potrebami bo morda izklopljen zvok."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Dotaknite se, če želite izklopiti zvok. V storitvah za ljudi s posebnimi potrebami bo morda izklopljen zvok."</string>
diff --git a/packages/SystemUI/res/values-sq-rAL/strings.xml b/packages/SystemUI/res/values-sq-rAL/strings.xml
index 688e643..4fbd833 100644
--- a/packages/SystemUI/res/values-sq-rAL/strings.xml
+++ b/packages/SystemUI/res/values-sq-rAL/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"Lidhje CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -344,8 +345,7 @@
     <string name="zen_silence_introduction" msgid="3137882381093271568">"Kjo bllokon TË GJITHË tingujt dhe dridhjet, duke përfshirë edhe nga alarmet, muzika, videot dhe lojërat."</string>
     <string name="keyguard_more_overflow_text" msgid="9195222469041601365">"+<xliff:g id="NUMBER_OF_NOTIFICATIONS">%d</xliff:g>"</string>
     <string name="speed_bump_explanation" msgid="1288875699658819755">"Njoftimet më pak urgjente, më poshtë!"</string>
-    <!-- no translation found for notification_tap_again (7590196980943943842) -->
-    <skip />
+    <string name="notification_tap_again" msgid="7590196980943943842">"Trokit përsëri për ta hapur"</string>
     <string name="keyguard_unlock" msgid="8043466894212841998">"Rrëshqit për të shkyçur"</string>
     <string name="phone_hint" msgid="4872890986869209950">"Rrëshqit për të hapur telefonin"</string>
     <string name="voice_hint" msgid="8939888732119726665">"Rrëshqit për të hapur ndihmën zanore"</string>
@@ -435,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> është dialogu i volumit"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Trokit për të restauruar origjinalin."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Po përdor profilin tënd të punës"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Telefono"</item>
+    <item msgid="5997713001067658559">"Sistemi"</item>
+    <item msgid="7858983209929864160">"Bjeri ziles"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarmi"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Trokit për të aktivizuar."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Trokit për ta caktuar te dridhja. Shërbimet e qasshmërisë mund të çaktivizohen."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Trokit për të çaktivizuar. Shërbimet e qasshmërisë mund të çaktivizohen."</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 2bfdc88..eed01c1 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -144,6 +144,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роминг"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> је дијалог за јачину звука"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Додирните да бисте вратили оригинал."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Користите профил за Work"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Позови"</item>
+    <item msgid="5997713001067658559">"Систем"</item>
+    <item msgid="7858983209929864160">"Прстен"</item>
+    <item msgid="1850038478268896762">"Медијуми"</item>
+    <item msgid="8265110906352372092">"Аларм"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Додирните да бисте укључили звук."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Додирните да бисте подесили на вибрацију. Звук услуга приступачности ће можда бити искључен."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Додирните да бисте искључили звук. Звук услуга приступачности ће можда бити искључен."</string>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 7c2f3af..39a6b2f 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> används som volymkontroll"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Återställ originalet genom att trycka här."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Du använder din jobbprofil"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Ring"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Ring"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Tryck här om du vill slå på ljudet."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tryck här om du vill sätta på vibrationen. Tillgänglighetstjänster kanske inaktiveras."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Tryck här om du vill stänga av ljudet. Tillgänglighetstjänsterna kanske inaktiveras."</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 28b6153..d1ca28b 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Inatumia data nje mtandao wako wa kawaida"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ni mazungumzo ya sauti"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Gonga ili urejeshe picha ya asili."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Unatumia wasifu wako wa kazini"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Piga simu"</item>
+    <item msgid="5997713001067658559">"Mfumo"</item>
+    <item msgid="7858983209929864160">"Pete"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Kengele"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Gonga ili urejeshe."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Gonga ili uweke mtetemo. Huenda ikakomesha huduma za zana za walio na matatizo ya kuona au kusikia."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Gonga ili ukomeshe. Huenda ikakomesha huduma za zana za walio na matatizo ya kuona au kusikia."</string>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 6c5a313..7e63cbf 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -94,8 +94,6 @@
     <dimen name="navigation_key_width">128dp</dimen>
     <dimen name="navigation_key_padding">25dp</dimen>
 
-    <dimen name="qs_expand_margin">0dp</dimen>
-
     <!-- Keyboard shortcuts helper -->
     <dimen name="ksh_layout_width">488dp</dimen>
 
diff --git a/packages/SystemUI/res/values-ta-rIN/strings.xml b/packages/SystemUI/res/values-ta-rIN/strings.xml
index d7ba719..6ba18c3 100644
--- a/packages/SystemUI/res/values-ta-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ta-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ரோமிங்"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"ஒலியளவு செய்தி: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"அசலை மீட்டமைக்க, தட்டவும்."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"பணி சுயவிவரத்தைப் பயன்படுத்துகிறீர்கள்"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"அழைப்பு"</item>
+    <item msgid="5997713001067658559">"சாதனம்"</item>
+    <item msgid="7858983209929864160">"ரிங்"</item>
+    <item msgid="1850038478268896762">"மீடியா"</item>
+    <item msgid="8265110906352372092">"அலாரம்"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"புளூடூத்"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. ஒலி இயக்க, தட்டவும்."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. அதிர்விற்கு அமைக்க, தட்டவும். அணுகல்தன்மை சேவைகள் ஒலியடக்கப்படக்கூடும்."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. ஒலியடக்க, தட்டவும். அணுகல்தன்மை சேவைகள் ஒலியடக்கப்படக்கூடும்."</string>
diff --git a/packages/SystemUI/res/values-te-rIN/strings.xml b/packages/SystemUI/res/values-te-rIN/strings.xml
index 1843ee4..42705fe 100644
--- a/packages/SystemUI/res/values-te-rIN/strings.xml
+++ b/packages/SystemUI/res/values-te-rIN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"రోమింగ్"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> అనేది వాల్యూమ్ డైలాగ్"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"అసలు దాన్ని పునరుద్ధరించడానికి నొక్కండి."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"మీరు మీ కార్యాలయ ప్రొఫైల్‌ను ఉపయోగిస్తున్నారు"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"కాల్"</item>
+    <item msgid="5997713001067658559">"సిస్టమ్"</item>
+    <item msgid="7858983209929864160">"రింగ్"</item>
+    <item msgid="1850038478268896762">"మీడియా"</item>
+    <item msgid="8265110906352372092">"అలారం"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"బ్లూటూత్"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. అన్‌మ్యూట్ చేయడానికి నొక్కండి."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. వైబ్రేషన్‌కు సెట్ చేయడానికి నొక్కండి. ప్రాప్యత సేవలు మ్యూట్ చేయబడవచ్చు."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. మ్యూట్ చేయడానికి నొక్కండి. ప్రాప్యత సేవలు మ్యూట్ చేయబడవచ్చు."</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index a20033a..7474ab3 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"โรมมิ่ง"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> เป็นช่องโต้ตอบระดับเสียง"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"แตะเพื่อคืนค่าเป็นค่าเดิม"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"คุณกำลังใช้โปรไฟล์งานของคุณ"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"โทร"</item>
+    <item msgid="5997713001067658559">"ระบบ"</item>
+    <item msgid="7858983209929864160">"ทำให้ส่งเสียง"</item>
+    <item msgid="1850038478268896762">"สื่อ"</item>
+    <item msgid="8265110906352372092">"การปลุก"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"บลูทูธ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s แตะเพื่อเปิดเสียง"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s แตะเพื่อตั้งค่าให้สั่น อาจมีการปิดเสียงบริการการเข้าถึง"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s แตะเพื่อปิดเสียง อาจมีการปิดเสียงบริการการเข้าถึง"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 41326ab..35b2392 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Roaming"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"Ang <xliff:g id="APP_NAME">%1$s</xliff:g> ang volume dialog"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"I-tap upang i-restore ang orihinal."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Ginagamit mo ang iyong profile sa trabaho"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Tawag"</item>
+    <item msgid="5997713001067658559">"System"</item>
+    <item msgid="7858983209929864160">"Ipa-ring"</item>
+    <item msgid="1850038478268896762">"Media"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. I-tap upang i-unmute."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. I-tap upang itakda na mag-vibrate. Maaaring i-mute ang mga serbisyo sa Accessibility."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. I-tap upang i-mute. Maaaring i-mute ang mga serbisyo sa Accessibility."</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index e95785f..49dfc95 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Dolaşımda"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ses denetimi iletişim kutusu olarak ayarlandı"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Orijinali geri yüklemek için dokunun."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"İş profilinizi kullanıyorsunuz"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Çağrı"</item>
+    <item msgid="5997713001067658559">"Sistem"</item>
+    <item msgid="7858983209929864160">"Zili Çaldır"</item>
+    <item msgid="1850038478268896762">"Medya"</item>
+    <item msgid="8265110906352372092">"Alarm"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Sesi açmak için hafifçe dokunun."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Titreşime ayarlamak için hafifçe dokunun. Erişilebilirlik hizmetlerinin sesi kapatılabilir."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Sesi kapatmak için hafifçe dokunun. Erişilebilirlik hizmetlerinin sesi kapatılabilir."</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index f68521c..79333a9 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -145,6 +145,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Роумінг"</string>
@@ -440,6 +441,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> призначено регулятором гучності"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Торкніться, щоб відновити оригінал."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Ви в робочому профілі"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Виклик"</item>
+    <item msgid="5997713001067658559">"Система"</item>
+    <item msgid="7858983209929864160">"Дзвонити"</item>
+    <item msgid="1850038478268896762">"Медіа"</item>
+    <item msgid="8265110906352372092">"Будильник"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Торкніться, щоб увімкнути звук."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Торкніться, щоб налаштувати вібросигнал. Спеціальні можливості може бути вимкнено."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Торкніться, щоб вимкнути звук. Спеціальні можливості може бути вимкнено."</string>
diff --git a/packages/SystemUI/res/values-ur-rPK/strings.xml b/packages/SystemUI/res/values-ur-rPK/strings.xml
index 92139f1..e652aee 100644
--- a/packages/SystemUI/res/values-ur-rPK/strings.xml
+++ b/packages/SystemUI/res/values-ur-rPK/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+‎"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"رومنگ"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> والیوم ڈائلاگ ہے"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"اصل بحال کرنے کیلئے تھپتھپائیں۔"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"آپ اپنا دفتری پروفائل استعمال کر رہے ہیں۔"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"کال"</item>
+    <item msgid="5997713001067658559">"سسٹم"</item>
+    <item msgid="7858983209929864160">"رِنگ"</item>
+    <item msgid="1850038478268896762">"میڈیا"</item>
+    <item msgid="8265110906352372092">"الارم"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"بلوٹوتھ"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"‏‎%1$s۔ آواز چالو کرنے کیلئے تھپتھپائیں۔"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"‏‎%1$s۔ ارتعاش پر سیٹ کرنے کیلئے تھپتھپائیں۔ Accessibility سروسز شاید خاموش ہوں۔"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"‏‎%1$s۔ خاموش کرنے کیلئے تھپتھپائیں۔ Accessibility سروسز شاید خاموش ہوں۔"</string>
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings.xml b/packages/SystemUI/res/values-uz-rUZ/strings.xml
index 84e2a29..a8923dc 100644
--- a/packages/SystemUI/res/values-uz-rUZ/strings.xml
+++ b/packages/SystemUI/res/values-uz-rUZ/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Rouming"</string>
@@ -213,7 +214,7 @@
     <string name="accessibility_quick_settings_location_on" msgid="5809937096590102036">"Joylashuv ma’lumotini yuborish yoqilgan."</string>
     <string name="accessibility_quick_settings_location_changed_off" msgid="8526845571503387376">"Joylashuv ma’lumotini yuborish o‘chirildi."</string>
     <string name="accessibility_quick_settings_location_changed_on" msgid="339403053079338468">"Joylashuv ma’lumotini yuborish yoqildi."</string>
-    <string name="accessibility_quick_settings_alarm" msgid="3959908972897295660">"Uyg‘otkich signali <xliff:g id="TIME">%s</xliff:g> da chalinadi."</string>
+    <string name="accessibility_quick_settings_alarm" msgid="3959908972897295660">"Signal <xliff:g id="TIME">%s</xliff:g> da chalinadi."</string>
     <string name="accessibility_quick_settings_close" msgid="3115847794692516306">"Panelni yopish."</string>
     <string name="accessibility_quick_settings_more_time" msgid="3659274935356197708">"Ko‘proq vaqt."</string>
     <string name="accessibility_quick_settings_less_time" msgid="2404728746293515623">"Kamroq vaqt."</string>
@@ -265,7 +266,7 @@
     <string name="quick_settings_dnd_label" msgid="8735855737575028208">"Bezovta qilinmasin"</string>
     <string name="quick_settings_dnd_priority_label" msgid="483232950670692036">"Faqat muhimlari"</string>
     <string name="quick_settings_dnd_alarms_label" msgid="2559229444312445858">"Faqat signallar"</string>
-    <string name="quick_settings_dnd_none_label" msgid="5025477807123029478">"Tinchlik saqlansin"</string>
+    <string name="quick_settings_dnd_none_label" msgid="5025477807123029478">"Jimjitlik"</string>
     <string name="quick_settings_bluetooth_label" msgid="6304190285170721401">"Bluetooth"</string>
     <string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g>ta qurilma)"</string>
     <string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth o‘chirilgan"</string>
@@ -340,7 +341,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Qidirish"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> uchun yuqoriga suring."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> uchun chapga suring."</string>
-    <string name="zen_priority_introduction" msgid="3070506961866919502">"Turli ovoz va tebranishlar endi sizni bezovta qilmaydi. Biroq uyg‘otkich signallari, eslatmalar, tadbirlar haqidagi bildirishnomalar va siz tanlagan abonentlardan kelgan qo‘ng‘iroqlar bundan mustasno."</string>
+    <string name="zen_priority_introduction" msgid="3070506961866919502">"Turli ovoz va tebranishlar endi sizni bezovta qilmaydi. Biroq signallar, eslatmalar, tadbirlar haqidagi bildirishnomalar va siz tanlagan abonentlardan kelgan qo‘ng‘iroqlar bundan mustasno."</string>
     <string name="zen_priority_customize_button" msgid="7948043278226955063">"Sozlash"</string>
     <string name="zen_silence_introduction_voice" msgid="2284540992298200729">"Bu BARCHA, jumladan signallar, musiqa, videolar va o‘yinlardan keladigan tovush va tebranishlarni to‘sib qo‘yadi. Siz telefon qo‘ng‘iroqlarini bemalol amalga oshirishingiz mumkin."</string>
     <string name="zen_silence_introduction" msgid="3137882381093271568">"Bu BARCHA, jumladan, signallar, musiqa, videolar va o‘yinlardan keladigan tovush va tebranishlarni to‘sib qo‘yadi."</string>
@@ -351,8 +352,8 @@
     <string name="phone_hint" msgid="4872890986869209950">"Telefonni ochish uchun suring"</string>
     <string name="voice_hint" msgid="8939888732119726665">"Ovozli yordam: belgidan boshlab suring"</string>
     <string name="camera_hint" msgid="7939688436797157483">"Kamerani ochish uchun suring"</string>
-    <string name="interruption_level_none_with_warning" msgid="5114872171614161084">"Tinchlik saqlansin. Ekrandan o‘qish dasturlari ham ishlamaydi."</string>
-    <string name="interruption_level_none" msgid="6000083681244492992">"Tinchlik saqlansin"</string>
+    <string name="interruption_level_none_with_warning" msgid="5114872171614161084">"Jimjitlik – tinchlik saqlanadi. Ekrandan o‘qish dasturlari ham ishlamaydi."</string>
+    <string name="interruption_level_none" msgid="6000083681244492992">"Jimjitlik"</string>
     <string name="interruption_level_priority" msgid="6426766465363855505">"Faqat muhimlari"</string>
     <string name="interruption_level_alarms" msgid="5226306993448328896">"Faqat signallar"</string>
     <string name="interruption_level_none_twoline" msgid="3957581548190765889">"Tinchlik\nsaqlansin"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> ovoz balandligini boshqaradi"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Aslini tiklash uchun bosing."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Siz ishchi profildan foydalanmoqdasiz"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Qo‘ng‘iroq"</item>
+    <item msgid="5997713001067658559">"Tizim"</item>
+    <item msgid="7858983209929864160">"Jiringlatish"</item>
+    <item msgid="1850038478268896762">"Multimedia"</item>
+    <item msgid="8265110906352372092">"Signal"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Ovozini yoqish uchun ustiga bosing."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Tebranishni yoqish uchun ustiga bosing. Maxsus imkoniyatlar ishlamasligi mumkin."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Ovozini o‘chirish uchun ustiga bosing. Maxsus imkoniyatlar ishlamasligi mumkin."</string>
@@ -642,7 +655,7 @@
     <string name="accessibility_quick_settings_settings" msgid="6132460890024942157">"Sozlamalarni ochish."</string>
     <string name="accessibility_quick_settings_expand" msgid="2375165227880477530">"Tezkor sozlamalarni ochish."</string>
     <string name="accessibility_quick_settings_collapse" msgid="1792625797142648105">"Tezkor sozlamalarni yopish."</string>
-    <string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Uyg‘otkich o‘rnatildi."</string>
+    <string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Signal o‘rnatildi."</string>
     <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"<xliff:g id="ID_1">%s</xliff:g> sifatida kirgansiz"</string>
     <string name="accessibility_quick_settings_no_internet" msgid="31890692343084075">"Internet yo‘q."</string>
     <string name="accessibility_quick_settings_open_details" msgid="4230931801728005194">"Tafsilotlarini ko‘rsatish."</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 24c2907..edc8e48 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3,5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Chuyển vùng"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"<xliff:g id="APP_NAME">%1$s</xliff:g> là hộp thoại khối lượng"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Nhấn để khôi phục ảnh chụp màn hình gốc."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Bạn đang sử dụng hồ sơ công việc của mình"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Gọi"</item>
+    <item msgid="5997713001067658559">"Hệ thống"</item>
+    <item msgid="7858983209929864160">"Chuông"</item>
+    <item msgid="1850038478268896762">"Phương tiện"</item>
+    <item msgid="8265110906352372092">"Báo thức"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Nhấn để bật tiếng."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Nhấn để đặt chế độ rung. Bạn có thể tắt tiếng dịch vụ trợ năng."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Nhấn để tắt tiếng. Bạn có thể tắt tiếng dịch vụ trợ năng."</string>
diff --git a/packages/SystemUI/res/values-w550dp-land/dimens.xml b/packages/SystemUI/res/values-w550dp-land/dimens.xml
index 4160c83..eaca9d7 100644
--- a/packages/SystemUI/res/values-w550dp-land/dimens.xml
+++ b/packages/SystemUI/res/values-w550dp-land/dimens.xml
@@ -18,6 +18,4 @@
 <resources>
     <!-- Standard notification width + gravity -->
     <dimen name="notification_panel_width">544dp</dimen>
-
-    <dimen name="qs_expand_margin">32dp</dimen>
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 7613099..beb08d1 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫游中"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"“<xliff:g id="APP_NAME">%1$s</xliff:g>”已用作音量控制对话框"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"点按即可恢复原始设置。"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"您当前正在使用工作资料"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"通话"</item>
+    <item msgid="5997713001067658559">"系统"</item>
+    <item msgid="7858983209929864160">"铃声"</item>
+    <item msgid="1850038478268896762">"媒体"</item>
+    <item msgid="8265110906352372092">"闹钟"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"蓝牙"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s。点按即可取消静音。"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s。点按即可设为振动,但可能会同时将无障碍服务设为静音。"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s。点按即可设为静音,但可能会同时将无障碍服务设为静音。"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 40d3429..9d25d71 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫遊"</string>
@@ -436,6 +437,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」為音量對話框"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"輕按即可復原。"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"您正在使用工作設定檔"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"通話"</item>
+    <item msgid="5997713001067658559">"系統"</item>
+    <item msgid="7858983209929864160">"鈴聲"</item>
+    <item msgid="1850038478268896762">"媒體"</item>
+    <item msgid="8265110906352372092">"鬧鐘"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"藍牙"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s。輕按即可取消靜音。"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s。輕按即可設為震動。無障礙功能服務可能已經設為靜音。"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s。輕按即可設為靜音。無障礙功能服務可能已經設為靜音。"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 7f03c5d..8979b85 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫遊中"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」現在是預設的音量控制對話方塊。"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"輕觸即可恢復原始設定。"</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"您正在使用 Work 設定檔"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"通話"</item>
+    <item msgid="5997713001067658559">"系統"</item>
+    <item msgid="7858983209929864160">"鈴聲"</item>
+    <item msgid="1850038478268896762">"媒體"</item>
+    <item msgid="8265110906352372092">"鬧鐘"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"藍牙"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s。輕觸即可取消靜音。"</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s。輕觸即可設為震動,但系統可能會將無障礙服務一併設為靜音。"</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s。輕觸即可設為靜音,但系統可能會將無障礙服務一併設為靜音。"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index bedaeca..b4526bd 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -143,6 +143,7 @@
     <string name="accessibility_data_connection_3g" msgid="8628562305003568260">"3G"</string>
     <string name="accessibility_data_connection_3.5g" msgid="8664845609981692001">"3.5G"</string>
     <string name="accessibility_data_connection_4g" msgid="7741000750630089612">"4G"</string>
+    <string name="accessibility_data_connection_4g_plus" msgid="3032226872470658661">"4G+"</string>
     <string name="accessibility_data_connection_lte" msgid="5413468808637540658">"I-LTE"</string>
     <string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"Iyazulazula"</string>
@@ -434,6 +435,18 @@
     <string name="volumeui_notification_title" msgid="4906770126345910955">"I-<xliff:g id="APP_NAME">%1$s</xliff:g> yingxoxo yevolumu"</string>
     <string name="volumeui_notification_text" msgid="8819536904234337445">"Thepha ukuze ubuyisele okwasekuqaleni."</string>
     <string name="managed_profile_foreground_toast" msgid="5421487114739245972">"Usebenzisa iphrofayela yakho yomsebenzi"</string>
+  <string-array name="volume_stream_titles">
+    <item msgid="5841843895402729630">"Shayela"</item>
+    <item msgid="5997713001067658559">"Isistimu"</item>
+    <item msgid="7858983209929864160">"Khalisa"</item>
+    <item msgid="1850038478268896762">"Abezindaba"</item>
+    <item msgid="8265110906352372092">"I-Alamu"</item>
+    <item msgid="5339394737636839168"></item>
+    <item msgid="2951313578278086204">"I-Bluetooth"</item>
+    <item msgid="2919807739709798970"></item>
+    <item msgid="150349973435223405"></item>
+    <item msgid="6761963760295549099"></item>
+  </string-array>
     <string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Thepha ukuze ususe ukuthula."</string>
     <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s. Thepha ukuze usethe ukudlidliza. Amasevisi okufinyelela angathuliswa."</string>
     <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s. Thepha ukuze uthulise. Amasevisi okufinyelela angathuliswa."</string>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index cb51649..9061376 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -30,18 +30,13 @@
     <color name="batterymeter_charge_color">#FFFFFFFF</color>
     <color name="batterymeter_bolt_color">#FFFFFFFF</color>
     <color name="qs_batterymeter_frame_color">#FF404040</color>
-    <color name="system_primary_color">#ff263238</color><!-- blue grey 900 -->
-    <color name="system_secondary_color">#ff37474F</color><!-- blue grey 800 -->
-    <color name="system_accent_color">#ff80CBC4</color><!-- deep teal 200 -->
     <color name="system_warning_color">#fff4511e</color><!-- deep orange 600 -->
     <color name="qs_text">#FFFFFFFF</color>
     <color name="qs_tile_divider">#29ffffff</color><!-- 16% white -->
     <color name="qs_subhead">#99FFFFFF</color><!-- 60% white -->
-    <color name="qs_detail_empty">#24B0BEC5</color><!-- 14% blue grey 200 -->
-    <color name="qs_detail_button">#FFB0BEC5</color><!-- 100% blue grey 200 -->
+    <color name="qs_detail_button">@*android:color/quaternary_device_default_settings</color>
     <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white -->
     <color name="qs_detail_transition">#66FFFFFF</color>
-    <color name="qs_detail_progress_track">#99009688</color><!-- 60% deep teal 500 -->
     <color name="data_usage_secondary">#99FFFFFF</color><!-- 60% white -->
     <color name="data_usage_graph_track">#33FFFFFF</color><!-- 20% white -->
     <color name="data_usage_graph_warning">#FFFFFFFF</color>
@@ -99,15 +94,11 @@
     <!-- The color of the ripples on the tinted notifications -->
     <color name="notification_ripple_tinted_color">#30ffffff</color>
 
-    <!-- The color of the circle around the primary user in the user switcher -->
-    <color name="current_user_border_color">@color/system_accent_color</color>
-
     <!-- The color of the gear shown behind a notification -->
     <color name="notification_gear_color">#ff757575</color>
 
     <!-- The "inside" of a notification, reached via longpress -->
     <color name="notification_guts_bg_color">#eeeeee</color>
-    <color name="notification_guts_slider_color">@*android:color/material_deep_teal_500</color>
     <color name="notification_guts_disabled_slider_color">@*android:color/material_grey_300</color>
     <color name="notification_guts_secondary_slider_color">#858383</color>
     <color name="notification_guts_icon_tint">#8a000000</color>
@@ -126,13 +117,11 @@
     <!-- Shadow color for the furthest pixels around the fake shadow for recents. -->
     <color name="fake_shadow_end_color">#03000000</color>
 
-    <color name="screen_pinning_nav_icon_highlight_outer">#4080cbc4</color><!-- 25% deep teal 200 -->
-    <color name="screen_pinning_request_bg">#ff009688</color><!-- deep teal 500 -->
     <color name="screen_pinning_request_window_bg">#80000000</color>
 
     <color name="segmented_buttons_background">#14FFFFFF</color><!-- 8% white -->
     <color name="segmented_button_selected">#FFFFFFFF</color>
-    <color name="segmented_button_unselected">#FFB0BEC5</color><!-- blue grey 200 -->
+    <color name="segmented_button_unselected">@*android:color/quaternary_device_default_settings</color>
 
     <color name="dark_mode_icon_color_single_tone">#99000000</color>
     <color name="dark_mode_icon_color_dual_tone_background">#3d000000</color>
@@ -142,13 +131,9 @@
     <color name="light_mode_icon_color_dual_tone_background">#4dffffff</color>
     <color name="light_mode_icon_color_dual_tone_fill">#ffffff</color>
 
-    <color name="zen_introduction_message_background">#ff009688</color><!-- deep teal 500 -->
     <color name="volume_icon_color">#ffffffff</color>
     <color name="volume_settings_icon_color">#7fffffff</color>
-    <color name="volume_slider_inactive">#FFB0BEC5</color><!-- blue grey 200 -->
-
-    <color name="fab_ripple">#1fffffff</color><!-- 12% white -->
-    <color name="fab_shape">#ff009688</color><!-- Teal 500 -->
+    <color name="volume_slider_inactive">@*android:color/quaternary_device_default_settings</color>
 
     <color name="docked_divider_background">#ff000000</color>
     <color name="docked_divider_handle">#ffffff</color>
@@ -166,16 +151,10 @@
     <color name="qs_tile_tint_inactive">#4dffffff</color>
     <color name="qs_tile_tint_active">#ffffffff</color>
 
-    <color name="switch_bar_background">#ff37474f</color>
-    <color name="switch_accent_color">#ff7fcac3</color>
-
     <!-- Keyboard shortcuts colors -->
-    <color name="ksh_system_group_color">@color/material_deep_teal_500</color>
     <color name="ksh_application_group_color">#fff44336</color>
     <color name="ksh_keyword_color">#d9000000</color>
     <color name="ksh_key_item_color">@color/material_grey_600</color>
     <color name="ksh_key_item_background">@color/material_grey_100</color>
 
-    <!-- Background color of edit overflow -->
-    <color name="qs_edit_overflow_bg">#455A64</color>
 </resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 02b1b50..134388f 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -103,9 +103,19 @@
         wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location
     </string>
 
+    <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
+    <string name="quick_settings_tiles_stock" translatable="false">
+        wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location,hotspot,inversion,saver,work,cast,night
+    </string>
+
     <!-- The tiles to display in QuickSettings -->
     <string name="quick_settings_tiles" translatable="false">default</string>
 
+    <!-- The tiles to display in QuickSettings in retail mode -->
+    <string name="quick_settings_tiles_retail_mode" translatable="false">
+        cell,battery,dnd,flashlight,rotation,location
+    </string>
+
     <!-- Whether or not the RSSI tile is capitalized or not. -->
     <bool name="quick_settings_rssi_tile_capitalization">true</bool>
 
@@ -265,4 +275,3 @@
     <bool name="quick_settings_show_full_alarm">false</bool>
 
 </resources>
-
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 2a4752a..e1cbbc5 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -130,7 +130,7 @@
     <dimen name="close_handle_underlap">32dp</dimen>
 
     <!-- Height of the status bar header bar -->
-    <dimen name="status_bar_header_height">80dp</dimen>
+    <dimen name="status_bar_header_height">104dp</dimen>
 
     <!-- Height of the status bar header bar when expanded -->
     <dimen name="status_bar_header_height_expanded">116dp</dimen>
@@ -141,6 +141,9 @@
     <!-- Margin start of the system icons super container -->
     <dimen name="system_icons_super_container_margin_start">16dp</dimen>
 
+    <!-- Margin end of the system icons super container when the avatar is missing. -->
+    <dimen name="system_icons_super_container_avatarless_margin_end">6dp</dimen>
+
     <!-- Width for the notification panel and related windows -->
     <dimen name="match_parent">-1px</dimen>
     <dimen name="standard_notification_panel_width">416dp</dimen>
@@ -172,10 +175,6 @@
     <dimen name="qs_tile_margin_top">16dp</dimen>
     <dimen name="qs_quick_tile_size">48dp</dimen>
     <dimen name="qs_quick_tile_padding">12dp</dimen>
-    <dimen name="qs_date_anim_translation">32dp</dimen>
-    <dimen name="qs_date_alarm_anim_translation">22dp</dimen>
-    <dimen name="qs_date_collapsed_text_size">14sp</dimen>
-    <dimen name="qs_date_text_size">16sp</dimen>
     <dimen name="qs_header_gear_translation">16dp</dimen>
     <dimen name="qs_page_indicator_width">16dp</dimen>
     <dimen name="qs_page_indicator_height">8dp</dimen>
@@ -202,7 +201,6 @@
     <dimen name="qs_detail_margin_top">28dp</dimen>
     <dimen name="qs_data_usage_text_size">14sp</dimen>
     <dimen name="qs_data_usage_usage_text_size">36sp</dimen>
-    <dimen name="qs_expand_margin">0dp</dimen>
     <dimen name="qs_battery_padding">2dp</dimen>
     <dimen name="qs_detail_items_padding_top">4dp</dimen>
 
@@ -538,6 +536,19 @@
 
     <!-- Volume dialog root view bottom margin, at rest -->
     <dimen name="volume_dialog_margin_bottom">4dp</dimen>
+    <dimen name="volume_dialog_collapsed_padding_top">8dp</dimen>
+    <dimen name="volume_dialog_expanded_padding_top">22dp</dimen>
+    <dimen name="volume_dialog_padding_end">40dp</dimen>
+
+    <dimen name="volume_row_padding_bottom">9.4dp</dimen>
+    <dimen name="volume_row_padding_start">4dp</dimen>
+    <dimen name="volume_row_header_padding_start">16dp</dimen>
+    <dimen name="volume_row_height">64dp</dimen>
+    <dimen name="volume_row_slider_height">48dp</dimen>
+    <dimen name="volume_row_slider_padding_start">12dp</dimen>
+
+    <dimen name="volume_expander_margin_end">2dp</dimen>
+    <dimen name="volume_expander_margin_top">6dp</dimen>
 
     <!-- Padding between icon and text for managed profile toast -->
     <dimen name="managed_profile_toast_padding">4dp</dimen>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index f7a169c..3ed0711 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -348,6 +348,9 @@
     <!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_data_connection_4g">4G</string>
 
+    <!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+    <string name="accessibility_data_connection_4g_plus">4G+</string>
+
     <!-- Content description of the data connection type LTE for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_data_connection_lte">LTE</string>
 
@@ -1093,14 +1096,14 @@
     <!-- Toast shown when user unlocks screen and managed profile activity is in the foreground -->
     <string name="managed_profile_foreground_toast">You\'re using your work profile</string>
 
-    <string-array name="volume_stream_titles" translatable="false">
-        <item>Voice calls</item> <!-- STREAM_VOICE_CALL -->
+    <string-array name="volume_stream_titles">
+        <item>Call</item> <!-- STREAM_VOICE_CALL -->
         <item>System</item> <!-- STREAM_SYSTEM -->
-        <item>Notifications</item> <!-- STREAM_RING -->
+        <item>Ring</item> <!-- STREAM_RING -->
         <item>Media</item> <!-- STREAM_MUSIC -->
-        <item>Alarms</item> <!-- STREAM_ALARM -->
+        <item>Alarm</item> <!-- STREAM_ALARM -->
         <item></item> <!-- STREAM_NOTIFICATION -->
-        <item>Bluetooth calls</item> <!-- STREAM_BLUETOOTH_SCO -->
+        <item>Bluetooth</item> <!-- STREAM_BLUETOOTH_SCO -->
         <item></item> <!-- STREAM_SYSTEM_ENFORCED -->
         <item></item> <!-- STREAM_DTMF -->
         <item></item> <!-- STREAM_TTS -->
@@ -1333,59 +1336,6 @@
     <!-- Notification: Gear: Content description for the gear. [CHAR LIMIT=NONE] -->
     <string name="notification_gear_accessibility"><xliff:g id="app_name" example="YouTube">%1$s</xliff:g> notification controls</string>
 
-    <!-- SysUI Tuner: Color and appearance screen title [CHAR LIMIT=50] -->
-    <string name="color_and_appearance">Color and appearance</string>
-
-    <!-- SysUI Tuner: Name of the night mode feature [CHAR LIMIT=30] -->
-    <string name="night_mode">Night mode</string>
-
-    <!-- SysUI Tuner: Name of calibrate display dialog [CHAR LIMIT=30] -->
-    <string name="calibrate_display">Calibrate display</string>
-
-    <!-- SysUI Tuner: Summary of night mode when its on [CHAR LIMIT=NONE] -->
-    <string name="night_mode_on">On</string>
-
-    <!-- SysUI Tuner: Summary of night mode when its off [CHAR LIMIT=NONE] -->
-    <string name="night_mode_off">Off</string>
-
-    <!-- SysUI Tuner: Label for switch to turn on night mode automatically [CHAR LIMIT=50] -->
-    <string name="turn_on_automatically">Turn on automatically</string>
-
-    <!-- SysUI Tuner: Summary for switch to turn on night mode automatically [CHAR LIMIT=NONE] -->
-    <string name="turn_on_auto_summary">Switch into Night Mode as appropriate for location and time of day</string>
-
-    <!-- SysUI Tuner: Label for section controlling what night mode does [CHAR LIMIT=60] -->
-    <string name="when_night_mode_on">When Night Mode is on</string>
-
-    <!-- SysUI Tuner: Switch controlling whether dark theme is turned on with night mode [CHAR LIMIT=45] -->
-    <string name="use_dark_theme">Use dark theme for Android OS</string>
-
-    <!-- SysUI Tuner: Switch controlling whether tint is changed with night mode [CHAR LIMIT=45] -->
-    <string name="adjust_tint">Adjust tint</string>
-
-    <!-- SysUI Tuner: Switch controlling whether brightness is changed with night mode [CHAR LIMIT=45] -->
-    <string name="adjust_brightness">Adjust brightness</string>
-
-    <!-- SysUI Tuner: Disclaimer about using dark theme with night mode [CHAR LIMIT=NONE] -->
-    <string name="night_mode_disclaimer">The dark theme is applied to
-        core areas of Android OS that are normally displayed in a light theme,
-        such as Settings.</string>
-
-    <!-- Button to apply settings [CHAR LIMIT=30] -->
-    <string name="color_apply">Apply</string>
-
-    <!-- Title of warning dialog about bad color settings. [CHAR LIMIT=30] -->
-    <string name="color_revert_title">Confirm settings</string>
-
-    <!-- Message warning user about custom color settings [CHAR LIMIT=NONE] -->
-    <string name="color_revert_message">Some color settings can make this
-        device unusable. Click OK to confirm these color settings,
-        otherwise these settings will reset after 10 seconds.</string>
-
-    <string name="color_modification_r" translatable="false">R</string>
-    <string name="color_modification_g" translatable="false">G</string>
-    <string name="color_modification_b" translatable="false">B</string>
-
     <!-- Title of the battery settings detail panel [CHAR LIMIT=20] -->
     <string name="battery_panel_title">Battery usage</string>
 
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index aeb484f..1ee13e9 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -132,7 +132,7 @@
 
     <style name="TextAppearance.QS.DetailItemSecondary">
         <item name="android:textSize">@dimen/qs_detail_item_secondary_text_size</item>
-        <item name="android:textColor">@color/system_accent_color</item>
+        <item name="android:textColor">?android:attr/colorAccent</item>
     </style>
 
     <style name="TextAppearance.QS.Introduction">
@@ -177,7 +177,7 @@
 
     <style name="TextAppearance.QS.DataUsage.Usage">
         <item name="android:textSize">@dimen/qs_data_usage_usage_text_size</item>
-        <item name="android:textColor">@color/system_accent_color</item>
+        <item name="android:textColor">?android:attr/colorAccent</item>
     </style>
 
     <style name="TextAppearance.QS.DataUsage.Secondary">
@@ -217,19 +217,13 @@
     <style name="Animation.StatusBar">
     </style>
 
-    <style name="systemui_theme" parent="@android:style/Theme.DeviceDefault">
-        <item name="android:colorPrimary">@color/system_primary_color</item>
-        <item name="android:colorControlActivated">@color/system_accent_color</item>
-    </style>
+    <style name="systemui_theme" parent="@android:style/Theme.DeviceDefault" />
 
     <style name="systemui_theme_remote_input" parent="@android:style/Theme.DeviceDefault.Light">
         <item name="android:colorAccent">@color/remote_input_accent</item>
     </style>
 
-    <style name="Theme.SystemUI.Dialog" parent="@android:style/Theme.DeviceDefault.Light.Dialog">
-        <item name="android:colorPrimary">@color/system_primary_color</item>
-        <item name="android:colorControlActivated">@color/system_accent_color</item>
-    </style>
+    <style name="Theme.SystemUI.Dialog" parent="@android:style/Theme.DeviceDefault.Light.Dialog" />
 
     <style name="Theme.SystemUI.Dialog.Alert" parent="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert" />
 
@@ -296,7 +290,7 @@
     <style name="TextAppearance.Volume.ZenDetail">
         <item name="android:textSize">14sp</item>
         <item name="android:fontFamily">sans-serif</item>
-        <item name="android:textColor">#ffb0b3c5</item>
+        <item name="android:textColor">@*android:color/quaternary_device_default_settings</item>
     </style>
 
     <style name="VolumeButtons" parent="@android:style/Widget.Material.Button.Borderless">
@@ -320,12 +314,12 @@
         <item name="android:layout_height">48dp</item>
     </style>
 
-    <style name="TunerSettings" parent="@android:style/Theme.Material.Settings">
+    <style name="TunerSettings" parent="@android:style/Theme.DeviceDefault.Settings">
         <item name="android:windowActionBar">false</item>
         <item name="preferenceTheme">@style/TunerPreferenceTheme</item>
     </style>
 
-    <style name="TunerPreferenceTheme" parent="@android:style/Theme.Material.Settings">
+    <style name="TunerPreferenceTheme" parent="@android:style/Theme.DeviceDefault.Settings">
         <item name="dropdownPreferenceStyle">@style/Preference.DropDown.Material</item>
     </style>
 
@@ -341,16 +335,16 @@
     </style>
 
     <style name="TextAppearance.NotificationGuts.Secondary">
-        <item name="android:alpha">.54</item>
+        <item name="android:textColor">?android:attr/textColorSecondary</item>
     </style>
 
     <style name="TextAppearance.NotificationGuts.Primary">
-        <item name="android:alpha">.87</item>
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
         <item name="android:textSize">16sp</item>
     </style>
 
     <style name="TextAppearance.NotificationGuts.Radio">
-        <item name="android:alpha">.87</item>
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
     </style>
 
     <style name="TextAppearance.NotificationGuts.Button">
@@ -358,15 +352,11 @@
         <item name="android:textAllCaps">true</item>
         <item name="android:fontFamily">sans-serif-medium</item>
         <item name="android:gravity">center</item>
-        <item name="android:textColor">@*android:color/material_deep_teal_500</item>
+        <item name="android:textColor">?android:attr/colorAccent</item>
     </style>
 
-    <style name="ThemeOverlay.SwitchBar" parent="@android:style/ThemeOverlay">
-        <item name="android:colorAccent">@color/switch_accent_color</item>
-    </style>
-
-    <style name="edit_theme" parent="@android:style/Theme.Material">
-        <item name="android:colorBackground">@color/qs_edit_overflow_bg</item>
+    <style name="edit_theme" parent="@*android:style/Theme.DeviceDefault.Settings.Dark">
+        <item name="android:colorBackground">?android:attr/colorSecondary</item>
     </style>
 
 </resources>
diff --git a/packages/SystemUI/res/xml/color_and_appearance.xml b/packages/SystemUI/res/xml/color_and_appearance.xml
deleted file mode 100644
index 21f890e..0000000
--- a/packages/SystemUI/res/xml/color_and_appearance.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:sysui="http://schemas.android.com/apk/res-auto"
-    android:title="@string/color_and_appearance">
-
-    <Preference
-        android:key="night_mode"
-        android:title="@string/night_mode"
-        android:fragment="com.android.systemui.tuner.NightModeFragment" />
-
-    <com.android.systemui.tuner.CalibratePreference
-        android:key="calibrate"
-        android:title="@string/calibrate_display" />
-
-</PreferenceScreen>
diff --git a/packages/SystemUI/res/xml/night_mode.xml b/packages/SystemUI/res/xml/night_mode.xml
deleted file mode 100644
index 34af820..0000000
--- a/packages/SystemUI/res/xml/night_mode.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:sysui="http://schemas.android.com/apk/res-auto"
-    android:title="@string/night_mode">
-
-    <SwitchPreference
-        android:key="auto"
-        android:title="@string/turn_on_automatically"
-        android:summary="@string/turn_on_auto_summary" />
-
-    <PreferenceCategory
-        android:title="@string/when_night_mode_on">
-
-        <SwitchPreference
-            android:key="adjust_tint"
-            android:title="@string/adjust_tint" />
-
-        <SwitchPreference
-            android:key="adjust_brightness"
-            android:title="@string/adjust_brightness" />
-
-    </PreferenceCategory>
-
-</PreferenceScreen>
diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml
index 116bc69..b46e862 100644
--- a/packages/SystemUI/res/xml/tuner_prefs.xml
+++ b/packages/SystemUI/res/xml/tuner_prefs.xml
@@ -100,13 +100,6 @@
 
     </PreferenceScreen>
 
-    <!--
-    <Preference
-        android:key="color_transform"
-        android:title="@string/color_and_appearance"
-        android:fragment="com.android.systemui.tuner.ColorAndAppearanceFragment" />
-    -->
-
     <PreferenceScreen
         android:key="volume_and_do_not_disturb"
         android:title="@string/volume_and_do_not_disturb">
diff --git a/packages/SystemUI/src/com/android/systemui/Interpolators.java b/packages/SystemUI/src/com/android/systemui/Interpolators.java
index 17f4dab..fd3bd92 100644
--- a/packages/SystemUI/src/com/android/systemui/Interpolators.java
+++ b/packages/SystemUI/src/com/android/systemui/Interpolators.java
@@ -36,6 +36,7 @@
     public static final Interpolator ACCELERATE = new AccelerateInterpolator();
     public static final Interpolator ACCELERATE_DECELERATE = new AccelerateDecelerateInterpolator();
     public static final Interpolator DECELERATE_QUINT = new DecelerateInterpolator(2.5f);
+    public static final Interpolator CUSTOM_40_40 = new PathInterpolator(0.4f, 0f, 0.6f, 1f);
 
     /**
      * Interpolator to be used when animating a move based on a click. Pair with enough duration.
diff --git a/packages/SystemUI/src/com/android/systemui/Prefs.java b/packages/SystemUI/src/com/android/systemui/Prefs.java
index 907616c..19ae295 100644
--- a/packages/SystemUI/src/com/android/systemui/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/Prefs.java
@@ -47,7 +47,6 @@
         Key.QS_DATA_SAVER_DIALOG_SHOWN,
         Key.QS_INVERT_COLORS_ADDED,
         Key.QS_WORK_ADDED,
-        Key.QS_NIGHT_ADDED,
     })
     public @interface Key {
         String OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME = "OverviewLastStackTaskActiveTime";
@@ -67,7 +66,6 @@
         String QS_DATA_SAVER_DIALOG_SHOWN = "QsDataSaverDialogShown";
         String QS_INVERT_COLORS_ADDED = "QsInvertColorsAdded";
         String QS_WORK_ADDED = "QsWorkAdded";
-        String QS_NIGHT_ADDED = "QsNightAdded";
     }
 
     public static boolean getBoolean(Context context, @Key String key, boolean defaultValue) {
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
index 53c2233..06ce88cc 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
@@ -23,8 +23,12 @@
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.ViewMediatorCallback;
+import com.android.systemui.R;
+import com.android.systemui.assist.AssistManager;
+import com.android.systemui.statusbar.BaseStatusBar;
 import com.android.systemui.statusbar.ScrimView;
 import com.android.systemui.statusbar.phone.KeyguardBouncer;
+import com.android.systemui.statusbar.phone.LockscreenWallpaper;
 import com.android.systemui.statusbar.phone.NotificationIconAreaController;
 import com.android.systemui.statusbar.phone.PhoneStatusBar;
 import com.android.systemui.statusbar.phone.QSTileHost;
@@ -89,7 +93,7 @@
     }
 
     public ScrimController createScrimController(ScrimView scrimBehind, ScrimView scrimInFront,
-            View headsUpScrim) {
+            View headsUpScrim, LockscreenWallpaper lockscreenWallpaper) {
         return new ScrimController(scrimBehind, scrimInFront, headsUpScrim);
     }
 
@@ -115,4 +119,8 @@
     public <T> T createInstance(Class<T> classType) {
         return null;
     }
+
+    public AssistManager createAssistManager(BaseStatusBar bar, Context context) {
+        return new AssistManager(bar, context);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistDisclosure.java b/packages/SystemUI/src/com/android/systemui/assist/AssistDisclosure.java
index 5878219..8bd38db 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistDisclosure.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistDisclosure.java
@@ -95,39 +95,34 @@
     private class AssistDisclosureView extends View
             implements ValueAnimator.AnimatorUpdateListener {
 
-        public static final int TRACING_ANIMATION_DURATION = 600;
-        public static final int ALPHA_IN_ANIMATION_DURATION = 450;
-        public static final int ALPHA_OUT_ANIMATION_DURATION = 400;
+        static final int FULL_ALPHA = 222; // 87%
+        static final int ALPHA_IN_ANIMATION_DURATION = 400;
+        static final int ALPHA_OUT_ANIMATION_DURATION = 300;
+
 
         private float mThickness;
         private float mShadowThickness;
         private final Paint mPaint = new Paint();
         private final Paint mShadowPaint = new Paint();
 
-        private final ValueAnimator mTracingAnimator;
         private final ValueAnimator mAlphaOutAnimator;
         private final ValueAnimator mAlphaInAnimator;
         private final AnimatorSet mAnimator;
 
-        private float mTracingProgress = 0;
         private int mAlpha = 0;
 
         public AssistDisclosureView(Context context) {
             super(context);
 
-            mTracingAnimator = ValueAnimator.ofFloat(0, 1).setDuration(TRACING_ANIMATION_DURATION);
-            mTracingAnimator.addUpdateListener(this);
-            mTracingAnimator.setInterpolator(AnimationUtils.loadInterpolator(mContext,
-                    R.interpolator.assist_disclosure_trace));
-            mAlphaInAnimator = ValueAnimator.ofInt(0, 255).setDuration(ALPHA_IN_ANIMATION_DURATION);
+            mAlphaInAnimator = ValueAnimator.ofInt(0, FULL_ALPHA)
+                    .setDuration(ALPHA_IN_ANIMATION_DURATION);
             mAlphaInAnimator.addUpdateListener(this);
-            mAlphaInAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
-            mAlphaOutAnimator = ValueAnimator.ofInt(255, 0).setDuration(
+            mAlphaInAnimator.setInterpolator(Interpolators.CUSTOM_40_40);
+            mAlphaOutAnimator = ValueAnimator.ofInt(FULL_ALPHA, 0).setDuration(
                     ALPHA_OUT_ANIMATION_DURATION);
             mAlphaOutAnimator.addUpdateListener(this);
-            mAlphaOutAnimator.setInterpolator(Interpolators.FAST_OUT_LINEAR_IN);
+            mAlphaOutAnimator.setInterpolator(Interpolators.CUSTOM_40_40);
             mAnimator = new AnimatorSet();
-            mAnimator.play(mAlphaInAnimator).with(mTracingAnimator);
             mAnimator.play(mAlphaInAnimator).before(mAlphaOutAnimator);
             mAnimator.addListener(new AnimatorListenerAdapter() {
                 boolean mCancelled;
@@ -174,8 +169,6 @@
             super.onDetachedFromWindow();
 
             mAnimator.cancel();
-
-            mTracingProgress = 0;
             mAlpha = 0;
         }
 
@@ -197,45 +190,32 @@
             final int width = getWidth();
             final int height = getHeight();
             float thickness = mThickness;
-            final float pixelProgress = mTracingProgress * (width + height - 2 * thickness);
 
-            float bottomProgress = Math.min(pixelProgress, width / 2f);
-            if (bottomProgress > 0) {
-                drawBeam(canvas,
-                        width / 2f - bottomProgress,
-                        height - thickness,
-                        width / 2f + bottomProgress,
-                        height, paint, padding);
-            }
+            // bottom
+            drawBeam(canvas,
+                    0,
+                    height - thickness,
+                    width,
+                    height, paint, padding);
 
-            float sideProgress = Math.min(pixelProgress - bottomProgress, height - thickness);
-            if (sideProgress > 0) {
-                drawBeam(canvas,
-                        0,
-                        (height - thickness) - sideProgress,
-                        thickness,
-                        height - thickness, paint, padding);
-                drawBeam(canvas,
-                        width - thickness,
-                        (height - thickness) - sideProgress,
-                        width,
-                        height - thickness, paint, padding);
-            }
+            // sides
+            drawBeam(canvas,
+                    0,
+                    0,
+                    thickness,
+                    height - thickness, paint, padding);
+            drawBeam(canvas,
+                    width - thickness,
+                    0,
+                    width,
+                    height - thickness, paint, padding);
 
-            float topProgress = Math.min(pixelProgress - bottomProgress - sideProgress,
-                    width / 2 - thickness);
-            if (sideProgress > 0 && topProgress > 0) {
-                drawBeam(canvas,
-                        thickness,
-                        0,
-                        thickness + topProgress,
-                        thickness, paint, padding);
-                drawBeam(canvas,
-                        (width - thickness) - topProgress,
-                        0,
-                        width - thickness,
-                        thickness, paint, padding);
-            }
+            // top
+            drawBeam(canvas,
+                    thickness,
+                    0,
+                    width - thickness,
+                    thickness, paint, padding);
         }
 
         private void drawBeam(Canvas canvas, float left, float top, float right, float bottom,
@@ -253,8 +233,6 @@
                 mAlpha = (int) mAlphaOutAnimator.getAnimatedValue();
             } else if (animation == mAlphaInAnimator) {
                 mAlpha = (int) mAlphaInAnimator.getAnimatedValue();
-            } else if (animation == mTracingAnimator) {
-                mTracingProgress = (float) mTracingAnimator.getAnimatedValue();
             }
             invalidate();
         }
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
index a0aeb2f..af2a286 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
@@ -15,6 +15,7 @@
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.Handler;
+import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.provider.Settings;
@@ -28,6 +29,7 @@
 import android.widget.ImageView;
 
 import com.android.internal.app.AssistUtils;
+import com.android.internal.app.IVoiceInteractionSessionListener;
 import com.android.internal.app.IVoiceInteractionSessionShowCallback;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.BaseStatusBar;
@@ -51,7 +53,7 @@
 
     private AssistOrbContainer mView;
     private final BaseStatusBar mBar;
-    private final AssistUtils mAssistUtils;
+    protected final AssistUtils mAssistUtils;
 
     private IVoiceInteractionSessionShowCallback mShowCallback =
             new IVoiceInteractionSessionShowCallback.Stub() {
@@ -81,6 +83,23 @@
         mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
         mAssistUtils = new AssistUtils(context);
         mAssistDisclosure = new AssistDisclosure(context, new Handler());
+
+        registerVoiceInteractionSessionListener();
+    }
+
+    protected void registerVoiceInteractionSessionListener() {
+        mAssistUtils.registerVoiceInteractionSessionListener(
+                new IVoiceInteractionSessionListener.Stub() {
+            @Override
+            public void onVoiceSessionShown() throws RemoteException {
+                Log.v(TAG, "Voice open");
+            }
+
+            @Override
+            public void onVoiceSessionHidden() throws RemoteException {
+                Log.v(TAG, "Voice closed");
+            }
+        });
     }
 
     public void onConfigurationChanged() {
@@ -103,6 +122,10 @@
         }
     }
 
+    protected boolean shouldShowOrb() {
+        return true;
+    }
+
     public void startAssist(Bundle args) {
         final ComponentName assistComponent = getAssistInfo();
         if (assistComponent == null) {
@@ -110,7 +133,7 @@
         }
 
         final boolean isService = assistComponent.equals(getVoiceInteractorComponentName());
-        if (!isService || !isVoiceSessionRunning()) {
+        if (!isService || (!isVoiceSessionRunning() && shouldShowOrb())) {
             showOrb(assistComponent, isService);
             mView.postDelayed(mHideRunnable, isService
                     ? TIMEOUT_SERVICE
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
index 3370091..5f1b042 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
@@ -39,6 +39,8 @@
 import android.util.Log;
 import android.view.Display;
 
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.systemui.SystemUIApplication;
 import com.android.systemui.statusbar.phone.DozeParameters;
 import com.android.systemui.statusbar.phone.DozeParameters.PulseSchedule;
@@ -538,6 +540,10 @@
             mWakeLock.acquire();
             try {
                 if (DEBUG) Log.d(mTag, "onTrigger: " + triggerEventToString(event));
+                if (mSensor.getType() == Sensor.TYPE_PICK_UP_GESTURE) {
+                    int subType = (int) event.values[0];
+                    MetricsLogger.action(mContext, MetricsEvent.ACTION_AMBIENT_GESTURE, subType);
+                }
                 if (mDebugVibrate) {
                     final Vibrator v = (Vibrator) mContext.getSystemService(
                             Context.VIBRATOR_SERVICE);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 6759e6b..42a9ed5 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -360,7 +360,7 @@
             mSwitchingUser = false;
             if (userId != UserHandle.USER_SYSTEM) {
                 UserInfo info = UserManager.get(mContext).getUserInfo(userId);
-                if (info != null && info.isGuest()) {
+                if (info != null && (info.isGuest() || info.isDemo())) {
                     // If we just switched to a guest, try to dismiss keyguard.
                     dismiss();
                 }
@@ -399,8 +399,7 @@
             sendUserPresentBroadcast();
             synchronized (KeyguardViewMediator.this) {
                 // If system user is provisioned, we might want to lock now to avoid showing launcher
-                if (UserManager.isSplitSystemUser()
-                        && KeyguardUpdateMonitor.getCurrentUser() == UserHandle.USER_SYSTEM) {
+                if (mustNotUnlockCurrentUser()) {
                     doKeyguardLocked(null);
                 }
             }
@@ -599,7 +598,6 @@
                 return KeyguardSecurityView.PROMPT_REASON_WRONG_CREDENTIAL;
             }
 
-
             return KeyguardSecurityView.PROMPT_REASON_NONE;
         }
     };
@@ -608,6 +606,11 @@
         mPM.userActivity(SystemClock.uptimeMillis(), false);
     }
 
+    boolean mustNotUnlockCurrentUser() {
+        return (UserManager.isSplitSystemUser() || UserManager.isDeviceInDemoMode(mContext))
+                && KeyguardUpdateMonitor.getCurrentUser() == UserHandle.USER_SYSTEM;
+    }
+
     private void setupLocked() {
         mPM = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
         mWM = WindowManagerGlobal.getWindowManagerService();
@@ -1181,8 +1184,7 @@
         }
 
         // In split system user mode, we never unlock system user.
-        if (!UserManager.isSplitSystemUser()
-                || KeyguardUpdateMonitor.getCurrentUser() != UserHandle.USER_SYSTEM
+        if (!mustNotUnlockCurrentUser()
                 || !mUpdateMonitor.isDeviceProvisioned()) {
 
             // if the setup wizard hasn't run yet, don't show
@@ -1620,8 +1622,7 @@
         synchronized (KeyguardViewMediator.this) {
             if (DEBUG) Log.d(TAG, "handleHide");
 
-            if (UserManager.isSplitSystemUser()
-                    && KeyguardUpdateMonitor.getCurrentUser() == UserHandle.USER_SYSTEM) {
+            if (mustNotUnlockCurrentUser()) {
                 // In split system user mode, we never unlock system user. The end user has to
                 // switch to another user.
                 // TODO: We should stop it early by disabling the swipe up flow. Right now swipe up
diff --git a/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java b/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java
index aff5d2b..5f23a40 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java
@@ -24,6 +24,7 @@
 import android.util.AttributeSet;
 import android.view.View;
 
+import com.android.settingslib.Utils;
 import com.android.systemui.R;
 
 public class DataUsageGraph extends View {
@@ -45,7 +46,7 @@
         super(context, attrs);
         final Resources res = context.getResources();
         mTrackColor = context.getColor(R.color.data_usage_graph_track);
-        mUsageColor = context.getColor(R.color.system_accent_color);
+        mUsageColor = Utils.getColorAccent(context);
         mOverlimitColor = context.getColor(R.color.system_warning_color);
         mWarningColor = context.getColor(R.color.data_usage_graph_warning);
         mMarkerWidth = res.getDimensionPixelSize(R.dimen.data_usage_graph_marker_width);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 2dcb5f4..aaa4e51 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -41,8 +41,7 @@
     private static final String ALLOW_FANCY_ANIMATION = "sysui_qs_fancy_anim";
     private static final String MOVE_FULL_ROWS = "sysui_qs_move_whole_rows";
 
-    public static final float EXPANDED_TILE_DELAY = .7f;
-    private static final float LAST_ROW_EXPANDED_DELAY = .86f;
+    public static final float EXPANDED_TILE_DELAY = .86f;
 
     private final ArrayList<View> mAllViews = new ArrayList<>();
     private final ArrayList<View> mTopFiveQs = new ArrayList<>();
@@ -58,7 +57,7 @@
     private TouchAnimator mTranslationXAnimator;
     private TouchAnimator mTranslationYAnimator;
     private TouchAnimator mNonfirstPageAnimator;
-    private TouchAnimator mLastRowAnimator;
+    private TouchAnimator mBrightnessAnimator;
 
     private boolean mOnKeyguard;
 
@@ -144,7 +143,6 @@
         TouchAnimator.Builder firstPageBuilder = new Builder();
         TouchAnimator.Builder translationXBuilder = new Builder();
         TouchAnimator.Builder translationYBuilder = new Builder();
-        TouchAnimator.Builder lastRowBuilder = new Builder();
 
         if (mQsPanel.getHost() == null) return;
         Collection<QSTile<?>> tiles = mQsPanel.getHost().getTiles();
@@ -152,7 +150,6 @@
         int[] loc1 = new int[2];
         int[] loc2 = new int[2];
         int lastXDiff = 0;
-        int lastYDiff = 0;
         int lastX = 0;
 
         clearAnimationState();
@@ -175,7 +172,6 @@
                 final int xDiff = loc2[0] - loc1[0];
                 final int yDiff = loc2[1] - loc1[1];
                 lastXDiff = loc1[0] - lastX;
-                lastYDiff = yDiff;
                 // Move the quick tile right from its location to the new one.
                 translationXBuilder.addFloat(quickTileView, "translationX", 0, xDiff);
                 translationYBuilder.addFloat(quickTileView, "translationY", 0, yDiff);
@@ -209,13 +205,25 @@
 
                 mAllViews.add(tileIcon);
             } else {
-                lastRowBuilder.addFloat(tileView, "alpha", 0, 1);
+                firstPageBuilder.addFloat(tileView, "alpha", 0, 1);
             }
             mAllViews.add(tileView);
             mAllViews.add(label);
             count++;
         }
         if (mAllowFancy) {
+            // Make brightness appear static position and alpha in through second half.
+            View brightness = mQsPanel.getBrightnessView();
+            if (brightness != null) {
+                firstPageBuilder.addFloat(brightness, "translationY", mQsPanel.getHeight(), 0);
+                mBrightnessAnimator = new TouchAnimator.Builder()
+                        .addFloat(brightness, "alpha", 0, 1)
+                        .setStartDelay(.5f)
+                        .build();
+                mAllViews.add(brightness);
+            } else {
+                mBrightnessAnimator = null;
+            }
             mFirstPageAnimator = firstPageBuilder
                     .setListener(this)
                     .build();
@@ -223,9 +231,6 @@
             mFirstPageDelayedAnimator = new TouchAnimator.Builder()
                     .setStartDelay(EXPANDED_TILE_DELAY)
                     .addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1).build();
-            mLastRowAnimator = lastRowBuilder
-                    .setStartDelay(LAST_ROW_EXPANDED_DELAY)
-                    .build();
             Path path = new Path();
             path.moveTo(0, 0);
             path.cubicTo(0, 0, 0, 1, 1, 1);
@@ -279,7 +284,9 @@
             mFirstPageDelayedAnimator.setPosition(position);
             mTranslationXAnimator.setPosition(position);
             mTranslationYAnimator.setPosition(position);
-            mLastRowAnimator.setPosition(position);
+            if (mBrightnessAnimator != null) {
+                mBrightnessAnimator.setPosition(position);
+            }
         } else {
             mNonfirstPageAnimator.setPosition(position);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
index 932b4f5..65d6805 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
@@ -19,6 +19,7 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
+import android.graphics.drawable.Drawable;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -57,6 +58,7 @@
     private boolean mIsVisible;
     private boolean mIsIconVisible;
     private int mFooterTextId;
+    private int mFooterIconId;
 
     public QSFooter(QSPanel qsPanel, Context context) {
         mRootView = LayoutInflater.from(context)
@@ -64,6 +66,7 @@
         mRootView.setOnClickListener(this);
         mFooterText = (TextView) mRootView.findViewById(R.id.footer_text);
         mFooterIcon = (ImageView) mRootView.findViewById(R.id.footer_icon);
+        mFooterIconId = R.drawable.ic_qs_vpn;
         mContext = context;
         mMainHandler = new Handler();
     }
@@ -118,6 +121,14 @@
             mIsVisible = true;
         } else {
             mFooterTextId = R.string.vpn_footer;
+            // Update the VPN footer icon, if needed.
+            int footerIconId = (mSecurityController.isVpnBranded()
+                ? R.drawable.ic_qs_branded_vpn
+                : R.drawable.ic_qs_vpn);
+            if (mFooterIconId != footerIconId) {
+                mFooterIcon.setImageResource(footerIconId);
+                mFooterIconId = footerIconId;
+            }
             mIsVisible = mIsIconVisible;
         }
         mMainHandler.post(mUpdateDisplayState);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 636a9a50..890279f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -106,8 +106,6 @@
                 R.layout.qs_paged_tile_layout, this, false);
         mTileLayout.setListening(mListening);
         addView((View) mTileLayout);
-        findViewById(android.R.id.edit).setOnClickListener(view ->
-                mHost.startRunnableDismissingKeyguard(() -> showEdit(view)));
     }
 
     public boolean isShowingCustomize() {
@@ -168,6 +166,10 @@
         brightnessSlider.setMirrorController(c);
     }
 
+    View getBrightnessView() {
+        return mBrightnessView;
+    }
+
     public void setCallback(Callback callback) {
         mCallback = callback;
     }
@@ -369,7 +371,7 @@
     }
 
 
-    private void showEdit(final View v) {
+    public void showEdit(final View v) {
         v.post(new Runnable() {
             @Override
             public void run() {
@@ -377,8 +379,8 @@
                     if (!mCustomizePanel.isCustomizing()) {
                         int[] loc = new int[2];
                         v.getLocationInWindow(loc);
-                        int x = loc[0];
-                        int y = loc[1];
+                        int x = loc[0] + v.getWidth() / 2;
+                        int y = loc[1] + v.getHeight() / 2;
                         mCustomizePanel.show(x, y);
                     }
                 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index 27b079a..ca853fe 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -39,7 +39,6 @@
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BluetoothController;
 import com.android.systemui.statusbar.policy.CastController;
-import com.android.systemui.statusbar.policy.NightModeController;
 import com.android.systemui.statusbar.policy.FlashlightController;
 import com.android.systemui.statusbar.policy.HotspotController;
 import com.android.systemui.statusbar.policy.KeyguardMonitor;
@@ -447,7 +446,6 @@
         UserInfoController getUserInfoController();
         BatteryController getBatteryController();
         TileServices getTileServices();
-        NightModeController getNightModeController();
         void removeTile(String tileSpec);
         ManagedProfileController getManagedProfileController();
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java
index feacaa0..5ed19ef 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileBaseView.java
@@ -63,6 +63,7 @@
         setClipChildren(false);
         setClipToPadding(false);
         mCollapsedView = collapsedView;
+        setFocusable(true);
     }
 
     private Drawable newTileBackground() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
index f287f1b..f09275d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
@@ -146,12 +146,11 @@
     };
 
     public int getNumQuickTiles(Context context) {
-        return TunerService.get(context).getValue(NUM_QUICK_TILES, 5);
+        return TunerService.get(context).getValue(NUM_QUICK_TILES, 6);
     }
 
     private static class HeaderTileLayout extends LinearLayout implements QSTileLayout {
 
-        private final Space mEndSpacer;
         protected final ArrayList<TileRecord> mRecords = new ArrayList<>();
         private boolean mListening;
 
@@ -161,25 +160,6 @@
             setClipToPadding(false);
             setGravity(Gravity.CENTER_VERTICAL);
             setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
-
-            mEndSpacer = new Space(context);
-            mEndSpacer.setLayoutParams(generateLayoutParams());
-            updateDownArrowMargin();
-            addView(mEndSpacer);
-            setOrientation(LinearLayout.HORIZONTAL);
-        }
-
-        @Override
-        protected void onConfigurationChanged(Configuration newConfig) {
-            super.onConfigurationChanged(newConfig);
-            updateDownArrowMargin();
-        }
-
-        private void updateDownArrowMargin() {
-            LayoutParams params = (LayoutParams) mEndSpacer.getLayoutParams();
-            params.setMarginStart(mContext.getResources().getDimensionPixelSize(
-                    R.dimen.qs_expand_margin));
-            mEndSpacer.setLayoutParams(params);
         }
 
         @Override
@@ -193,11 +173,11 @@
 
         @Override
         public void addTile(TileRecord tile) {
-            addView(tile.tileView, getChildCount() - 1 /* Leave icon at end */,
-                    generateLayoutParams());
-            // Add a spacer.
-            addView(new Space(mContext), getChildCount() - 1 /* Leave icon at end */,
-                    generateSpaceParams());
+            if (getChildCount() != 0) {
+                // Add a spacer.
+                addView(new Space(mContext), getChildCount(), generateSpaceParams());
+            }
+            addView(tile.tileView, getChildCount(), generateLayoutParams());
             mRecords.add(tile);
             tile.tile.setListening(this, mListening);
         }
@@ -222,8 +202,10 @@
             int childIndex = getChildIndex(tile.tileView);
             // Remove the tile.
             removeViewAt(childIndex);
-            // Remove its spacer as well.
-            removeViewAt(childIndex);
+            if (getChildCount() != 0) {
+                // Remove its spacer as well.
+                removeViewAt(childIndex);
+            }
             mRecords.remove(tile);
             tile.tile.setListening(this, false);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index 8e4ed91..3a693cf 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -19,6 +19,7 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.drawable.ColorDrawable;
 import android.os.Handler;
@@ -71,6 +72,7 @@
     private final Handler mHandler = new Handler();
     private final List<TileInfo> mTiles = new ArrayList<>();
     private final ItemTouchHelper mItemTouchHelper;
+    private final ItemDecoration mDecoration;
     private final AccessibilityManager mAccessibilityManager;
     private int mEditIndex;
     private int mTileDividerIndex;
@@ -88,6 +90,7 @@
         mContext = context;
         mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
         mItemTouchHelper = new ItemTouchHelper(mCallbacks);
+        mDecoration = new TileItemDecoration(context);
     }
 
     public void setHost(QSTileHost host) {
@@ -459,9 +462,16 @@
         }
     };
 
-    private final ItemDecoration mDecoration = new ItemDecoration() {
-        // TODO: Move this to resource.
-        private final ColorDrawable mDrawable = new ColorDrawable(0xff384248);
+    private class TileItemDecoration extends ItemDecoration {
+        private final ColorDrawable mDrawable;
+
+        private TileItemDecoration(Context context) {
+            TypedArray ta =
+                    context.obtainStyledAttributes(new int[]{android.R.attr.colorSecondary});
+            mDrawable = new ColorDrawable(ta.getColor(0, 0));
+            ta.recycle();
+        }
+
 
         @Override
         public void onDraw(Canvas c, RecyclerView parent, State state) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 1431b22..40ef6eb 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -57,8 +57,7 @@
     }
 
     private void addSystemTiles(final QSTileHost host) {
-        String possible = mContext.getString(R.string.quick_settings_tiles_default)
-                + ",hotspot,inversion,saver,work,cast,night";
+        String possible = mContext.getString(R.string.quick_settings_tiles_stock);
         String[] possibleTiles = possible.split(",");
         final Handler qsHandler = new Handler(host.getLooper());
         final Handler mainHandler = new Handler(Looper.getMainLooper());
@@ -145,9 +144,16 @@
             PackageManager pm = mContext.getPackageManager();
             List<ResolveInfo> services = pm.queryIntentServicesAsUser(
                     new Intent(TileService.ACTION_QS_TILE), 0, ActivityManager.getCurrentUser());
+            String stockTiles = mContext.getString(R.string.quick_settings_tiles_stock);
             for (ResolveInfo info : services) {
                 String packageName = info.serviceInfo.packageName;
                 ComponentName componentName = new ComponentName(packageName, info.serviceInfo.name);
+
+                // Don't include apps that are a part of the default tile set.
+                if (stockTiles.contains(componentName.flattenToString())) {
+                    continue;
+                }
+
                 final CharSequence appLabel = info.serviceInfo.applicationInfo.loadLabel(pm);
                 String spec = CustomTile.toSpec(componentName);
                 State state = getState(params[0], spec);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
index d3f5d26..569a567 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
@@ -82,8 +82,11 @@
     private void setTileIcon() {
         try {
             PackageManager pm = mContext.getPackageManager();
-            ServiceInfo info = pm.getServiceInfo(mComponent,
-                    PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE);
+            int flags = PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE;
+            if (isSystemApp(pm)) {
+                flags |= PackageManager.MATCH_DISABLED_COMPONENTS;
+            }
+            ServiceInfo info = pm.getServiceInfo(mComponent, flags);
             int icon = info.icon != 0 ? info.icon
                     : info.applicationInfo.icon;
             // Update the icon if its not set or is the default icon.
@@ -103,6 +106,10 @@
         }
     }
 
+    private boolean isSystemApp(PackageManager pm) throws PackageManager.NameNotFoundException {
+        return pm.getApplicationInfo(mComponent.getPackageName(), 0).isSystemApp();
+    }
+
     /**
      * Compare two icons, only works for resources.
      */
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java
index bad4e79..a63eabc 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java
@@ -16,6 +16,7 @@
 
 package com.android.systemui.qs.tiles;
 
+import android.annotation.ColorInt;
 import android.content.Context;
 import android.content.res.Configuration;
 import android.content.res.Resources;
@@ -24,6 +25,7 @@
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.android.settingslib.Utils;
 import com.android.settingslib.net.DataUsageController;
 import com.android.systemui.FontSizeUtils;
 import com.android.systemui.R;
@@ -64,7 +66,7 @@
         final Resources res = mContext.getResources();
         final int titleId;
         final long bytes;
-        int usageColor = R.color.system_accent_color;
+        @ColorInt int usageColor = 0;
         final String top;
         String bottom = null;
         if (info.usageLevel < info.warningLevel || info.limitLevel <= 0) {
@@ -89,14 +91,18 @@
                     formatBytes(info.usageLevel));
             bottom = res.getString(R.string.quick_settings_cellular_detail_data_limit,
                     formatBytes(info.limitLevel));
-            usageColor = R.color.system_warning_color;
+            usageColor = mContext.getColor(R.color.system_warning_color);
+        }
+
+        if (usageColor == 0) {
+            usageColor = Utils.getColorAccent(mContext);
         }
 
         final TextView title = (TextView) findViewById(android.R.id.title);
         title.setText(titleId);
         final TextView usage = (TextView) findViewById(R.id.usage_text);
         usage.setText(formatBytes(bytes));
-        usage.setTextColor(mContext.getColor(usageColor));
+        usage.setTextColor(usageColor);
         final DataUsageGraph graph = (DataUsageGraph) findViewById(R.id.usage_graph);
         graph.setLevels(info.limitLevel, info.warningLevel, info.usageLevel);
         final TextView carrier = (TextView) findViewById(R.id.usage_carrier_text);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 0f356e0..7bdb1c4 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -801,9 +801,13 @@
         Recents.getTaskLoader().dump(prefix, writer);
 
         String id = Integer.toHexString(System.identityHashCode(this));
+        long lastStackActiveTime = Prefs.getLong(this,
+                Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, -1);
 
         writer.print(prefix); writer.print(TAG);
         writer.print(" visible="); writer.print(mIsVisible ? "Y" : "N");
+        writer.print(" lastStackTaskActiveTime="); writer.print(lastStackActiveTime);
+        writer.print(" currentTime="); writer.print(System.currentTimeMillis());
         writer.print(" [0x"); writer.print(id); writer.print("]");
         writer.println();
 
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
index 7e1deec..f9e59e7 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
@@ -609,7 +609,7 @@
         stackLayout.setSystemInsets(systemInsets);
         if (stack != null) {
             stackLayout.getTaskStackBounds(displayRect, windowRect, systemInsets.top,
-                    systemInsets.right, mTaskStackBounds);
+                    systemInsets.left, systemInsets.right, mTaskStackBounds);
             stackLayout.reset();
             stackLayout.initialize(displayRect, windowRect, mTaskStackBounds,
                     TaskStackLayoutAlgorithm.StackState.getStackStateForStack(stack));
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
index 26200d0..b5753ba 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
@@ -511,8 +511,8 @@
             int top = dockArea.bottom < 1f
                     ? 0
                     : insets.top;
-            layoutAlgorithm.getTaskStackBounds(displayRect, windowRectOut, top, insets.right,
-                    taskStackBounds);
+            layoutAlgorithm.getTaskStackBounds(displayRect, windowRectOut, top, insets.left,
+                    insets.right, taskStackBounds);
             return taskStackBounds;
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
index e3fe1ab..89789bce 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
@@ -1058,9 +1058,9 @@
      * top and right system insets (but not the bottom inset) and left/right paddings, but _not_
      * the top/bottom padding or insets.
      */
-    public void getTaskStackBounds(Rect displayRect, Rect windowRect, int topInset, int rightInset,
-            Rect taskStackBounds) {
-        taskStackBounds.set(windowRect.left, windowRect.top + topInset,
+    public void getTaskStackBounds(Rect displayRect, Rect windowRect, int topInset, int leftInset,
+            int rightInset, Rect taskStackBounds) {
+        taskStackBounds.set(windowRect.left + leftInset, windowRect.top + topInset,
                 windowRect.right - rightInset, windowRect.bottom);
 
         // Ensure that the new width is at most the smaller display edge size
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 586a8bc..21780a6 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -1191,7 +1191,8 @@
         // bounds have changed.  This is because we may get spurious measures while dragging where
         // our current stack bounds reflect the target drop region.
         mLayoutAlgorithm.getTaskStackBounds(mDisplayRect, new Rect(0, 0, width, height),
-                mLayoutAlgorithm.mSystemInsets.top, mLayoutAlgorithm.mSystemInsets.right, mTmpRect);
+                mLayoutAlgorithm.mSystemInsets.top, mLayoutAlgorithm.mSystemInsets.left,
+                mLayoutAlgorithm.mSystemInsets.right, mTmpRect);
         if (!mTmpRect.equals(mStableStackBounds)) {
             mStableStackBounds.set(mTmpRect);
             mStackBounds.set(mTmpRect);
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
index 4badc42..f3bae20 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
@@ -23,6 +23,8 @@
 import android.os.Message;
 import android.os.Messenger;
 import android.os.RemoteException;
+import android.os.UserManager;
+import android.util.Log;
 import android.view.WindowManager;
 
 public class TakeScreenshotService extends Service {
@@ -44,6 +46,16 @@
                     }
                 }
             };
+
+            // If the storage for this user is locked, we have no place to store
+            // the screenshot, so skip taking it instead of showing a misleading
+            // animation and error notification.
+            if (!getSystemService(UserManager.class).isUserUnlocked()) {
+                Log.w(TAG, "Skipping screenshot because storage is locked!");
+                post(finisher);
+                return;
+            }
+
             if (mScreenshot == null) {
                 mScreenshot = new GlobalScreenshot(TakeScreenshotService.this);
             }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 7b23c80..419c91b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -23,6 +23,7 @@
 import android.os.IBinder;
 import android.os.Message;
 import android.util.Pair;
+import android.view.KeyEvent;
 
 import com.android.internal.os.SomeArgs;
 import com.android.internal.statusbar.IStatusBar;
@@ -75,6 +76,7 @@
     private static final int MSG_TOGGLE_APP_SPLIT_SCREEN       = 30 << MSG_SHIFT;
     private static final int MSG_APP_TRANSITION_FINISHED       = 31 << MSG_SHIFT;
     private static final int MSG_DISMISS_KEYBOARD_SHORTCUTS    = 32 << MSG_SHIFT;
+    private static final int MSG_HANDLE_SYSNAV_KEY             = 33 << MSG_SHIFT;
 
     public static final int FLAG_EXCLUDE_NONE = 0;
     public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
@@ -129,6 +131,8 @@
         void addQsTile(ComponentName tile);
         void remQsTile(ComponentName tile);
         void clickTile(ComponentName tile);
+
+        void handleSystemNavigationKey(int arg1);
     }
 
     public CommandQueue(Callbacks callbacks) {
@@ -388,6 +392,13 @@
         }
     }
 
+    @Override
+    public void handleSystemNavigationKey(int key) {
+        synchronized (mLock) {
+            mHandler.obtainMessage(MSG_HANDLE_SYSNAV_KEY, key, 0).sendToTarget();
+        }
+    }
+
     private final class H extends Handler {
         public void handleMessage(Message msg) {
             final int what = msg.what & MSG_MASK;
@@ -503,6 +514,9 @@
                 case MSG_TOGGLE_APP_SPLIT_SCREEN:
                     mCallbacks.toggleSplitScreen();
                     break;
+                case MSG_HANDLE_SYSNAV_KEY:
+                    mCallbacks.handleSystemNavigationKey(msg.arg1);
+                    break;
             }
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
index 79e06c6..016e1f2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
@@ -16,6 +16,8 @@
 
 package com.android.systemui.statusbar;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.AlertDialog;
 import android.app.AppGlobals;
 import android.app.Dialog;
@@ -45,15 +47,18 @@
 import android.view.KeyboardShortcutInfo;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.View.AccessibilityDelegate;
 import android.view.ViewGroup;
 import android.view.Window;
 import android.view.WindowManager.KeyboardShortcutsReceiver;
+import android.view.accessibility.AccessibilityNodeInfo;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.android.internal.app.AssistUtils;
+import com.android.settingslib.Utils;
 import com.android.systemui.R;
 import com.android.systemui.recents.Recents;
 
@@ -63,6 +68,7 @@
 import java.util.List;
 
 import static android.content.Context.LAYOUT_INFLATER_SERVICE;
+import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;
 import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
 
 /**
@@ -72,7 +78,6 @@
     private static final String TAG = KeyboardShortcuts.class.getSimpleName();
     private static final Object sLock = new Object();
     private static KeyboardShortcuts sInstance;
-    private static boolean sIsShowing;
 
     private final SparseArray<String> mSpecialCharacterNames = new SparseArray<>();
     private final SparseArray<String> mModifierNames = new SparseArray<>();
@@ -113,7 +118,7 @@
     private KeyCharacterMap mKeyCharacterMap;
 
     private KeyboardShortcuts(Context context) {
-        this.mContext = new ContextThemeWrapper(context, android.R.style.Theme_Material_Light);
+        this.mContext = new ContextThemeWrapper(context, android.R.style.Theme_DeviceDefault_Light);
         this.mPackageManager = AppGlobals.getPackageManager();
         loadResources(context);
     }
@@ -131,13 +136,12 @@
                 dismiss();
             }
             getInstance(context).showKeyboardShortcuts(deviceId);
-            sIsShowing = true;
         }
     }
 
     public static void toggle(Context context, int deviceId) {
         synchronized (sLock) {
-            if (sIsShowing) {
+            if (isShowing()) {
                 dismiss();
             } else {
                 show(context, deviceId);
@@ -151,10 +155,14 @@
                 sInstance.dismissKeyboardShortcuts();
                 sInstance = null;
             }
-            sIsShowing = false;
         }
     }
 
+    private static boolean isShowing() {
+        return sInstance != null && sInstance.mKeyboardShortcutsDialog != null
+                && sInstance.mKeyboardShortcutsDialog.isShowing();
+    }
+
     private void loadResources(Context context) {
         mSpecialCharacterNames.put(
                 KeyEvent.KEYCODE_HOME, context.getString(R.string.keyboard_key_home));
@@ -580,7 +588,7 @@
                     R.layout.keyboard_shortcuts_category_title, keyboardShortcutsLayout, false);
             categoryTitle.setText(group.getLabel());
             categoryTitle.setTextColor(group.isSystemGroup()
-                    ? mContext.getColor(R.color.ksh_system_group_color)
+                    ? Utils.getColorAccent(mContext)
                     : mContext.getColor(R.color.ksh_application_group_color));
             keyboardShortcutsLayout.addView(categoryTitle);
 
@@ -589,7 +597,7 @@
             final int itemsSize = group.getItems().size();
             for (int j = 0; j < itemsSize; j++) {
                 KeyboardShortcutInfo info = group.getItems().get(j);
-                List<StringOrDrawable> shortcutKeys = getHumanReadableShortcutKeys(info);
+                List<StringDrawableContainer> shortcutKeys = getHumanReadableShortcutKeys(info);
                 if (shortcutKeys == null) {
                     // Ignore shortcuts we can't display keys for.
                     Log.w(TAG, "Keyboard Shortcut contains unsupported keys, skipping.");
@@ -619,25 +627,33 @@
                         .findViewById(R.id.keyboard_shortcuts_item_container);
                 final int shortcutKeysSize = shortcutKeys.size();
                 for (int k = 0; k < shortcutKeysSize; k++) {
-                    StringOrDrawable shortcutRepresentation = shortcutKeys.get(k);
-                    if (shortcutRepresentation.drawable != null) {
+                    StringDrawableContainer shortcutRepresentation = shortcutKeys.get(k);
+                    if (shortcutRepresentation.mDrawable != null) {
                         ImageView shortcutKeyIconView = (ImageView) inflater.inflate(
                                 R.layout.keyboard_shortcuts_key_icon_view, shortcutItemsContainer,
                                 false);
                         Bitmap bitmap = Bitmap.createBitmap(shortcutKeyIconItemHeightWidth,
                                 shortcutKeyIconItemHeightWidth, Bitmap.Config.ARGB_8888);
                         Canvas canvas = new Canvas(bitmap);
-                        shortcutRepresentation.drawable.setBounds(0, 0, canvas.getWidth(),
+                        shortcutRepresentation.mDrawable.setBounds(0, 0, canvas.getWidth(),
                                 canvas.getHeight());
-                        shortcutRepresentation.drawable.draw(canvas);
+                        shortcutRepresentation.mDrawable.draw(canvas);
                         shortcutKeyIconView.setImageBitmap(bitmap);
+                        shortcutKeyIconView.setImportantForAccessibility(
+                                IMPORTANT_FOR_ACCESSIBILITY_YES);
+                        shortcutKeyIconView.setAccessibilityDelegate(
+                                new ShortcutKeyAccessibilityDelegate(
+                                        shortcutRepresentation.mString));
                         shortcutItemsContainer.addView(shortcutKeyIconView);
-                    } else if (shortcutRepresentation.string != null) {
+                    } else if (shortcutRepresentation.mString != null) {
                         TextView shortcutKeyTextView = (TextView) inflater.inflate(
                                 R.layout.keyboard_shortcuts_key_view, shortcutItemsContainer,
                                 false);
                         shortcutKeyTextView.setMinimumWidth(shortcutKeyTextItemMinWidth);
-                        shortcutKeyTextView.setText(shortcutRepresentation.string);
+                        shortcutKeyTextView.setText(shortcutRepresentation.mString);
+                        shortcutKeyTextView.setAccessibilityDelegate(
+                                new ShortcutKeyAccessibilityDelegate(
+                                        shortcutRepresentation.mString));
                         shortcutItemsContainer.addView(shortcutKeyTextView);
                     }
                 }
@@ -653,19 +669,20 @@
         }
     }
 
-    private List<StringOrDrawable> getHumanReadableShortcutKeys(KeyboardShortcutInfo info) {
-        List<StringOrDrawable> shortcutKeys = getHumanReadableModifiers(info);
+    private List<StringDrawableContainer> getHumanReadableShortcutKeys(KeyboardShortcutInfo info) {
+        List<StringDrawableContainer> shortcutKeys = getHumanReadableModifiers(info);
         if (shortcutKeys == null) {
             return null;
         }
-        String displayLabelString = null;
-        Drawable displayLabelDrawable = null;
+        String shortcutKeyString = null;
+        Drawable shortcutKeyDrawable = null;
         if (info.getBaseCharacter() > Character.MIN_VALUE) {
-            displayLabelString = String.valueOf(info.getBaseCharacter());
+            shortcutKeyString = String.valueOf(info.getBaseCharacter());
         } else if (mSpecialCharacterDrawables.get(info.getKeycode()) != null) {
-            displayLabelDrawable = mSpecialCharacterDrawables.get(info.getKeycode());
+            shortcutKeyDrawable = mSpecialCharacterDrawables.get(info.getKeycode());
+            shortcutKeyString = mSpecialCharacterNames.get(info.getKeycode());
         } else if (mSpecialCharacterNames.get(info.getKeycode()) != null) {
-            displayLabelString = mSpecialCharacterNames.get(info.getKeycode());
+            shortcutKeyString = mSpecialCharacterNames.get(info.getKeycode());
         } else {
             // Special case for shortcuts with no base key or keycode.
             if (info.getKeycode() == KeyEvent.KEYCODE_UNKNOWN) {
@@ -673,22 +690,23 @@
             }
             char displayLabel = mKeyCharacterMap.getDisplayLabel(info.getKeycode());
             if (displayLabel != 0) {
-                displayLabelString = String.valueOf(displayLabel);
+                shortcutKeyString = String.valueOf(displayLabel);
             } else {
                 return null;
             }
         }
 
-        if (displayLabelDrawable != null) {
-            shortcutKeys.add(new StringOrDrawable(displayLabelDrawable));
-        } else if (displayLabelString != null) {
-            shortcutKeys.add(new StringOrDrawable(displayLabelString.toUpperCase()));
+        if (shortcutKeyString != null) {
+            shortcutKeys.add(new StringDrawableContainer(shortcutKeyString, shortcutKeyDrawable));
+        } else {
+            Log.w(TAG, "Keyboard Shortcut does not have a text representation, skipping.");
         }
+
         return shortcutKeys;
     }
 
-    private List<StringOrDrawable> getHumanReadableModifiers(KeyboardShortcutInfo info) {
-        final List<StringOrDrawable> shortcutKeys = new ArrayList<>();
+    private List<StringDrawableContainer> getHumanReadableModifiers(KeyboardShortcutInfo info) {
+        final List<StringDrawableContainer> shortcutKeys = new ArrayList<>();
         int modifiers = info.getModifiers();
         if (modifiers == 0) {
             return shortcutKeys;
@@ -696,13 +714,9 @@
         for(int i = 0; i < mModifierNames.size(); ++i) {
             final int supportedModifier = mModifierNames.keyAt(i);
             if ((modifiers & supportedModifier) != 0) {
-                if (mModifierDrawables.get(supportedModifier) != null) {
-                    shortcutKeys.add(new StringOrDrawable(
-                            mModifierDrawables.get(supportedModifier)));
-                } else {
-                    shortcutKeys.add(new StringOrDrawable(
-                            mModifierNames.get(supportedModifier).toUpperCase()));
-                }
+                shortcutKeys.add(new StringDrawableContainer(
+                        mModifierNames.get(supportedModifier),
+                        mModifierDrawables.get(supportedModifier)));
                 modifiers &= ~supportedModifier;
             }
         }
@@ -713,16 +727,31 @@
         return shortcutKeys;
     }
 
-    private static final class StringOrDrawable {
-        public String string;
-        public Drawable drawable;
+    private final class ShortcutKeyAccessibilityDelegate extends AccessibilityDelegate {
+        private String mContentDescription;
 
-        public StringOrDrawable(String string) {
-            this.string = string;
+        ShortcutKeyAccessibilityDelegate(String contentDescription) {
+            mContentDescription = contentDescription;
         }
 
-        public StringOrDrawable(Drawable drawable) {
-            this.drawable = drawable;
+        @Override
+        public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
+            super.onInitializeAccessibilityNodeInfo(host, info);
+            if (mContentDescription != null) {
+                info.setContentDescription(mContentDescription.toLowerCase());
+            }
+        }
+    }
+
+    private static final class StringDrawableContainer {
+        @NonNull
+        public String mString;
+        @Nullable
+        public Drawable mDrawable;
+
+        StringDrawableContainer(String string, Drawable drawable) {
+            mString = string;
+            mDrawable = drawable;
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index 870e7f0..b66a4fb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -266,7 +266,7 @@
     }
 
     private void bindSlider(final View importanceSlider, final boolean systemApp) {
-        mActiveSliderTint = loadColorStateList(R.color.notification_guts_slider_color);
+        mActiveSliderTint = ColorStateList.valueOf(Utils.getColorAccent(mContext));
         mInactiveSliderTint = loadColorStateList(R.color.notification_guts_disabled_slider_color);
 
         mImportanceSummary = ((TextView) importanceSlider.findViewById(R.id.summary));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
index dba7130..bfa43fd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ScrimView.java
@@ -42,6 +42,7 @@
     private float mViewAlpha = 1.0f;
     private ValueAnimator mAlphaAnimator;
     private Rect mExcludedRect = new Rect();
+    private int mLeftInset = 0;
     private boolean mHasExcludedArea;
     private ValueAnimator.AnimatorUpdateListener mAlphaUpdateListener
             = new ValueAnimator.AnimatorUpdateListener() {
@@ -87,12 +88,12 @@
                 if (mExcludedRect.top > 0) {
                     canvas.drawRect(0, 0, getWidth(), mExcludedRect.top, mPaint);
                 }
-                if (mExcludedRect.left > 0) {
-                    canvas.drawRect(0,  mExcludedRect.top, mExcludedRect.left, mExcludedRect.bottom,
-                            mPaint);
+                if (mExcludedRect.left + mLeftInset > 0) {
+                    canvas.drawRect(0,  mExcludedRect.top, mExcludedRect.left + mLeftInset,
+                            mExcludedRect.bottom, mPaint);
                 }
-                if (mExcludedRect.right < getWidth()) {
-                    canvas.drawRect(mExcludedRect.right,
+                if (mExcludedRect.right + mLeftInset < getWidth()) {
+                    canvas.drawRect(mExcludedRect.right + mLeftInset,
                             mExcludedRect.top,
                             getWidth(),
                             mExcludedRect.bottom,
@@ -183,4 +184,14 @@
     public void setChangeRunnable(Runnable changeRunnable) {
         mChangeRunnable = changeRunnable;
     }
+
+    public void setLeftInset(int leftInset) {
+        if (mLeftInset != leftInset) {
+            mLeftInset = leftInset;
+
+            if (mHasExcludedArea) {
+                invalidate();
+            }
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 599e575a..74caa53 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -67,6 +67,8 @@
 
     private boolean mNoSimsVisible = false;
     private boolean mVpnVisible = false;
+    private int mVpnIconId = 0;
+    private int mLastVpnIconId = -1;
     private boolean mEthernetVisible = false;
     private int mEthernetIconId = 0;
     private int mLastEthernetIconId = -1;
@@ -164,6 +166,7 @@
         mSC = sc;
         mSC.addCallback(this);
         mVpnVisible = mSC.isVpnEnabled();
+        mVpnIconId = currentVpnIconId(mSC.isVpnBranded());
     }
 
     @Override
@@ -249,6 +252,7 @@
             @Override
             public void run() {
                 mVpnVisible = mSC.isVpnEnabled();
+                mVpnIconId = currentVpnIconId(mSC.isVpnBranded());
                 apply();
             }
         });
@@ -436,6 +440,15 @@
         if (mWifiGroup == null) return;
 
         mVpn.setVisibility(mVpnVisible ? View.VISIBLE : View.GONE);
+        if (mVpnVisible) {
+            if (mLastVpnIconId != mVpnIconId) {
+                setIconForView(mVpn, mVpnIconId);
+                mLastVpnIconId = mVpnIconId;
+            }
+            mVpn.setVisibility(View.VISIBLE);
+        } else {
+            mVpn.setVisibility(View.GONE);
+        }
         if (DEBUG) Log.d(TAG, String.format("vpn: %s", mVpnVisible ? "VISIBLE" : "GONE"));
 
         if (mEthernetVisible) {
@@ -564,6 +577,10 @@
         v.setImageTintList(ColorStateList.valueOf(tint));
     }
 
+    private int currentVpnIconId(boolean isBranded) {
+        return isBranded ? R.drawable.stat_sys_branded_vpn : R.drawable.stat_sys_vpn_ic;
+    }
+
     private class PhoneState {
         private final int mSubId;
         private boolean mMobileVisible = false;
@@ -685,4 +702,3 @@
         }
     }
 }
-
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
index 58fbd4c..b742479 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
@@ -24,7 +24,6 @@
 import com.android.systemui.statusbar.policy.DataSaverController.Listener;
 import com.android.systemui.statusbar.policy.HotspotController;
 import com.android.systemui.statusbar.policy.HotspotController.Callback;
-import com.android.systemui.statusbar.policy.NightModeController;
 
 /**
  * Manages which tiles should be automatically added to QS.
@@ -67,35 +66,12 @@
         if (!Prefs.getBoolean(context, Key.QS_WORK_ADDED, false)) {
             host.getManagedProfileController().addCallback(mProfileCallback);
         }
-        if (!Prefs.getBoolean(context, Key.QS_NIGHT_ADDED, false)) {
-            host.getNightModeController().addListener(mNightModeListener);
-        }
     }
 
     public void destroy() {
         // TODO: Remove any registered listeners.
     }
 
-    private final NightModeController.Listener mNightModeListener =
-            new NightModeController.Listener() {
-        @Override
-        public void onNightModeChanged() {
-            if (mHost.getNightModeController().isEnabled()) {
-                mHost.addTile("night");
-                Prefs.putBoolean(mContext, Key.QS_NIGHT_ADDED, true);
-                mHandler.post(new Runnable() {
-                    @Override
-                    public void run() {
-                        mHost.getNightModeController().removeListener(mNightModeListener);
-                    }
-                });
-            }
-        }
-
-        @Override
-        public void onTwilightAutoChanged() { }
-    };
-
     private final ManagedProfileController.Callback mProfileCallback =
             new ManagedProfileController.Callback() {
                 @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
index 30d24ff..b53a999 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
@@ -14,11 +14,10 @@
 
 package com.android.systemui.statusbar.phone;
 
+import android.annotation.DrawableRes;
+import android.annotation.Nullable;
 import android.graphics.drawable.Drawable;
 import android.view.View;
-import android.widget.ImageView;
-
-import com.android.systemui.statusbar.policy.KeyButtonView;
 
 import java.util.ArrayList;
 
@@ -65,9 +64,9 @@
             view.setVisibility(mVisibility);
         }
         if (mImageResource > 0) {
-            ((ImageView) view).setImageResource(mImageResource);
+            ((ButtonInterface) view).setImageResource(mImageResource);
         } else if (mImageDrawable != null) {
-            ((ImageView) view).setImageDrawable(mImageDrawable);
+            ((ButtonInterface) view).setImageDrawable(mImageDrawable);
         }
     }
 
@@ -88,7 +87,7 @@
         mImageResource = -1;
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((ImageView) mViews.get(i)).setImageDrawable(mImageDrawable);
+            ((ButtonInterface) mViews.get(i)).setImageDrawable(mImageDrawable);
         }
     }
 
@@ -97,7 +96,7 @@
         mImageDrawable = null;
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((ImageView) mViews.get(i)).setImageResource(mImageResource);
+            ((ButtonInterface) mViews.get(i)).setImageResource(mImageResource);
         }
     }
 
@@ -114,7 +113,7 @@
         // This seems to be an instantaneous thing, so not going to persist it.
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((KeyButtonView) mViews.get(i)).abortCurrentGesture();
+            ((ButtonInterface) mViews.get(i)).abortCurrentGesture();
         }
     }
 
@@ -158,6 +157,10 @@
         }
     }
 
+    public ArrayList<View> getViews() {
+        return mViews;
+    }
+
     public View getCurrentView() {
         return mCurrentView;
     }
@@ -165,4 +168,15 @@
     public void setCurrentView(View currentView) {
         mCurrentView = currentView.findViewById(mId);
     }
+
+    /**
+     * Interface for ImageView button actions.
+     */
+    public interface ButtonInterface {
+        void setImageResource(@DrawableRes int resId);
+
+        void setImageDrawable(@Nullable Drawable drawable);
+
+        void abortCurrentGesture();
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index 772c766..a98601a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -18,6 +18,7 @@
 
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
+import android.app.ActivityOptions;
 import android.app.admin.DevicePolicyManager;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
@@ -44,6 +45,7 @@
 import android.util.TypedValue;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.widget.FrameLayout;
 import android.widget.TextView;
@@ -448,12 +450,24 @@
                 @Override
                 public void run() {
                     int result = ActivityManager.START_CANCELED;
+
+                    // Normally an activity will set it's requested rotation
+                    // animation on its window. However when launching an activity
+                    // causes the orientation to change this is too late. In these cases
+                    // the default animation is used. This doesn't look good for
+                    // the camera (as it rotates the camera contents out of sync
+                    // with physical reality). So, we ask the WindowManager to
+                    // force the crossfade animation if an orientation change
+                    // happens to occur during the launch.
+                    ActivityOptions o = ActivityOptions.makeBasic();
+                    o.setRotationAnimationHint(
+                            WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE);
                     try {
                         result = ActivityManagerNative.getDefault().startActivityAsUser(
                                 null, getContext().getBasePackageName(),
                                 intent,
                                 intent.resolveTypeIfNeeded(getContext().getContentResolver()),
-                                null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null, null,
+                                null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null, o.toBundle(),
                                 UserHandle.CURRENT.getIdentifier());
                     } catch (RemoteException e) {
                         Log.w(TAG, "Unable to start camera activity", e);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index ee88b00..b3e86b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -234,7 +234,6 @@
         mKeyguardView.setViewMediatorCallback(mCallback);
         mContainer.addView(mRoot, mContainer.getChildCount());
         mRoot.setVisibility(View.INVISIBLE);
-        mRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME);
     }
 
     protected void removeView() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index 7db2870..93ed139 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.util.TypedValue;
@@ -56,8 +57,10 @@
 
     private BatteryController mBatteryController;
     private KeyguardUserSwitcher mKeyguardUserSwitcher;
+    private UserSwitcherController mUserSwitcherController;
 
     private int mSystemIconsSwitcherHiddenExpandedMargin;
+    private int mSystemIconsBaseMargin;
     private View mSystemIconsContainer;
 
     public KeyguardStatusBarView(Context context, AttributeSet attrs) {
@@ -136,8 +139,11 @@
     }
 
     private void loadDimens() {
-        mSystemIconsSwitcherHiddenExpandedMargin = getResources().getDimensionPixelSize(
+        Resources res = getResources();
+        mSystemIconsSwitcherHiddenExpandedMargin = res.getDimensionPixelSize(
                 R.dimen.system_icons_switcher_hidden_expanded_margin);
+        mSystemIconsBaseMargin = res.getDimensionPixelSize(
+                R.dimen.system_icons_super_container_avatarless_margin_end);
     }
 
     private void updateVisibilities() {
@@ -149,13 +155,29 @@
         } else if (mMultiUserSwitch.getParent() == this && mKeyguardUserSwitcherShowing) {
             removeView(mMultiUserSwitch);
         }
+        if (mKeyguardUserSwitcher == null) {
+            // If we have no keyguard switcher, the screen width is under 600dp. In this case,
+            // we don't show the multi-user avatar unless there is more than 1 user on the device.
+            if (mUserSwitcherController != null
+                    && mUserSwitcherController.getSwitchableUserCount() > 1) {
+                mMultiUserSwitch.setVisibility(View.VISIBLE);
+            } else {
+                mMultiUserSwitch.setVisibility(View.GONE);
+            }
+        }
         mBatteryLevel.setVisibility(mBatteryCharging ? View.VISIBLE : View.GONE);
     }
 
     private void updateSystemIconsLayoutParams() {
         RelativeLayout.LayoutParams lp =
                 (LayoutParams) mSystemIconsSuperContainer.getLayoutParams();
-        int marginEnd = mKeyguardUserSwitcherShowing ? mSystemIconsSwitcherHiddenExpandedMargin : 0;
+        // If the avatar icon is gone, we need to have some end margin to display the system icons
+        // correctly.
+        int baseMarginEnd = mMultiUserSwitch.getVisibility() == View.GONE
+                ? mSystemIconsBaseMargin
+                : 0;
+        int marginEnd = mKeyguardUserSwitcherShowing ? mSystemIconsSwitcherHiddenExpandedMargin :
+                baseMarginEnd;
         if (marginEnd != lp.getMarginEnd()) {
             lp.setMarginEnd(marginEnd);
             mSystemIconsSuperContainer.setLayoutParams(lp);
@@ -187,6 +209,7 @@
     }
 
     public void setUserSwitcherController(UserSwitcherController controller) {
+        mUserSwitcherController = controller;
         mMultiUserSwitch.setUserSwitcherController(controller);
     }
 
@@ -287,6 +310,9 @@
             mSystemIconsSuperContainer.animate().cancel();
             mMultiUserSwitch.animate().cancel();
             mMultiUserSwitch.setAlpha(1f);
+        } else {
+            updateVisibilities();
+            updateSystemIconsLayoutParams();
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
index ab5ee93..9bb4936 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -168,6 +168,7 @@
             setContentDescription(contentDescription);
             mHasFingerPrintIcon = anyFingerprintIcon;
             if (animation != null && isAnim) {
+                animation.forceAnimationOnUI();
                 animation.start();
             }
             mLastState = state;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index 2bee816..dd46b08 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -26,7 +26,9 @@
 import android.widget.FrameLayout;
 import android.widget.LinearLayout;
 import android.widget.Space;
+
 import com.android.systemui.R;
+import com.android.systemui.SystemUIFactory;
 import com.android.systemui.statusbar.policy.KeyButtonView;
 import com.android.systemui.tuner.TunerService;
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 5fab796..53fe6ce3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -380,10 +380,6 @@
                 && ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) == 0);
         final boolean disableSearch = ((disabledFlags & View.STATUS_BAR_DISABLE_SEARCH) != 0);
 
-        if (SLIPPERY_WHEN_DISABLED) {
-            setSlippery(disableHome && disableRecent && disableBack && disableSearch);
-        }
-
         ViewGroup navButtons = (ViewGroup) getCurrentView().findViewById(R.id.nav_buttons);
         if (navButtons != null) {
             LayoutTransition lt = navButtons.getLayoutTransition();
@@ -458,22 +454,6 @@
         }
     }
 
-    public void setSlippery(boolean newSlippery) {
-        WindowManager.LayoutParams lp = (WindowManager.LayoutParams) getLayoutParams();
-        if (lp != null) {
-            boolean oldSlippery = (lp.flags & WindowManager.LayoutParams.FLAG_SLIPPERY) != 0;
-            if (!oldSlippery && newSlippery) {
-                lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY;
-            } else if (oldSlippery && !newSlippery) {
-                lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY;
-            } else {
-                return;
-            }
-            WindowManager wm = (WindowManager)getContext().getSystemService(Context.WINDOW_SERVICE);
-            wm.updateViewLayout(this, lp);
-        }
-    }
-
     public void setMenuVisibility(final boolean show) {
         setMenuVisibility(show, false);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 5064d8e..4b82279 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1296,7 +1296,7 @@
         }
     }
 
-    private void flingSettings(float vel, boolean expand) {
+    public void flingSettings(float vel, boolean expand) {
         flingSettings(vel, expand, null, false /* isClick */);
     }
 
@@ -1390,10 +1390,14 @@
         return maxHeight;
     }
 
-    private boolean isInSettings() {
+    public boolean isInSettings() {
         return mQsExpanded;
     }
 
+    public boolean isExpanding() {
+        return mIsExpanding;
+    }
+
     @Override
     protected void onHeightUpdated(float expandedHeight) {
         if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
@@ -2108,6 +2112,7 @@
         onEmptySpaceClick(x);
     }
 
+    @Override
     protected boolean onMiddleClicked() {
         switch (mStatusBar.getBarState()) {
             case StatusBarState.KEYGUARD:
@@ -2257,6 +2262,7 @@
         mStatusBar.clearNotificationEffects();
     }
 
+    @Override
     protected boolean isPanelVisibleBecauseOfHeadsUp() {
         return mHeadsUpManager.hasPinnedHeadsUp() || mHeadsUpAnimatingAway;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index f7b258f..34aaae4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -22,6 +22,7 @@
 import android.annotation.NonNull;
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
+import android.app.ActivityOptions;
 import android.app.IActivityManager;
 import android.app.Notification;
 import android.app.PendingIntent;
@@ -765,7 +766,7 @@
             // no window manager? good luck with that
         }
 
-        mAssistManager = new AssistManager(this, context);
+        mAssistManager = SystemUIFactory.getInstance().createAssistManager(this, context);
 
         // figure out which pixel-format to use for the status bar.
         mPixelFormat = PixelFormat.OPAQUE;
@@ -787,11 +788,15 @@
         mBackdropFront = (ImageView) mBackdrop.findViewById(R.id.backdrop_front);
         mBackdropBack = (ImageView) mBackdrop.findViewById(R.id.backdrop_back);
 
+        if (ENABLE_LOCKSCREEN_WALLPAPER) {
+            mLockscreenWallpaper = new LockscreenWallpaper(mContext, this, mHandler);
+        }
+
         ScrimView scrimBehind = (ScrimView) mStatusBarWindow.findViewById(R.id.scrim_behind);
         ScrimView scrimInFront = (ScrimView) mStatusBarWindow.findViewById(R.id.scrim_in_front);
         View headsUpScrim = mStatusBarWindow.findViewById(R.id.heads_up_scrim);
         mScrimController = SystemUIFactory.getInstance().createScrimController(
-                scrimBehind, scrimInFront, headsUpScrim);
+                scrimBehind, scrimInFront, headsUpScrim, mLockscreenWallpaper);
         if (mScrimSrcModeEnabled) {
             Runnable runnable = new Runnable() {
                 @Override
@@ -821,10 +826,6 @@
                 mKeyguardBottomArea.getLockIcon());
         mKeyguardBottomArea.setKeyguardIndicationController(mKeyguardIndicationController);
 
-        if (ENABLE_LOCKSCREEN_WALLPAPER) {
-            mLockscreenWallpaper = new LockscreenWallpaper(mContext, this, mHandler);
-        }
-
         // set the initial view visibility
         setAreThereNotifications();
 
@@ -1235,6 +1236,7 @@
     }
 
     private View.OnClickListener mRecentsClickListener = new View.OnClickListener() {
+        @Override
         public void onClick(View v) {
             awakenDreams();
             toggleRecentApps();
@@ -1299,6 +1301,7 @@
     };
 
     private final View.OnTouchListener mHomeActionListener = new View.OnTouchListener() {
+        @Override
         public boolean onTouch(View v, MotionEvent event) {
             switch (event.getAction()) {
                 case MotionEvent.ACTION_UP:
@@ -1372,7 +1375,8 @@
                     | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                     | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
                     | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
-                    | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
+                    | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
+                    | WindowManager.LayoutParams.FLAG_SLIPPERY,
                 PixelFormat.TRANSLUCENT);
         // this will allow the navbar to run in an overlay on devices that support this
         if (ActivityManager.isHighEndGfx()) {
@@ -2231,6 +2235,7 @@
     /**
      * State is one or more of the DISABLE constants from StatusBarManager.
      */
+    @Override
     public void disable(int state1, int state2, boolean animate) {
         animate &= mStatusBarWindowState != WINDOW_STATE_HIDDEN;
         mDisabledUnmodified1 = state1;
@@ -2460,6 +2465,7 @@
 
     }
 
+    @Override
     protected void updateHeadsUp(String key, Entry entry, boolean shouldPeek,
             boolean alertAgain) {
         final boolean wasHeadsUp = isHeadsUp(key);
@@ -2476,6 +2482,7 @@
         }
     }
 
+    @Override
     protected void setHeadsUpUser(int newUserId) {
         if (mHeadsUpManager != null) {
             mHeadsUpManager.setUser(newUserId);
@@ -2486,6 +2493,7 @@
         return mHeadsUpManager.isHeadsUp(key);
     }
 
+    @Override
     protected boolean isSnoozedPackage(StatusBarNotification sbn) {
         return mHeadsUpManager.isSnoozed(sbn.getPackageName());
     }
@@ -2526,6 +2534,7 @@
      * All changes to the status bar and notifications funnel through here and are batched.
      */
     private class H extends BaseStatusBar.H {
+        @Override
         public void handleMessage(Message m) {
             super.handleMessage(m);
             switch (m.what) {
@@ -2567,6 +2576,32 @@
         mHeadsUpManager.releaseAllImmediately();
     }
 
+    /**
+     * Called for system navigation gestures. First action opens the panel, second opens
+     * settings. Down action closes the entire panel.
+     */
+    @Override
+    public void handleSystemNavigationKey(int key) {
+        if (SPEW) Log.d(TAG, "handleSystemNavigationKey: " + key);
+        if (!panelsEnabled()) {
+            return;
+        }
+
+        // Panels are not available in setup
+        if (!mUserSetup) return;
+
+        if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP == key) {
+            mNotificationPanel.collapse(false /* delayed */, 1.0f /* speedUpFactor */);
+        } else if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN == key) {
+            if (mNotificationPanel.isFullyCollapsed()) {
+                mNotificationPanel.expand(true /* animate */);
+            } else if (!mNotificationPanel.isInSettings() && !mNotificationPanel.isExpanding()){
+                mNotificationPanel.flingSettings(0 /* velocity */, true /* expand */);
+            }
+        }
+
+    }
+
     boolean panelsEnabled() {
         return (mDisabled1 & StatusBarManager.DISABLE_EXPAND) == 0 && !ONLY_CORE_APPS;
     }
@@ -2578,8 +2613,6 @@
         }
 
         mExpandedVisible = true;
-        if (mNavigationBarView != null)
-            mNavigationBarView.setSlippery(true);
 
         // Expand the window to encompass the full screen in anticipation of the drag.
         // This is only possible to do atomically because the status bar is at the top of the screen!
@@ -2610,15 +2643,18 @@
         mHandler.sendEmptyMessage(MSG_OPEN_SETTINGS_PANEL);
     }
 
+    @Override
     public void animateCollapsePanels(int flags) {
         animateCollapsePanels(flags, false /* force */, false /* delayed */,
                 1.0f /* speedUpFactor */);
     }
 
+    @Override
     public void animateCollapsePanels(int flags, boolean force) {
         animateCollapsePanels(flags, force, false /* delayed */, 1.0f /* speedUpFactor */);
     }
 
+    @Override
     public void animateCollapsePanels(int flags, boolean force, boolean delayed) {
         animateCollapsePanels(flags, force, delayed, 1.0f /* speedUpFactor */);
     }
@@ -2713,8 +2749,7 @@
         mNotificationPanel.closeQs();
 
         mExpandedVisible = false;
-        if (mNavigationBarView != null)
-            mNavigationBarView.setSlippery(false);
+
         visibilityChanged(false);
 
         // Shrink the window to the size of the status bar only
@@ -3056,6 +3091,7 @@
         }
     }
 
+    @Override
     public void topAppWindowChanged(boolean showMenu) {
         if (SPEW) {
             Log.d(TAG, (showMenu?"showing":"hiding") + " the MENU button");
@@ -3092,6 +3128,7 @@
                 + ") " + v.getWidth() + "x" + v.getHeight() + "]";
     }
 
+    @Override
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         synchronized (mQueueLock) {
             pw.println("Current Status Bar state:");
@@ -3169,6 +3206,7 @@
                 pw.println("see the logcat for a dump of the views we have created.");
                 // must happen on ui thread
                 mHandler.post(new Runnable() {
+                        @Override
                         public void run() {
                             mStatusBarView.getLocationOnScreen(mAbsPos);
                             Log.d(TAG, "mStatusBarView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
@@ -3279,18 +3317,32 @@
                 mContext, intent, mCurrentUserId);
         final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
         Runnable runnable = new Runnable() {
+            @Override
             public void run() {
                 mAssistManager.hideAssist();
                 intent.setFlags(
                         Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
                 int result = ActivityManager.START_CANCELED;
+                ActivityOptions options = new ActivityOptions(getActivityOptions());
+                if (intent == KeyguardBottomAreaView.INSECURE_CAMERA_INTENT) {
+                    // Normally an activity will set it's requested rotation
+                    // animation on its window. However when launching an activity
+                    // causes the orientation to change this is too late. In these cases
+                    // the default animation is used. This doesn't look good for
+                    // the camera (as it rotates the camera contents out of sync
+                    // with physical reality). So, we ask the WindowManager to
+                    // force the crossfade animation if an orientation change
+                    // happens to occur during the launch.
+                    options.setRotationAnimationHint(
+                            WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE);
+                }
                 try {
                     result = ActivityManagerNative.getDefault().startActivityAsUser(
                             null, mContext.getBasePackageName(),
                             intent,
                             intent.resolveTypeIfNeeded(mContext.getContentResolver()),
                             null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null,
-                            getActivityOptions(), UserHandle.CURRENT.getIdentifier());
+                            options.toBundle(), UserHandle.CURRENT.getIdentifier());
                 } catch (RemoteException e) {
                     Log.w(TAG, "Unable to start activity", e);
                 }
@@ -3323,6 +3375,7 @@
             @Override
             public boolean onDismiss() {
                 AsyncTask.execute(new Runnable() {
+                    @Override
                     public void run() {
                         try {
                             if (keyguardShowing && !afterKeyguardGone) {
@@ -3346,6 +3399,7 @@
     }
 
     private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
         public void onReceive(Context context, Intent intent) {
             if (DEBUG) Log.v(TAG, "onReceive: " + intent);
             String action = intent.getAction();
@@ -3376,6 +3430,7 @@
     };
 
     private BroadcastReceiver mDemoReceiver = new BroadcastReceiver() {
+        @Override
         public void onReceive(Context context, Intent intent) {
             if (DEBUG) Log.v(TAG, "onReceive: " + intent);
             String action = intent.getAction();
@@ -3458,6 +3513,7 @@
         setControllerUsers();
         clearCurrentMediaNotification();
         mLockscreenWallpaper.setCurrentUser(newUserId);
+        mScrimController.setCurrentUser(newUserId);
         updateMediaMetaData(true, false);
     }
 
@@ -3635,6 +3691,7 @@
     }
 
     Runnable mStartTracing = new Runnable() {
+        @Override
         public void run() {
             vibrate();
             SystemClock.sleep(250);
@@ -3645,6 +3702,7 @@
     };
 
     Runnable mStopTracing = new Runnable() {
+        @Override
         public void run() {
             android.os.Debug.stopMethodTracing();
             Log.d(TAG, "stopTracing");
@@ -4250,6 +4308,10 @@
         mStackScroller.setActivatedChild(view);
     }
 
+    public ButtonDispatcher getHomeButton() {
+        return mNavigationBarView.getHomeButton();
+    }
+
     /**
      * @param state The {@link StatusBarState} to set.
      */
@@ -4597,7 +4659,7 @@
 
     private void vibrateForCameraGesture() {
         // Make sure to pass -1 for repeat so VibratorService doesn't stop us when going to sleep.
-        mVibrator.vibrate(new long[]{0, 750L}, -1 /* repeat */);
+        mVibrator.vibrate(new long[]{0, 400}, -1 /* repeat */);
     }
 
     public void onScreenTurnedOn() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index d9dd9e2..a13138d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -144,7 +144,7 @@
 
         // listen for user / profile change.
         try {
-            ActivityManagerNative.getDefault().registerUserSwitchObserver(mUserSwitchListener);
+            ActivityManagerNative.getDefault().registerUserSwitchObserver(mUserSwitchListener, TAG);
         } catch (RemoteException e) {
             // Ignore
         }
@@ -217,6 +217,8 @@
             mSimState = IccCardConstants.State.ABSENT;
         } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) {
             mSimState = IccCardConstants.State.CARD_IO_ERROR;
+        } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_RESTRICTED.equals(stateExtra)) {
+            mSimState = IccCardConstants.State.CARD_RESTRICTED;
         } else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
             mSimState = IccCardConstants.State.READY;
         } else if (IccCardConstants.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index fa57775..ca7f905 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -27,6 +27,7 @@
 import android.os.Looper;
 import android.os.Process;
 import android.os.UserHandle;
+import android.os.UserManager;
 import android.provider.Settings;
 import android.provider.Settings.Secure;
 import android.service.quicksettings.Tile;
@@ -59,7 +60,6 @@
 import com.android.systemui.statusbar.policy.BluetoothController;
 import com.android.systemui.statusbar.policy.CastController;
 import com.android.systemui.statusbar.policy.NextAlarmController;
-import com.android.systemui.statusbar.policy.NightModeController;
 import com.android.systemui.statusbar.policy.FlashlightController;
 import com.android.systemui.statusbar.policy.HotspotController;
 import com.android.systemui.statusbar.policy.KeyguardMonitor;
@@ -70,7 +70,6 @@
 import com.android.systemui.statusbar.policy.UserInfoController;
 import com.android.systemui.statusbar.policy.UserSwitcherController;
 import com.android.systemui.statusbar.policy.ZenModeController;
-import com.android.systemui.tuner.NightModeTile;
 import com.android.systemui.tuner.TunerService;
 import com.android.systemui.tuner.TunerService.Tunable;
 
@@ -110,7 +109,6 @@
     private final TileServices mServices;
 
     private final List<Callback> mCallbacks = new ArrayList<>();
-    private final NightModeController mNightModeController;
     private final AutoTileManager mAutoTiles;
     private final ManagedProfileController mProfileController;
     private final NextAlarmController mNextAlarmController;
@@ -143,7 +141,6 @@
         mBattery = battery;
         mIconController = iconController;
         mNextAlarmController = nextAlarmController;
-        mNightModeController = new NightModeController(mContext, true);
         mProfileController = new ManagedProfileController(this);
 
         final HandlerThread ht = new HandlerThread(QSTileHost.class.getSimpleName(),
@@ -307,10 +304,6 @@
         return mIconController;
     }
 
-    public NightModeController getNightModeController() {
-        return mNightModeController;
-    }
-
     public ManagedProfileController getManagedProfileController() {
         return mProfileController;
     }
@@ -321,6 +314,9 @@
             return;
         }
         if (DEBUG) Log.d(TAG, "Recreating tiles");
+        if (newValue == null && UserManager.isDeviceInDemoMode(mContext)) {
+            newValue = mContext.getResources().getString(R.string.quick_settings_tiles_retail_mode);
+        }
         final List<String> tileSpecs = loadTileSpecs(mContext, newValue);
         int currentUser = ActivityManager.getCurrentUser();
         if (tileSpecs.equals(mTileSpecs) && currentUser == mCurrentUser) return;
@@ -444,8 +440,6 @@
         else if (tileSpec.equals("user")) return new UserTile(this);
         else if (tileSpec.equals("battery")) return new BatteryTile(this);
         else if (tileSpec.equals("saver")) return new DataSaverTile(this);
-        else if (tileSpec.equals(NightModeTile.NIGHT_MODE_SPEC))
-            return new NightModeTile(this);
         // Intent tiles.
         else if (tileSpec.startsWith(IntentTile.PREFIX)) return IntentTile.create(this,tileSpec);
         else if (tileSpec.startsWith(CustomTile.PREFIX)) return CustomTile.create(this,tileSpec);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
index e091d6dc..85303f4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
@@ -23,6 +23,7 @@
 import android.content.res.Configuration;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.RippleDrawable;
+import android.os.UserManager;
 import android.util.AttributeSet;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -82,18 +83,13 @@
     protected MultiUserSwitch mMultiUserSwitch;
     private ImageView mMultiUserAvatar;
 
-    private float mDateTimeTranslation;
-    private float mDateTimeAlarmTranslation;
-    private float mDateScaleFactor;
-    protected float mGearTranslation;
 
     private TouchAnimator mSecondHalfAnimator;
     private TouchAnimator mFirstHalfAnimator;
-    private TouchAnimator mDateSizeAnimator;
-    private TouchAnimator mAlarmTranslation;
     protected TouchAnimator mSettingsAlpha;
     private float mExpansionAmount;
     private QSTileHost mHost;
+    private View mEdit;
     private boolean mShowFullAlarm;
 
     public QuickStatusBarHeader(Context context, AttributeSet attrs) {
@@ -106,6 +102,10 @@
 
         mEmergencyOnly = (TextView) findViewById(R.id.header_emergency_calls_only);
 
+        mEdit = findViewById(android.R.id.edit);
+        findViewById(android.R.id.edit).setOnClickListener(view ->
+                mHost.startRunnableDismissingKeyguard(() -> mQsPanel.showEdit(view)));
+
         mDateTimeAlarmGroup = (ViewGroup) findViewById(R.id.date_time_alarm_group);
         mDateTimeAlarmGroup.findViewById(R.id.empty_time_view).setVisibility(View.GONE);
         mDateTimeGroup = (ViewGroup) findViewById(R.id.date_time_group);
@@ -152,47 +152,23 @@
         FontSizeUtils.updateFontSize(mAlarmStatus, R.dimen.qs_date_collapsed_size);
         FontSizeUtils.updateFontSize(mEmergencyOnly, R.dimen.qs_emergency_calls_only_text_size);
 
-        mGearTranslation = mContext.getResources().getDimension(R.dimen.qs_header_gear_translation);
-
-        mDateTimeTranslation = mContext.getResources().getDimension(
-                R.dimen.qs_date_anim_translation);
-        mDateTimeAlarmTranslation = mContext.getResources().getDimension(
-                R.dimen.qs_date_alarm_anim_translation);
-        float dateCollapsedSize = mContext.getResources().getDimension(
-                R.dimen.qs_date_collapsed_text_size);
-        float dateExpandedSize = mContext.getResources().getDimension(
-                R.dimen.qs_date_text_size);
-        mDateScaleFactor = dateExpandedSize / dateCollapsedSize;
-        updateDateTimePosition();
-
         mSecondHalfAnimator = new TouchAnimator.Builder()
                 .addFloat(mShowFullAlarm ? mAlarmStatus : findViewById(R.id.date), "alpha", 0, 1)
                 .addFloat(mEmergencyOnly, "alpha", 0, 1)
-                .setStartDelay(.5f)
                 .build();
         if (mShowFullAlarm) {
             mFirstHalfAnimator = new TouchAnimator.Builder()
                     .addFloat(mAlarmStatusCollapsed, "alpha", 1, 0)
-                    .setEndDelay(.5f)
                     .build();
         }
-        mDateSizeAnimator = new TouchAnimator.Builder()
-                .addFloat(mDateTimeGroup, "scaleX", 1, mDateScaleFactor)
-                .addFloat(mDateTimeGroup, "scaleY", 1, mDateScaleFactor)
-                .setStartDelay(.36f)
-                .build();
 
         updateSettingsAnimator();
     }
 
     protected void updateSettingsAnimator() {
         mSettingsAlpha = new TouchAnimator.Builder()
-                .addFloat(mSettingsContainer, "translationY", -mGearTranslation, 0)
-                .addFloat(mMultiUserSwitch, "translationY", -mGearTranslation, 0)
-                .addFloat(mSettingsButton, "rotation", -90, 0)
-                .addFloat(mSettingsContainer, "alpha", 0, 1)
+                .addFloat(mEdit, "alpha", 0, 1)
                 .addFloat(mMultiUserSwitch, "alpha", 0, 1)
-                .setStartDelay(QSAnimator.EXPANDED_TILE_DELAY)
                 .build();
 
         final boolean isRtl = isLayoutRtl();
@@ -251,8 +227,6 @@
         if (mShowFullAlarm) {
             mFirstHalfAnimator.setPosition(headerExpansionFraction);
         }
-        mDateSizeAnimator.setPosition(headerExpansionFraction);
-        mAlarmTranslation.setPosition(headerExpansionFraction);
         mSettingsAlpha.setPosition(headerExpansionFraction);
 
         updateAlarmVisibilities();
@@ -273,15 +247,6 @@
         mAlarmStatusCollapsed.setVisibility(mAlarmShowing ? View.VISIBLE : View.INVISIBLE);
     }
 
-    private void updateDateTimePosition() {
-        // This one has its own because we have to rebuild it every time the alarm state changes.
-        mAlarmTranslation = new TouchAnimator.Builder()
-                .addFloat(mDateTimeAlarmGroup, "translationY", 0, mAlarmShowing
-                        ? mDateTimeAlarmTranslation : mDateTimeTranslation)
-                .build();
-        mAlarmTranslation.setPosition(mExpansionAmount);
-    }
-
     public void setListening(boolean listening) {
         if (listening == mListening) {
             return;
@@ -293,7 +258,6 @@
 
     @Override
     public void updateEverything() {
-        updateDateTimePosition();
         updateVisibilities();
         setClickable(false);
     }
@@ -302,11 +266,12 @@
         updateAlarmVisibilities();
         mEmergencyOnly.setVisibility(mExpanded && mShowEmergencyCallsOnly
                 ? View.VISIBLE : View.INVISIBLE);
-        mSettingsContainer.setVisibility(mExpanded ? View.VISIBLE : View.INVISIBLE);
         mSettingsContainer.findViewById(R.id.tuner_icon).setVisibility(
                 TunerService.isTunerEnabled(mContext) ? View.VISIBLE : View.INVISIBLE);
-        mMultiUserSwitch.setVisibility(mExpanded && mMultiUserSwitch.hasMultipleUsers()
+        final boolean isDemo = UserManager.isDeviceInDemoMode(mContext);
+        mMultiUserSwitch.setVisibility(mExpanded && mMultiUserSwitch.hasMultipleUsers() && !isDemo
                 ? View.VISIBLE : View.INVISIBLE);
+        mEdit.setVisibility(isDemo || !mExpanded ? View.INVISIBLE : View.VISIBLE);
     }
 
     private void updateListeners() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 9c4480e..8b87a7f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -30,6 +30,7 @@
 import android.view.animation.Interpolator;
 import android.view.animation.PathInterpolator;
 
+import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.ExpandableNotificationRow;
 import com.android.systemui.statusbar.NotificationData;
@@ -46,10 +47,13 @@
     public static final long ANIMATION_DURATION = 220;
     public static final Interpolator KEYGUARD_FADE_OUT_INTERPOLATOR
             = new PathInterpolator(0f, 0, 0.7f, 1f);
+    public static final Interpolator KEYGUARD_FADE_OUT_INTERPOLATOR_LOCKED
+            = new PathInterpolator(0.3f, 0f, 0.8f, 1f);
     private static final float SCRIM_BEHIND_ALPHA = 0.62f;
-    private static final float SCRIM_BEHIND_ALPHA_KEYGUARD = 0.45f;
-    private static final float SCRIM_BEHIND_ALPHA_UNLOCKING = 0.2f;
+    protected static final float SCRIM_BEHIND_ALPHA_KEYGUARD = 0.45f;
+    protected static final float SCRIM_BEHIND_ALPHA_UNLOCKING = 0.2f;
     private static final float SCRIM_IN_FRONT_ALPHA = 0.75f;
+    private static final float SCRIM_IN_FRONT_ALPHA_LOCKED = 0.85f;
     private static final int TAG_KEY_ANIM = R.id.scrim;
     private static final int TAG_KEY_ANIM_TARGET = R.id.scrim_target;
     private static final int TAG_START_ALPHA = R.id.scrim_alpha_start;
@@ -59,6 +63,7 @@
     private final ScrimView mScrimInFront;
     private final UnlockMethodCache mUnlockMethodCache;
     private final View mHeadsUpScrim;
+    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
 
     private float mScrimBehindAlpha = SCRIM_BEHIND_ALPHA;
     private float mScrimBehindAlphaKeyguard = SCRIM_BEHIND_ALPHA_KEYGUARD;
@@ -99,6 +104,7 @@
         mHeadsUpScrim = headsUpScrim;
         final Context context = scrimBehind.getContext();
         mUnlockMethodCache = UnlockMethodCache.getInstance(context);
+        mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
         updateHeadsUpScrim(false);
     }
 
@@ -120,6 +126,13 @@
         scheduleUpdate();
     }
 
+    protected void setScrimBehindValues(float scrimBehindAlphaKeyguard,
+            float scrimBehindAlphaUnlocking) {
+        mScrimBehindAlphaKeyguard = scrimBehindAlphaKeyguard;
+        mScrimBehindAlphaUnlocking = scrimBehindAlphaUnlocking;
+        scheduleUpdate();
+    }
+
     public void onTrackingStarted() {
         mExpanding = true;
         mDarkenWhileDragging = !mUnlockMethodCache.canSkipBouncer();
@@ -162,11 +175,19 @@
         mAnimateChange = true;
         mSkipFirstFrame = skipFirstFrame;
         mOnAnimationFinished = onAnimationFinished;
-        scheduleUpdate();
 
-        // No need to wait for the next frame to be drawn for this case - onPreDraw will execute
-        // the changes we just scheduled.
-        onPreDraw();
+        if (mKeyguardUpdateMonitor.isUserUnlocked()) {
+            scheduleUpdate();
+
+            // No need to wait for the next frame to be drawn for this case - onPreDraw will execute
+            // the changes we just scheduled.
+            onPreDraw();
+        } else {
+
+            // In case the user isn't unlocked, make sure to delay a bit because the system is hosed
+            // with too many things in this case, in order to not skip the initial frames.
+            mScrimInFront.postOnAnimationDelayed(this::scheduleUpdate, 16);
+        }
     }
 
     public void abortKeyguardFadingOut() {
@@ -211,6 +232,11 @@
         return mDozeInFrontAlpha;
     }
 
+    private float getScrimInFrontAlpha() {
+        return mKeyguardUpdateMonitor.isUserUnlocked()
+                ? SCRIM_IN_FRONT_ALPHA
+                : SCRIM_IN_FRONT_ALPHA_LOCKED;
+    }
     private void scheduleUpdate() {
         if (mUpdatePending) return;
 
@@ -250,10 +276,10 @@
             float fraction = 1 - behindFraction;
             fraction = (float) Math.pow(fraction, 0.8f);
             behindFraction = (float) Math.pow(behindFraction, 0.8f);
-            setScrimInFrontColor(fraction * SCRIM_IN_FRONT_ALPHA);
+            setScrimInFrontColor(fraction * getScrimInFrontAlpha());
             setScrimBehindColor(behindFraction * mScrimBehindAlphaKeyguard);
         } else if (mBouncerShowing) {
-            setScrimInFrontColor(SCRIM_IN_FRONT_ALPHA);
+            setScrimInFrontColor(getScrimInFrontAlpha());
             setScrimBehindColor(0f);
         } else {
             float fraction = Math.max(0, Math.min(mFraction, 1));
@@ -371,7 +397,13 @@
     }
 
     private Interpolator getInterpolator() {
-        return mAnimateKeyguardFadingOut ? KEYGUARD_FADE_OUT_INTERPOLATOR : mInterpolator;
+        if (mAnimateKeyguardFadingOut && !mKeyguardUpdateMonitor.isUserUnlocked()) {
+            return KEYGUARD_FADE_OUT_INTERPOLATOR_LOCKED;
+        } else if (mAnimateKeyguardFadingOut) {
+            return KEYGUARD_FADE_OUT_INTERPOLATOR;
+        } else {
+            return mInterpolator;
+        }
     }
 
     @Override
@@ -524,6 +556,10 @@
         mScrimBehind.setExcludedArea(area);
     }
 
+    public void setLeftInset(int inset) {
+        mScrimBehind.setLeftInset(inset);
+    }
+
     public int getScrimBehindColor() {
         return mScrimBehind.getScrimColorWithAlpha();
     }
@@ -538,4 +574,8 @@
                 R.dimen.heads_up_scrim_height);
         mHeadsUpScrim.setLayoutParams(layoutParams);
     }
+
+    public void setCurrentUser(int currentUser) {
+        // Don't care in the base class.
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
deleted file mode 100644
index 72eafd8..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ /dev/null
@@ -1,842 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.statusbar.phone;
-
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.graphics.Outline;
-import android.graphics.Rect;
-import android.graphics.drawable.Animatable;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.RippleDrawable;
-import android.util.AttributeSet;
-import android.util.MathUtils;
-import android.util.TypedValue;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewOutlineProvider;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.RelativeLayout;
-import android.widget.Switch;
-import android.widget.TextView;
-import android.widget.Toast;
-import com.android.keyguard.KeyguardStatusView;
-import com.android.systemui.BatteryMeterView;
-import com.android.systemui.FontSizeUtils;
-import com.android.systemui.R;
-import com.android.systemui.qs.QSPanel;
-import com.android.systemui.qs.QSPanel.Callback;
-import com.android.systemui.qs.QSTile;
-import com.android.systemui.qs.QSTile.DetailAdapter;
-import com.android.systemui.statusbar.policy.BatteryController;
-import com.android.systemui.statusbar.policy.NetworkController.EmergencyListener;
-import com.android.systemui.statusbar.policy.NextAlarmController;
-import com.android.systemui.statusbar.policy.UserInfoController;
-import com.android.systemui.tuner.TunerService;
-
-import java.text.NumberFormat;
-
-/**
- * The view to manage the header area in the expanded status bar.
- */
-public class StatusBarHeaderView extends BaseStatusBarHeader implements View.OnClickListener,
-        BatteryController.BatteryStateChangeCallback, NextAlarmController.NextAlarmChangeCallback,
-        EmergencyListener {
-
-    private boolean mExpanded;
-    private boolean mListening;
-
-    private ViewGroup mSystemIconsContainer;
-    private View mSystemIconsSuperContainer;
-    private View mDateGroup;
-    private View mClock;
-    private TextView mTime;
-    private TextView mAmPm;
-    private MultiUserSwitch mMultiUserSwitch;
-    private ImageView mMultiUserAvatar;
-    private TextView mDateCollapsed;
-    private TextView mDateExpanded;
-    private LinearLayout mSystemIcons;
-    private View mSignalCluster;
-    private SettingsButton mSettingsButton;
-    private View mSettingsContainer;
-    private View mQsDetailHeader;
-    private TextView mQsDetailHeaderTitle;
-    private Switch mQsDetailHeaderSwitch;
-    private ImageView mQsDetailHeaderProgress;
-    private TextView mEmergencyCallsOnly;
-    private TextView mBatteryLevel;
-    private TextView mAlarmStatus;
-
-    private boolean mShowEmergencyCallsOnly;
-    private boolean mAlarmShowing;
-    private AlarmManager.AlarmClockInfo mNextAlarm;
-
-    private int mCollapsedHeight;
-    private int mExpandedHeight;
-
-    private int mMultiUserExpandedMargin;
-    private int mMultiUserCollapsedMargin;
-
-    private int mClockMarginBottomExpanded;
-    private int mClockMarginBottomCollapsed;
-    private int mMultiUserSwitchWidthCollapsed;
-    private int mMultiUserSwitchWidthExpanded;
-
-    private int mClockCollapsedSize;
-    private int mClockExpandedSize;
-
-    /**
-     * In collapsed QS, the clock and avatar are scaled down a bit post-layout to allow for a nice
-     * transition. These values determine that factor.
-     */
-    private float mClockCollapsedScaleFactor;
-    private float mAvatarCollapsedScaleFactor;
-
-    private ActivityStarter mActivityStarter;
-    private BatteryController mBatteryController;
-    private NextAlarmController mNextAlarmController;
-    private QSPanel mQSPanel;
-
-    private final Rect mClipBounds = new Rect();
-
-    private boolean mCaptureValues;
-    private boolean mSignalClusterDetached;
-    private final LayoutValues mCollapsedValues = new LayoutValues();
-    private final LayoutValues mExpandedValues = new LayoutValues();
-    private final LayoutValues mCurrentValues = new LayoutValues();
-
-    private float mCurrentT;
-    private boolean mShowingDetail;
-    private boolean mDetailTransitioning;
-
-    private boolean mAllowExpand = true;
-
-    public StatusBarHeaderView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-        mSystemIconsSuperContainer = findViewById(R.id.system_icons_super_container);
-        mSystemIconsContainer = (ViewGroup) findViewById(R.id.system_icons_container);
-        mSystemIconsSuperContainer.setOnClickListener(this);
-        mDateGroup = findViewById(R.id.date_group);
-        mClock = findViewById(R.id.clock);
-        mTime = (TextView) findViewById(R.id.time_view);
-        mAmPm = (TextView) findViewById(R.id.am_pm_view);
-        mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
-        mMultiUserAvatar = (ImageView) findViewById(R.id.multi_user_avatar);
-        mDateCollapsed = (TextView) findViewById(R.id.date_collapsed);
-        mDateExpanded = (TextView) findViewById(R.id.date_expanded);
-        mSettingsButton = (SettingsButton) findViewById(R.id.settings_button);
-        mSettingsContainer = findViewById(R.id.settings_button_container);
-        mSettingsButton.setOnClickListener(this);
-        mQsDetailHeader = findViewById(R.id.qs_detail_header);
-        mQsDetailHeader.setAlpha(0);
-        mQsDetailHeaderTitle = (TextView) mQsDetailHeader.findViewById(android.R.id.title);
-        mQsDetailHeaderSwitch = (Switch) mQsDetailHeader.findViewById(android.R.id.toggle);
-        mQsDetailHeaderProgress = (ImageView) findViewById(R.id.qs_detail_header_progress);
-        mEmergencyCallsOnly = (TextView) findViewById(R.id.header_emergency_calls_only);
-        mBatteryLevel = (TextView) findViewById(R.id.battery_level);
-        mAlarmStatus = (TextView) findViewById(R.id.alarm_status);
-        mAlarmStatus.setOnClickListener(this);
-        mSignalCluster = findViewById(R.id.signal_cluster);
-        mSystemIcons = (LinearLayout) findViewById(R.id.system_icons);
-        loadDimens();
-        updateVisibilities();
-        updateClockScale();
-        updateAvatarScale();
-        addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
-            @Override
-            public void onLayoutChange(View v, int left, int top, int right,
-                    int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
-                if ((right - left) != (oldRight - oldLeft)) {
-                    // width changed, update clipping
-                    setClipping(getHeight());
-                }
-                boolean rtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
-                mTime.setPivotX(rtl ? mTime.getWidth() : 0);
-                mTime.setPivotY(mTime.getBaseline());
-                updateAmPmTranslation();
-            }
-        });
-        setOutlineProvider(new ViewOutlineProvider() {
-            @Override
-            public void getOutline(View view, Outline outline) {
-                outline.setRect(mClipBounds);
-            }
-        });
-        requestCaptureValues();
-
-        // RenderThread is doing more harm than good when touching the header (to expand quick
-        // settings), so disable it for this view
-        ((RippleDrawable) getBackground()).setForceSoftware(true);
-        ((RippleDrawable) mSettingsButton.getBackground()).setForceSoftware(true);
-        ((RippleDrawable) mSystemIconsSuperContainer.getBackground()).setForceSoftware(true);
-    }
-
-    @Override
-    protected void onLayout(boolean changed, int l, int t, int r, int b) {
-        super.onLayout(changed, l, t, r, b);
-        if (mCaptureValues) {
-            if (mExpanded) {
-                captureLayoutValues(mExpandedValues);
-            } else {
-                captureLayoutValues(mCollapsedValues);
-            }
-            mCaptureValues = false;
-            updateLayoutValues(mCurrentT);
-        }
-        mAlarmStatus.setX(mDateGroup.getLeft() + mDateCollapsed.getRight());
-    }
-
-    @Override
-    protected void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-        FontSizeUtils.updateFontSize(mBatteryLevel, R.dimen.battery_level_text_size);
-        FontSizeUtils.updateFontSize(mEmergencyCallsOnly,
-                R.dimen.qs_emergency_calls_only_text_size);
-        FontSizeUtils.updateFontSize(mDateCollapsed, R.dimen.qs_date_collapsed_size);
-        FontSizeUtils.updateFontSize(mDateExpanded, R.dimen.qs_date_collapsed_size);
-        FontSizeUtils.updateFontSize(mAlarmStatus, R.dimen.qs_date_collapsed_size);
-        FontSizeUtils.updateFontSize(this, android.R.id.title, R.dimen.qs_detail_header_text_size);
-        FontSizeUtils.updateFontSize(this, android.R.id.toggle, R.dimen.qs_detail_header_text_size);
-        FontSizeUtils.updateFontSize(mAmPm, R.dimen.qs_time_collapsed_size);
-        FontSizeUtils.updateFontSize(this, R.id.empty_time_view, R.dimen.qs_time_expanded_size);
-
-        mEmergencyCallsOnly.setText(com.android.internal.R.string.emergency_calls_only);
-
-        mClockCollapsedSize = getResources().getDimensionPixelSize(R.dimen.qs_time_collapsed_size);
-        mClockExpandedSize = getResources().getDimensionPixelSize(R.dimen.qs_time_expanded_size);
-        mClockCollapsedScaleFactor = (float) mClockCollapsedSize / (float) mClockExpandedSize;
-
-        updateClockScale();
-        updateClockCollapsedMargin();
-    }
-
-    private void updateClockCollapsedMargin() {
-        Resources res = getResources();
-        int padding = res.getDimensionPixelSize(R.dimen.clock_collapsed_bottom_margin);
-        int largePadding = res.getDimensionPixelSize(
-                R.dimen.clock_collapsed_bottom_margin_large_text);
-        float largeFactor = (MathUtils.constrain(getResources().getConfiguration().fontScale, 1.0f,
-                FontSizeUtils.LARGE_TEXT_SCALE) - 1f) / (FontSizeUtils.LARGE_TEXT_SCALE - 1f);
-        mClockMarginBottomCollapsed = Math.round((1 - largeFactor) * padding + largeFactor * largePadding);
-        requestLayout();
-    }
-
-    private void requestCaptureValues() {
-        mCaptureValues = true;
-        requestLayout();
-    }
-
-    private void loadDimens() {
-        mCollapsedHeight = getResources().getDimensionPixelSize(R.dimen.status_bar_header_height);
-        mExpandedHeight = getResources().getDimensionPixelSize(
-                R.dimen.status_bar_header_height_expanded);
-        mMultiUserExpandedMargin =
-                getResources().getDimensionPixelSize(R.dimen.multi_user_switch_expanded_margin);
-        mMultiUserCollapsedMargin =
-                getResources().getDimensionPixelSize(R.dimen.multi_user_switch_collapsed_margin);
-        mClockMarginBottomExpanded =
-                getResources().getDimensionPixelSize(R.dimen.clock_expanded_bottom_margin);
-        updateClockCollapsedMargin();
-        mMultiUserSwitchWidthCollapsed =
-                getResources().getDimensionPixelSize(R.dimen.multi_user_switch_width_collapsed);
-        mMultiUserSwitchWidthExpanded =
-                getResources().getDimensionPixelSize(R.dimen.multi_user_switch_width_expanded);
-        mAvatarCollapsedScaleFactor =
-                getResources().getDimensionPixelSize(R.dimen.multi_user_avatar_collapsed_size)
-                / (float) mMultiUserAvatar.getLayoutParams().width;
-        mClockCollapsedSize = getResources().getDimensionPixelSize(R.dimen.qs_time_collapsed_size);
-        mClockExpandedSize = getResources().getDimensionPixelSize(R.dimen.qs_time_expanded_size);
-        mClockCollapsedScaleFactor = (float) mClockCollapsedSize / (float) mClockExpandedSize;
-
-    }
-
-    public void setActivityStarter(ActivityStarter activityStarter) {
-        mActivityStarter = activityStarter;
-    }
-
-    public void setBatteryController(BatteryController batteryController) {
-        mBatteryController = batteryController;
-        ((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController);
-    }
-
-    public void setNextAlarmController(NextAlarmController nextAlarmController) {
-        mNextAlarmController = nextAlarmController;
-    }
-
-    public int getCollapsedHeight() {
-        return mCollapsedHeight;
-    }
-
-    public int getExpandedHeight() {
-        return mAllowExpand ? mExpandedHeight : mCollapsedHeight;
-    }
-
-    public void setListening(boolean listening) {
-        if (listening == mListening) {
-            return;
-        }
-        mListening = listening;
-        updateListeners();
-    }
-
-    public void setExpanded(boolean expanded) {
-        if (!mAllowExpand) {
-            expanded = false;
-        }
-        boolean changed = expanded != mExpanded;
-        mExpanded = expanded;
-        if (changed) {
-            updateEverything();
-        }
-    }
-
-    public void updateEverything() {
-        updateHeights();
-        updateVisibilities();
-        updateSystemIconsLayoutParams();
-        updateClickTargets();
-        updateMultiUserSwitch();
-        updateClockScale();
-        updateAvatarScale();
-        updateClockLp();
-        requestCaptureValues();
-    }
-
-    private void updateHeights() {
-        int height = mExpanded ? mExpandedHeight : mCollapsedHeight;
-        ViewGroup.LayoutParams lp = getLayoutParams();
-        if (lp.height != height) {
-            lp.height = height;
-            setLayoutParams(lp);
-        }
-    }
-
-    private void updateVisibilities() {
-        mDateCollapsed.setVisibility(mExpanded && mAlarmShowing ? View.VISIBLE : View.INVISIBLE);
-        mDateExpanded.setVisibility(mExpanded && mAlarmShowing ? View.INVISIBLE : View.VISIBLE);
-        mAlarmStatus.setVisibility(mExpanded && mAlarmShowing ? View.VISIBLE : View.INVISIBLE);
-        mSettingsContainer.setVisibility(mExpanded ? View.VISIBLE : View.INVISIBLE);
-        mQsDetailHeader.setVisibility(mExpanded && mShowingDetail? View.VISIBLE : View.INVISIBLE);
-        if (mSignalCluster != null) {
-            updateSignalClusterDetachment();
-        }
-        mEmergencyCallsOnly.setVisibility(mExpanded && mShowEmergencyCallsOnly ? VISIBLE : GONE);
-        mBatteryLevel.setVisibility(mExpanded ? View.VISIBLE : View.GONE);
-        mSettingsContainer.findViewById(R.id.tuner_icon).setVisibility(
-                TunerService.isTunerEnabled(mContext) ? View.VISIBLE : View.INVISIBLE);
-    }
-
-    private void updateSignalClusterDetachment() {
-        boolean detached = mExpanded;
-        if (detached != mSignalClusterDetached) {
-            if (detached) {
-                getOverlay().add(mSignalCluster);
-            } else {
-                reattachSignalCluster();
-            }
-        }
-        mSignalClusterDetached = detached;
-    }
-
-    private void reattachSignalCluster() {
-        getOverlay().remove(mSignalCluster);
-        mSystemIcons.addView(mSignalCluster, 1);
-    }
-
-    private void updateSystemIconsLayoutParams() {
-        RelativeLayout.LayoutParams lp = (LayoutParams) mSystemIconsSuperContainer.getLayoutParams();
-        int rule = mExpanded
-                ? mSettingsContainer.getId()
-                : mMultiUserSwitch.getId();
-        if (rule != lp.getRules()[RelativeLayout.START_OF]) {
-            lp.addRule(RelativeLayout.START_OF, rule);
-            mSystemIconsSuperContainer.setLayoutParams(lp);
-        }
-    }
-
-    private void updateListeners() {
-        if (mListening) {
-            mBatteryController.addStateChangedCallback(this);
-            mNextAlarmController.addStateChangedCallback(this);
-        } else {
-            mBatteryController.removeStateChangedCallback(this);
-            mNextAlarmController.removeStateChangedCallback(this);
-        }
-    }
-
-    private void updateAvatarScale() {
-        if (mExpanded) {
-            mMultiUserAvatar.setScaleX(1f);
-            mMultiUserAvatar.setScaleY(1f);
-        } else {
-            mMultiUserAvatar.setScaleX(mAvatarCollapsedScaleFactor);
-            mMultiUserAvatar.setScaleY(mAvatarCollapsedScaleFactor);
-        }
-    }
-
-    private void updateClockScale() {
-        mTime.setTextSize(TypedValue.COMPLEX_UNIT_PX, mExpanded
-                ? mClockExpandedSize
-                : mClockCollapsedSize);
-        mTime.setScaleX(1f);
-        mTime.setScaleY(1f);
-        updateAmPmTranslation();
-    }
-
-    private void updateAmPmTranslation() {
-        boolean rtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
-        mAmPm.setTranslationX((rtl ? 1 : -1) * mTime.getWidth() * (1 - mTime.getScaleX()));
-    }
-
-    @Override
-    public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
-        String percentage = NumberFormat.getPercentInstance().format((double) level / 100.0);
-        mBatteryLevel.setText(percentage);
-    }
-
-    @Override
-    public void onPowerSaveChanged(boolean isPowerSave) {
-        // could not care less
-    }
-
-    @Override
-    public void onNextAlarmChanged(AlarmManager.AlarmClockInfo nextAlarm) {
-        mNextAlarm = nextAlarm;
-        if (nextAlarm != null) {
-            mAlarmStatus.setText(KeyguardStatusView.formatNextAlarm(getContext(), nextAlarm));
-        }
-        mAlarmShowing = nextAlarm != null;
-        updateEverything();
-        requestCaptureValues();
-    }
-
-    private void updateClickTargets() {
-        mMultiUserSwitch.setClickable(mExpanded);
-        mMultiUserSwitch.setFocusable(mExpanded);
-        mSystemIconsSuperContainer.setClickable(mExpanded);
-        mSystemIconsSuperContainer.setFocusable(mExpanded);
-        mAlarmStatus.setClickable(mNextAlarm != null && mNextAlarm.getShowIntent() != null);
-    }
-
-    private void updateClockLp() {
-        int marginBottom = mExpanded
-                ? mClockMarginBottomExpanded
-                : mClockMarginBottomCollapsed;
-        LayoutParams lp = (LayoutParams) mDateGroup.getLayoutParams();
-        if (marginBottom != lp.bottomMargin) {
-            lp.bottomMargin = marginBottom;
-            mDateGroup.setLayoutParams(lp);
-        }
-    }
-
-    private void updateMultiUserSwitch() {
-        int marginEnd;
-        int width;
-        if (mExpanded) {
-            marginEnd = mMultiUserExpandedMargin;
-            width = mMultiUserSwitchWidthExpanded;
-        } else {
-            marginEnd = mMultiUserCollapsedMargin;
-            width = mMultiUserSwitchWidthCollapsed;
-        }
-        MarginLayoutParams lp = (MarginLayoutParams) mMultiUserSwitch.getLayoutParams();
-        if (marginEnd != lp.getMarginEnd() || lp.width != width) {
-            lp.setMarginEnd(marginEnd);
-            lp.width = width;
-            mMultiUserSwitch.setLayoutParams(lp);
-        }
-    }
-
-    public void setExpansion(float t) {
-        if (!mExpanded) {
-            t = 0f;
-        }
-        mCurrentT = t;
-        float height = mCollapsedHeight + t * (mExpandedHeight - mCollapsedHeight);
-        if (height < mCollapsedHeight) {
-            height = mCollapsedHeight;
-        }
-        if (height > mExpandedHeight) {
-            height = mExpandedHeight;
-        }
-        setClipping(height);
-        updateLayoutValues(t);
-    }
-
-    private void updateLayoutValues(float t) {
-        if (mCaptureValues) {
-            return;
-        }
-        mCurrentValues.interpoloate(mCollapsedValues, mExpandedValues, t);
-        applyLayoutValues(mCurrentValues);
-    }
-
-    private void setClipping(float height) {
-        mClipBounds.set(getPaddingLeft(), 0, getWidth() - getPaddingRight(), (int) height);
-        setClipBounds(mClipBounds);
-        invalidateOutline();
-    }
-
-    public void setUserInfoController(UserInfoController userInfoController) {
-        userInfoController.addListener(new UserInfoController.OnUserInfoChangedListener() {
-            @Override
-            public void onUserInfoChanged(String name, Drawable picture) {
-                mMultiUserAvatar.setImageDrawable(picture);
-            }
-        });
-    }
-
-    @Override
-    public void setCallback(Callback qsPanelCallback) {
-    }
-
-    @Override
-    public void onClick(View v) {
-        if (v == mSettingsButton) {
-            if (mSettingsButton.isTunerClick()) {
-                if (TunerService.isTunerEnabled(mContext)) {
-                    TunerService.showResetRequest(mContext, new Runnable() {
-                        @Override
-                        public void run() {
-                            // Relaunch settings so that the tuner disappears.
-                            startSettingsActivity();
-                        }
-                    });
-                } else {
-                    Toast.makeText(getContext(), R.string.tuner_toast, Toast.LENGTH_LONG).show();
-                    TunerService.setTunerEnabled(mContext, true);
-                }
-            }
-            startSettingsActivity();
-        } else if (v == mSystemIconsSuperContainer) {
-            startBatteryActivity();
-        } else if (v == mAlarmStatus && mNextAlarm != null) {
-            PendingIntent showIntent = mNextAlarm.getShowIntent();
-            if (showIntent != null) {
-                mActivityStarter.startPendingIntentDismissingKeyguard(showIntent);
-            }
-        }
-    }
-
-    private void startSettingsActivity() {
-        mActivityStarter.startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS),
-                true /* dismissShade */);
-    }
-
-    private void startBatteryActivity() {
-        mActivityStarter.startActivity(new Intent(Intent.ACTION_POWER_USAGE_SUMMARY),
-                true /* dismissShade */);
-    }
-
-    public void setQSPanel(QSPanel qsp) {
-        mQSPanel = qsp;
-        if (mQSPanel != null) {
-            mQSPanel.setCallback(mQsPanelCallback);
-        }
-        mMultiUserSwitch.setQsPanel(qsp);
-    }
-
-    @Override
-    public boolean shouldDelayChildPressedState() {
-        return true;
-    }
-
-    @Override
-    public void setEmergencyCallsOnly(boolean show) {
-        boolean changed = show != mShowEmergencyCallsOnly;
-        if (changed) {
-            mShowEmergencyCallsOnly = show;
-            if (mExpanded) {
-                updateEverything();
-                requestCaptureValues();
-            }
-        }
-    }
-
-    @Override
-    protected void dispatchSetPressed(boolean pressed) {
-        // We don't want that everything lights up when we click on the header, so block the request
-        // here.
-    }
-
-    private void captureLayoutValues(LayoutValues target) {
-        target.timeScale = mExpanded ? 1f : mClockCollapsedScaleFactor;
-        target.clockY = mClock.getBottom();
-        target.dateY = mDateGroup.getTop();
-        target.emergencyCallsOnlyAlpha = getAlphaForVisibility(mEmergencyCallsOnly);
-        target.alarmStatusAlpha = getAlphaForVisibility(mAlarmStatus);
-        target.dateCollapsedAlpha = getAlphaForVisibility(mDateCollapsed);
-        target.dateExpandedAlpha = getAlphaForVisibility(mDateExpanded);
-        target.avatarScale = mMultiUserAvatar.getScaleX();
-        target.avatarX = mMultiUserSwitch.getLeft() + mMultiUserAvatar.getLeft();
-        target.avatarY = mMultiUserSwitch.getTop() + mMultiUserAvatar.getTop();
-        if (getLayoutDirection() == LAYOUT_DIRECTION_LTR) {
-            target.batteryX = mSystemIconsSuperContainer.getLeft()
-                    + mSystemIconsContainer.getRight();
-        } else {
-            target.batteryX = mSystemIconsSuperContainer.getLeft()
-                    + mSystemIconsContainer.getLeft();
-        }
-        target.batteryY = mSystemIconsSuperContainer.getTop() + mSystemIconsContainer.getTop();
-        target.batteryLevelAlpha = getAlphaForVisibility(mBatteryLevel);
-        target.settingsAlpha = getAlphaForVisibility(mSettingsContainer);
-        target.settingsTranslation = mExpanded
-                ? 0
-                : mMultiUserSwitch.getLeft() - mSettingsContainer.getLeft();
-        target.signalClusterAlpha = mSignalClusterDetached ? 0f : 1f;
-        target.settingsRotation = !mExpanded ? 90f : 0f;
-    }
-
-    private float getAlphaForVisibility(View v) {
-        return v == null || v.getVisibility() == View.VISIBLE ? 1f : 0f;
-    }
-
-    private void applyAlpha(View v, float alpha) {
-        if (v == null || v.getVisibility() == View.GONE) {
-            return;
-        }
-        if (alpha == 0f) {
-            v.setVisibility(View.INVISIBLE);
-        } else {
-            v.setVisibility(View.VISIBLE);
-            v.setAlpha(alpha);
-        }
-    }
-
-    private void applyLayoutValues(LayoutValues values) {
-        mTime.setScaleX(values.timeScale);
-        mTime.setScaleY(values.timeScale);
-        mClock.setY(values.clockY - mClock.getHeight());
-        mDateGroup.setY(values.dateY);
-        mAlarmStatus.setY(values.dateY - mAlarmStatus.getPaddingTop());
-        mMultiUserAvatar.setScaleX(values.avatarScale);
-        mMultiUserAvatar.setScaleY(values.avatarScale);
-        mMultiUserAvatar.setX(values.avatarX - mMultiUserSwitch.getLeft());
-        mMultiUserAvatar.setY(values.avatarY - mMultiUserSwitch.getTop());
-        if (getLayoutDirection() == LAYOUT_DIRECTION_LTR) {
-            mSystemIconsSuperContainer.setX(values.batteryX - mSystemIconsContainer.getRight());
-        } else {
-            mSystemIconsSuperContainer.setX(values.batteryX - mSystemIconsContainer.getLeft());
-        }
-        mSystemIconsSuperContainer.setY(values.batteryY - mSystemIconsContainer.getTop());
-        if (mSignalCluster != null && mExpanded) {
-            if (getLayoutDirection() == LAYOUT_DIRECTION_LTR) {
-                mSignalCluster.setX(mSystemIconsSuperContainer.getX()
-                        - mSignalCluster.getWidth());
-            } else {
-                mSignalCluster.setX(mSystemIconsSuperContainer.getX()
-                        + mSystemIconsSuperContainer.getWidth());
-            }
-            mSignalCluster.setY(
-                    mSystemIconsSuperContainer.getY() + mSystemIconsSuperContainer.getHeight()/2
-                            - mSignalCluster.getHeight()/2);
-        } else if (mSignalCluster != null) {
-            mSignalCluster.setTranslationX(0f);
-            mSignalCluster.setTranslationY(0f);
-        }
-        if (!mSettingsButton.isAnimating()) {
-            mSettingsContainer.setTranslationY(mSystemIconsSuperContainer.getTranslationY());
-            mSettingsContainer.setTranslationX(values.settingsTranslation);
-            mSettingsButton.setRotation(values.settingsRotation);
-        }
-        applyAlpha(mEmergencyCallsOnly, values.emergencyCallsOnlyAlpha);
-        if (!mShowingDetail && !mDetailTransitioning) {
-            // Otherwise it needs to stay invisible
-            applyAlpha(mAlarmStatus, values.alarmStatusAlpha);
-        }
-        applyAlpha(mDateCollapsed, values.dateCollapsedAlpha);
-        applyAlpha(mDateExpanded, values.dateExpandedAlpha);
-        applyAlpha(mBatteryLevel, values.batteryLevelAlpha);
-        applyAlpha(mSettingsContainer, values.settingsAlpha);
-        applyAlpha(mSignalCluster, values.signalClusterAlpha);
-        if (!mExpanded) {
-            mTime.setScaleX(1f);
-            mTime.setScaleY(1f);
-        }
-        updateAmPmTranslation();
-    }
-
-    /**
-     * Captures all layout values (position, visibility) for a certain state. This is used for
-     * animations.
-     */
-    private static final class LayoutValues {
-
-        float dateExpandedAlpha;
-        float dateCollapsedAlpha;
-        float emergencyCallsOnlyAlpha;
-        float alarmStatusAlpha;
-        float timeScale = 1f;
-        float clockY;
-        float dateY;
-        float avatarScale;
-        float avatarX;
-        float avatarY;
-        float batteryX;
-        float batteryY;
-        float batteryLevelAlpha;
-        float settingsAlpha;
-        float settingsTranslation;
-        float signalClusterAlpha;
-        float settingsRotation;
-
-        public void interpoloate(LayoutValues v1, LayoutValues v2, float t) {
-            timeScale = v1.timeScale * (1 - t) + v2.timeScale * t;
-            clockY = v1.clockY * (1 - t) + v2.clockY * t;
-            dateY = v1.dateY * (1 - t) + v2.dateY * t;
-            avatarScale = v1.avatarScale * (1 - t) + v2.avatarScale * t;
-            avatarX = v1.avatarX * (1 - t) + v2.avatarX * t;
-            avatarY = v1.avatarY * (1 - t) + v2.avatarY * t;
-            batteryX = v1.batteryX * (1 - t) + v2.batteryX * t;
-            batteryY = v1.batteryY * (1 - t) + v2.batteryY * t;
-            settingsTranslation = v1.settingsTranslation * (1 - t) + v2.settingsTranslation * t;
-
-            float t1 = Math.max(0, t - 0.5f) * 2;
-            settingsRotation = v1.settingsRotation * (1 - t1) + v2.settingsRotation * t1;
-            emergencyCallsOnlyAlpha =
-                    v1.emergencyCallsOnlyAlpha * (1 - t1) + v2.emergencyCallsOnlyAlpha * t1;
-
-            float t2 = Math.min(1, 2 * t);
-            signalClusterAlpha = v1.signalClusterAlpha * (1 - t2) + v2.signalClusterAlpha * t2;
-
-            float t3 = Math.max(0, t - 0.7f) / 0.3f;
-            batteryLevelAlpha = v1.batteryLevelAlpha * (1 - t3) + v2.batteryLevelAlpha * t3;
-            settingsAlpha = v1.settingsAlpha * (1 - t3) + v2.settingsAlpha * t3;
-            dateExpandedAlpha = v1.dateExpandedAlpha * (1 - t3) + v2.dateExpandedAlpha * t3;
-            dateCollapsedAlpha = v1.dateCollapsedAlpha * (1 - t3) + v2.dateCollapsedAlpha * t3;
-            alarmStatusAlpha = v1.alarmStatusAlpha * (1 - t3) + v2.alarmStatusAlpha * t3;
-        }
-    }
-
-    private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() {
-        private boolean mScanState;
-
-        @Override
-        public void onToggleStateChanged(final boolean state) {
-            post(new Runnable() {
-                @Override
-                public void run() {
-                    handleToggleStateChanged(state);
-                }
-            });
-        }
-
-        @Override
-        public void onShowingDetail(final DetailAdapter detail, int x, int y) {
-            mDetailTransitioning = true;
-            post(new Runnable() {
-                @Override
-                public void run() {
-                    handleShowingDetail(detail);
-                }
-            });
-        }
-
-        @Override
-        public void onScanStateChanged(final boolean state) {
-            post(new Runnable() {
-                @Override
-                public void run() {
-                    handleScanStateChanged(state);
-                }
-            });
-        }
-
-        private void handleToggleStateChanged(boolean state) {
-            mQsDetailHeaderSwitch.setChecked(state);
-        }
-
-        private void handleScanStateChanged(boolean state) {
-            if (mScanState == state) return;
-            mScanState = state;
-            final Animatable anim = (Animatable) mQsDetailHeaderProgress.getDrawable();
-            if (state) {
-                mQsDetailHeaderProgress.animate().alpha(1f);
-                anim.start();
-            } else {
-                mQsDetailHeaderProgress.animate().alpha(0f);
-                anim.stop();
-            }
-        }
-
-        private void handleShowingDetail(final QSTile.DetailAdapter detail) {
-            final boolean showingDetail = detail != null;
-            transition(mClock, !showingDetail);
-            transition(mDateGroup, !showingDetail);
-            if (mAlarmShowing) {
-                transition(mAlarmStatus, !showingDetail);
-            }
-            transition(mQsDetailHeader, showingDetail);
-            mShowingDetail = showingDetail;
-            if (showingDetail) {
-                mQsDetailHeaderTitle.setText(detail.getTitle());
-                final Boolean toggleState = detail.getToggleState();
-                if (toggleState == null) {
-                    mQsDetailHeaderSwitch.setVisibility(INVISIBLE);
-                    mQsDetailHeader.setClickable(false);
-                } else {
-                    mQsDetailHeaderSwitch.setVisibility(VISIBLE);
-                    mQsDetailHeaderSwitch.setChecked(toggleState);
-                    mQsDetailHeader.setClickable(true);
-                    mQsDetailHeader.setOnClickListener(new OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            boolean checked = !mQsDetailHeaderSwitch.isChecked();
-                            mQsDetailHeaderSwitch.setChecked(checked);
-                            detail.setToggleState(checked);
-                        }
-                    });
-                }
-            } else {
-                mQsDetailHeader.setClickable(false);
-            }
-        }
-
-        private void transition(final View v, final boolean in) {
-            if (in) {
-                v.bringToFront();
-                v.setVisibility(VISIBLE);
-            }
-            if (v.hasOverlappingRendering()) {
-                v.animate().withLayer();
-            }
-            v.animate()
-                    .alpha(in ? 1 : 0)
-                    .withEndAction(new Runnable() {
-                        @Override
-                        public void run() {
-                            if (!in) {
-                                v.setVisibility(INVISIBLE);
-                            }
-                            mDetailTransitioning = false;
-                        }
-                    })
-                    .start();
-        }
-    };
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 8d0d9cb..3691a42 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -53,6 +53,11 @@
 
     private static final long WAKE_AND_UNLOCK_SCRIM_FADEOUT_DURATION_MS = 200;
 
+    // Duration of the Keyguard dismissal animation in case the user is currently locked. This is to
+    // make everything a bit slower to bridge a gap until the user is unlocked and home screen has
+    // dranw its first frame.
+    private static final long KEYGUARD_DISMISS_DURATION_LOCKED = 2000;
+
     private static String TAG = "StatusBarKeyguardViewManager";
 
     protected final Context mContext;
@@ -274,9 +279,12 @@
     /**
      * Hides the keyguard view
      */
-    public void hide(long startTime, final long fadeoutDuration) {
+    public void hide(long startTime, long fadeoutDuration) {
         mShowing = false;
 
+        if (!KeyguardUpdateMonitor.getInstance(mContext).isUserUnlocked()) {
+            fadeoutDuration = KEYGUARD_DISMISS_DURATION_LOCKED;
+        }
         long uptimeMillis = SystemClock.uptimeMillis();
         long delay = Math.max(0, startTime + HIDE_TIMING_CORRECTION_MS - uptimeMillis);
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index ebfa018..7b22b88 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -70,6 +70,7 @@
     private View mBrightnessMirror;
 
     private int mRightInset = 0;
+    private int mLeftInset = 0;
 
     private PhoneStatusBar mService;
     private final Paint mTransparentSrcPaint = new Paint();
@@ -93,25 +94,26 @@
     @Override
     protected boolean fitSystemWindows(Rect insets) {
         if (getFitsSystemWindows()) {
-            boolean paddingChanged = insets.left != getPaddingLeft()
-                    || insets.top != getPaddingTop()
+            boolean paddingChanged = insets.top != getPaddingTop()
                     || insets.bottom != getPaddingBottom();
 
             // Super-special right inset handling, because scrims and backdrop need to ignore it.
-            if (insets.right != mRightInset) {
+            if (insets.right != mRightInset || insets.left != mLeftInset) {
                 mRightInset = insets.right;
+                mLeftInset = insets.left;
                 applyMargins();
             }
-            // Drop top inset, apply left inset and pass through bottom inset.
+            // Drop top inset, and pass through bottom inset.
             if (paddingChanged) {
-                setPadding(insets.left, 0, 0, 0);
+                setPadding(0, 0, 0, 0);
             }
             insets.left = 0;
             insets.top = 0;
             insets.right = 0;
         } else {
-            if (mRightInset != 0) {
+            if (mRightInset != 0 || mLeftInset != 0) {
                 mRightInset = 0;
+                mLeftInset = 0;
                 applyMargins();
             }
             boolean changed = getPaddingLeft() != 0
@@ -127,13 +129,16 @@
     }
 
     private void applyMargins() {
+        mService.mScrimController.setLeftInset(mLeftInset);
         final int N = getChildCount();
         for (int i = 0; i < N; i++) {
             View child = getChildAt(i);
             if (child.getLayoutParams() instanceof LayoutParams) {
                 LayoutParams lp = (LayoutParams) child.getLayoutParams();
-                if (!lp.ignoreRightInset && lp.rightMargin != mRightInset) {
+                if (!lp.ignoreRightInset
+                        && (lp.rightMargin != mRightInset || lp.leftMargin != mLeftInset)) {
                     lp.rightMargin = mRightInset;
+                    lp.leftMargin = mLeftInset;
                     child.requestLayout();
                 }
             }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index c8c824a..d8b1a62 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -16,6 +16,8 @@
 
 package com.android.systemui.statusbar.policy;
 
+import android.annotation.DrawableRes;
+import android.annotation.Nullable;
 import android.app.ActivityManager;
 import android.content.Context;
 import android.content.res.Configuration;
@@ -42,11 +44,12 @@
 import android.widget.ImageView;
 
 import com.android.systemui.R;
+import com.android.systemui.statusbar.phone.ButtonDispatcher;
 
 import static android.view.accessibility.AccessibilityNodeInfo.ACTION_CLICK;
 import static android.view.accessibility.AccessibilityNodeInfo.ACTION_LONG_CLICK;
 
-public class KeyButtonView extends ImageView {
+public class KeyButtonView extends ImageView implements ButtonDispatcher.ButtonInterface {
 
     private int mContentDescriptionRes;
     private long mDownTime;
@@ -247,10 +250,21 @@
                 InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
     }
 
+    @Override
     public void abortCurrentGesture() {
         setPressed(false);
         mGestureAborted = true;
     }
+
+    @Override
+    public void setImageResource(@DrawableRes int resId) {
+        super.setImageResource(resId);
+    }
+
+    @Override
+    public void setImageDrawable(@Nullable Drawable drawable) {
+        super.setImageDrawable(drawable);
+    }
 }
 
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index 83e25eb..ac3246d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -197,8 +197,11 @@
 
         if (mConfig.show4gForLte) {
             mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
+            mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
+                TelephonyIcons.FOUR_G_PLUS);
         } else {
             mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.LTE);
+            mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA, TelephonyIcons.LTE);
         }
         mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_IWLAN, TelephonyIcons.WFC);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index a633241..7a042af 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -781,6 +781,7 @@
                             datatype.equals("1x") ? TelephonyIcons.ONE_X :
                             datatype.equals("3g") ? TelephonyIcons.THREE_G :
                             datatype.equals("4g") ? TelephonyIcons.FOUR_G :
+                            datatype.equals("4g+") ? TelephonyIcons.FOUR_G_PLUS :
                             datatype.equals("e") ? TelephonyIcons.E :
                             datatype.equals("g") ? TelephonyIcons.G :
                             datatype.equals("h") ? TelephonyIcons.H :
@@ -810,7 +811,7 @@
 
     private SubscriptionInfo addSignalController(int id, int simSlotIndex) {
         SubscriptionInfo info = new SubscriptionInfo(id, "", simSlotIndex, "", "", 0, 0, "", 0,
-                null, 0, 0, "", SubscriptionManager.SIM_PROVISIONED);
+                null, 0, 0, "");
         mMobileSignalControllers.put(id, new MobileSignalController(mContext,
                 mConfig, mHasMobileDataFeature, mPhone, mCallbackHandler, this, info,
                 mSubDefaults, mReceiverHandler.getLooper()));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NightModeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NightModeController.java
deleted file mode 100644
index 4611ef9..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NightModeController.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package com.android.systemui.statusbar.policy;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.opengl.Matrix;
-import android.provider.Settings.Secure;
-import android.util.MathUtils;
-import com.android.systemui.tuner.TunerService;
-
-import java.util.ArrayList;
-
-/**
- * Listens for changes to twilight from the TwilightService.
- *
- * Also pushes the current matrix to accessibility based on the current twilight
- * and various tuner settings.
- */
-public class NightModeController implements TunerService.Tunable {
-
-    public static final String NIGHT_MODE_ADJUST_TINT = "tuner_night_mode_adjust_tint";
-    private static final String COLOR_MATRIX_CUSTOM_VALUES = "tuner_color_custom_values";
-
-    private static final String ACTION_TWILIGHT_CHANGED = "android.intent.action.TWILIGHT_CHANGED";
-
-    private static final String EXTRA_IS_NIGHT = "isNight";
-    private static final String EXTRA_AMOUNT = "amount";
-
-    // Night mode ~= 3400 K
-    private static final float[] NIGHT_VALUES = new float[] {
-        1, 0,     0,     0,
-        0, .754f, 0,     0,
-        0, 0,     .516f, 0,
-        0, 0,     0,     1,
-    };
-    public static final float[] IDENTITY_MATRIX = new float[] {
-        1, 0, 0, 0,
-        0, 1, 0, 0,
-        0, 0, 1, 0,
-        0, 0, 0, 1,
-    };
-
-    private final ArrayList<Listener> mListeners = new ArrayList<>();
-
-    private final Context mContext;
-
-    // This is whether or not this is the main NightMode controller in SysUI that should be
-    // updating relevant color matrixes or if its in the tuner process getting current state
-    // for UI.
-    private final boolean mUpdateMatrix;
-
-    private float[] mCustomMatrix;
-    private boolean mListening;
-    private boolean mAdjustTint;
-
-    private boolean mIsNight;
-    private float mAmount;
-    private boolean mIsAuto;
-
-    public NightModeController(Context context) {
-        this(context, false);
-    }
-
-    public NightModeController(Context context, boolean updateMatrix) {
-        mContext = context;
-        mUpdateMatrix = updateMatrix;
-        TunerService.get(mContext).addTunable(this, NIGHT_MODE_ADJUST_TINT,
-                COLOR_MATRIX_CUSTOM_VALUES, Secure.TWILIGHT_MODE);
-    }
-
-    public void setNightMode(boolean isNight) {
-        if (mIsAuto) {
-            if (mIsNight != isNight) {
-                TunerService.get(mContext).setValue(Secure.TWILIGHT_MODE, isNight
-                        ? Secure.TWILIGHT_MODE_AUTO_OVERRIDE_ON
-                        : Secure.TWILIGHT_MODE_AUTO_OVERRIDE_OFF);
-            } else {
-                TunerService.get(mContext).setValue(Secure.TWILIGHT_MODE,
-                        Secure.TWILIGHT_MODE_AUTO);
-            }
-        } else {
-            TunerService.get(mContext).setValue(Secure.TWILIGHT_MODE, isNight
-                    ? Secure.TWILIGHT_MODE_LOCKED_ON : Secure.TWILIGHT_MODE_LOCKED_OFF);
-        }
-    }
-
-    public void setAuto(boolean auto) {
-        mIsAuto = auto;
-        if (auto) {
-            TunerService.get(mContext).setValue(Secure.TWILIGHT_MODE, Secure.TWILIGHT_MODE_AUTO);
-        } else {
-            // Lock into the current state
-            TunerService.get(mContext).setValue(Secure.TWILIGHT_MODE, mIsNight
-                    ? Secure.TWILIGHT_MODE_LOCKED_ON : Secure.TWILIGHT_MODE_LOCKED_OFF);
-        }
-    }
-
-    public boolean isAuto() {
-        return mIsAuto;
-    }
-
-    public void setAdjustTint(Boolean newValue) {
-        TunerService.get(mContext).setValue(NIGHT_MODE_ADJUST_TINT, ((Boolean) newValue) ? 1 : 0);
-    }
-
-    public void addListener(Listener listener) {
-        mListeners.add(listener);
-        listener.onNightModeChanged();
-        updateListening();
-    }
-
-    public void removeListener(Listener listener) {
-        mListeners.remove(listener);
-        updateListening();
-    }
-
-    private void updateListening() {
-        boolean shouldListen = mListeners.size() != 0 || (mUpdateMatrix && mAdjustTint);
-        if (shouldListen == mListening) return;
-        mListening = shouldListen;
-        if (mListening) {
-            mContext.registerReceiver(mReceiver, new IntentFilter(ACTION_TWILIGHT_CHANGED));
-        } else {
-            mContext.unregisterReceiver(mReceiver);
-        }
-    }
-
-    public boolean isEnabled() {
-        if (!mListening) {
-            updateNightMode(mContext.registerReceiver(null,
-                    new IntentFilter(ACTION_TWILIGHT_CHANGED)));
-        }
-        return mIsNight;
-    }
-
-    public String getCustomValues() {
-        return TunerService.get(mContext).getValue(COLOR_MATRIX_CUSTOM_VALUES);
-    }
-
-    public void setCustomValues(String values) {
-        TunerService.get(mContext).setValue(COLOR_MATRIX_CUSTOM_VALUES, values);
-    }
-
-    @Override
-    public void onTuningChanged(String key, String newValue) {
-        if (COLOR_MATRIX_CUSTOM_VALUES.equals(key)) {
-            mCustomMatrix = newValue != null ? toValues(newValue) : null;
-            updateCurrentMatrix();
-        } else if (NIGHT_MODE_ADJUST_TINT.equals(key)) {
-            mAdjustTint = newValue == null || Integer.parseInt(newValue) != 0;
-            updateListening();
-            updateCurrentMatrix();
-        } else if (Secure.TWILIGHT_MODE.equals(key)) {
-            mIsAuto = newValue != null && Integer.parseInt(newValue) >= Secure.TWILIGHT_MODE_AUTO;
-        }
-    }
-
-    private void updateCurrentMatrix() {
-        if (!mUpdateMatrix) return;
-        if ((!mAdjustTint || mAmount == 0) && mCustomMatrix == null) {
-            TunerService.get(mContext).setValue(Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX, null);
-            return;
-        }
-        float[] values = scaleValues(IDENTITY_MATRIX, NIGHT_VALUES, mAdjustTint ? mAmount : 0);
-        if (mCustomMatrix != null) {
-            values = multiply(values, mCustomMatrix);
-        }
-        TunerService.get(mContext).setValue(Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX,
-                toString(values));
-    }
-
-    private void updateNightMode(Intent intent) {
-        mIsNight = intent != null && intent.getBooleanExtra(EXTRA_IS_NIGHT, false);
-        mAmount = intent != null ? intent.getFloatExtra(EXTRA_AMOUNT, 0) : 0;
-    }
-
-    private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (ACTION_TWILIGHT_CHANGED.equals(intent.getAction())) {
-                updateNightMode(intent);
-                updateCurrentMatrix();
-                for (int i = 0; i < mListeners.size(); i++) {
-                    mListeners.get(i).onNightModeChanged();
-                }
-            }
-        }
-    };
-
-    public interface Listener {
-        void onNightModeChanged();
-        void onTwilightAutoChanged();
-    }
-
-    private static float[] multiply(float[] matrix, float[] other) {
-        if (matrix == null) {
-            return other;
-        }
-        float[] result = new float[16];
-        Matrix.multiplyMM(result, 0, matrix, 0, other, 0);
-        return result;
-    }
-
-    private float[] scaleValues(float[] identityMatrix, float[] nightValues, float amount) {
-        float[] values = new float[identityMatrix.length];
-        for (int i = 0; i < values.length; i++) {
-            values[i] = MathUtils.lerp(identityMatrix[i], nightValues[i], amount);
-        }
-        return values;
-    }
-
-    public static String toString(float[] values) {
-        StringBuilder builder = new StringBuilder();
-        for (int i = 0; i < values.length; i++) {
-            if (builder.length() != 0) {
-                builder.append(',');
-            }
-            builder.append(values[i]);
-        }
-        return builder.toString();
-    }
-
-    public static float[] toValues(String customValues) {
-        String[] strValues = customValues.split(",");
-        float[] values = new float[strValues.length];
-        for (int i = 0; i < values.length; i++) {
-            values[i] = Float.parseFloat(strValues[i]);
-        }
-        return values;
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index 7704a07..a2289c8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -21,6 +21,7 @@
 import android.app.RemoteInput;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.ShortcutManager;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
@@ -132,6 +133,15 @@
         mEditText.mShowImeOnInputConnection = false;
         mController.remoteInputSent(mEntry);
 
+        // Tell ShortcutManager that this package has been "activated".  ShortcutManager
+        // will reset the throttling for this package.
+        // Strictly speaking, the intent receiver may be different from the notification publisher,
+        // but that's an edge case, and also because we can't always know which package will receive
+        // an intent, so we just reset for the publisher.
+        getContext().getSystemService(ShortcutManager.class).onApplicationActive(
+                mEntry.notification.getPackageName(),
+                mEntry.notification.getUser().getIdentifier());
+
         MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_REMOTE_INPUT_SEND,
                 mEntry.notification.getPackageName());
         try {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityController.java
index a22f988..014afae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityController.java
@@ -23,6 +23,8 @@
     String getProfileOwnerName();
     boolean isVpnEnabled();
     boolean isVpnRestricted();
+    /** Whether the VPN app should use branded VPN iconography.  */
+    boolean isVpnBranded();
     String getPrimaryVpnName();
     String getProfileVpnName();
     void onUserSwitched(int newUserId);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
index 5046456..07d3b59 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
@@ -18,6 +18,8 @@
 import android.app.ActivityManager;
 import android.app.admin.DevicePolicyManager;
 import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.UserInfo;
 import android.net.ConnectivityManager;
@@ -54,10 +56,13 @@
             .build();
     private static final int NO_NETWORK = -1;
 
+    private static final String VPN_BRANDED_META_DATA = "com.android.systemui.IS_BRANDED";
+
     private final Context mContext;
     private final ConnectivityManager mConnectivityManager;
     private final IConnectivityManager mConnectivityManagerService;
     private final DevicePolicyManager mDevicePolicyManager;
+    private final PackageManager mPackageManager;
     private final UserManager mUserManager;
 
     @GuardedBy("mCallbacks")
@@ -75,6 +80,7 @@
                 context.getSystemService(Context.CONNECTIVITY_SERVICE);
         mConnectivityManagerService = IConnectivityManager.Stub.asInterface(
                 ServiceManager.getService(Context.CONNECTIVITY_SERVICE));
+        mPackageManager = context.getPackageManager();
         mUserManager = (UserManager)
                 context.getSystemService(Context.USER_SERVICE);
 
@@ -165,6 +171,21 @@
     }
 
     @Override
+    public boolean isVpnBranded() {
+        VpnConfig cfg = mCurrentVpns.get(mVpnUserId);
+        if (cfg == null) {
+            return false;
+        }
+
+        String packageName = getPackageNameForVpnConfig(cfg);
+        if (packageName == null) {
+            return false;
+        }
+
+        return isVpnPackageBranded(packageName);
+    }
+
+    @Override
     public void removeCallback(SecurityControllerCallback callback) {
         synchronized (mCallbacks) {
             if (callback == null) return;
@@ -245,6 +266,28 @@
         mCurrentVpns = vpns;
     }
 
+    private String getPackageNameForVpnConfig(VpnConfig cfg) {
+        if (cfg.legacy) {
+            return null;
+        }
+        return cfg.user;
+    }
+
+    private boolean isVpnPackageBranded(String packageName) {
+        boolean isBranded;
+        try {
+            ApplicationInfo info = mPackageManager.getApplicationInfo(packageName,
+                PackageManager.GET_META_DATA);
+            if (info == null || info.metaData == null || !info.isSystemApp()) {
+                return false;
+            }
+            isBranded = info.metaData.getBoolean(VPN_BRANDED_META_DATA, false);
+        } catch (NameNotFoundException e) {
+            return false;
+        }
+        return isBranded;
+    }
+
     private final NetworkCallback mNetworkCallback = new NetworkCallback() {
         @Override
         public void onAvailable(Network network) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
index 6ff8f77..d91b332 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
@@ -182,6 +182,19 @@
 
     static final int QS_DATA_4G = R.drawable.ic_qs_signal_4g;
 
+    static final int[][] DATA_4G_PLUS = {
+            { R.drawable.stat_sys_data_fully_connected_4g_plus,
+              R.drawable.stat_sys_data_fully_connected_4g_plus,
+              R.drawable.stat_sys_data_fully_connected_4g_plus,
+              R.drawable.stat_sys_data_fully_connected_4g_plus },
+            { R.drawable.stat_sys_data_fully_connected_4g_plus,
+              R.drawable.stat_sys_data_fully_connected_4g_plus,
+              R.drawable.stat_sys_data_fully_connected_4g_plus,
+              R.drawable.stat_sys_data_fully_connected_4g_plus }
+    };
+
+    static final int QS_DATA_4G_PLUS = R.drawable.ic_qs_signal_4g_plus;
+
     // LTE branded "LTE"
     static final int[][] DATA_LTE = {
             { R.drawable.stat_sys_data_fully_connected_lte,
@@ -204,6 +217,7 @@
     static final int ICON_H = R.drawable.stat_sys_data_fully_connected_h;
     static final int ICON_3G = R.drawable.stat_sys_data_fully_connected_3g;
     static final int ICON_4G = R.drawable.stat_sys_data_fully_connected_4g;
+    static final int ICON_4G_PLUS = R.drawable.stat_sys_data_fully_connected_4g_plus;
     static final int ICON_1X = R.drawable.stat_sys_data_fully_connected_1x;
     static final int ICON_CARRIER_NETWORK_CHANGE =
             R.drawable.stat_sys_signal_carrier_network_change_animation;
@@ -213,6 +227,7 @@
     static final int QS_ICON_LTE = R.drawable.ic_qs_signal_lte;
     static final int QS_ICON_3G = R.drawable.ic_qs_signal_3g;
     static final int QS_ICON_4G = R.drawable.ic_qs_signal_4g;
+    static final int QS_ICON_4G_PLUS = R.drawable.ic_qs_signal_4g_plus;
     static final int QS_ICON_1X = R.drawable.ic_qs_signal_1x;
     static final int QS_ICON_CARRIER_NETWORK_CHANGE =
             R.drawable.ic_qs_signal_carrier_network_change_animation;
@@ -348,6 +363,21 @@
             TelephonyIcons.QS_DATA_4G
             );
 
+    static final MobileIconGroup FOUR_G_PLUS = new MobileIconGroup(
+            "4G+",
+            TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
+            TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH,
+            AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
+            0,0,
+            TelephonyIcons.TELEPHONY_NO_NETWORK,
+            TelephonyIcons.QS_TELEPHONY_NO_NETWORK,
+            AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
+            R.string.accessibility_data_connection_4g_plus,
+            TelephonyIcons.ICON_4G_PLUS,
+            true,
+            TelephonyIcons.QS_DATA_4G_PLUS
+            );
+
     static final MobileIconGroup LTE = new MobileIconGroup(
             "LTE",
             TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index 89d2712..27ba003 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -381,6 +381,18 @@
         Log.e(TAG, "Couldn't switch to user, id=" + userId);
     }
 
+    public int getSwitchableUserCount() {
+        int count = 0;
+        final int N = mUsers.size();
+        for (int i = 0; i < N; ++i) {
+            UserRecord record = mUsers.get(i);
+            if (record.info != null && record.info.supportsSwitchTo()) {
+                count++;
+            }
+        }
+        return count;
+    }
+
     private void switchToUserId(int id) {
         try {
             pauseRefreshUsers();
@@ -419,23 +431,27 @@
     }
 
     private void listenForCallState() {
-        TelephonyManager.from(mContext).listen(new PhoneStateListener() {
-            private int mCallState;
-            @Override
-            public void onCallStateChanged(int state, String incomingNumber) {
-                if (mCallState == state) return;
-                if (DEBUG) Log.v(TAG, "Call state changed: " + state);
-                mCallState = state;
-                int currentUserId = ActivityManager.getCurrentUser();
-                UserInfo userInfo = mUserManager.getUserInfo(currentUserId);
-                if (userInfo != null && userInfo.isGuest()) {
-                    showGuestNotification(currentUserId);
-                }
-                refreshUsers(UserHandle.USER_NULL);
-            }
-        }, PhoneStateListener.LISTEN_CALL_STATE);
+        TelephonyManager.from(mContext).listen(mPhoneStateListener,
+                PhoneStateListener.LISTEN_CALL_STATE);
     }
 
+    private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+        private int mCallState;
+
+        @Override
+        public void onCallStateChanged(int state, String incomingNumber) {
+            if (mCallState == state) return;
+            if (DEBUG) Log.v(TAG, "Call state changed: " + state);
+            mCallState = state;
+            int currentUserId = ActivityManager.getCurrentUser();
+            UserInfo userInfo = mUserManager.getUserInfo(currentUserId);
+            if (userInfo != null && userInfo.isGuest()) {
+                showGuestNotification(currentUserId);
+            }
+            refreshUsers(UserHandle.USER_NULL);
+        }
+    };
+
     private BroadcastReceiver mReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
index 27726af..2d4900b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
@@ -257,4 +257,9 @@
         } catch (RemoteException ex) {
         }
     }
+
+    @Override
+    public void handleSystemNavigationKey(int arg1) {
+        // Not implemented
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
index 8881c79..6e08139 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
@@ -47,9 +47,9 @@
     @Override
     public void onAttached() {
         super.onAttached();
-        TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
         mHasPercentage = Settings.System.getInt(getContext().getContentResolver(),
                 SHOW_PERCENT_SETTING, 0) != 0;
+        TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/CalibratePreference.java b/packages/SystemUI/src/com/android/systemui/tuner/CalibratePreference.java
deleted file mode 100644
index ff7be13..0000000
--- a/packages/SystemUI/src/com/android/systemui/tuner/CalibratePreference.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package com.android.systemui.tuner;
-
-import android.content.Context;
-import android.support.v7.preference.DialogPreference;
-import android.util.AttributeSet;
-
-public class CalibratePreference extends DialogPreference {
-    public CalibratePreference(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
index ea92443..caa0527 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
@@ -32,6 +32,8 @@
     private boolean mHasSeconds;
     private ArraySet<String> mBlacklist;
     private boolean mHasSetValue;
+    private boolean mReceivedSeconds;
+    private boolean mReceivedClock;
 
     public ClockPreference(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -55,12 +57,14 @@
     @Override
     public void onTuningChanged(String key, String newValue) {
         if (StatusBarIconController.ICON_BLACKLIST.equals(key)) {
+            mReceivedClock = true;
             mBlacklist = StatusBarIconController.getIconBlacklist(newValue);
             mClockEnabled = !mBlacklist.contains(mClock);
         } else if (Clock.CLOCK_SECONDS.equals(key)) {
+            mReceivedSeconds = true;
             mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0;
         }
-        if (!mHasSetValue) {
+        if (!mHasSetValue && mReceivedClock && mReceivedSeconds) {
             // Because of the complicated tri-state it can end up looping and setting state back to
             // what the user didn't choose.  To avoid this, just set the state once and rely on the
             // preference to handle updates.
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java
deleted file mode 100644
index af95cf9..0000000
--- a/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package com.android.systemui.tuner;
-
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.provider.Settings;
-import android.provider.Settings.Secure;
-import android.support.v14.preference.PreferenceFragment;
-import android.support.v7.preference.Preference;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.SeekBar;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.MetricsProto.MetricsEvent;
-import com.android.systemui.R;
-import com.android.systemui.statusbar.policy.NightModeController;
-
-public class ColorAndAppearanceFragment extends PreferenceFragment {
-
-    private static final String KEY_CALIBRATE = "calibrate";
-
-    private static final long RESET_DELAY = 10000;
-    private static final CharSequence KEY_NIGHT_MODE = "night_mode";
-
-    private NightModeController mNightModeController;
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        mNightModeController = new NightModeController(getContext());
-    }
-
-    @Override
-    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
-        addPreferencesFromResource(R.xml.color_and_appearance);
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_COLOR_AND_APPEARANCE, true);
-        // TODO: Figure out better title model for Tuner, to avoid any more of this.
-        getActivity().setTitle(R.string.color_and_appearance);
-
-        Preference nightMode = findPreference(KEY_NIGHT_MODE);
-        nightMode.setSummary(mNightModeController.isEnabled()
-                ? R.string.night_mode_on : R.string.night_mode_off);
-    }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_COLOR_AND_APPEARANCE, false);
-    }
-
-    @Override
-    public void onDisplayPreferenceDialog(Preference preference) {
-        if (preference instanceof CalibratePreference) {
-            CalibrateDialog.show(this);
-        } else {
-            super.onDisplayPreferenceDialog(preference);
-        }
-    }
-
-    private void startRevertTimer() {
-        getView().postDelayed(mResetColorMatrix, RESET_DELAY);
-    }
-
-    private void onApply() {
-        MetricsLogger.action(getContext(), MetricsEvent.ACTION_TUNER_CALIBRATE_DISPLAY_CHANGED);
-        mNightModeController.setCustomValues(Settings.Secure.getString(
-                getContext().getContentResolver(), Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX));
-        getView().removeCallbacks(mResetColorMatrix);
-    }
-
-    private void onRevert() {
-        getView().removeCallbacks(mResetColorMatrix);
-        mResetColorMatrix.run();
-    }
-
-    private final Runnable mResetColorMatrix = new Runnable() {
-        @Override
-        public void run() {
-            ((DialogFragment) getFragmentManager().findFragmentByTag("RevertWarning")).dismiss();
-            Settings.Secure.putString(getContext().getContentResolver(),
-                    Settings.Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX, null);
-        }
-    };
-
-    public static class CalibrateDialog extends DialogFragment implements
-            DialogInterface.OnClickListener {
-        private float[] mValues;
-        private NightModeController mNightModeController;
-
-        public static void show(ColorAndAppearanceFragment fragment) {
-            CalibrateDialog dialog = new CalibrateDialog();
-            dialog.setTargetFragment(fragment, 0);
-            dialog.show(fragment.getFragmentManager(), "Calibrate");
-        }
-
-        @Override
-        public void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-            mNightModeController = new NightModeController(getContext());
-            String customValues = mNightModeController.getCustomValues();
-            if (customValues == null) {
-                // Generate this as a string because its the easiest way to generate a copy of the
-                // identity.
-                customValues = NightModeController.toString(NightModeController.IDENTITY_MATRIX);
-            }
-            mValues = NightModeController.toValues(customValues);
-        }
-
-        @Override
-        public Dialog onCreateDialog(Bundle savedInstanceState) {
-            View v = LayoutInflater.from(getContext()).inflate(R.layout.calibrate_sliders, null);
-            bindView(v.findViewById(R.id.r_group), 0);
-            bindView(v.findViewById(R.id.g_group), 5);
-            bindView(v.findViewById(R.id.b_group), 10);
-            MetricsLogger.visible(getContext(), MetricsEvent.TUNER_CALIBRATE_DISPLAY);
-            return new AlertDialog.Builder(getContext())
-                    .setTitle(R.string.calibrate_display)
-                    .setView(v)
-                    .setPositiveButton(R.string.color_apply, this)
-                    .setNegativeButton(android.R.string.cancel, null)
-                    .create();
-        }
-
-        @Override
-        public void onDismiss(DialogInterface dialog) {
-            super.onDismiss(dialog);
-            MetricsLogger.hidden(getContext(), MetricsEvent.TUNER_CALIBRATE_DISPLAY);
-        }
-
-        private void bindView(View view, final int index) {
-            SeekBar seekBar = (SeekBar) view.findViewById(com.android.internal.R.id.seekbar);
-            seekBar.setMax(1000);
-            seekBar.setProgress((int) (1000 * mValues[index]));
-            seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
-                @Override
-                public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
-                    mValues[index] = progress / 1000f;
-                }
-
-                @Override
-                public void onStartTrackingTouch(SeekBar seekBar) {
-                }
-
-                @Override
-                public void onStopTrackingTouch(SeekBar seekBar) {
-                }
-            });
-        }
-
-        @Override
-        public void onClick(DialogInterface dialog, int which) {
-            if (mValues[0] == 1 && mValues[5] == 1 && mValues[10] == 1) {
-                // Allow removal of matrix by all values set to highest.
-                mNightModeController.setCustomValues(null);
-                return;
-            }
-            ((ColorAndAppearanceFragment) getTargetFragment()).startRevertTimer();
-            Settings.Secure.putString(getContext().getContentResolver(),
-                    Settings.Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX,
-                    NightModeController.toString(mValues));
-            RevertWarning.show((ColorAndAppearanceFragment) getTargetFragment());
-        }
-    }
-
-    public static class RevertWarning extends DialogFragment
-            implements DialogInterface.OnClickListener {
-
-        public static void show(ColorAndAppearanceFragment fragment) {
-            RevertWarning warning = new RevertWarning();
-            warning.setTargetFragment(fragment, 0);
-            warning.show(fragment.getFragmentManager(), "RevertWarning");
-        }
-
-        @Override
-        public Dialog onCreateDialog(Bundle savedInstanceState) {
-            AlertDialog alertDialog = new AlertDialog.Builder(getContext())
-                    .setTitle(R.string.color_revert_title)
-                    .setMessage(R.string.color_revert_message)
-                    .setPositiveButton(R.string.ok, this)
-                    .create();
-            alertDialog.setCanceledOnTouchOutside(true);
-            return alertDialog;
-        }
-
-        @Override
-        public void onCancel(DialogInterface dialog) {
-            super.onCancel(dialog);
-            ((ColorAndAppearanceFragment) getTargetFragment()).onRevert();
-        }
-
-        @Override
-        public void onClick(DialogInterface dialog, int which) {
-            ((ColorAndAppearanceFragment) getTargetFragment()).onApply();
-        }
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java
deleted file mode 100644
index ae2856c..0000000
--- a/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.tuner;
-
-import android.annotation.Nullable;
-import android.app.UiModeManager;
-import android.content.Context;
-import android.os.Bundle;
-import android.provider.Settings.Secure;
-import android.support.v14.preference.PreferenceFragment;
-import android.support.v14.preference.SwitchPreference;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.Preference.OnPreferenceChangeListener;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Switch;
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.MetricsProto.MetricsEvent;
-import com.android.systemui.R;
-import com.android.systemui.statusbar.policy.NightModeController;
-import com.android.systemui.statusbar.policy.NightModeController.Listener;
-import com.android.systemui.tuner.TunerService.Tunable;
-
-public class NightModeFragment extends PreferenceFragment implements Tunable,
-        Listener, OnPreferenceChangeListener {
-
-    private static final String TAG = "NightModeFragment";
-
-    public static final String EXTRA_SHOW_NIGHT_MODE = "show_night_mode";
-
-    private static final CharSequence KEY_AUTO = "auto";
-    private static final CharSequence KEY_ADJUST_TINT = "adjust_tint";
-    private static final CharSequence KEY_ADJUST_BRIGHTNESS = "adjust_brightness";
-
-    private Switch mSwitch;
-
-    private NightModeController mNightModeController;
-    private SwitchPreference mAutoSwitch;
-    private SwitchPreference mAdjustTint;
-    private SwitchPreference mAdjustBrightness;
-    private UiModeManager mUiModeManager;
-
-    @Override
-    public void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        mNightModeController = new NightModeController(getContext());
-        mUiModeManager = getContext().getSystemService(UiModeManager.class);
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        final View view = LayoutInflater.from(getContext()).inflate(
-                R.layout.night_mode_settings, container, false);
-        ((ViewGroup) view).addView(super.onCreateView(inflater, container, savedInstanceState));
-        return view;
-    }
-
-    @Override
-    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
-        final Context context = getPreferenceManager().getContext();
-
-        addPreferencesFromResource(R.xml.night_mode);
-        mAutoSwitch = (SwitchPreference) findPreference(KEY_AUTO);
-        mAutoSwitch.setOnPreferenceChangeListener(this);
-        mAdjustTint = (SwitchPreference) findPreference(KEY_ADJUST_TINT);
-        mAdjustTint.setOnPreferenceChangeListener(this);
-        mAdjustBrightness = (SwitchPreference) findPreference(KEY_ADJUST_BRIGHTNESS);
-        mAdjustBrightness.setOnPreferenceChangeListener(this);
-    }
-
-    @Override
-    public void onViewCreated(View view, Bundle savedInstanceState) {
-        super.onViewCreated(view, savedInstanceState);
-        View switchBar = view.findViewById(R.id.switch_bar);
-        mSwitch = (Switch) switchBar.findViewById(android.R.id.switch_widget);
-        mSwitch.setChecked(mNightModeController.isEnabled());
-        switchBar.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                boolean newState = !mNightModeController.isEnabled();
-                MetricsLogger.action(getContext(), MetricsEvent.ACTION_TUNER_NIGHT_MODE, newState);
-                mNightModeController.setNightMode(newState);
-                mSwitch.setChecked(newState);
-            }
-        });
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_NIGHT_MODE, true);
-        mNightModeController.addListener(this);
-        TunerService.get(getContext()).addTunable(this, Secure.BRIGHTNESS_USE_TWILIGHT,
-                NightModeController.NIGHT_MODE_ADJUST_TINT);
-        calculateDisabled();
-    }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_NIGHT_MODE, false);
-        mNightModeController.removeListener(this);
-        TunerService.get(getContext()).removeTunable(this);
-    }
-
-    @Override
-    public boolean onPreferenceChange(Preference preference, Object newValue) {
-        final Boolean value = (Boolean) newValue;
-        if (mAutoSwitch == preference) {
-            MetricsLogger.action(getContext(), MetricsEvent.ACTION_TUNER_NIGHT_MODE_AUTO, value);
-            mNightModeController.setAuto(value);
-        } else if (mAdjustTint == preference) {
-            MetricsLogger.action(getContext(),
-                    MetricsEvent.ACTION_TUNER_NIGHT_MODE_ADJUST_TINT, value);
-            mNightModeController.setAdjustTint(value);
-            postCalculateDisabled();
-        } else if (mAdjustBrightness == preference) {
-            MetricsLogger.action(getContext(),
-                    MetricsEvent.ACTION_TUNER_NIGHT_MODE_ADJUST_BRIGHTNESS, value);
-            TunerService.get(getContext()).setValue(Secure.BRIGHTNESS_USE_TWILIGHT,
-                    value ? 1 : 0);
-            postCalculateDisabled();
-        } else {
-            return false;
-        }
-        return true;
-    }
-
-    private void postCalculateDisabled() {
-        // Post this because its the easiest way to wait for all state to be calculated.
-        getView().post(new Runnable() {
-            @Override
-            public void run() {
-                calculateDisabled();
-            }
-        });
-    }
-
-    private void calculateDisabled() {
-        int enabledCount = (mAdjustTint.isChecked() ? 1 : 0)
-                + (mAdjustBrightness.isChecked() ? 1 : 0);
-        if (enabledCount == 1) {
-            if (mAdjustTint.isChecked()) {
-                mAdjustTint.setEnabled(false);
-            } else {
-                mAdjustBrightness.setEnabled(false);
-            }
-        } else {
-            mAdjustTint.setEnabled(true);
-            mAdjustBrightness.setEnabled(true);
-        }
-    }
-
-    @Override
-    public void onTuningChanged(String key, String newValue) {
-        if (Secure.BRIGHTNESS_USE_TWILIGHT.equals(key)) {
-            mAdjustBrightness.setChecked(newValue != null && Integer.parseInt(newValue) != 0);
-        } else if (NightModeController.NIGHT_MODE_ADJUST_TINT.equals(key)) {
-            // Default on.
-            mAdjustTint.setChecked(newValue == null || Integer.parseInt(newValue) != 0);
-        }
-    }
-
-    @Override
-    public void onNightModeChanged() {
-        mSwitch.setChecked(mNightModeController.isEnabled());
-    }
-
-    @Override
-    public void onTwilightAutoChanged() {
-        mAutoSwitch.setChecked(mNightModeController.isAuto());
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/NightModeTile.java b/packages/SystemUI/src/com/android/systemui/tuner/NightModeTile.java
deleted file mode 100644
index fe44502..0000000
--- a/packages/SystemUI/src/com/android/systemui/tuner/NightModeTile.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.tuner;
-
-import android.content.Intent;
-import com.android.internal.logging.MetricsProto.MetricsEvent;
-import com.android.systemui.Prefs;
-import com.android.systemui.Prefs.Key;
-import com.android.systemui.R;
-import com.android.systemui.qs.QSTile;
-import com.android.systemui.statusbar.policy.NightModeController;
-
-
-public class NightModeTile extends QSTile<QSTile.State> implements NightModeController.Listener {
-
-    public static final String NIGHT_MODE_SPEC = "night";
-
-    private final NightModeController mNightModeController;
-
-    private int mIndex;
-    private String mCurrentValue;
-
-    private boolean mCustomEnabled;
-    private String[] mValues;
-    private CharSequence[] mValueTitles;
-
-    public NightModeTile(Host host) {
-        super(host);
-        mNightModeController = host.getNightModeController();
-    }
-
-    @Override
-    public boolean isAvailable() {
-        return Prefs.getBoolean(mContext, Key.QS_NIGHT_ADDED, false)
-                && TunerService.isTunerEnabled(mContext);
-    }
-
-    @Override
-    public void setListening(boolean listening) {
-        if (listening) {
-            mNightModeController.addListener(this);
-            refreshState();
-        } else {
-            mNightModeController.removeListener(this);
-        }
-    }
-
-    @Override
-    public State newTileState() {
-        return new State();
-    }
-
-    @Override
-    public Intent getLongClickIntent() {
-        return new Intent(mContext, TunerActivity.class)
-                .putExtra(NightModeFragment.EXTRA_SHOW_NIGHT_MODE, true);
-    }
-
-    @Override
-    protected void handleClick() {
-        mNightModeController.setNightMode(!mNightModeController.isEnabled());
-        refreshState();
-    }
-
-    @Override
-    public CharSequence getTileLabel() {
-        return mContext.getString(R.string.night_mode);
-    }
-
-    @Override
-    protected void handleUpdateState(State state, Object arg) {
-        // TODO: Right now this is just a dropper, needs an actual night icon.
-        boolean enabled = mNightModeController.isEnabled();
-        state.icon = ResourceIcon.get(enabled ? R.drawable.ic_night_mode
-                : R.drawable.ic_night_mode_disabled);
-        state.label = mContext.getString(R.string.night_mode);
-        state.contentDescription = mContext.getString(R.string.night_mode);
-    }
-
-    @Override
-    public void onNightModeChanged() {
-        refreshState();
-    }
-
-    @Override
-    public void onTwilightAutoChanged() {
-        // Don't care.
-    }
-
-    @Override
-    public int getMetricsCategory() {
-        return MetricsEvent.QS_COLOR_MATRIX;
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
index 5e5da74..5fe9296 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
@@ -39,10 +39,7 @@
             final String action = getIntent().getAction();
             boolean showDemoMode = action != null && action.equals(
                     "com.android.settings.action.DEMO_MODE");
-            boolean showNightMode = getIntent().getBooleanExtra(
-                    NightModeFragment.EXTRA_SHOW_NIGHT_MODE, false);
-            final PreferenceFragment fragment = showNightMode ? new NightModeFragment()
-                    : showDemoMode ? new DemoModeFragment()
+            final PreferenceFragment fragment = showDemoMode ? new DemoModeFragment()
                     : new TunerFragment();
             getFragmentManager().beginTransaction().replace(R.id.content_frame,
                     fragment, TAG_TUNER).commit();
diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
index 30622d2..5cc2d01 100644
--- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
@@ -528,7 +528,7 @@
     private static boolean isSettingsShown(ComponentName topActivity) {
         for (Pair<String, String> componentName : sSettingsPackageAndClassNamePairList) {
             String packageName = componentName.first;
-            if (topActivity.getPackageName().equals(componentName.first)) {
+            if (topActivity.getPackageName().equals(packageName)) {
                 String className = componentName.second;
                 if (className == null || topActivity.getClassName().equals(className)) {
                     return true;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 1973e05..af6fec2 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -68,6 +68,7 @@
 import android.widget.SeekBar.OnSeekBarChangeListener;
 import android.widget.TextView;
 
+import com.android.settingslib.Utils;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.policy.ZenModeController;
 import com.android.systemui.tuner.TunerService;
@@ -152,7 +153,7 @@
         mKeyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
         mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
         mAccessibilityMgr = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
-        mActiveSliderTint = loadColorStateList(R.color.system_accent_color);
+        mActiveSliderTint = ColorStateList.valueOf(Utils.getColorAccent(mContext));
         mInactiveSliderTint = loadColorStateList(R.color.volume_slider_inactive);
 
         initDialog();
@@ -562,6 +563,14 @@
         if (!mExpanded && mExpandButtonAnimationRunning) {
             prepareForCollapse();
         }
+        final Resources res = mContext.getResources();
+        int paddingTop = mExpanded
+                ? res.getDimensionPixelSize(R.dimen.volume_dialog_expanded_padding_top)
+                : res.getDimensionPixelSize(R.dimen.volume_dialog_collapsed_padding_top);
+        mDialogContentView.setPaddingRelative(mDialogContentView.getPaddingStart(),
+                paddingTop,
+                mDialogContentView.getPaddingEnd(),
+                mDialogContentView.getPaddingBottom());
         updateRowsH();
         if (mExpandButtonAnimationRunning) {
             final Drawable d = mExpandButton.getDrawable();
@@ -622,7 +631,6 @@
             Util.setVisOrGone(row.view, visible);
             Util.setVisOrGone(row.space, visible && mExpanded);
             updateVolumeRowHeaderVisibleH(row);
-            row.header.setAlpha(mExpanded && isActive ? 1 : 0.5f);
             updateVolumeRowSliderTintH(row, isActive);
         }
     }
@@ -740,21 +748,7 @@
         updateVolumeRowHeaderVisibleH(row);
 
         // update header text
-        String text = ss.name;
-        if (mShowHeaders) {
-            if (isRingZenNone) {
-                text = mContext.getString(R.string.volume_stream_muted_dnd, ss.name);
-            } else if (isRingVibrate && isRingLimited) {
-                text = mContext.getString(R.string.volume_stream_vibrate_dnd, ss.name);
-            } else if (isRingVibrate) {
-                text = mContext.getString(R.string.volume_stream_vibrate, ss.name);
-            } else if (ss.muted || mAutomute && ss.level == 0) {
-                text = mContext.getString(R.string.volume_stream_muted, ss.name);
-            } else if (isRingLimited) {
-                text = mContext.getString(R.string.volume_stream_limited_dnd, ss.name);
-            }
-        }
-        Util.setText(row.header, text);
+        Util.setText(row.header, ss.name);
 
         // update icon
         final boolean iconEnabled = (mAutomute || ss.muteSupported) && !zenMuted;
@@ -823,7 +817,7 @@
 
     private void updateVolumeRowHeaderVisibleH(VolumeRow row) {
         final boolean dynamic = row.ss != null && row.ss.dynamic;
-        final boolean showHeaders = mShowHeaders || mExpanded && dynamic;
+        final boolean showHeaders = mExpanded && (mShowHeaders || dynamic);
         if (row.cachedShowHeaders != showHeaders) {
             row.cachedShowHeaders = showHeaders;
             Util.setVisOrGone(row.header, showHeaders);
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
index 3d33809..44a435e 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
@@ -122,7 +122,6 @@
     private void applyConfiguration() {
         mDialog.setStreamImportant(AudioManager.STREAM_ALARM, true);
         mDialog.setStreamImportant(AudioManager.STREAM_SYSTEM, false);
-        mDialog.setShowHeaders(false);
         mDialog.setAutomute(true);
         mDialog.setSilentMode(false);
         mController.setVolumePolicy(mVolumePolicy);
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePrefs.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePrefs.java
index bbb70ed..04339eb 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumePrefs.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePrefs.java
@@ -43,7 +43,7 @@
     public static final String PREF_ADJUST_ALARMS = "pref_adjust_alarms";
     public static final String PREF_ADJUST_NOTIFICATION = "pref_adjust_notification";
 
-    public static final boolean DEFAULT_SHOW_HEADERS = false;
+    public static final boolean DEFAULT_SHOW_HEADERS = true;
     public static final boolean DEFAULT_ENABLE_AUTOMUTE = true;
     public static final boolean DEFAULT_ENABLE_SILENT_MODE = true;
 
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index a1487e3..45e3e7e 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -2212,12 +2212,166 @@
     // Notification group expansion state toggled by the expand affordance.
     ACTION_NOTIFICATION_GROUP_EXPANDER = 408;
 
+
     // Notification expansion state toggled by the expand gesture.
     ACTION_NOTIFICATION_GESTURE_EXPANDER = 409;
 
     // Notification group expansion state toggled by the expand gesture.
     ACTION_NOTIFICATION_GROUP_GESTURE_EXPANDER = 410;
 
+    // User performs gesture that activates the ambient display
+    // 1: Gesture performed is Nudge
+    // 2: Gesture performed is Pickup
+    // 4: Gesture performed is Double Tap
+    ACTION_AMBIENT_GESTURE = 411;
+
+    // ---- End N Constants, all N constants go above this line ----
+
+    // ------- Begin N App Disambig Shade -----
+    // Application disambig shade opened or closed with a featured app.
+    // These are actually visibility events, but visible/hidden doesn't
+    // take a package, so these are being logged as actions.
+    // Package: Calling app on open, called app on close
+    ACTION_SHOW_APP_DISAMBIG_APP_FEATURED = 451;
+    ACTION_HIDE_APP_DISAMBIG_APP_FEATURED = 452;
+
+    // Application disambig shade opened or closed without a featured app.
+    // These are actually visibility events, but visible/hidden doesn't
+    // take a package, so these are being logged as actions.
+    // Package: Calling app on open, called app on close
+    ACTION_SHOW_APP_DISAMBIG_NONE_FEATURED = 453;
+    ACTION_HIDE_APP_DISAMBIG_NONE_FEATURED = 454;
+
+    // User opens in an app by pressing “Always” in the application disambig shade.
+    // Subtype: Index of selection
+    ACTION_APP_DISAMBIG_ALWAYS = 455;
+
+    // User opens in an app by pressing “Just Once” in the application disambig shade.
+    // Subtype: Index of selection
+    ACTION_APP_DISAMBIG_JUST_ONCE = 456;
+
+    // User opens in an app by tapping on its name in the application disambig shade.
+    // Subtype: Index of selection
+    ACTION_APP_DISAMBIG_TAP = 457;
+
+    // OPEN: Settings > Internal storage > Storage manager
+    // CATEGORY: SETTINGS
+    STORAGE_MANAGER_SETTINGS = 458;
+
+    // OPEN: Settings -> Gestures
+    // CATEGORY: SETTINGS
+    SETTINGS_GESTURES = 459;
+
+    // ------ Begin Deletion Helper ------
+    // ACTION: Settings > Storage > Free Up Space > Photos & Videos > Toggle
+    //   SUBTYPE: false is off, true is on
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_SELECTION_PHOTOS = 460;
+
+    // ACTION: Settings > Storage > Free Up Space > Apps > Toggle
+    //   SUBTYPE: false is off, true is on
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_SELECTION_ALL_APPS = 461;
+
+    // ACTION: Settings > Storage > Free Up Space > Apps > Click an unchecked app
+    // CATEGORY: SETTINGS
+    //   PACKAGE: Unchecked app
+    ACTION_DELETION_SELECTION_APP_ON = 462;
+
+    // ACTION: Settings > Storage > Free Up Space > Apps > Click a checked app
+    // CATEGORY: SETTINGS
+    //   PACKAGE: Checked app
+    ACTION_DELETION_SELECTION_APP_OFF = 463;
+
+    // ACTION: Settings > Storage > Free Up Space > Apps > Click category
+    //   SUBTYPE: false is expanded, true is collapsed
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_APPS_COLLAPSED = 464;
+
+    // ACTION: Settings > Storage > Free Up Space > Downloads > Check On
+    //   SUBTYPE: false is off, true is on
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_SELECTION_DOWNLOADS = 465;
+
+    // ACTION: Settings > Storage > Free Up Space > Downloads > Click category
+    //   SUBTYPE: false is expanded, true is collapsed
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_DOWNLOADS_COLLAPSED = 466;
+
+    // ACTION: Settings > Storage > Free Up Space > Free up ... GB
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_HELPER_CLEAR = 467;
+
+    // ACTION: Settings > Storage > Free Up Space > Cancel
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_HELPER_CANCEL = 468;
+
+    // ACTION: Settings > Storage > Free Up Space > Free up ... GB > Remove
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_HELPER_REMOVE_CONFIRM = 469;
+
+    // ACTION: Settings > Storage > Free Up Space > Free up ... GB > Cancel
+    // CATEGORY: SETTINGS
+    ACTION_DELETION_HELPER_REMOVE_CANCEL = 470;
+
+    // Deletion helper encountered an error during package deletion.
+    ACTION_DELETION_HELPER_APPS_DELETION_FAIL = 471;
+
+    // Deletion helper encountered an error during downloads folder deletion.
+    ACTION_DELETION_HELPER_DOWNLOADS_DELETION_FAIL = 472;
+
+    // Deletion helper encountered an error during photo and video deletion.
+    ACTION_DELETION_HELPER_PHOTOS_VIDEOS_DELETION_FAIL = 473;
+
+    // OPEN: Settings (root page if there are multiple tabs)
+    // CATEGORY: SETTINGS
+    DASHBOARD_CONTAINER = 474;
+
+    // OPEN: Settings -> SUPPORT TAB
+    // CATEGORY: SETTINGS
+    SUPPORT_FRAGMENT = 475;
+
+    // ACTION: Settings -> Select summary tab.
+    ACTION_SELECT_SUMMARY=476;
+
+    // ACTION: Settings -> Select support tab.
+    ACTION_SELECT_SUPPORT_FRAGMENT = 477;
+
+    // ACTION: Settings -> Support -> Tips & tricks
+    ACTION_SUPPORT_TIPS_AND_TRICKS = 478;
+
+    // ACTION: Settings -> Support -> Help & feedback
+    ACTION_SUPPORT_HELP_AND_FEEDBACK = 479;
+
+    // ACTION: Settings -> Support -> Sign in
+    ACTION_SUPPORT_SIGN_IN = 480;
+
+    // ACTION: Settings -> Support -> Phone
+    ACTION_SUPPORT_PHONE = 481;
+
+    // ACTION: Settings -> Support -> Chat
+    ACTION_SUPPORT_CHAT = 482;
+
+    // ACTION: Settings -> Support -> Phone/Chat -> Disclaimer Cancel
+    ACTION_SUPPORT_DISCLAIMER_CANCEL = 483;
+
+    // ACTION: Settings -> Support -> Phone/Chat -> Disclaimer OK
+    ACTION_SUPPORT_DISCLAIMER_OK = 484;
+
+    // ACTION: Settings -> Support -> Toll-Free Phone
+    ACTION_SUPPORT_DAIL_TOLLFREE = 485;
+
+    // ACTION: Settings -> Support -> "Travel Abroad" Button
+    ACTION_SUPPORT_VIEW_TRAVEL_ABROAD_DIALOG = 486;
+
+    // ACTION: Settings -> Support -> "Travel Abroad" Button -> Tolled Phone
+    ACTION_SUPPORT_DIAL_TOLLED = 487;
+
+    // OPEN: Settings > Display > Night display
+    // CATEGORY: SETTINGS
+    NIGHT_DISPLAY_SETTINGS = 488;
+
+    // ---- End N-MR1 Constants, all N-MR1 constants go above this line ----
     // Add new aosp constants above this line.
     // END OF AOSP CONSTANTS
   }
diff --git a/services/Android.mk b/services/Android.mk
index 1918db5..3385bed 100644
--- a/services/Android.mk
+++ b/services/Android.mk
@@ -28,6 +28,7 @@
     net \
     print \
     restrictions \
+    retaildemo \
     usage \
     usb \
     voiceinteraction
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 2a30229..6defd0f 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -30,6 +30,7 @@
 import android.app.admin.DevicePolicyManagerInternal.OnCrossProfileWidgetProvidersChangeListener;
 import android.appwidget.AppWidgetManager;
 import android.appwidget.AppWidgetProviderInfo;
+import android.appwidget.PendingHostUpdate;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
@@ -72,10 +73,12 @@
 import android.util.ArraySet;
 import android.util.AtomicFile;
 import android.util.AttributeSet;
+import android.util.LongSparseArray;
 import android.util.Pair;
 import android.util.Slog;
 import android.util.SparseArray;
 import android.util.SparseIntArray;
+import android.util.SparseLongArray;
 import android.util.TypedValue;
 import android.util.Xml;
 import android.view.Display;
@@ -738,8 +741,8 @@
     }
 
     @Override
-    public ParceledListSlice<RemoteViews> startListening(IAppWidgetHost callbacks,
-            String callingPackage, int hostId, int[] appWidgetIds, int[] updatedIds) {
+    public ParceledListSlice<PendingHostUpdate> startListening(IAppWidgetHost callbacks,
+            String callingPackage, int hostId, int[] appWidgetIds) {
         final int userId = UserHandle.getCallingUserId();
 
         if (DEBUG) {
@@ -759,18 +762,19 @@
             host.callbacks = callbacks;
 
             int N = appWidgetIds.length;
-            ArrayList<RemoteViews> outViews = new ArrayList<>(N);
-            RemoteViews rv;
-            int added = 0;
+            ArrayList<PendingHostUpdate> outUpdates = new ArrayList<>(N);
+
+            LongSparseArray<PendingHostUpdate> updatesMap = new LongSparseArray<>();
             for (int i = 0; i < N; i++) {
-                rv = host.getPendingViewsForId(appWidgetIds[i]);
-                if (rv != null) {
-                    updatedIds[added] = appWidgetIds[i];
-                    outViews.add(rv);
-                    added++;
+                if (host.getPendingUpdatesForId(appWidgetIds[i], updatesMap)) {
+                    // We key the updates based on time, so that the values are sorted by time.
+                    int M = updatesMap.size();
+                    for (int j = 0; j < M; j++) {
+                        outUpdates.add(updatesMap.valueAt(j));
+                    }
                 }
             }
-            return new ParceledListSlice<>(outViews);
+            return new ParceledListSlice<>(outUpdates);
         }
     }
 
@@ -1810,6 +1814,15 @@
     }
 
     private void scheduleNotifyAppWidgetViewDataChanged(Widget widget, int viewId) {
+        if (viewId == ID_VIEWS_UPDATE || viewId == ID_PROVIDER_CHANGED) {
+            // A view id should never collide with these constants but a developer can call this
+            // method with a wrong id. In that case, ignore the call.
+            return;
+        }
+        long requestTime = SystemClock.uptimeMillis();
+        if (widget != null) {
+            widget.updateTimes.put(viewId, requestTime);
+        }
         if (widget == null || widget.host == null || widget.host.zombie
                 || widget.host.callbacks == null || widget.provider == null
                 || widget.provider.zombie) {
@@ -1819,6 +1832,7 @@
         SomeArgs args = SomeArgs.obtain();
         args.arg1 = widget.host;
         args.arg2 = widget.host.callbacks;
+        args.arg3 = requestTime;
         args.argi1 = widget.appWidgetId;
         args.argi2 = viewId;
 
@@ -1829,9 +1843,10 @@
 
 
     private void handleNotifyAppWidgetViewDataChanged(Host host, IAppWidgetHost callbacks,
-            int appWidgetId, int viewId) {
+            int appWidgetId, int viewId, long requestTime) {
         try {
             callbacks.viewDataChanged(appWidgetId, viewId);
+            host.lastWidgetUpdateTime = requestTime;
         } catch (RemoteException re) {
             // It failed; remove the callback. No need to prune because
             // we know that this host is still referenced by this instance.
@@ -1880,7 +1895,7 @@
     private void scheduleNotifyUpdateAppWidgetLocked(Widget widget, RemoteViews updateViews) {
         long requestTime = SystemClock.uptimeMillis();
         if (widget != null) {
-            widget.lastUpdateTime = requestTime;
+            widget.updateTimes.put(ID_VIEWS_UPDATE, requestTime);
         }
         if (widget == null || widget.provider == null || widget.provider.zombie
                 || widget.host.callbacks == null || widget.host.zombie) {
@@ -1890,7 +1905,7 @@
         SomeArgs args = SomeArgs.obtain();
         args.arg1 = widget.host;
         args.arg2 = widget.host.callbacks;
-        args.arg3 = updateViews;
+        args.arg3 = updateViews.clone();
         args.arg4 = requestTime;
         args.argi1 = widget.appWidgetId;
 
@@ -1913,6 +1928,12 @@
     }
 
     private void scheduleNotifyProviderChangedLocked(Widget widget) {
+        long requestTime = SystemClock.uptimeMillis();
+        if (widget != null) {
+            // When the provider changes, reset everything else.
+            widget.updateTimes.clear();
+            widget.updateTimes.append(ID_PROVIDER_CHANGED, requestTime);
+        }
         if (widget == null || widget.provider == null || widget.provider.zombie
                 || widget.host.callbacks == null || widget.host.zombie) {
             return;
@@ -1922,6 +1943,7 @@
         args.arg1 = widget.host;
         args.arg2 = widget.host.callbacks;
         args.arg3 = widget.provider.info;
+        args.arg4 = requestTime;
         args.argi1 = widget.appWidgetId;
 
         mCallbackHandler.obtainMessage(
@@ -1930,9 +1952,10 @@
     }
 
     private void handleNotifyProviderChanged(Host host, IAppWidgetHost callbacks,
-            int appWidgetId, AppWidgetProviderInfo info) {
+            int appWidgetId, AppWidgetProviderInfo info, long requestTime) {
         try {
             callbacks.providerChanged(appWidgetId, info);
+            host.lastWidgetUpdateTime = requestTime;
         } catch (RemoteException re) {
             synchronized (mLock){
                 Slog.e(TAG, "Widget host dead: " + host.id, re);
@@ -3416,10 +3439,11 @@
                     Host host = (Host) args.arg1;
                     IAppWidgetHost callbacks = (IAppWidgetHost) args.arg2;
                     AppWidgetProviderInfo info = (AppWidgetProviderInfo)args.arg3;
+                    long requestTime = (Long) args.arg4;
                     final int appWidgetId = args.argi1;
                     args.recycle();
 
-                    handleNotifyProviderChanged(host, callbacks, appWidgetId, info);
+                    handleNotifyProviderChanged(host, callbacks, appWidgetId, info, requestTime);
                 } break;
 
                 case MSG_NOTIFY_PROVIDERS_CHANGED: {
@@ -3435,11 +3459,13 @@
                     SomeArgs args = (SomeArgs) message.obj;
                     Host host = (Host) args.arg1;
                     IAppWidgetHost callbacks = (IAppWidgetHost) args.arg2;
+                    long requestTime = (Long) args.arg3;
                     final int appWidgetId = args.argi1;
                     final int viewId = args.argi2;
                     args.recycle();
 
-                    handleNotifyAppWidgetViewDataChanged(host, callbacks, appWidgetId, viewId);
+                    handleNotifyAppWidgetViewDataChanged(host, callbacks, appWidgetId, viewId,
+                            requestTime);
                 } break;
             }
         }
@@ -3778,20 +3804,41 @@
         }
 
         /**
-         * Returns the RemoveViews for the provided widget id if an update is pending
-         * for that widget.
+         * Adds all pending updates in {@param outUpdates} keys by the update time.
          */
-        public RemoteViews getPendingViewsForId(int appWidgetId) {
+        public boolean getPendingUpdatesForId(int appWidgetId,
+                LongSparseArray<PendingHostUpdate> outUpdates) {
             long updateTime = lastWidgetUpdateTime;
             int N = widgets.size();
             for (int i = 0; i < N; i++) {
                 Widget widget = widgets.get(i);
-                if (widget.appWidgetId == appWidgetId
-                        && widget.lastUpdateTime > updateTime) {
-                    return cloneIfLocalBinder(widget.getEffectiveViewsLocked());
+                if (widget.appWidgetId == appWidgetId) {
+                    outUpdates.clear();
+                    for (int j = widget.updateTimes.size() - 1; j >= 0; j--) {
+                        long time = widget.updateTimes.valueAt(j);
+                        if (time <= updateTime) {
+                            continue;
+                        }
+                        int id = widget.updateTimes.keyAt(j);
+                        final PendingHostUpdate update;
+                        switch (id) {
+                            case ID_PROVIDER_CHANGED:
+                                update = PendingHostUpdate.providerChanged(
+                                        appWidgetId, widget.provider.info);
+                                break;
+                            case ID_VIEWS_UPDATE:
+                                update = PendingHostUpdate.updateAppWidget(appWidgetId,
+                                        cloneIfLocalBinder(widget.getEffectiveViewsLocked()));
+                                break;
+                            default:
+                                update = PendingHostUpdate.viewDataChanged(appWidgetId, id);
+                        }
+                        outUpdates.put(time, update);
+                    }
+                    return true;
                 }
             }
-            return null;
+            return false;
         }
 
         @Override
@@ -3856,6 +3903,10 @@
         }
     }
 
+    // These can be any constants that would not collide with a resource id.
+    private static final int ID_VIEWS_UPDATE = 0;
+    private static final int ID_PROVIDER_CHANGED = 1;
+
     private static final class Widget {
         int appWidgetId;
         int restoredId;  // tracking & remapping any restored state
@@ -3864,7 +3915,8 @@
         RemoteViews maskedViews;
         Bundle options;
         Host host;
-        long lastUpdateTime;
+        // timestamps for various operations
+        SparseLongArray updateTimes = new SparseLongArray(2);
 
         @Override
         public String toString() {
diff --git a/services/core/java/com/android/server/AttributeCache.java b/services/core/java/com/android/server/AttributeCache.java
index 57f18c0..58ec836 100644
--- a/services/core/java/com/android/server/AttributeCache.java
+++ b/services/core/java/com/android/server/AttributeCache.java
@@ -25,23 +25,24 @@
 import android.content.res.TypedArray;
 import android.os.UserHandle;
 import android.util.ArrayMap;
+import android.util.LruCache;
 import android.util.SparseArray;
 
 import com.android.internal.annotations.GuardedBy;
 
-import java.lang.ref.WeakReference;
-
 /**
  * TODO: This should be better integrated into the system so it doesn't need
  * special calls from the activity manager to clear it.
  */
 public final class AttributeCache {
+    private static final int CACHE_SIZE = 4;
     private static AttributeCache sInstance = null;
 
     private final Context mContext;
 
     @GuardedBy("this")
-    private final ArrayMap<String, WeakReference<Package>> mPackages = new ArrayMap<>();
+    private final LruCache<String, Package> mPackages = new LruCache<>(CACHE_SIZE);
+
     @GuardedBy("this")
     private final Configuration mConfiguration = new Configuration();
 
@@ -86,15 +87,12 @@
 
     public void removePackage(String packageName) {
         synchronized (this) {
-            final WeakReference<Package> ref = mPackages.remove(packageName);
-            final Package pkg = (ref != null) ? ref.get() : null;
+            final Package pkg = mPackages.remove(packageName);
             if (pkg != null) {
-                if (pkg.mMap != null) {
-                    for (int i = 0; i < pkg.mMap.size(); i++) {
-                        final ArrayMap<int[], Entry> map = pkg.mMap.valueAt(i);
-                        for (int j = 0; j < map.size(); j++) {
-                            map.valueAt(j).recycle();
-                        }
+                for (int i = 0; i < pkg.mMap.size(); i++) {
+                    final ArrayMap<int[], Entry> map = pkg.mMap.valueAt(i);
+                    for (int j = 0; j < map.size(); j++) {
+                        map.valueAt(j).recycle();
                     }
                 }
 
@@ -113,15 +111,14 @@
                 // The configurations being masked out are ones that commonly
                 // change so we don't want flushing the cache... all others
                 // will flush the cache.
-                mPackages.clear();
+                mPackages.evictAll();
             }
         }
     }
     
     public Entry get(String packageName, int resId, int[] styleable, int userId) {
         synchronized (this) {
-            WeakReference<Package> ref = mPackages.get(packageName);
-            Package pkg = (ref != null) ? ref.get() : null;
+            Package pkg = mPackages.get(packageName);
             ArrayMap<int[], Entry> map = null;
             Entry ent = null;
             if (pkg != null) {
@@ -144,7 +141,7 @@
                     return null;
                 }
                 pkg = new Package(context);
-                mPackages.put(packageName, new WeakReference<>(pkg));
+                mPackages.put(packageName, pkg);
             }
             
             if (map == null) {
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 172025b..8c5887f 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -425,6 +425,24 @@
         return false;
     }
 
+    public int getState() {
+        if ((Binder.getCallingUid() != Process.SYSTEM_UID) &&
+                (!checkIfCallerIsForegroundUser())) {
+            Slog.w(TAG, "getState(): not allowed for non-active and non system user");
+            return BluetoothAdapter.STATE_OFF;
+        }
+
+        try {
+            mBluetoothLock.readLock().lock();
+            if (mBluetooth != null) return mBluetooth.getState();
+        } catch (RemoteException e) {
+            Slog.e(TAG, "getState()", e);
+        } finally {
+            mBluetoothLock.readLock().unlock();
+        }
+        return BluetoothAdapter.STATE_OFF;
+    }
+
     class ClientDeathRecipient implements IBinder.DeathRecipient {
         public void binderDied() {
             if (DBG) Slog.d(TAG, "Binder is dead -  unregister Ble App");
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index b12972c..985d4a8 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -76,6 +76,7 @@
 import android.net.UidRange;
 import android.net.Uri;
 import android.net.metrics.DefaultNetworkEvent;
+import android.net.metrics.IpConnectivityLog;
 import android.net.metrics.NetworkEvent;
 import android.os.Binder;
 import android.os.Build;
@@ -93,6 +94,7 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.ResultReceiver;
+import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -124,6 +126,7 @@
 import com.android.internal.util.AsyncChannel;
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.internal.util.MessageUtils;
+import com.android.internal.util.WakeupMessage;
 import com.android.internal.util.XmlUtils;
 import com.android.server.am.BatteryStatsService;
 import com.android.server.connectivity.DataConnectionStats;
@@ -170,7 +173,7 @@
  */
 public class ConnectivityService extends IConnectivityManager.Stub
         implements PendingIntent.OnFinished {
-    private static final String TAG = "ConnectivityService";
+    private static final String TAG = ConnectivityService.class.getSimpleName();
 
     private static final boolean DBG = true;
     private static final boolean VDBG = false;
@@ -190,6 +193,12 @@
     // connect anyway?" dialog after the user selects a network that doesn't validate.
     private static final int PROMPT_UNVALIDATED_DELAY_MS = 8 * 1000;
 
+    // Default to 30s linger time-out. Modifiable only for testing.
+    private static final String LINGER_DELAY_PROPERTY = "persist.netmon.linger";
+    private static final int DEFAULT_LINGER_DELAY_MS = 30_000;
+    @VisibleForTesting
+    protected int mLingerDelayMs;  // Can't be final, or test subclass constructors can't change it.
+
     // How long to delay to removal of a pending intent based request.
     // See Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS
     private final int mReleasePendingIntentDelayMs;
@@ -238,7 +247,8 @@
     private static final int DISABLED = 0;
 
     private static final SparseArray<String> sMagicDecoderRing = MessageUtils.findMessageNames(
-            new Class[] { AsyncChannel.class, ConnectivityService.class, NetworkAgent.class });
+            new Class[] { AsyncChannel.class, ConnectivityService.class, NetworkAgent.class,
+                    NetworkAgentInfo.class });
 
     private enum ReapUnvalidatedNetworks {
         // Tear down networks that have no chance (e.g. even if validated) of becoming
@@ -293,7 +303,7 @@
 
     /**
      * indicates a timeout period is over - check if we had a network yet or not
-     * and if not, call the timeout calback (but leave the request live until they
+     * and if not, call the timeout callback (but leave the request live until they
      * cancel it.
      * includes a NetworkRequestInfo
      */
@@ -370,6 +380,16 @@
      */
     private static final int EVENT_REGISTER_NETWORK_LISTENER_WITH_INTENT = 31;
 
+    /**
+     * Indicates a caller has requested to have its callback invoked with
+     * the latest LinkProperties or NetworkCapabilities.
+     *
+     * arg1 = UID of caller
+     * obj  = NetworkRequest
+     */
+    private static final int EVENT_REQUEST_LINKPROPERTIES  = 32;
+    private static final int EVENT_REQUEST_NETCAPABILITIES = 33;
+
     /** Handler thread used for both of the handlers below. */
     @VisibleForTesting
     protected final HandlerThread mHandlerThread;
@@ -454,6 +474,8 @@
         }
     }
 
+    private final IpConnectivityLog mMetricsLog = new IpConnectivityLog();
+
     /**
      * Implements support for the legacy "one network per network type" model.
      *
@@ -487,8 +509,16 @@
          *
          * The actual lists are populated when we scan the network types that
          * are supported on this device.
+         *
+         * Threading model:
+         *  - addSupportedType() is only called in the constructor
+         *  - add(), update(), remove() are only called from the ConnectivityService handler thread.
+         *    They are therefore not thread-safe with respect to each other.
+         *  - getNetworkForType() can be called at any time on binder threads. It is synchronized
+         *    on mTypeLists to be thread-safe with respect to a concurrent remove call.
+         *  - dump is thread-safe with respect to concurrent add and remove calls.
          */
-        private ArrayList<NetworkAgentInfo> mTypeLists[];
+        private final ArrayList<NetworkAgentInfo> mTypeLists[];
 
         public LegacyTypeTracker() {
             mTypeLists = (ArrayList<NetworkAgentInfo>[])
@@ -508,11 +538,12 @@
         }
 
         public NetworkAgentInfo getNetworkForType(int type) {
-            if (isTypeSupported(type) && !mTypeLists[type].isEmpty()) {
-                return mTypeLists[type].get(0);
-            } else {
-                return null;
+            synchronized (mTypeLists) {
+                if (isTypeSupported(type) && !mTypeLists[type].isEmpty()) {
+                    return mTypeLists[type].get(0);
+                }
             }
+            return null;
         }
 
         private void maybeLogBroadcast(NetworkAgentInfo nai, DetailedState state, int type,
@@ -535,12 +566,13 @@
             if (list.contains(nai)) {
                 return;
             }
-
-            list.add(nai);
+            synchronized (mTypeLists) {
+                list.add(nai);
+            }
 
             // Send a broadcast if this is the first network of its type or if it's the default.
             final boolean isDefaultNetwork = isDefaultNetwork(nai);
-            if (list.size() == 1 || isDefaultNetwork) {
+            if ((list.size() == 1) || isDefaultNetwork) {
                 maybeLogBroadcast(nai, DetailedState.CONNECTED, type, isDefaultNetwork);
                 sendLegacyNetworkBroadcast(nai, DetailedState.CONNECTED, type);
             }
@@ -552,11 +584,12 @@
             if (list == null || list.isEmpty()) {
                 return;
             }
-
             final boolean wasFirstNetwork = list.get(0).equals(nai);
 
-            if (!list.remove(nai)) {
-                return;
+            synchronized (mTypeLists) {
+                if (!list.remove(nai)) {
+                    return;
+                }
             }
 
             final DetailedState state = DetailedState.DISCONNECTED;
@@ -591,8 +624,8 @@
             for (int type = 0; type < mTypeLists.length; type++) {
                 final ArrayList<NetworkAgentInfo> list = mTypeLists[type];
                 final boolean contains = (list != null && list.contains(nai));
-                final boolean isFirst = (list != null && list.size() > 0 && nai == list.get(0));
-                if (isFirst || (contains && isDefault)) {
+                final boolean isFirst = contains && (nai == list.get(0));
+                if (isFirst || contains && isDefault) {
                     maybeLogBroadcast(nai, state, type, isDefault);
                     sendLegacyNetworkBroadcast(nai, state, type);
                 }
@@ -617,10 +650,12 @@
             pw.println();
             pw.println("Current state:");
             pw.increaseIndent();
-            for (int type = 0; type < mTypeLists.length; type++) {
-                if (mTypeLists[type] == null|| mTypeLists[type].size() == 0) continue;
-                for (NetworkAgentInfo nai : mTypeLists[type]) {
-                    pw.println(type + " " + naiToString(nai));
+            synchronized (mTypeLists) {
+                for (int type = 0; type < mTypeLists.length; type++) {
+                    if (mTypeLists[type] == null || mTypeLists[type].isEmpty()) continue;
+                    for (NetworkAgentInfo nai : mTypeLists[type]) {
+                        pw.println(type + " " + naiToString(nai));
+                    }
                 }
             }
             pw.decreaseIndent();
@@ -640,8 +675,7 @@
         if (DBG) log("ConnectivityService starting up");
 
         mDefaultRequest = createInternetRequestForTransport(-1);
-        NetworkRequestInfo defaultNRI = new NetworkRequestInfo(null, mDefaultRequest,
-                new Binder(), NetworkRequestType.REQUEST);
+        NetworkRequestInfo defaultNRI = new NetworkRequestInfo(null, mDefaultRequest, new Binder());
         mNetworkRequests.put(mDefaultRequest, defaultNRI);
         mNetworkRequestInfoLogs.log("REGISTER " + defaultNRI);
 
@@ -666,6 +700,8 @@
         mReleasePendingIntentDelayMs = Settings.Secure.getInt(context.getContentResolver(),
                 Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS, 5_000);
 
+        mLingerDelayMs = SystemProperties.getInt(LINGER_DELAY_PROPERTY, DEFAULT_LINGER_DELAY_MS);
+
         mContext = checkNotNull(context, "missing Context");
         mNetd = checkNotNull(netManager, "missing INetworkManagementService");
         mStatsService = checkNotNull(statsService, "missing INetworkStatsService");
@@ -792,7 +828,19 @@
         if (transportType > -1) {
             netCap.addTransportType(transportType);
         }
-        return new NetworkRequest(netCap, TYPE_NONE, nextNetworkRequestId());
+        return new NetworkRequest(netCap, TYPE_NONE, nextNetworkRequestId(),
+                NetworkRequest.Type.REQUEST);
+    }
+
+    // Used only for testing.
+    // TODO: Delete this and either:
+    // 1. Give Fake SettingsProvider the ability to send settings change notifications (requires
+    //    changing ContentResolver to make registerContentObserver non-final).
+    // 2. Give FakeSettingsProvider an alternative notification mechanism and have the test use it
+    //    by subclassing SettingsObserver.
+    @VisibleForTesting
+    void updateMobileDataAlwaysOn() {
+        mHandler.sendEmptyMessage(EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON);
     }
 
     private void handleMobileDataAlwaysOn() {
@@ -805,7 +853,7 @@
 
         if (enable) {
             handleRegisterNetworkRequest(new NetworkRequestInfo(
-                    null, mDefaultMobileDataRequest, new Binder(), NetworkRequestType.REQUEST));
+                    null, mDefaultMobileDataRequest, new Binder()));
         } else {
             handleReleaseNetworkRequest(mDefaultMobileDataRequest, Process.SYSTEM_UID);
         }
@@ -1056,6 +1104,7 @@
         return nai != null ? nai.network : null;
     }
 
+    // Public because it's used by mLockdownTracker.
     public NetworkInfo getActiveNetworkInfoUnfiltered() {
         enforceAccessPermission();
         final int uid = Binder.getCallingUid();
@@ -1311,6 +1360,7 @@
      * desired
      * @return {@code true} on success, {@code false} on failure
      */
+    @Override
     public boolean requestRouteToHostAddress(int networkType, byte[] hostAddress) {
         enforceChangePermission();
         if (mProtectedNetworks.contains(networkType)) {
@@ -1519,6 +1569,7 @@
         mContext.enforceCallingOrSelfPermission(KeepaliveTracker.PERMISSION, "ConnectivityService");
     }
 
+    // Public because it's used by mLockdownTracker.
     public void sendConnectedBroadcast(NetworkInfo info) {
         enforceConnectivityInternalPermission();
         sendGeneralBroadcast(info, CONNECTIVITY_ACTION);
@@ -1875,15 +1926,16 @@
         for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
             pw.println(nai.toString());
             pw.increaseIndent();
-            pw.println("Requests:");
+            pw.println(String.format("Requests: %d request/%d total",
+                    nai.numRequestNetworkRequests(), nai.numNetworkRequests()));
             pw.increaseIndent();
-            for (int i = 0; i < nai.networkRequests.size(); i++) {
-                pw.println(nai.networkRequests.valueAt(i).toString());
+            for (int i = 0; i < nai.numNetworkRequests(); i++) {
+                pw.println(nai.requestAt(i).toString());
             }
             pw.decreaseIndent();
             pw.println("Lingered:");
             pw.increaseIndent();
-            for (NetworkRequest nr : nai.networkLingered) pw.println(nr.toString());
+            nai.dumpLingerTimers(pw);
             pw.decreaseIndent();
             pw.decreaseIndent();
         }
@@ -1987,10 +2039,6 @@
         return false;
     }
 
-    private boolean isRequest(NetworkRequest request) {
-        return mNetworkRequests.get(request).isRequest();
-    }
-
     // must be stateless - things change under us.
     private class NetworkStateTrackerHandler extends Handler {
         public NetworkStateTrackerHandler(Looper looper) {
@@ -2132,13 +2180,6 @@
                     }
                     break;
                 }
-                case NetworkMonitor.EVENT_NETWORK_LINGER_COMPLETE: {
-                    NetworkAgentInfo nai = (NetworkAgentInfo)msg.obj;
-                    if (isLiveNetworkAgent(nai, msg.what)) {
-                        handleLingerComplete(nai);
-                    }
-                    break;
-                }
                 case NetworkMonitor.EVENT_PROVISIONING_NOTIFICATION: {
                     final int netId = msg.arg2;
                     final boolean visible = (msg.arg1 != 0);
@@ -2159,9 +2200,26 @@
                             loge("EVENT_PROVISIONING_NOTIFICATION from unknown NetworkMonitor");
                             break;
                         }
-                        setProvNotificationVisibleIntent(true, netId, NotificationType.SIGN_IN,
-                                nai.networkInfo.getType(), nai.networkInfo.getExtraInfo(),
-                                (PendingIntent)msg.obj, nai.networkMisc.explicitlySelected);
+                        if (!nai.networkMisc.provisioningNotificationDisabled) {
+                            setProvNotificationVisibleIntent(true, netId, NotificationType.SIGN_IN,
+                                    nai.networkInfo.getType(), nai.networkInfo.getExtraInfo(),
+                                    (PendingIntent)msg.obj, nai.networkMisc.explicitlySelected);
+                        }
+                    }
+                    break;
+                }
+            }
+            return true;
+        }
+
+        private boolean maybeHandleNetworkAgentInfoMessage(Message msg) {
+            switch (msg.what) {
+                default:
+                    return false;
+                case NetworkAgentInfo.EVENT_NETWORK_LINGER_COMPLETE: {
+                    NetworkAgentInfo nai = (NetworkAgentInfo) msg.obj;
+                    if (nai != null && isLiveNetworkAgent(nai, msg.what)) {
+                        handleLingerComplete(nai);
                     }
                     break;
                 }
@@ -2171,31 +2229,33 @@
 
         @Override
         public void handleMessage(Message msg) {
-            if (!maybeHandleAsyncChannelMessage(msg) && !maybeHandleNetworkMonitorMessage(msg)) {
+            if (!maybeHandleAsyncChannelMessage(msg) &&
+                    !maybeHandleNetworkMonitorMessage(msg) &&
+                    !maybeHandleNetworkAgentInfoMessage(msg)) {
                 maybeHandleNetworkAgentMessage(msg);
             }
         }
     }
 
-    private void linger(NetworkAgentInfo nai) {
-        nai.lingering = true;
-        NetworkEvent.logEvent(nai.network.netId, NetworkEvent.NETWORK_LINGER);
-        nai.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_LINGER);
-        notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_LOSING);
-    }
-
-    // Cancel any lingering so the linger timeout doesn't teardown a network.
-    // This should be called when a network begins satisfying a NetworkRequest.
-    // Note: depending on what state the NetworkMonitor is in (e.g.,
-    // if it's awaiting captive portal login, or if validation failed), this
-    // may trigger a re-evaluation of the network.
-    private void unlinger(NetworkAgentInfo nai) {
-        nai.networkLingered.clear();
-        if (!nai.lingering) return;
-        nai.lingering = false;
-        NetworkEvent.logEvent(nai.network.netId, NetworkEvent.NETWORK_UNLINGER);
-        if (VDBG) log("Canceling linger of " + nai.name());
-        nai.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_CONNECTED);
+    private void updateLingerState(NetworkAgentInfo nai, long now) {
+        // 1. Update the linger timer. If it's changed, reschedule or cancel the alarm.
+        // 2. If the network was lingering and there are now requests, unlinger it.
+        // 3. If this network is unneeded (which implies it is not lingering), and there is at least
+        //    one lingered request, start lingering.
+        nai.updateLingerTimer();
+        if (nai.isLingering() && nai.numRequestNetworkRequests() > 0) {
+            if (DBG) log("Unlingering " + nai.name());
+            nai.unlinger();
+            logNetworkEvent(nai, NetworkEvent.NETWORK_UNLINGER);
+        } else if (unneeded(nai) && nai.getLingerExpiry() > 0) {  // unneeded() calls isLingering()
+            int lingerTime = (int) (nai.getLingerExpiry() - now);
+            if (DBG) {
+                Log.d(TAG, "Lingering " + nai.name() + " for " + lingerTime + "ms");
+            }
+            nai.linger();
+            logNetworkEvent(nai, NetworkEvent.NETWORK_LINGER);
+            notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_LOSING, lingerTime);
+        }
     }
 
     private void handleAsyncChannelHalfConnect(Message msg) {
@@ -2205,7 +2265,7 @@
                 if (VDBG) log("NetworkFactory connected");
                 // A network factory has connected.  Send it all current NetworkRequests.
                 for (NetworkRequestInfo nri : mNetworkRequests.values()) {
-                    if (!nri.isRequest()) continue;
+                    if (!nri.request.isRequest()) continue;
                     NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
                     ac.sendMessage(android.net.NetworkFactory.CMD_REQUEST_NETWORK,
                             (nai != null ? nai.getCurrentScore() : 0), 0, nri.request);
@@ -2240,7 +2300,7 @@
         NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo);
         if (nai != null) {
             if (DBG) {
-                log(nai.name() + " got DISCONNECTED, was satisfying " + nai.networkRequests.size());
+                log(nai.name() + " got DISCONNECTED, was satisfying " + nai.numNetworkRequests());
             }
             // A network agent has disconnected.
             // TODO - if we move the logic to the network agent (have them disconnect
@@ -2277,15 +2337,16 @@
                 mNetworkForNetId.remove(nai.network.netId);
             }
             // Remove all previously satisfied requests.
-            for (int i = 0; i < nai.networkRequests.size(); i++) {
-                NetworkRequest request = nai.networkRequests.valueAt(i);
+            for (int i = 0; i < nai.numNetworkRequests(); i++) {
+                NetworkRequest request = nai.requestAt(i);
                 NetworkAgentInfo currentNetwork = mNetworkForRequestId.get(request.requestId);
                 if (currentNetwork != null && currentNetwork.network.netId == nai.network.netId) {
                     mNetworkForRequestId.remove(request.requestId);
                     sendUpdatedScoreToFactories(request, 0);
                 }
             }
-            if (nai.networkRequests.get(mDefaultRequest.requestId) != null) {
+            nai.clearLingerState();
+            if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
                 removeDataActivityTracking(nai);
                 notifyLockdownVpn(nai);
                 requestNetworkTransitionWakelock(nai.name());
@@ -2346,7 +2407,7 @@
     private void handleRegisterNetworkRequest(NetworkRequestInfo nri) {
         mNetworkRequests.put(nri.request, nri);
         mNetworkRequestInfoLogs.log("REGISTER " + nri);
-        if (!nri.isRequest()) {
+        if (!nri.request.isRequest()) {
             for (NetworkAgentInfo network : mNetworkAgentInfos.values()) {
                 if (nri.request.networkCapabilities.hasSignalStrength() &&
                         network.satisfiesImmutableCapabilitiesOf(nri.request)) {
@@ -2355,7 +2416,7 @@
             }
         }
         rematchAllNetworksAndRequests(null, 0);
-        if (nri.isRequest() && mNetworkForRequestId.get(nri.request.requestId) == null) {
+        if (nri.request.isRequest() && mNetworkForRequestId.get(nri.request.requestId) == null) {
             sendUpdatedScoreToFactories(nri.request, 0);
         }
     }
@@ -2372,12 +2433,15 @@
     // This is whether it is satisfying any NetworkRequests or were it to become validated,
     // would it have a chance of satisfying any NetworkRequests.
     private boolean unneeded(NetworkAgentInfo nai) {
-        if (!nai.everConnected || nai.isVPN() || nai.lingering) return false;
+        if (!nai.everConnected || nai.isVPN() ||
+               nai.isLingering() || nai.numRequestNetworkRequests() > 0) {
+            return false;
+        }
         for (NetworkRequestInfo nri : mNetworkRequests.values()) {
             // If this Network is already the highest scoring Network for a request, or if
             // there is hope for it to become one if it validated, then it is needed.
-            if (nri.isRequest() && nai.satisfies(nri.request) &&
-                    (nai.networkRequests.get(nri.request.requestId) != null ||
+            if (nri.request.isRequest() && nai.satisfies(nri.request) &&
+                    (nai.isSatisfyingRequest(nri.request.requestId) ||
                     // Note that this catches two important cases:
                     // 1. Unvalidated cellular will not be reaped when unvalidated WiFi
                     //    is currently satisfying the request.  This is desirable when
@@ -2393,102 +2457,149 @@
         return true;
     }
 
-    private void handleReleaseNetworkRequest(NetworkRequest request, int callingUid) {
-        NetworkRequestInfo nri = mNetworkRequests.get(request);
+    private NetworkRequestInfo getNriForAppRequest(
+            NetworkRequest request, int callingUid, String requestedOperation) {
+        final NetworkRequestInfo nri = mNetworkRequests.get(request);
+
         if (nri != null) {
             if (Process.SYSTEM_UID != callingUid && nri.mUid != callingUid) {
-                if (DBG) log("Attempt to release unowned NetworkRequest " + request);
-                return;
+                log(String.format("UID %d attempted to %s for unowned request %s",
+                        callingUid, requestedOperation, nri));
+                return null;
             }
-            if (VDBG || (DBG && nri.isRequest())) log("releasing NetworkRequest " + request);
-            nri.unlinkDeathRecipient();
-            mNetworkRequests.remove(request);
-            synchronized (mUidToNetworkRequestCount) {
-                int requests = mUidToNetworkRequestCount.get(nri.mUid, 0);
-                if (requests < 1) {
-                    Slog.wtf(TAG, "BUG: too small request count " + requests + " for UID " +
-                            nri.mUid);
-                } else if (requests == 1) {
-                    mUidToNetworkRequestCount.removeAt(
-                            mUidToNetworkRequestCount.indexOfKey(nri.mUid));
-                } else {
-                    mUidToNetworkRequestCount.put(nri.mUid, requests - 1);
-                }
-            }
-            mNetworkRequestInfoLogs.log("RELEASE " + nri);
-            if (nri.isRequest()) {
-                // Find all networks that are satisfying this request and remove the request
-                // from their request lists.
-                // TODO - it's my understanding that for a request there is only a single
-                // network satisfying it, so this loop is wasteful
-                boolean wasKept = false;
-                for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
-                    if (nai.networkRequests.get(nri.request.requestId) != null) {
-                        nai.networkRequests.remove(nri.request.requestId);
-                        if (VDBG) {
-                            log(" Removing from current network " + nai.name() +
-                                    ", leaving " + nai.networkRequests.size() +
-                                    " requests.");
-                        }
-                        if (unneeded(nai)) {
-                            if (DBG) log("no live requests for " + nai.name() + "; disconnecting");
-                            teardownUnneededNetwork(nai);
-                        } else {
-                            // suspect there should only be one pass through here
-                            // but if any were kept do the check below
-                            wasKept |= true;
-                        }
-                    }
-                }
-
-                NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
-                if (nai != null) {
-                    mNetworkForRequestId.remove(nri.request.requestId);
-                }
-                // Maintain the illusion.  When this request arrived, we might have pretended
-                // that a network connected to serve it, even though the network was already
-                // connected.  Now that this request has gone away, we might have to pretend
-                // that the network disconnected.  LegacyTypeTracker will generate that
-                // phantom disconnect for this type.
-                if (nri.request.legacyType != TYPE_NONE && nai != null) {
-                    boolean doRemove = true;
-                    if (wasKept) {
-                        // check if any of the remaining requests for this network are for the
-                        // same legacy type - if so, don't remove the nai
-                        for (int i = 0; i < nai.networkRequests.size(); i++) {
-                            NetworkRequest otherRequest = nai.networkRequests.valueAt(i);
-                            if (otherRequest.legacyType == nri.request.legacyType &&
-                                    isRequest(otherRequest)) {
-                                if (DBG) log(" still have other legacy request - leaving");
-                                doRemove = false;
-                            }
-                        }
-                    }
-
-                    if (doRemove) {
-                        mLegacyTypeTracker.remove(nri.request.legacyType, nai, false);
-                    }
-                }
-
-                for (NetworkFactoryInfo nfi : mNetworkFactoryInfos.values()) {
-                    nfi.asyncChannel.sendMessage(android.net.NetworkFactory.CMD_CANCEL_REQUEST,
-                            nri.request);
-                }
-            } else {
-                // listens don't have a singular affectedNetwork.  Check all networks to see
-                // if this listen request applies and remove it.
-                for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
-                    nai.networkRequests.remove(nri.request.requestId);
-                    if (nri.request.networkCapabilities.hasSignalStrength() &&
-                            nai.satisfiesImmutableCapabilitiesOf(nri.request)) {
-                        updateSignalStrengthThresholds(nai, "RELEASE", nri.request);
-                    }
-                }
-            }
-            callCallbackForRequest(nri, null, ConnectivityManager.CALLBACK_RELEASED);
         }
+
+        return nri;
     }
 
+    private void handleRequestCallbackUpdate(NetworkRequest request, int callingUid,
+            String description, int callbackType) {
+        final NetworkRequestInfo nri = getNriForAppRequest(request, callingUid, description);
+        if (nri == null) return;
+
+        final NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
+        // The network that is satisfying this request may have changed since
+        // the application requested the update.
+        //
+        // - If the request is no longer satisfied, don't send any updates.
+        // - If the request is satisfied by a different network, it is the
+        //   caller's responsibility to check that the Network object in the
+        //   callback matches the network that was returned in the last
+        //   onAvailable() callback for this request.
+        if (nai == null) return;
+        callCallbackForRequest(nri, nai, callbackType, 0);
+    }
+
+    private void handleRequestLinkProperties(NetworkRequest request, int callingUid) {
+        handleRequestCallbackUpdate(request, callingUid,
+                "request LinkProperties", ConnectivityManager.CALLBACK_IP_CHANGED);
+    }
+
+    private void handleRequestNetworkCapabilities(NetworkRequest request, int callingUid) {
+        handleRequestCallbackUpdate(request, callingUid,
+                "request NetworkCapabilities", ConnectivityManager.CALLBACK_CAP_CHANGED);
+    }
+
+    private void handleReleaseNetworkRequest(NetworkRequest request, int callingUid) {
+        final NetworkRequestInfo nri = getNriForAppRequest(
+                request, callingUid, "release NetworkRequest");
+        if (nri == null) return;
+
+        if (VDBG || (DBG && nri.request.isRequest())) log("releasing " + request);
+        nri.unlinkDeathRecipient();
+        mNetworkRequests.remove(request);
+        synchronized (mUidToNetworkRequestCount) {
+            int requests = mUidToNetworkRequestCount.get(nri.mUid, 0);
+            if (requests < 1) {
+                Slog.wtf(TAG, "BUG: too small request count " + requests + " for UID " +
+                        nri.mUid);
+            } else if (requests == 1) {
+                mUidToNetworkRequestCount.removeAt(
+                        mUidToNetworkRequestCount.indexOfKey(nri.mUid));
+            } else {
+                mUidToNetworkRequestCount.put(nri.mUid, requests - 1);
+            }
+        }
+        mNetworkRequestInfoLogs.log("RELEASE " + nri);
+        if (nri.request.isRequest()) {
+            boolean wasKept = false;
+            NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
+            if (nai != null) {
+                nai.removeRequest(nri.request.requestId);
+                if (VDBG) {
+                    log(" Removing from current network " + nai.name() +
+                            ", leaving " + nai.numNetworkRequests() + " requests.");
+                }
+                // If there are still lingered requests on this network, don't tear it down,
+                // but resume lingering instead.
+                updateLingerState(nai, SystemClock.elapsedRealtime());
+                if (unneeded(nai)) {
+                    if (DBG) log("no live requests for " + nai.name() + "; disconnecting");
+                    teardownUnneededNetwork(nai);
+                } else {
+                    wasKept = true;
+                }
+                mNetworkForRequestId.remove(nri.request.requestId);
+            }
+
+            // TODO: remove this code once we know that the Slog.wtf is never hit.
+            //
+            // Find all networks that are satisfying this request and remove the request
+            // from their request lists.
+            // TODO - it's my understanding that for a request there is only a single
+            // network satisfying it, so this loop is wasteful
+            for (NetworkAgentInfo otherNai : mNetworkAgentInfos.values()) {
+                if (otherNai.isSatisfyingRequest(nri.request.requestId) && otherNai != nai) {
+                    Slog.wtf(TAG, "Request " + nri.request + " satisfied by " +
+                            otherNai.name() + ", but mNetworkAgentInfos says " +
+                            (nai != null ? nai.name() : "null"));
+                }
+            }
+
+            // Maintain the illusion.  When this request arrived, we might have pretended
+            // that a network connected to serve it, even though the network was already
+            // connected.  Now that this request has gone away, we might have to pretend
+            // that the network disconnected.  LegacyTypeTracker will generate that
+            // phantom disconnect for this type.
+            if (nri.request.legacyType != TYPE_NONE && nai != null) {
+                boolean doRemove = true;
+                if (wasKept) {
+                    // check if any of the remaining requests for this network are for the
+                    // same legacy type - if so, don't remove the nai
+                    for (int i = 0; i < nai.numNetworkRequests(); i++) {
+                        NetworkRequest otherRequest = nai.requestAt(i);
+                        if (otherRequest.legacyType == nri.request.legacyType &&
+                                otherRequest.isRequest()) {
+                            if (DBG) log(" still have other legacy request - leaving");
+                            doRemove = false;
+                        }
+                    }
+                }
+
+                if (doRemove) {
+                    mLegacyTypeTracker.remove(nri.request.legacyType, nai, false);
+                }
+            }
+
+            for (NetworkFactoryInfo nfi : mNetworkFactoryInfos.values()) {
+                nfi.asyncChannel.sendMessage(android.net.NetworkFactory.CMD_CANCEL_REQUEST,
+                        nri.request);
+            }
+        } else {
+            // listens don't have a singular affectedNetwork.  Check all networks to see
+            // if this listen request applies and remove it.
+            for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
+                nai.removeRequest(nri.request.requestId);
+                if (nri.request.networkCapabilities.hasSignalStrength() &&
+                        nai.satisfiesImmutableCapabilitiesOf(nri.request)) {
+                    updateSignalStrengthThresholds(nai, "RELEASE", nri.request);
+                }
+            }
+        }
+        callCallbackForRequest(nri, null, ConnectivityManager.CALLBACK_RELEASED, 0);
+    }
+
+    @Override
     public void setAcceptUnvalidated(Network network, boolean accept, boolean always) {
         enforceConnectivityInternalPermission();
         mHandler.sendMessage(mHandler.obtainMessage(EVENT_SET_ACCEPT_UNVALIDATED,
@@ -2562,6 +2673,7 @@
 
         PendingIntent pendingIntent = PendingIntent.getActivityAsUser(
                 mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT, null, UserHandle.CURRENT);
+
         setProvNotificationVisibleIntent(true, nai.network.netId, NotificationType.NO_INTERNET,
                 nai.networkInfo.getType(), nai.networkInfo.getExtraInfo(), pendingIntent, true);
     }
@@ -2647,6 +2759,12 @@
                     handleMobileDataAlwaysOn();
                     break;
                 }
+                case EVENT_REQUEST_LINKPROPERTIES:
+                    handleRequestLinkProperties((NetworkRequest) msg.obj, msg.arg1);
+                    break;
+                case EVENT_REQUEST_NETCAPABILITIES:
+                    handleRequestNetworkCapabilities((NetworkRequest) msg.obj, msg.arg1);
+                    break;
                 // Sent by KeepaliveTracker to process an app request on the state machine thread.
                 case NetworkAgent.CMD_START_PACKET_KEEPALIVE: {
                     mKeepaliveTracker.handleStartKeepalive(msg);
@@ -2671,6 +2789,7 @@
     }
 
     // javadoc from interface
+    @Override
     public int tether(String iface) {
         ConnectivityManager.enforceTetherChangePermission(mContext);
         if (isTetheringSupported()) {
@@ -2688,6 +2807,7 @@
     }
 
     // javadoc from interface
+    @Override
     public int untether(String iface) {
         ConnectivityManager.enforceTetherChangePermission(mContext);
 
@@ -2706,6 +2826,7 @@
     }
 
     // javadoc from interface
+    @Override
     public int getLastTetherError(String iface) {
         enforceTetherAccessPermission();
 
@@ -2717,6 +2838,7 @@
     }
 
     // TODO - proper iface API for selection by property, inspection, etc
+    @Override
     public String[] getTetherableUsbRegexs() {
         enforceTetherAccessPermission();
         if (isTetheringSupported()) {
@@ -2726,6 +2848,7 @@
         }
     }
 
+    @Override
     public String[] getTetherableWifiRegexs() {
         enforceTetherAccessPermission();
         if (isTetheringSupported()) {
@@ -2735,6 +2858,7 @@
         }
     }
 
+    @Override
     public String[] getTetherableBluetoothRegexs() {
         enforceTetherAccessPermission();
         if (isTetheringSupported()) {
@@ -2744,6 +2868,7 @@
         }
     }
 
+    @Override
     public int setUsbTethering(boolean enable) {
         ConnectivityManager.enforceTetherChangePermission(mContext);
         if (isTetheringSupported()) {
@@ -2755,21 +2880,25 @@
 
     // TODO - move iface listing, queries, etc to new module
     // javadoc from interface
+    @Override
     public String[] getTetherableIfaces() {
         enforceTetherAccessPermission();
         return mTethering.getTetherableIfaces();
     }
 
+    @Override
     public String[] getTetheredIfaces() {
         enforceTetherAccessPermission();
         return mTethering.getTetheredIfaces();
     }
 
+    @Override
     public String[] getTetheringErroredIfaces() {
         enforceTetherAccessPermission();
         return mTethering.getErroredIfaces();
     }
 
+    @Override
     public String[] getTetheredDhcpRanges() {
         enforceConnectivityInternalPermission();
         return mTethering.getTetheredDhcpRanges();
@@ -2828,12 +2957,14 @@
     }
 
     // 100 percent is full good, 0 is full bad.
+    @Override
     public void reportInetCondition(int networkType, int percentage) {
         NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
         if (nai == null) return;
         reportNetworkConnectivity(nai.network, percentage > 50);
     }
 
+    @Override
     public void reportNetworkConnectivity(Network network, boolean hasConnectivity) {
         enforceAccessPermission();
         enforceInternetPermission();
@@ -2878,6 +3009,7 @@
         }
     }
 
+    @Override
     public ProxyInfo getProxyForNetwork(Network network) {
         if (network == null) return getDefaultProxy();
         final ProxyInfo globalProxy = getGlobalProxy();
@@ -3793,31 +3925,12 @@
         }
     }
 
-    /**
-     * A NetworkRequest as registered by an application can be one of three
-     * types:
-     *
-     *     - "listen", for which the framework will issue callbacks about any
-     *       and all networks that match the specified NetworkCapabilities,
-     *
-     *     - "request", capable of causing a specific network to be created
-     *       first (e.g. a telephony DUN request), the framework will issue
-     *       callbacks about the single, highest scoring current network
-     *       (if any) that matches the specified NetworkCapabilities, or
-     *
-     *     - "track the default network", a hybrid of the two designed such
-     *       that the framework will issue callbacks for the single, highest
-     *       scoring current network (if any) that matches the capabilities of
-     *       the default Internet request (mDefaultRequest), but which cannot
-     *       cause the framework to either create or retain the existence of
-     *       any specific network.
-     *
-     */
-    private static enum NetworkRequestType {
-        LISTEN,
-        TRACK_DEFAULT,
-        REQUEST
-    };
+    private void ensureNetworkRequestHasType(NetworkRequest request) {
+        if (request.type == NetworkRequest.Type.NONE) {
+            throw new IllegalArgumentException(
+                    "All NetworkRequests in ConnectivityService must have a type");
+        }
+    }
 
     /**
      * Tracks info about the requester.
@@ -3831,27 +3944,26 @@
         final int mPid;
         final int mUid;
         final Messenger messenger;
-        private final NetworkRequestType mType;
 
-        NetworkRequestInfo(NetworkRequest r, PendingIntent pi, NetworkRequestType type) {
+        NetworkRequestInfo(NetworkRequest r, PendingIntent pi) {
             request = r;
+            ensureNetworkRequestHasType(request);
             mPendingIntent = pi;
             messenger = null;
             mBinder = null;
             mPid = getCallingPid();
             mUid = getCallingUid();
-            mType = type;
             enforceRequestCountLimit();
         }
 
-        NetworkRequestInfo(Messenger m, NetworkRequest r, IBinder binder, NetworkRequestType type) {
+        NetworkRequestInfo(Messenger m, NetworkRequest r, IBinder binder) {
             super();
             messenger = m;
             request = r;
+            ensureNetworkRequestHasType(request);
             mBinder = binder;
             mPid = getCallingPid();
             mUid = getCallingUid();
-            mType = type;
             mPendingIntent = null;
             enforceRequestCountLimit();
 
@@ -3872,16 +3984,6 @@
             }
         }
 
-        private String typeString() {
-            switch (mType) {
-                case LISTEN: return "Listen";
-                case REQUEST: return "Request";
-                case TRACK_DEFAULT: return "Track default";
-                default:
-                    return "unknown type";
-            }
-        }
-
         void unlinkDeathRecipient() {
             if (mBinder != null) {
                 mBinder.unlinkToDeath(this, 0);
@@ -3894,29 +3996,8 @@
             releaseNetworkRequest(request);
         }
 
-        /**
-         * Returns true iff. the contained NetworkRequest is one that:
-         *
-         *     - should be associated with at most one satisfying network
-         *       at a time;
-         *
-         *     - should cause a network to be kept up if it is the only network
-         *       which can satisfy the NetworkReqeust.
-         *
-         * For full detail of how isRequest() is used for pairing Networks with
-         * NetworkRequests read rematchNetworkAndRequests().
-         *
-         * TODO: Rename to something more properly descriptive.
-         */
-        public boolean isRequest() {
-            return (mType == NetworkRequestType.TRACK_DEFAULT) ||
-                   (mType == NetworkRequestType.REQUEST);
-        }
-
         public String toString() {
-            return typeString() +
-                    " from uid/pid:" + mUid + "/" + mPid +
-                    " for " + request +
+            return "uid/pid:" + mUid + "/" + mPid + " " + request +
                     (mPendingIntent == null ? "" : " to trigger " + mPendingIntent);
         }
     }
@@ -3966,20 +4047,23 @@
     @Override
     public NetworkRequest requestNetwork(NetworkCapabilities networkCapabilities,
             Messenger messenger, int timeoutMs, IBinder binder, int legacyType) {
-        final NetworkRequestType type = (networkCapabilities == null)
-                ? NetworkRequestType.TRACK_DEFAULT
-                : NetworkRequestType.REQUEST;
+        final NetworkRequest.Type type = (networkCapabilities == null)
+                ? NetworkRequest.Type.TRACK_DEFAULT
+                : NetworkRequest.Type.REQUEST;
         // If the requested networkCapabilities is null, take them instead from
         // the default network request. This allows callers to keep track of
         // the system default network.
-        if (type == NetworkRequestType.TRACK_DEFAULT) {
+        if (type == NetworkRequest.Type.TRACK_DEFAULT) {
             networkCapabilities = new NetworkCapabilities(mDefaultRequest.networkCapabilities);
             enforceAccessPermission();
         } else {
             networkCapabilities = new NetworkCapabilities(networkCapabilities);
             enforceNetworkRequestPermissions(networkCapabilities);
+            // TODO: this is incorrect. We mark the request as metered or not depending on the state
+            // of the app when the request is filed, but we never change the request if the app
+            // changes network state. http://b/29964605
+            enforceMeteredApnPolicy(networkCapabilities);
         }
-        enforceMeteredApnPolicy(networkCapabilities);
         ensureRequestableCapabilities(networkCapabilities);
 
         if (timeoutMs < 0 || timeoutMs > ConnectivityManager.MAX_NETWORK_REQUEST_TIMEOUT_MS) {
@@ -3993,8 +4077,8 @@
         }
 
         NetworkRequest networkRequest = new NetworkRequest(networkCapabilities, legacyType,
-                nextNetworkRequestId());
-        NetworkRequestInfo nri = new NetworkRequestInfo(messenger, networkRequest, binder, type);
+                nextNetworkRequestId(), type);
+        NetworkRequestInfo nri = new NetworkRequestInfo(messenger, networkRequest, binder);
         if (DBG) log("requestNetwork for " + nri);
 
         mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_REQUEST, nri));
@@ -4064,9 +4148,8 @@
         ensureRequestableCapabilities(networkCapabilities);
 
         NetworkRequest networkRequest = new NetworkRequest(networkCapabilities, TYPE_NONE,
-                nextNetworkRequestId());
-        NetworkRequestInfo nri = new NetworkRequestInfo(networkRequest, operation,
-                NetworkRequestType.REQUEST);
+                nextNetworkRequestId(), NetworkRequest.Type.REQUEST);
+        NetworkRequestInfo nri = new NetworkRequestInfo(networkRequest, operation);
         if (DBG) log("pendingRequest for " + nri);
         mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_REQUEST_WITH_INTENT,
                 nri));
@@ -4116,9 +4199,9 @@
         }
 
         NetworkRequest networkRequest = new NetworkRequest(
-                new NetworkCapabilities(networkCapabilities), TYPE_NONE, nextNetworkRequestId());
-        NetworkRequestInfo nri = new NetworkRequestInfo(messenger, networkRequest, binder,
-                NetworkRequestType.LISTEN);
+                new NetworkCapabilities(networkCapabilities), TYPE_NONE, nextNetworkRequestId(),
+                NetworkRequest.Type.LISTEN);
+        NetworkRequestInfo nri = new NetworkRequestInfo(messenger, networkRequest, binder);
         if (VDBG) log("listenForNetwork for " + nri);
 
         mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_LISTENER, nri));
@@ -4134,18 +4217,35 @@
         }
 
         NetworkRequest networkRequest = new NetworkRequest(
-                new NetworkCapabilities(networkCapabilities), TYPE_NONE, nextNetworkRequestId());
-        NetworkRequestInfo nri = new NetworkRequestInfo(networkRequest, operation,
-                NetworkRequestType.LISTEN);
+                new NetworkCapabilities(networkCapabilities), TYPE_NONE, nextNetworkRequestId(),
+                NetworkRequest.Type.LISTEN);
+        NetworkRequestInfo nri = new NetworkRequestInfo(networkRequest, operation);
         if (VDBG) log("pendingListenForNetwork for " + nri);
 
         mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_LISTENER, nri));
     }
 
     @Override
+    public void requestLinkProperties(NetworkRequest networkRequest) {
+        ensureNetworkRequestHasType(networkRequest);
+        if (networkRequest.type == NetworkRequest.Type.LISTEN) return;
+        mHandler.sendMessage(mHandler.obtainMessage(
+                EVENT_REQUEST_LINKPROPERTIES, getCallingUid(), 0, networkRequest));
+    }
+
+    @Override
+    public void requestNetworkCapabilities(NetworkRequest networkRequest) {
+        ensureNetworkRequestHasType(networkRequest);
+        if (networkRequest.type == NetworkRequest.Type.LISTEN) return;
+        mHandler.sendMessage(mHandler.obtainMessage(
+                EVENT_REQUEST_NETCAPABILITIES, getCallingUid(), 0, networkRequest));
+    }
+
+    @Override
     public void releaseNetworkRequest(NetworkRequest networkRequest) {
-        mHandler.sendMessage(mHandler.obtainMessage(EVENT_RELEASE_NETWORK_REQUEST, getCallingUid(),
-                0, networkRequest));
+        ensureNetworkRequestHasType(networkRequest);
+        mHandler.sendMessage(mHandler.obtainMessage(
+                EVENT_RELEASE_NETWORK_REQUEST, getCallingUid(), 0, networkRequest));
     }
 
     @Override
@@ -4452,10 +4552,10 @@
     }
 
     private void sendUpdatedScoreToFactories(NetworkAgentInfo nai) {
-        for (int i = 0; i < nai.networkRequests.size(); i++) {
-            NetworkRequest nr = nai.networkRequests.valueAt(i);
+        for (int i = 0; i < nai.numNetworkRequests(); i++) {
+            NetworkRequest nr = nai.requestAt(i);
             // Don't send listening requests to factories. b/17393458
-            if (!isRequest(nr)) continue;
+            if (!nr.isRequest()) continue;
             sendUpdatedScoreToFactories(nr, nai.getCurrentScore());
         }
     }
@@ -4504,7 +4604,7 @@
     }
 
     private void callCallbackForRequest(NetworkRequestInfo nri,
-            NetworkAgentInfo networkAgent, int notificationType) {
+            NetworkAgentInfo networkAgent, int notificationType, int arg1) {
         if (nri.messenger == null) return;  // Default request has no msgr
         Bundle bundle = new Bundle();
         bundle.putParcelable(NetworkRequest.class.getSimpleName(),
@@ -4516,7 +4616,7 @@
         }
         switch (notificationType) {
             case ConnectivityManager.CALLBACK_LOSING: {
-                msg.arg1 = 30 * 1000; // TODO - read this from NetworkMonitor
+                msg.arg1 = arg1;
                 break;
             }
             case ConnectivityManager.CALLBACK_CAP_CHANGED: {
@@ -4545,12 +4645,14 @@
     }
 
     private void teardownUnneededNetwork(NetworkAgentInfo nai) {
-        for (int i = 0; i < nai.networkRequests.size(); i++) {
-            NetworkRequest nr = nai.networkRequests.valueAt(i);
-            // Ignore listening requests.
-            if (!isRequest(nr)) continue;
-            loge("Dead network still had at least " + nr);
-            break;
+        if (nai.numRequestNetworkRequests() != 0) {
+            for (int i = 0; i < nai.numNetworkRequests(); i++) {
+                NetworkRequest nr = nai.requestAt(i);
+                // Ignore listening requests.
+                if (!nr.isRequest()) continue;
+                loge("Dead network still had at least " + nr);
+                break;
+            }
         }
         nai.asyncChannel.disconnect();
     }
@@ -4561,7 +4663,14 @@
             return;
         }
         if (DBG) log("handleLingerComplete for " + oldNetwork.name());
-        teardownUnneededNetwork(oldNetwork);
+
+        // If we get here it means that the last linger timeout for this network expired. So there
+        // must be no other active linger timers, and we must stop lingering.
+        oldNetwork.clearLingerState();
+
+        if (unneeded(oldNetwork)) {
+            teardownUnneededNetwork(oldNetwork);
+        }
     }
 
     private void makeDefault(NetworkAgentInfo newNetwork) {
@@ -4606,7 +4715,7 @@
     //               performed to tear down unvalidated networks that have no chance (i.e. even if
     //               validated) of becoming the highest scoring network.
     private void rematchNetworkAndRequests(NetworkAgentInfo newNetwork,
-            ReapUnvalidatedNetworks reapUnvalidatedNetworks) {
+            ReapUnvalidatedNetworks reapUnvalidatedNetworks, long now) {
         if (!newNetwork.everConnected) return;
         boolean keep = newNetwork.isVPN();
         boolean isNewDefault = false;
@@ -4632,7 +4741,7 @@
             // check if it satisfies the NetworkCapabilities
             if (VDBG) log("  checking if request is satisfied: " + nri.request);
             if (satisfies) {
-                if (!nri.isRequest()) {
+                if (!nri.request.isRequest()) {
                     // This is not a request, it's a callback listener.
                     // Add it to newNetwork regardless of score.
                     if (newNetwork.addRequest(nri.request)) addedRequests.add(nri);
@@ -4651,13 +4760,13 @@
                     if (VDBG) log("rematch for " + newNetwork.name());
                     if (currentNetwork != null) {
                         if (VDBG) log("   accepting network in place of " + currentNetwork.name());
-                        currentNetwork.networkRequests.remove(nri.request.requestId);
-                        currentNetwork.networkLingered.add(nri.request);
+                        currentNetwork.removeRequest(nri.request.requestId);
+                        currentNetwork.lingerRequest(nri.request, now, mLingerDelayMs);
                         affectedNetworks.add(currentNetwork);
                     } else {
                         if (VDBG) log("   accepting network in place of null");
                     }
-                    unlinger(newNetwork);
+                    newNetwork.unlingerRequest(nri.request);
                     mNetworkForRequestId.put(nri.request.requestId, newNetwork);
                     if (!newNetwork.addRequest(nri.request)) {
                         Slog.wtf(TAG, "BUG: " + newNetwork.name() + " already has " + nri.request);
@@ -4675,7 +4784,7 @@
                         oldDefaultNetwork = currentNetwork;
                     }
                 }
-            } else if (newNetwork.networkRequests.get(nri.request.requestId) != null) {
+            } else if (newNetwork.isSatisfyingRequest(nri.request.requestId)) {
                 // If "newNetwork" is listed as satisfying "nri" but no longer satisfies "nri",
                 // mark it as no longer satisfying "nri".  Because networks are processed by
                 // rematchAllNetworkAndRequests() in descending score order, "currentNetwork" will
@@ -4687,12 +4796,12 @@
                     log("Network " + newNetwork.name() + " stopped satisfying" +
                             " request " + nri.request.requestId);
                 }
-                newNetwork.networkRequests.remove(nri.request.requestId);
+                newNetwork.removeRequest(nri.request.requestId);
                 if (currentNetwork == newNetwork) {
                     mNetworkForRequestId.remove(nri.request.requestId);
                     sendUpdatedScoreToFactories(nri.request, 0);
                 } else {
-                    if (nri.isRequest()) {
+                    if (nri.request.isRequest()) {
                         Slog.wtf(TAG, "BUG: Removing request " + nri.request.requestId + " from " +
                                 newNetwork.name() +
                                 " without updating mNetworkForRequestId or factories!");
@@ -4705,23 +4814,7 @@
                 // a) be requested and b) change is NET_CAPABILITY_TRUSTED,
                 // so this code is only incorrect for a network that loses
                 // the TRUSTED capability, which is a rare case.
-                callCallbackForRequest(nri, newNetwork, ConnectivityManager.CALLBACK_LOST);
-            }
-        }
-        // Linger any networks that are no longer needed.
-        for (NetworkAgentInfo nai : affectedNetworks) {
-            if (nai.lingering) {
-                // Already lingered.  Nothing to do.  This can only happen if "nai" is in
-                // "affectedNetworks" twice.  The reasoning being that to get added to
-                // "affectedNetworks", "nai" must have been satisfying a NetworkRequest
-                // (i.e. not lingered) so it could have only been lingered by this loop.
-                // unneeded(nai) will be false and we'll call unlinger() below which would
-                // be bad, so handle it here.
-            } else if (unneeded(nai)) {
-                linger(nai);
-            } else {
-                // Clear nai.networkLingered we might have added above.
-                unlinger(nai);
+                callCallbackForRequest(nri, newNetwork, ConnectivityManager.CALLBACK_LOST, 0);
             }
         }
         if (isNewDefault) {
@@ -4746,6 +4839,15 @@
         // before LegacyTypeTracker sends legacy broadcasts
         for (NetworkRequestInfo nri : addedRequests) notifyNetworkCallback(newNetwork, nri);
 
+        // Linger any networks that are no longer needed. This should be done after sending the
+        // available callback for newNetwork.
+        for (NetworkAgentInfo nai : affectedNetworks) {
+            updateLingerState(nai, now);
+        }
+        // Possibly unlinger newNetwork. Unlingering a network does not send any callbacks so it
+        // does not need to be done in any particular order.
+        updateLingerState(newNetwork, now);
+
         if (isNewDefault) {
             // Maintain the illusion: since the legacy API only
             // understands one network at a time, we must pretend
@@ -4792,9 +4894,9 @@
             // (notification callbacks) and then uses the old api (getNetworkInfo(type))
             // they may get old info.  Reverse this after the old startUsing api is removed.
             // This is on top of the multiple intent sequencing referenced in the todo above.
-            for (int i = 0; i < newNetwork.networkRequests.size(); i++) {
-                NetworkRequest nr = newNetwork.networkRequests.valueAt(i);
-                if (nr.legacyType != TYPE_NONE && isRequest(nr)) {
+            for (int i = 0; i < newNetwork.numNetworkRequests(); i++) {
+                NetworkRequest nr = newNetwork.requestAt(i);
+                if (nr.legacyType != TYPE_NONE && nr.isRequest()) {
                     // legacy type tracker filters out repeat adds
                     mLegacyTypeTracker.add(nr.legacyType, newNetwork);
                 }
@@ -4811,8 +4913,19 @@
         if (reapUnvalidatedNetworks == ReapUnvalidatedNetworks.REAP) {
             for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
                 if (unneeded(nai)) {
-                    if (DBG) log("Reaping " + nai.name());
-                    teardownUnneededNetwork(nai);
+                    if (nai.getLingerExpiry() > 0) {
+                        // This network has active linger timers and no requests, but is not
+                        // lingering. Linger it.
+                        //
+                        // One way (the only way?) this can happen if this network is unvalidated
+                        // and became unneeded due to another network improving its score to the
+                        // point where this network will no longer be able to satisfy any requests
+                        // even if it validates.
+                        updateLingerState(nai, now);
+                    } else {
+                        if (DBG) log("Reaping " + nai.name());
+                        teardownUnneededNetwork(nai);
+                    }
                 }
             }
         }
@@ -4839,8 +4952,9 @@
         // Optimization: Only reprocess "changed" if its score improved.  This is safe because it
         // can only add more NetworkRequests satisfied by "changed", and this is exactly what
         // rematchNetworkAndRequests() handles.
+        final long now = SystemClock.elapsedRealtime();
         if (changed != null && oldScore < changed.getCurrentScore()) {
-            rematchNetworkAndRequests(changed, ReapUnvalidatedNetworks.REAP);
+            rematchNetworkAndRequests(changed, ReapUnvalidatedNetworks.REAP, now);
         } else {
             final NetworkAgentInfo[] nais = mNetworkAgentInfos.values().toArray(
                     new NetworkAgentInfo[mNetworkAgentInfos.size()]);
@@ -4854,7 +4968,8 @@
                         // is complete could incorrectly teardown a network that hasn't yet been
                         // rematched.
                         (nai != nais[nais.length-1]) ? ReapUnvalidatedNetworks.DONT_REAP
-                                : ReapUnvalidatedNetworks.REAP);
+                                : ReapUnvalidatedNetworks.REAP,
+                        now);
             }
         }
     }
@@ -4964,7 +5079,8 @@
             updateSignalStrengthThresholds(networkAgent, "CONNECT", null);
 
             // Consider network even though it is not yet validated.
-            rematchNetworkAndRequests(networkAgent, ReapUnvalidatedNetworks.REAP);
+            final long now = SystemClock.elapsedRealtime();
+            rematchNetworkAndRequests(networkAgent, ReapUnvalidatedNetworks.REAP, now);
 
             // This has to happen after matching the requests, because callbacks are just requests.
             notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_PRECHECK);
@@ -5012,14 +5128,8 @@
     // notify only this one new request of the current state
     protected void notifyNetworkCallback(NetworkAgentInfo nai, NetworkRequestInfo nri) {
         int notifyType = ConnectivityManager.CALLBACK_AVAILABLE;
-        // TODO - read state from monitor to decide what to send.
-//        if (nai.networkMonitor.isLingering()) {
-//            notifyType = NetworkCallbacks.LOSING;
-//        } else if (nai.networkMonitor.isEvaluating()) {
-//            notifyType = NetworkCallbacks.callCallbackForRequest(request, nai, notifyType);
-//        }
         if (nri.mPendingIntent == null) {
-            callCallbackForRequest(nri, nai, notifyType);
+            callCallbackForRequest(nri, nai, notifyType, 0);
         } else {
             sendPendingIntentForRequest(nri, nai, notifyType);
         }
@@ -5053,7 +5163,7 @@
                 intent.putExtra(ConnectivityManager.EXTRA_EXTRA_INFO, info.getExtraInfo());
             }
             NetworkAgentInfo newDefaultAgent = null;
-            if (nai.networkRequests.get(mDefaultRequest.requestId) != null) {
+            if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
                 newDefaultAgent = getDefaultNetwork();
                 if (newDefaultAgent != null) {
                     intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO,
@@ -5071,20 +5181,24 @@
         }
     }
 
-    protected void notifyNetworkCallbacks(NetworkAgentInfo networkAgent, int notifyType) {
+    protected void notifyNetworkCallbacks(NetworkAgentInfo networkAgent, int notifyType, int arg1) {
         if (VDBG) log("notifyType " + notifyTypeToName(notifyType) + " for " + networkAgent.name());
-        for (int i = 0; i < networkAgent.networkRequests.size(); i++) {
-            NetworkRequest nr = networkAgent.networkRequests.valueAt(i);
+        for (int i = 0; i < networkAgent.numNetworkRequests(); i++) {
+            NetworkRequest nr = networkAgent.requestAt(i);
             NetworkRequestInfo nri = mNetworkRequests.get(nr);
             if (VDBG) log(" sending notification for " + nr);
             if (nri.mPendingIntent == null) {
-                callCallbackForRequest(nri, networkAgent, notifyType);
+                callCallbackForRequest(nri, networkAgent, notifyType, arg1);
             } else {
                 sendPendingIntentForRequest(nri, networkAgent, notifyType);
             }
         }
     }
 
+    protected void notifyNetworkCallbacks(NetworkAgentInfo networkAgent, int notifyType) {
+        notifyNetworkCallbacks(networkAgent, notifyType, 0);
+    }
+
     private String notifyTypeToName(int notifyType) {
         switch (notifyType) {
             case ConnectivityManager.CALLBACK_PRECHECK:    return "PRECHECK";
@@ -5215,7 +5329,12 @@
         return new NetworkMonitor(context, handler, nai, defaultRequest);
     }
 
-    private static void logDefaultNetworkEvent(NetworkAgentInfo newNai, NetworkAgentInfo prevNai) {
+    @VisibleForTesting
+    public WakeupMessage makeWakeupMessage(Context c, Handler h, String s, int cmd, Object obj) {
+        return new WakeupMessage(c, h, s, cmd, 0, 0, obj);
+    }
+
+    private void logDefaultNetworkEvent(NetworkAgentInfo newNai, NetworkAgentInfo prevNai) {
         int newNetid = NETID_UNSET;
         int prevNetid = NETID_UNSET;
         int[] transports = new int[0];
@@ -5233,6 +5352,10 @@
             hadIPv6 = lp.hasGlobalIPv6Address() && lp.hasIPv6DefaultRoute();
         }
 
-        DefaultNetworkEvent.logEvent(newNetid, transports, prevNetid, hadIPv4, hadIPv6);
+        mMetricsLog.log(new DefaultNetworkEvent(newNetid, transports, prevNetid, hadIPv4, hadIPv6));
+    }
+
+    private void logNetworkEvent(NetworkAgentInfo nai, int evtype) {
+        mMetricsLog.log(new NetworkEvent(nai.network.netId, evtype));
     }
 }
diff --git a/services/core/java/com/android/server/InputContentUriTokenHandler.java b/services/core/java/com/android/server/InputContentUriTokenHandler.java
new file mode 100644
index 0000000..3f4972b
--- /dev/null
+++ b/services/core/java/com/android/server/InputContentUriTokenHandler.java
@@ -0,0 +1,121 @@
+/*
+** Copyright 2016, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package com.android.server;
+
+import android.annotation.NonNull;
+import android.annotation.UserIdInt;
+import android.app.ActivityManagerNative;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.RemoteException;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.inputmethod.IInputContentUriToken;
+
+final class InputContentUriTokenHandler extends IInputContentUriToken.Stub {
+
+    @NonNull
+    private final Uri mUri;
+    private final int mSourceUid;
+    @NonNull
+    private final String mTargetPackage;
+    @UserIdInt
+    private final int mSourceUserId;
+    @UserIdInt
+    private final int mTargetUserId;
+
+    private final Object mLock = new Object();
+
+    @GuardedBy("mLock")
+    private IBinder mPermissionOwnerToken = null;
+
+    InputContentUriTokenHandler(@NonNull Uri contentUri, int sourceUid,
+            @NonNull String targetPackage, @UserIdInt int sourceUserId,
+            @UserIdInt int targetUserId) {
+        mUri = contentUri;
+        mSourceUid = sourceUid;
+        mTargetPackage = targetPackage;
+        mSourceUserId = sourceUserId;
+        mTargetUserId = targetUserId;
+    }
+
+    @Override
+    public void take() {
+        synchronized (mLock) {
+            if (mPermissionOwnerToken != null) {
+                // Permission is already granted.
+                return;
+            }
+
+            try {
+                mPermissionOwnerToken = ActivityManagerNative.getDefault()
+                        .newUriPermissionOwner("InputContentUriTokenHandler");
+            } catch (RemoteException e) {
+                e.rethrowFromSystemServer();
+            }
+
+            doTakeLocked(mPermissionOwnerToken);
+        }
+    }
+
+    private void doTakeLocked(@NonNull IBinder permissionOwner) {
+        long origId = Binder.clearCallingIdentity();
+        try {
+            try {
+                ActivityManagerNative.getDefault().grantUriPermissionFromOwner(
+                        permissionOwner, mSourceUid, mTargetPackage, mUri,
+                        Intent.FLAG_GRANT_READ_URI_PERMISSION, mSourceUserId, mTargetUserId);
+            } catch (RemoteException e) {
+                e.rethrowFromSystemServer();
+            }
+        } finally {
+            Binder.restoreCallingIdentity(origId);
+        }
+    }
+
+    @Override
+    public void release() {
+        synchronized (mLock) {
+            if (mPermissionOwnerToken == null) {
+                return;
+            }
+            try {
+                ActivityManagerNative.getDefault().revokeUriPermissionFromOwner(
+                        mPermissionOwnerToken, mUri,
+                        Intent.FLAG_GRANT_READ_URI_PERMISSION, mSourceUserId);
+            } catch (RemoteException e) {
+                e.rethrowFromSystemServer();
+            } finally {
+                mPermissionOwnerToken = null;
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void finalize() throws Throwable {
+        try {
+            release();
+        } finally {
+            super.finalize();
+        }
+    }
+}
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 5d8fe7c..71ac544 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -18,6 +18,7 @@
 import static java.lang.annotation.RetentionPolicy.SOURCE;
 
 import com.android.internal.content.PackageMonitor;
+import com.android.internal.inputmethod.IInputContentUriToken;
 import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController;
 import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem;
 import com.android.internal.inputmethod.InputMethodUtils;
@@ -137,6 +138,7 @@
 import java.io.PrintWriter;
 import java.lang.annotation.Retention;
 import java.nio.charset.StandardCharsets;
+import java.security.InvalidParameterException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -175,6 +177,8 @@
 
     static final int MSG_HARD_KEYBOARD_SWITCH_CHANGED = 4000;
 
+    static final int MSG_SYSTEM_UNLOCK_USER = 5000;
+
     static final long TIME_TO_RECONNECT = 3 * 1000;
 
     static final int SECURE_SUGGESTION_SPANS_MAX_SIZE = 20;
@@ -798,14 +802,14 @@
 
         @Override
         public void onSwitchUser(@UserIdInt int userHandle) {
-            // Called on the system server's main looper thread.
+            // Called on ActivityManager thread.
             // TODO: Dispatch this to a worker thread as needed.
             mService.onSwitchUser(userHandle);
         }
 
         @Override
         public void onBootPhase(int phase) {
-            // Called on the system server's main looper thread.
+            // Called on ActivityManager thread.
             // TODO: Dispatch this to a worker thread as needed.
             if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) {
                 StatusBarManagerService statusBarService = (StatusBarManagerService) ServiceManager
@@ -815,10 +819,10 @@
         }
 
         @Override
-        public void onUnlockUser(@UserIdInt int userHandle) {
-            // Called on the system server's main looper thread.
-            // TODO: Dispatch this to a worker thread as needed.
-            mService.onUnlockUser(userHandle);
+        public void onUnlockUser(final @UserIdInt int userHandle) {
+            // Called on ActivityManager thread.
+            mService.mHandler.sendMessage(mService.mHandler.obtainMessage(MSG_SYSTEM_UNLOCK_USER,
+                    userHandle));
         }
     }
 
@@ -2968,6 +2972,10 @@
             case MSG_HARD_KEYBOARD_SWITCH_CHANGED:
                 mHardKeyboardListener.handleHardKeyboardStatusChange(msg.arg1 == 1);
                 return true;
+            case MSG_SYSTEM_UNLOCK_USER:
+                final int userId = msg.arg1;
+                onUnlockUser(userId);
+                return true;
         }
         return false;
     }
@@ -3911,6 +3919,52 @@
     }
 
     @Override
+    public IInputContentUriToken createInputContentUriToken(@Nullable IBinder token,
+            @Nullable Uri contentUri, @Nullable String packageName) {
+        if (!calledFromValidUser()) {
+            return null;
+        }
+
+        if (token == null) {
+            throw new NullPointerException("token");
+        }
+        if (packageName == null) {
+            throw new NullPointerException("packageName");
+        }
+        if (contentUri == null) {
+            throw new NullPointerException("contentUri");
+        }
+        final String contentUriScheme = contentUri.getScheme();
+        if (!"content".equals(contentUriScheme)) {
+            throw new InvalidParameterException("contentUri must have content scheme");
+        }
+
+        synchronized (mMethodMap) {
+            final int uid = Binder.getCallingUid();
+            if (mCurMethodId == null) {
+                return null;
+            }
+            if (mCurToken != token) {
+                Slog.e(TAG, "Ignoring createInputContentUriToken mCurToken=" + mCurToken
+                        + " token=" + token);
+                return null;
+            }
+            // We cannot simply distinguish a bad IME that reports an arbitrary package name from
+            // an unfortunate IME whose internal state is already obsolete due to the asynchronous
+            // nature of our system.  Let's compare it with our internal record.
+            if (!TextUtils.equals(mCurAttribute.packageName, packageName)) {
+                Slog.e(TAG, "Ignoring createInputContentUriToken mCurAttribute.packageName="
+                    + mCurAttribute.packageName + " packageName=" + packageName);
+                return null;
+            }
+            final int imeUserId = UserHandle.getUserId(uid);
+            final int appUserId = UserHandle.getUserId(mCurClient.uid);
+            return new InputContentUriTokenHandler(contentUri, uid, packageName, imeUserId,
+                    appUserId);
+        }
+    }
+
+    @Override
     protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
                 != PackageManager.PERMISSION_GRANTED) {
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index d64fe32..e28fa73 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -69,6 +69,7 @@
 import android.util.Slog;
 
 import com.android.internal.util.ArrayUtils;
+import com.android.internal.widget.ICheckCredentialProgressCallback;
 import com.android.internal.widget.ILockSettings;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.internal.widget.VerifyCredentialResponse;
@@ -300,7 +301,8 @@
         for (int i = 0; i < users.size(); i++) {
             UserInfo user = users.get(i);
             UserHandle userHandle = user.getUserHandle();
-            if (!mUserManager.isUserUnlockingOrUnlocked(userHandle)) {
+            final boolean isSecure = mStorage.hasPassword(user.id) || mStorage.hasPattern(user.id);
+            if (isSecure && !mUserManager.isUserUnlockingOrUnlocked(userHandle)) {
                 if (!user.isManagedProfile()) {
                     showEncryptionNotification(userHandle);
                 } else {
@@ -347,7 +349,7 @@
         CharSequence detail = r.getText(
                 com.android.internal.R.string.user_encrypted_detail);
 
-        PendingIntent intent = PendingIntent.getBroadcast(mContext, 0, ACTION_NULL,
+        PendingIntent intent = PendingIntent.getActivity(mContext, 0, ACTION_NULL,
                 PendingIntent.FLAG_UPDATE_CURRENT);
 
         showEncryptionNotification(user, title, message, detail, intent);
@@ -407,7 +409,9 @@
         List<UserInfo> profiles = mUserManager.getProfiles(userId);
         for (int i = 0; i < profiles.size(); i++) {
             UserInfo profile = profiles.get(i);
-            if (profile.isManagedProfile()) {
+            final boolean isSecure =
+                    mStorage.hasPassword(profile.id) || mStorage.hasPattern(profile.id);
+            if (isSecure && profile.isManagedProfile()) {
                 UserHandle userHandle = profile.getUserHandle();
                 if (!mUserManager.isUserUnlockingOrUnlocked(userHandle) &&
                         !mUserManager.isQuietModeEnabled(userHandle)) {
@@ -757,7 +761,7 @@
     private void unlockChildProfile(int profileHandle) throws RemoteException {
         try {
             doVerifyPassword(getDecryptedPasswordForTiedProfile(profileHandle), false,
-                    0 /* no challenge */, profileHandle);
+                    0 /* no challenge */, profileHandle, null /* progressCallback */);
         } catch (UnrecoverableKeyException | InvalidKeyException | KeyStoreException
                 | NoSuchAlgorithmException | NoSuchPaddingException
                 | InvalidAlgorithmParameterException | IllegalBlockSizeException
@@ -944,7 +948,7 @@
             CredentialHash willStore
                 = new CredentialHash(enrolledHandle, CredentialHash.VERSION_GATEKEEPER);
             setUserKeyProtection(userId, pattern,
-                doVerifyPattern(pattern, willStore, true, 0, userId));
+                doVerifyPattern(pattern, willStore, true, 0, userId, null /* progressCallback */));
             mStorage.writePatternHash(enrolledHandle, userId);
             fixateNewestUserKeyAuth(userId);
             onUserLockChanged(userId);
@@ -1004,7 +1008,8 @@
             CredentialHash willStore
                 = new CredentialHash(enrolledHandle, CredentialHash.VERSION_GATEKEEPER);
             setUserKeyProtection(userId, password,
-                doVerifyPassword(password, willStore, true, 0, userId));
+                doVerifyPassword(password, willStore, true, 0, userId,
+                        null /* progressCallback */));
             mStorage.writePasswordHash(enrolledHandle, userId);
             fixateNewestUserKeyAuth(userId);
             onUserLockChanged(userId);
@@ -1202,25 +1207,29 @@
     }
 
     @Override
-    public VerifyCredentialResponse checkPattern(String pattern, int userId) throws RemoteException {
-        return doVerifyPattern(pattern, false, 0, userId);
+    public VerifyCredentialResponse checkPattern(String pattern, int userId,
+            ICheckCredentialProgressCallback progressCallback) throws RemoteException {
+        return doVerifyPattern(pattern, false, 0, userId, progressCallback);
     }
 
     @Override
     public VerifyCredentialResponse verifyPattern(String pattern, long challenge, int userId)
             throws RemoteException {
-        return doVerifyPattern(pattern, true, challenge, userId);
+        return doVerifyPattern(pattern, true, challenge, userId, null /* progressCallback */);
     }
 
     private VerifyCredentialResponse doVerifyPattern(String pattern, boolean hasChallenge,
-            long challenge, int userId) throws RemoteException {
+            long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
+            throws RemoteException {
        checkPasswordReadPermission(userId);
        CredentialHash storedHash = mStorage.readPatternHash(userId);
-       return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId);
+       return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId,
+               progressCallback);
     }
 
     private VerifyCredentialResponse doVerifyPattern(String pattern, CredentialHash storedHash,
-            boolean hasChallenge, long challenge, int userId) throws RemoteException {
+            boolean hasChallenge, long challenge, int userId,
+            ICheckCredentialProgressCallback progressCallback) throws RemoteException {
        boolean shouldReEnrollBaseZero = storedHash != null && storedHash.isBaseZeroPattern;
 
        String patternToVerify;
@@ -1249,7 +1258,8 @@
                    public String adjustForKeystore(String pattern) {
                        return LockPatternUtils.patternStringToBaseZero(pattern);
                    }
-               }
+               },
+               progressCallback
        );
 
        if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK
@@ -1261,15 +1271,15 @@
     }
 
     @Override
-    public VerifyCredentialResponse checkPassword(String password, int userId)
-            throws RemoteException {
-        return doVerifyPassword(password, false, 0, userId);
+    public VerifyCredentialResponse checkPassword(String password, int userId,
+            ICheckCredentialProgressCallback progressCallback) throws RemoteException {
+        return doVerifyPassword(password, false, 0, userId, progressCallback);
     }
 
     @Override
     public VerifyCredentialResponse verifyPassword(String password, long challenge, int userId)
             throws RemoteException {
-        return doVerifyPassword(password, true, challenge, userId);
+        return doVerifyPassword(password, true, challenge, userId, null /* progressCallback */);
     }
 
     @Override
@@ -1282,8 +1292,10 @@
         final int parentProfileId = mUserManager.getProfileParent(userId).id;
         // Unlock parent by using parent's challenge
         final VerifyCredentialResponse parentResponse = isPattern
-                ? doVerifyPattern(password, true, challenge, parentProfileId)
-                : doVerifyPassword(password, true, challenge, parentProfileId);
+                ? doVerifyPattern(password, true, challenge, parentProfileId,
+                        null /* progressCallback */)
+                : doVerifyPassword(password, true, challenge, parentProfileId,
+                        null /* progressCallback */);
         if (parentResponse.getResponseCode() != VerifyCredentialResponse.RESPONSE_OK) {
             // Failed, just return parent's response
             return parentResponse;
@@ -1293,7 +1305,7 @@
             // Unlock work profile, and work profile with unified lock must use password only
             return doVerifyPassword(getDecryptedPasswordForTiedProfile(userId), true,
                     challenge,
-                    userId);
+                    userId, null /* progressCallback */);
         } catch (UnrecoverableKeyException | InvalidKeyException | KeyStoreException
                 | NoSuchAlgorithmException | NoSuchPaddingException
                 | InvalidAlgorithmParameterException | IllegalBlockSizeException
@@ -1304,14 +1316,17 @@
     }
 
     private VerifyCredentialResponse doVerifyPassword(String password, boolean hasChallenge,
-            long challenge, int userId) throws RemoteException {
+            long challenge, int userId, ICheckCredentialProgressCallback progressCallback)
+            throws RemoteException {
        checkPasswordReadPermission(userId);
        CredentialHash storedHash = mStorage.readPasswordHash(userId);
-       return doVerifyPassword(password, storedHash, hasChallenge, challenge, userId);
+       return doVerifyPassword(password, storedHash, hasChallenge, challenge, userId,
+               progressCallback);
     }
 
     private VerifyCredentialResponse doVerifyPassword(String password, CredentialHash storedHash,
-            boolean hasChallenge, long challenge, int userId) throws RemoteException {
+            boolean hasChallenge, long challenge, int userId,
+            ICheckCredentialProgressCallback progressCallback) throws RemoteException {
        return verifyCredential(userId, storedHash, password, hasChallenge, challenge,
                new CredentialUtil() {
                    @Override
@@ -1329,12 +1344,12 @@
                    public String adjustForKeystore(String password) {
                        return password;
                    }
-               }
-       );
+               }, progressCallback);
     }
 
     private VerifyCredentialResponse verifyCredential(int userId, CredentialHash storedHash,
-            String credential, boolean hasChallenge, long challenge, CredentialUtil credentialUtil)
+            String credential, boolean hasChallenge, long challenge, CredentialUtil credentialUtil,
+            ICheckCredentialProgressCallback progressCallback)
                 throws RemoteException {
         if ((storedHash == null || storedHash.hash.length == 0) && TextUtils.isEmpty(credential)) {
             // don't need to pass empty credentials to GateKeeper
@@ -1391,7 +1406,13 @@
         }
 
         if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
+
+
             // credential has matched
+
+            if (progressCallback != null) {
+                progressCallback.onCredentialVerified();
+            }
             unlockKeystore(credential, userId);
 
             Slog.i(TAG, "Unlocking user " + userId +
@@ -1447,7 +1468,7 @@
 
         try {
             if (mLockPatternUtils.isLockPatternEnabled(userId)) {
-                if (checkPattern(password, userId).getResponseCode()
+                if (checkPattern(password, userId, null /* progressCallback */).getResponseCode()
                         == GateKeeperResponse.RESPONSE_OK) {
                     return true;
                 }
@@ -1457,7 +1478,7 @@
 
         try {
             if (mLockPatternUtils.isLockPasswordEnabled(userId)) {
-                if (checkPassword(password, userId).getResponseCode()
+                if (checkPassword(password, userId, null /* progressCallback */).getResponseCode()
                         == GateKeeperResponse.RESPONSE_OK) {
                     return true;
                 }
diff --git a/services/core/java/com/android/server/MasterClearReceiver.java b/services/core/java/com/android/server/MasterClearReceiver.java
index 1653db9..6f8edec 100644
--- a/services/core/java/com/android/server/MasterClearReceiver.java
+++ b/services/core/java/com/android/server/MasterClearReceiver.java
@@ -47,6 +47,7 @@
         final String reason = intent.getStringExtra(Intent.EXTRA_REASON);
         final boolean wipeExternalStorage = intent.getBooleanExtra(
                 Intent.EXTRA_WIPE_EXTERNAL_STORAGE, false);
+        final boolean forceWipe = intent.getBooleanExtra(Intent.EXTRA_FORCE_MASTER_CLEAR, false);
 
         Slog.w(TAG, "!!! FACTORY RESET !!!");
         // The reboot call is blocking, so we need to do it on another thread.
@@ -54,7 +55,7 @@
             @Override
             public void run() {
                 try {
-                    RecoverySystem.rebootWipeUserData(context, shutdown, reason);
+                    RecoverySystem.rebootWipeUserData(context, shutdown, reason, forceWipe);
                     Log.wtf(TAG, "Still running after master clear?!");
                 } catch (IOException e) {
                     Slog.e(TAG, "Can't perform master clear/factory reset", e);
diff --git a/services/core/java/com/android/server/NativeDaemonConnectorException.java b/services/core/java/com/android/server/NativeDaemonConnectorException.java
index 590bbcc..4d8881c 100644
--- a/services/core/java/com/android/server/NativeDaemonConnectorException.java
+++ b/services/core/java/com/android/server/NativeDaemonConnectorException.java
@@ -41,7 +41,7 @@
     }
 
     public int getCode() {
-        return mEvent.getCode();
+        return mEvent != null ? mEvent.getCode() : -1;
     }
 
     public String getCmd() {
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index f236877..be9d836 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -971,6 +971,17 @@
     //
     // INetworkManagementService members
     //
+    @Override
+    public INetd getNetdService() throws RemoteException {
+        final CountDownLatch connectedSignal = mConnectedSignal;
+        if (connectedSignal != null) {
+            try {
+                connectedSignal.await();
+            } catch (InterruptedException ignored) {}
+        }
+
+        return mNetdService;
+    }
 
     @Override
     public String[] listInterfaces() {
diff --git a/services/core/java/com/android/server/PersistentDataBlockService.java b/services/core/java/com/android/server/PersistentDataBlockService.java
index 680547a..e233b1c 100644
--- a/services/core/java/com/android/server/PersistentDataBlockService.java
+++ b/services/core/java/com/android/server/PersistentDataBlockService.java
@@ -26,6 +26,7 @@
 import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.provider.Settings;
 import android.service.persistentdata.IPersistentDataBlockService;
 import android.service.persistentdata.PersistentDataBlockManager;
 import android.util.Slog;
@@ -155,6 +156,15 @@
                     "Only the Admin user is allowed to change OEM unlock state");
         }
     }
+
+    private void enforceFactoryResetAllowed() {
+        final boolean isOemUnlockRestricted = UserManager.get(mContext)
+                .hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET);
+        if (isOemUnlockRestricted) {
+            throw new SecurityException("OEM unlock is disallowed by DISALLOW_FACTORY_RESET");
+        }
+    }
+
     private int getTotalDataSizeLocked(DataInputStream inputStream) throws IOException {
         // skip over checksum
         inputStream.skipBytes(DIGEST_SIZE_BYTES);
@@ -447,14 +457,24 @@
         }
 
         @Override
-        public void setOemUnlockEnabled(boolean enabled) {
+        public void setOemUnlockEnabled(boolean enabled) throws SecurityException {
             // do not allow monkey to flip the flag
             if (ActivityManager.isUserAMonkey()) {
                 return;
             }
+
             enforceOemUnlockWritePermission();
             enforceIsAdmin();
 
+            if (enabled) {
+                // Do not allow oem unlock to be enabled if it has been disallowed.
+                if (Settings.Global.getInt(getContext().getContentResolver(),
+                        Settings.Global.OEM_UNLOCK_DISALLOWED, 0) == 1) {
+                    throw new SecurityException(
+                            "OEM unlock has been disallowed by OEM_UNLOCK_DISALLOWED.");
+                }
+                enforceFactoryResetAllowed();
+            }
             synchronized (mLock) {
                 doSetOemUnlockEnabledLocked(enabled);
                 computeAndWriteDigestLocked();
diff --git a/services/core/java/com/android/server/PinnerService.java b/services/core/java/com/android/server/PinnerService.java
index d48aeed..eaf317a 100644
--- a/services/core/java/com/android/server/PinnerService.java
+++ b/services/core/java/com/android/server/PinnerService.java
@@ -17,18 +17,34 @@
 package com.android.server;
 
 import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
+import android.content.Intent;
 import android.util.EventLog;
 import android.util.Slog;
 import android.os.Binder;
 import android.os.Build;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Process;
+import android.provider.MediaStore;
 import android.system.ErrnoException;
 import android.system.Os;
 import android.system.OsConstants;
 import android.system.StructStat;
 
+import com.android.internal.app.ResolverActivity;
+import com.android.internal.os.BackgroundThread;
+
+import dalvik.system.VMRuntime;
+
 import java.util.ArrayList;
+import java.util.List;
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -37,89 +53,344 @@
 /**
  * <p>PinnerService pins important files for key processes in memory.</p>
  * <p>Files to pin are specified in the config_defaultPinnerServiceFiles
- * overlay. </p>
+ * overlay.</p>
+ * <p>Pin the default camera application if specified in config_pinnerCameraApp.</p>
  */
 public final class PinnerService extends SystemService {
     private static final boolean DEBUG = false;
     private static final String TAG = "PinnerService";
 
     private final Context mContext;
-    private final ArrayList<String> mPinnedFiles = new ArrayList<String>();
+    private final ArrayList<PinnedFile> mPinnedFiles = new ArrayList<PinnedFile>();
+    private final ArrayList<PinnedFile> mPinnedCameraFiles = new ArrayList<PinnedFile>();
+    private final boolean mShouldPinCamera;
 
     private BinderService mBinderService;
 
+    private final long MAX_CAMERA_PIN_SIZE = 50 * (1 << 20); //50MB max
+
+    private PinnerHandler mPinnerHandler = null;
+
 
     public PinnerService(Context context) {
         super(context);
 
         mContext = context;
-
+        mShouldPinCamera = context.getResources().getBoolean(
+                com.android.internal.R.bool.config_pinnerCameraApp);
+        mPinnerHandler = new PinnerHandler(BackgroundThread.get().getLooper());
     }
 
     @Override
     public void onStart() {
-        Slog.e(TAG, "Starting PinnerService");
-
+        if (DEBUG) {
+            Slog.i(TAG, "Starting PinnerService");
+        }
         mBinderService = new BinderService();
         publishBinderService("pinner", mBinderService);
+        mPinnerHandler.sendMessage(
+                mPinnerHandler.obtainMessage(PinnerHandler.PIN_ONSTART_MSG));
+    }
 
-        // Files to pin come from the overlay and can be specified per-device config
-        // Continue trying to pin remaining files even if there is a failure
-        String[] filesToPin = mContext.getResources().getStringArray(com.android.internal.R.array.config_defaultPinnerServiceFiles);
-        for (int i = 0; i < filesToPin.length; i++){
-            boolean success = pinFile(filesToPin[i], 0, 0);
-            if (success == true) {
-                mPinnedFiles.add(filesToPin[i]);
-                Slog.i(TAG, "Pinned file = " + filesToPin[i]);
-            } else {
-                Slog.e(TAG, "Failed to pin file = " + filesToPin[i]);
+    /**
+     * Pin camera on unlock.
+     * We have to wait for unlock because the user's
+     * preference for camera is not available from PackageManager until after
+     * unlock
+     */
+    @Override
+    public void onUnlockUser(int userHandle) {
+        mPinnerHandler.sendMessage(
+                mPinnerHandler.obtainMessage(PinnerHandler.PIN_CAMERA_MSG, userHandle, 0));
+    }
+
+    /**
+     * Pin camera on user switch.
+     * If more than one user is using the device
+     * each user may set a different preference for the camera app.
+     * Make sure that user's preference is pinned into memory.
+     */
+    @Override
+    public void onSwitchUser(int userHandle) {
+        mPinnerHandler.sendMessage(
+                mPinnerHandler.obtainMessage(PinnerHandler.PIN_CAMERA_MSG, userHandle, 0));
+    }
+
+    /**
+     * Handler for on start pinning message
+     */
+    private void handlePinOnStart() {
+         // Files to pin come from the overlay and can be specified per-device config
+        String[] filesToPin = mContext.getResources().getStringArray(
+                com.android.internal.R.array.config_defaultPinnerServiceFiles);
+        synchronized(this) {
+            // Continue trying to pin remaining files even if there is a failure
+            for (int i = 0; i < filesToPin.length; i++){
+                PinnedFile pf = pinFile(filesToPin[i], 0, 0, 0);
+                if (pf != null) {
+                    mPinnedFiles.add(pf);
+                    if (DEBUG) {
+                        Slog.i(TAG, "Pinned file = " + pf.mFilename);
+                    }
+                } else {
+                    Slog.e(TAG, "Failed to pin file = " + filesToPin[i]);
+                }
             }
         }
     }
 
-    // mlock length bytes of fileToPin in memory, starting at offset
-    // length == 0 means pin from offset to end of file
-    private boolean pinFile(String fileToPin, long offset, long length) {
+    /**
+     * Handler for camera pinning message
+     */
+    private void handlePinCamera(int userHandle) {
+        if (mShouldPinCamera) {
+            synchronized(this) {
+                boolean success = pinCamera(userHandle);
+                if (!success) {
+                    //this is not necessarily an error
+                    if (DEBUG) {
+                        Slog.v(TAG, "Failed to pin camera.");
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     *  determine if the camera app is already pinned by comparing the
+     *  intent resolution to the pinned files list
+     */
+    private boolean alreadyPinned(int userHandle) {
+        ApplicationInfo cameraInfo = getCameraInfo(userHandle);
+        if (cameraInfo == null ) {
+            return false;
+        }
+        for (int i = 0; i < mPinnedCameraFiles.size(); i++) {
+            if (mPinnedCameraFiles.get(i).mFilename.equals(cameraInfo.sourceDir)) {
+                if (DEBUG) {
+                  Slog.v(TAG, "Camera is already pinned");
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void unpinCameraApp() {
+        for (int i = 0; i < mPinnedCameraFiles.size(); i++) {
+            unpinFile(mPinnedCameraFiles.get(i));
+        }
+        mPinnedCameraFiles.clear();
+    }
+
+    private boolean isResolverActivity(ActivityInfo info) {
+        return ResolverActivity.class.getName().equals(info.name);
+    }
+
+    private ApplicationInfo getCameraInfo(int userHandle) {
+        //  find the camera via an intent
+        //  use INTENT_ACTION_STILL_IMAGE_CAMERA instead of _SECURE.  On a
+        //  device without a fbe enabled, the _SECURE intent will never get set.
+        Intent cameraIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
+        PackageManager pm = mContext.getPackageManager();
+        ResolveInfo cameraResolveInfo = pm.resolveActivityAsUser(
+                cameraIntent, PackageManager.MATCH_DEFAULT_ONLY, userHandle);
+        if (cameraResolveInfo == null ) {
+            //this is not necessarily an error
+            if (DEBUG) {
+              Slog.v(TAG, "Unable to resolve camera intent");
+            }
+            return null;
+        }
+
+        if (isResolverActivity(cameraResolveInfo.activityInfo))
+        {
+            return null;
+        }
+
+        return cameraResolveInfo.activityInfo.applicationInfo;
+    }
+
+    private boolean pinCamera(int userHandle){
+        //we may have already pinned a camera app.  If we've pinned this
+        //camera app, we're done.  otherwise, unpin and pin the new app
+        if (alreadyPinned(userHandle)){
+            return true;
+        }
+
+        ApplicationInfo cameraInfo = getCameraInfo(userHandle);
+        if (cameraInfo == null) {
+            return false;
+        }
+
+        //unpin after checking that the camera intent has resolved
+        //this prevents us from thrashing when switching users with
+        //FBE enabled, because the intent won't resolve until the unlock
+        unpinCameraApp();
+
+        //pin APK
+        String camAPK = cameraInfo.sourceDir;
+        PinnedFile pf = pinFile(camAPK, 0, 0, MAX_CAMERA_PIN_SIZE);
+        if (pf == null) {
+            Slog.e(TAG, "Failed to pin " + camAPK);
+            return false;
+        }
+        if (DEBUG) {
+            Slog.i(TAG, "Pinned " + pf.mFilename);
+        }
+        mPinnedCameraFiles.add(pf);
+
+        //find the location of the odex based on the location of the APK
+        int lastPeriod = camAPK.lastIndexOf('.');
+        int lastSlash = camAPK.lastIndexOf('/', lastPeriod);
+        String base = camAPK.substring(0, lastSlash);
+        String appName = camAPK.substring(lastSlash + 1, lastPeriod);
+
+        // determine the ABI from either ApplicationInfo or Build
+        String arch = "arm";
+        if (cameraInfo.primaryCpuAbi != null
+            && VMRuntime.is64BitAbi(cameraInfo.primaryCpuAbi)) {
+            arch = arch + "64";
+        } else {
+            if (VMRuntime.is64BitAbi(Build.SUPPORTED_ABIS[0])) {
+                arch = arch + "64";
+            }
+        }
+        String odex = base + "/oat/" + arch + "/" + appName + ".odex";
+        //not all apps have odex files, so not pinning the odex is not a fatal error
+        pf = pinFile(odex, 0, 0, MAX_CAMERA_PIN_SIZE);
+        if (pf != null) {
+            mPinnedCameraFiles.add(pf);
+            if (DEBUG) {
+                Slog.i(TAG, "Pinned " + pf.mFilename);
+            }
+        }
+        return true;
+    }
+
+
+    /** mlock length bytes of fileToPin in memory, starting at offset
+     *  length == 0 means pin from offset to end of file
+     *  maxSize == 0 means infinite
+     */
+    private static PinnedFile pinFile(String fileToPin, long offset, long length, long maxSize) {
         FileDescriptor fd = new FileDescriptor();
         try {
-            fd = Os.open(fileToPin, OsConstants.O_RDONLY | OsConstants.O_CLOEXEC | OsConstants.O_NOFOLLOW, OsConstants.O_RDONLY);
+            fd = Os.open(fileToPin,
+                    OsConstants.O_RDONLY | OsConstants.O_CLOEXEC | OsConstants.O_NOFOLLOW,
+                    OsConstants.O_RDONLY);
 
             StructStat sb = Os.fstat(fd);
 
             if (offset + length > sb.st_size) {
                 Os.close(fd);
-                return false;
+                Slog.e(TAG, "Failed to pin file " + fileToPin +
+                        ", request extends beyond end of file.  offset + length =  "
+                        + (offset + length) + ", file length = " + sb.st_size);
+                return null;
             }
 
             if (length == 0) {
                 length = sb.st_size - offset;
             }
 
-            long address = Os.mmap(0, length, OsConstants.PROT_READ, OsConstants.MAP_PRIVATE, fd, offset);
+            if (maxSize > 0 && length > maxSize) {
+                Slog.e(TAG, "Could not pin file " + fileToPin +
+                        ", size = " + length + ", maxSize = " + maxSize);
+                Os.close(fd);
+                return null;
+            }
+
+            long address = Os.mmap(0, length, OsConstants.PROT_READ,
+                    OsConstants.MAP_PRIVATE, fd, offset);
             Os.close(fd);
 
             Os.mlock(address, length);
 
-            return true;
+            return new PinnedFile(address, length, fileToPin);
         } catch (ErrnoException e) {
-            Slog.e(TAG, "Failed to pin file " + fileToPin + " with error " + e.getMessage());
+            Slog.e(TAG, "Could not pin file " + fileToPin + " with error " + e.getMessage());
             if(fd.valid()) {
-                try { Os.close(fd); }
-                catch (ErrnoException eClose) {Slog.e(TAG, "Failed to close fd, error = " + eClose.getMessage());}
+                try {
+                    Os.close(fd);
+                }
+                catch (ErrnoException eClose) {
+                    Slog.e(TAG, "Failed to close fd, error = " + eClose.getMessage());
+                }
             }
-            return false;
+            return null;
         }
     }
 
+    private static boolean unpinFile(PinnedFile pf) {
+        try {
+            Os.munlock(pf.mAddress, pf.mLength);
+        } catch (ErrnoException e) {
+            Slog.e(TAG, "Failed to unpin file " + pf.mFilename + " with error " + e.getMessage());
+            return false;
+        }
+        if (DEBUG) {
+            Slog.i(TAG, "Unpinned file " + pf.mFilename );
+        }
+        return true;
+    }
 
     private final class BinderService extends Binder {
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
             pw.println("Pinned Files:");
-            for (int i = 0; i < mPinnedFiles.size(); i++) {
-                pw.println(mPinnedFiles.get(i));
+            synchronized(this) {
+                for (int i = 0; i < mPinnedFiles.size(); i++) {
+                    pw.println(mPinnedFiles.get(i).mFilename);
+                }
+                for (int i = 0; i < mPinnedCameraFiles.size(); i++) {
+                    pw.println(mPinnedCameraFiles.get(i).mFilename);
+                }
             }
         }
     }
+
+    private static class PinnedFile {
+        long mAddress;
+        long mLength;
+        String mFilename;
+
+        PinnedFile(long address, long length, String filename) {
+             mAddress = address;
+             mLength = length;
+             mFilename = filename;
+        }
+    }
+
+    final class PinnerHandler extends Handler {
+        static final int PIN_CAMERA_MSG  = 4000;
+        static final int PIN_ONSTART_MSG = 4001;
+
+        public PinnerHandler(Looper looper) {
+            super(looper, null, true);
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+
+                case PIN_CAMERA_MSG:
+                {
+                    handlePinCamera(msg.arg1);
+                }
+                break;
+
+                case PIN_ONSTART_MSG:
+                {
+                    handlePinOnStart();
+                }
+                break;
+
+                default:
+                    super.handleMessage(msg);
+            }
+        }
+    }
+
 }
diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java
index ecc69e9..90f507c 100644
--- a/services/core/java/com/android/server/SystemServiceManager.java
+++ b/services/core/java/com/android/server/SystemServiceManager.java
@@ -156,12 +156,15 @@
         final int serviceLen = mServices.size();
         for (int i = 0; i < serviceLen; i++) {
             final SystemService service = mServices.get(i);
+            Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onStartUser "
+                    + service.getClass().getName());
             try {
                 service.onStartUser(userHandle);
             } catch (Exception ex) {
                 Slog.wtf(TAG, "Failure reporting start of user " + userHandle
                         + " to service " + service.getClass().getName(), ex);
             }
+            Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
         }
     }
 
@@ -169,12 +172,15 @@
         final int serviceLen = mServices.size();
         for (int i = 0; i < serviceLen; i++) {
             final SystemService service = mServices.get(i);
+            Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onUnlockUser "
+                    + service.getClass().getName());
             try {
                 service.onUnlockUser(userHandle);
             } catch (Exception ex) {
                 Slog.wtf(TAG, "Failure reporting unlock of user " + userHandle
                         + " to service " + service.getClass().getName(), ex);
             }
+            Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
         }
     }
 
@@ -182,12 +188,15 @@
         final int serviceLen = mServices.size();
         for (int i = 0; i < serviceLen; i++) {
             final SystemService service = mServices.get(i);
+            Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onSwitchUser "
+                    + service.getClass().getName());
             try {
                 service.onSwitchUser(userHandle);
             } catch (Exception ex) {
                 Slog.wtf(TAG, "Failure reporting switch of user " + userHandle
                         + " to service " + service.getClass().getName(), ex);
             }
+            Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
         }
     }
 
@@ -195,12 +204,15 @@
         final int serviceLen = mServices.size();
         for (int i = 0; i < serviceLen; i++) {
             final SystemService service = mServices.get(i);
+            Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onStopUser "
+                    + service.getClass().getName());
             try {
                 service.onStopUser(userHandle);
             } catch (Exception ex) {
                 Slog.wtf(TAG, "Failure reporting stop of user " + userHandle
                         + " to service " + service.getClass().getName(), ex);
             }
+            Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
         }
     }
 
@@ -208,12 +220,15 @@
         final int serviceLen = mServices.size();
         for (int i = 0; i < serviceLen; i++) {
             final SystemService service = mServices.get(i);
+            Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "onCleanupUser "
+                    + service.getClass().getName());
             try {
                 service.onCleanupUser(userHandle);
             } catch (Exception ex) {
                 Slog.wtf(TAG, "Failure reporting cleanup of user " + userHandle
                         + " to service " + service.getClass().getName(), ex);
             }
+            Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
         }
     }
 
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index c124e5d..5bfb90f 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -63,6 +63,7 @@
 import org.xmlpull.v1.XmlSerializer;
 
 import android.Manifest;
+import android.annotation.NonNull;
 import android.annotation.UserIdInt;
 import android.app.Activity;
 import android.app.ActivityManager;
@@ -568,6 +569,9 @@
     private boolean mShowDialogs = true;
     private boolean mInVrMode = false;
 
+    // Whether we should use SCHED_FIFO for UI and RenderThreads.
+    private boolean mUseFifoUiScheduling = false;
+
     BroadcastQueue mFgBroadcastQueue;
     BroadcastQueue mBgBroadcastQueue;
     // Convenient for easy iteration over the queues. Foreground is first
@@ -2309,6 +2313,20 @@
                     if (mInVrMode != vrMode) {
                         mInVrMode = vrMode;
                         mShowDialogs = shouldShowDialogs(mConfiguration, mInVrMode);
+                        if (r.app != null) {
+                            ProcessRecord proc = r.app;
+                            if (proc.vrThreadTid > 0) {
+                                if (proc.curSchedGroup == ProcessList.SCHED_GROUP_TOP_APP) {
+                                    if (mInVrMode == true) {
+                                        Process.setThreadScheduler(proc.vrThreadTid,
+                                            Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK, 1);
+                                    } else {
+                                        Process.setThreadScheduler(proc.vrThreadTid,
+                                            Process.SCHED_OTHER, 0);
+                                    }
+                                }
+                            }
+                        }
                     }
                 }
                 vrService.setVrMode(vrMode, requestedPackage, userId, callingPackage);
@@ -2642,6 +2660,10 @@
         GL_ES_VERSION = SystemProperties.getInt("ro.opengles.version",
             ConfigurationInfo.GL_ES_VERSION_UNDEFINED);
 
+        if (SystemProperties.getInt("sys.use_fifo_ui", 0) != 0) {
+            mUseFifoUiScheduling = true;
+        }
+
         mTrackingAssociations = "1".equals(SystemProperties.get("debug.track-associations"));
 
         mConfiguration.setToDefaults();
@@ -5422,10 +5444,10 @@
             IPackageManager pm = AppGlobals.getPackageManager();
             int pkgUid = -1;
             synchronized(this) {
-                if (getPackageManagerInternalLocked().canPackageBeWiped(
+                if (getPackageManagerInternalLocked().isPackageDataProtected(
                         userId, packageName)) {
                     throw new SecurityException(
-                            "Cannot clear data for a device owner or a profile owner");
+                            "Cannot clear data for a protected package: " + packageName);
                 }
 
                 try {
@@ -6646,8 +6668,7 @@
     @Override
     public void showBootMessage(final CharSequence msg, final boolean always) {
         if (Binder.getCallingUid() != Process.myUid()) {
-            // These days only the core system can call this, so apps can't get in
-            // the way of what we show about running them.
+            throw new SecurityException();
         }
         mWindowManager.showBootMessage(msg, always);
     }
@@ -9247,9 +9268,6 @@
                         // sense, so turn off auto-remove.
                         intent.addFlags(Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
                     }
-                } else if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
-                    // Must be a new task.
-                    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                 }
                 if (!comp.equals(mLastAddedTaskComponent) || callingUid != mLastAddedTaskUid) {
                     mLastAddedTaskActivity = null;
@@ -12510,6 +12528,72 @@
         }
     }
 
+    public void setVrThread(int tid) {
+        if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_VR_MODE)) {
+            throw new UnsupportedOperationException("VR mode not supported on this device!");
+        }
+
+        synchronized (this) {
+            ProcessRecord proc;
+            synchronized (mPidsSelfLocked) {
+                final int pid = Binder.getCallingPid();
+                proc = mPidsSelfLocked.get(pid);
+                if (proc != null && mInVrMode && tid >= 0) {
+                    // ensure the tid belongs to the process
+                    if (!Process.isThreadInProcess(pid, tid)) {
+                        throw new IllegalArgumentException("VR thread does not belong to process");
+                    }
+                    // reset existing VR thread to CFS
+                    if (proc.vrThreadTid != 0) {
+                        Process.setThreadScheduler(proc.vrThreadTid, Process.SCHED_OTHER, 0);
+                    }
+                    // add check to guarantee that tid belongs to pid?
+                    proc.vrThreadTid = tid;
+                    // promote to FIFO now if the tid is non-zero
+                    if (proc.curSchedGroup == ProcessList.SCHED_GROUP_TOP_APP && proc.vrThreadTid > 0) {
+                        Process.setThreadScheduler(proc.vrThreadTid, Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK, 1);
+                    }
+                } else {
+                    //Slog.e("VR_FIFO", "Didn't set thread from setVrThread?");
+                }
+            }
+        }
+    }
+
+    @Override
+    public void setRenderThread(int tid) {
+        synchronized (this) {
+            ProcessRecord proc;
+            synchronized (mPidsSelfLocked) {
+                int pid = Binder.getCallingPid();
+                proc = mPidsSelfLocked.get(pid);
+                if (mUseFifoUiScheduling && proc != null && proc.renderThreadTid == 0 && tid > 0) {
+                    // ensure the tid belongs to the process
+                    if (!Process.isThreadInProcess(pid, tid)) {
+                        throw new IllegalArgumentException(
+                            "Render thread does not belong to process");
+                    }
+                    proc.renderThreadTid = tid;
+                    if (DEBUG_OOM_ADJ) {
+                        Slog.d("UI_FIFO", "Set RenderThread tid " + tid + " for pid " + pid);
+                    }
+                    // promote to FIFO now
+                    if (proc.curSchedGroup == ProcessList.SCHED_GROUP_TOP_APP) {
+                        if (DEBUG_OOM_ADJ) Slog.d("UI_FIFO", "Promoting " + tid + "out of band");
+                        Process.setThreadScheduler(proc.renderThreadTid,
+                            Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK, 1);
+                    }
+                } else {
+                    if (DEBUG_OOM_ADJ) {
+                        Slog.d("UI_FIFO", "Didn't set thread from setRenderThread? " +
+                               "PID: " + pid + ", TID: " + tid + " FIFO: " +
+                               mUseFifoUiScheduling);
+                    }
+                }
+            }
+        }
+    }
+
     @Override
     public int setVrMode(IBinder token, boolean enabled, ComponentName packageName) {
         if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_VR_MODE)) {
@@ -18835,8 +18919,9 @@
 
     /**
      * Decide based on the configuration whether we should shouw the ANR,
-     * crash, etc dialogs.  The idea is that if there is no affordnace to
-     * press the on-screen buttons, we shouldn't show the dialog.
+     * crash, etc dialogs.  The idea is that if there is no affordence to
+     * press the on-screen buttons, or the user experience would be more
+     * greatly impacted than the crash itself, we shouldn't show the dialog.
      *
      * A thought: SystemUI might also want to get told about this, the Power
      * dialog / global actions also might want different behaviors.
@@ -18845,9 +18930,10 @@
         final boolean inputMethodExists = !(config.keyboard == Configuration.KEYBOARD_NOKEYS
                                    && config.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH
                                    && config.navigation == Configuration.NAVIGATION_NONAV);
-        final boolean uiIsNotCarType = !((config.uiMode & Configuration.UI_MODE_TYPE_MASK)
-                                    == Configuration.UI_MODE_TYPE_CAR);
-        return inputMethodExists && uiIsNotCarType && !inVrMode;
+        int modeType = config.uiMode & Configuration.UI_MODE_TYPE_MASK;
+        final boolean uiModeSupportsDialogs = (modeType != Configuration.UI_MODE_TYPE_CAR
+                && !(modeType == Configuration.UI_MODE_TYPE_WATCH && "user".equals(Build.TYPE)));
+        return inputMethodExists && uiModeSupportsDialogs && !inVrMode;
     }
 
     @Override
@@ -19506,7 +19592,7 @@
                             adj = ProcessList.FOREGROUND_APP_ADJ;
                             if ((cr.flags&Context.BIND_NOT_FOREGROUND) == 0) {
                                 if ((cr.flags&Context.BIND_IMPORTANT) != 0) {
-                                    schedGroup = ProcessList.SCHED_GROUP_TOP_APP;
+                                    schedGroup = ProcessList.SCHED_GROUP_TOP_APP_BOUND;
                                 } else {
                                     schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
                                 }
@@ -20107,6 +20193,7 @@
         }
 
         if (app.setSchedGroup != app.curSchedGroup) {
+            int oldSchedGroup = app.setSchedGroup;
             app.setSchedGroup = app.curSchedGroup;
             if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Slog.v(TAG_OOM_ADJ,
                     "Setting sched group of " + app.processName
@@ -20122,30 +20209,65 @@
                         processGroup = Process.THREAD_GROUP_BG_NONINTERACTIVE;
                         break;
                     case ProcessList.SCHED_GROUP_TOP_APP:
+                    case ProcessList.SCHED_GROUP_TOP_APP_BOUND:
                         processGroup = Process.THREAD_GROUP_TOP_APP;
                         break;
                     default:
                         processGroup = Process.THREAD_GROUP_DEFAULT;
                         break;
                 }
-                if (true) {
-                    long oldId = Binder.clearCallingIdentity();
-                    try {
-                        Process.setProcessGroup(app.pid, processGroup);
-                    } catch (Exception e) {
-                        Slog.w(TAG, "Failed setting process group of " + app.pid
-                                + " to " + app.curSchedGroup);
-                        e.printStackTrace();
-                    } finally {
-                        Binder.restoreCallingIdentity(oldId);
-                    }
-                } else {
-                    if (app.thread != null) {
-                        try {
-                            app.thread.setSchedulingGroup(processGroup);
-                        } catch (RemoteException e) {
+                long oldId = Binder.clearCallingIdentity();
+                try {
+                    Process.setProcessGroup(app.pid, processGroup);
+                    if (app.curSchedGroup == ProcessList.SCHED_GROUP_TOP_APP) {
+                        // do nothing if we already switched to RT
+                        if (oldSchedGroup != ProcessList.SCHED_GROUP_TOP_APP) {
+                            // Switch VR thread for app to SCHED_FIFO
+                            if (mInVrMode && app.vrThreadTid != 0) {
+                                Process.setThreadScheduler(app.vrThreadTid,
+                                    Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK, 1);
+                            }
+                            if (mUseFifoUiScheduling) {
+                                // Switch UI pipeline for app to SCHED_FIFO
+                                app.savedPriority = Process.getThreadPriority(app.pid);
+                                Process.setThreadScheduler(app.pid,
+                                    Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK, 1);
+                                if (app.renderThreadTid != 0) {
+                                    Process.setThreadScheduler(app.renderThreadTid,
+                                        Process.SCHED_FIFO | Process.SCHED_RESET_ON_FORK, 1);
+                                    if (DEBUG_OOM_ADJ) {
+                                        Slog.d("UI_FIFO", "Set RenderThread (TID " +
+                                            app.renderThreadTid + ") to FIFO");
+                                    }
+                                } else {
+                                    if (DEBUG_OOM_ADJ) {
+                                        Slog.d("UI_FIFO", "Not setting RenderThread TID");
+                                    }
+                                }
+                            }
+                        }
+                    } else if (oldSchedGroup == ProcessList.SCHED_GROUP_TOP_APP &&
+                               app.curSchedGroup != ProcessList.SCHED_GROUP_TOP_APP) {
+                        // Reset VR thread to SCHED_OTHER
+                        // Safe to do even if we're not in VR mode
+                        if (app.vrThreadTid != 0) {
+                            Process.setThreadScheduler(app.vrThreadTid, Process.SCHED_OTHER, 0);
+                        }
+                        if (mUseFifoUiScheduling) {
+                            // Reset UI pipeline to SCHED_OTHER
+                            Process.setThreadScheduler(app.pid, Process.SCHED_OTHER, 0);
+                            Process.setThreadScheduler(app.renderThreadTid,
+                                Process.SCHED_OTHER, 0);
+                            Process.setThreadPriority(app.pid, app.savedPriority);
+                            Process.setThreadPriority(app.renderThreadTid, -4);
                         }
                     }
+                } catch (Exception e) {
+                    Slog.w(TAG, "Failed setting process group of " + app.pid
+                            + " to " + app.curSchedGroup);
+                    e.printStackTrace();
+                } finally {
+                    Binder.restoreCallingIdentity(oldId);
                 }
             }
         }
@@ -21308,6 +21430,11 @@
                 Slog.w(TAG, "No user info for user #" + targetUserId);
                 return false;
             }
+            if (!targetUserInfo.isDemo() && UserManager.isDeviceInDemoMode(mContext)) {
+                Slog.w(TAG, "Cannot switch to non-demo user #" + targetUserId
+                        + " when device is in demo mode");
+                return false;
+            }
             if (!targetUserInfo.supportsSwitchTo()) {
                 Slog.w(TAG, "Cannot switch to User #" + targetUserId + ": not supported");
                 return false;
@@ -21374,8 +21501,8 @@
     }
 
     @Override
-    public void registerUserSwitchObserver(IUserSwitchObserver observer) {
-        mUserController.registerUserSwitchObserver(observer);
+    public void registerUserSwitchObserver(IUserSwitchObserver observer, String name) {
+        mUserController.registerUserSwitchObserver(observer, name);
     }
 
     @Override
@@ -21649,6 +21776,43 @@
             }
             ((PendingIntentRecord) target).setWhitelistDuration(duration);
         }
+
+        @Override
+        public void updatePersistentConfigurationForUser(@NonNull Configuration values,
+                int userId) {
+            Preconditions.checkNotNull(values, "Configuration must not be null");
+            Preconditions.checkArgumentNonnegative(userId, "userId " + userId + " not supported");
+            synchronized (ActivityManagerService.this) {
+                updateConfigurationLocked(values, null, false, true, userId);
+            }
+        }
+
+        @Override
+        public IIntentSender getActivityIntentSenderAsPackage(
+                String packageName, int userId, int requestCode, Intent intent,
+                int flags, Bundle bOptions) {
+            String resolvedType = intent != null ? intent.resolveTypeIfNeeded(
+                    mContext.getContentResolver()) : null;
+
+            // UID of the package on user userId.
+            // "= 0" is needed because otherwise catch(RemoteException) would make it look like
+            // packageUid may not be initialized.
+            int packageUid = 0;
+            try {
+                packageUid = AppGlobals.getPackageManager().getPackageUid(
+                        packageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
+            } catch (RemoteException e) {
+                // Shouldn't happen.
+            }
+
+            synchronized (ActivityManagerService.this) {
+                return getIntentSenderLocked(
+                        ActivityManager.INTENT_SENDER_ACTIVITY, packageName, packageUid,
+                        UserHandle.getUserId(packageUid), /*token*/ null, /*resultWho*/ null,
+                        requestCode, new Intent[] {intent}, new String[]{resolvedType},
+                        flags, bOptions);
+            }
+        }
     }
 
     private final class SleepTokenImpl extends SleepToken {
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 50b6c0c..6e40cff 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -221,6 +221,8 @@
     boolean pendingVoiceInteractionStart;   // Waiting for activity-invoked voice session
     IVoiceInteractionSession voiceSession;  // Voice interaction session for this activity
 
+    int mRotationAnimationHint;
+
     private static String startingWindowStateToString(int state) {
         switch (state) {
             case STARTING_WINDOW_NOT_SHOWN:
@@ -635,6 +637,7 @@
         if (options != null) {
             pendingOptions = options;
             mLaunchTaskBehind = pendingOptions.getLaunchTaskBehind();
+            mRotationAnimationHint = pendingOptions.getRotationAnimationHint();
             PendingIntent usageReport = pendingOptions.getUsageTimeReport();
             if (usageReport != null) {
                 appTimeTracker = new AppTimeTracker(usageReport);
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 4ead64b..a102664 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1350,8 +1350,11 @@
             prev.cpuTimeAtResume = 0; // reset it
         }
 
-        // Notify when the task stack has changed, but only if visibilities changed (not just focus)
-        if (mStackSupervisor.mAppVisibilitiesChangedSinceLastPause) {
+        // Notify when the task stack has changed, but only if visibilities changed (not just
+        // focus). Also if there is an active pinned stack - we always want to notify it about
+        // task stack changes, because its positioning may depend on it.
+        if (mStackSupervisor.mAppVisibilitiesChangedSinceLastPause
+                || mService.mStackSupervisor.getStack(PINNED_STACK_ID) != null) {
             mService.notifyTaskStackChangedLocked();
             mStackSupervisor.mAppVisibilitiesChangedSinceLastPause = false;
         }
@@ -2587,11 +2590,14 @@
     }
 
     private void insertTaskAtTop(TaskRecord task, ActivityRecord newActivity) {
+        boolean isLastTaskOverHome = false;
         // If the moving task is over home stack, transfer its return type to next task
         if (task.isOverHomeStack()) {
             final TaskRecord nextTask = getNextTask(task);
             if (nextTask != null) {
                 nextTask.setTaskToReturnTo(task.getTaskToReturnTo());
+            } else {
+                isLastTaskOverHome = true;
             }
         }
 
@@ -2601,7 +2607,10 @@
             ActivityStack lastStack = mStackSupervisor.getLastStack();
             final boolean fromHome = lastStack.isHomeStack();
             if (!isHomeStack() && (fromHome || topTask() != task)) {
-                int returnToType = APPLICATION_ACTIVITY_TYPE;
+                // If it's a last task over home - we default to keep its return to type not to
+                // make underlying task focused when this one will be finished.
+                int returnToType = isLastTaskOverHome
+                        ? task.getTaskToReturnTo() : APPLICATION_ACTIVITY_TYPE;
                 if (fromHome && StackId.allowTopTaskToReturnHome(mStackId)) {
                     returnToType = lastStack.topTask() == null
                             ? HOME_ACTIVITY_TYPE : lastStack.topTask().taskType;
@@ -3760,6 +3769,10 @@
         if (getVisibleBehindActivity() == r) {
             mStackSupervisor.requestVisibleBehindLocked(r, false);
         }
+
+        // Clean-up activities are no longer relaunching (e.g. app process died). Notify window
+        // manager so it can update its bookkeeping.
+        mWindowManager.notifyAppRelaunchesCleared(r.appToken);
     }
 
     private void removeTimeoutsForActivityLocked(ActivityRecord r) {
@@ -5195,7 +5208,7 @@
                 (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0, r.userId, r.info.configChanges,
                 task.voiceSession != null, r.mLaunchTaskBehind, bounds, task.mOverrideConfig,
                 task.mResizeMode, r.isAlwaysFocusable(), task.isHomeTask(),
-                r.appInfo.targetSdkVersion);
+                r.appInfo.targetSdkVersion, r.mRotationAnimationHint);
         r.taskConfigOverride = task.mOverrideConfig;
     }
 
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 36207c4..82668e4 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -871,6 +871,8 @@
                 }
             }
         }
+        // Send launch end powerhint when idle
+        mService.mActivityStarter.sendPowerHintForLaunchEndIfNeeded();
         return true;
     }
 
@@ -2764,6 +2766,9 @@
             }
         }
 
+        // Send launch end powerhint before going sleep
+        mService.mActivityStarter.sendPowerHintForLaunchEndIfNeeded();
+
         for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
             final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
             for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
@@ -4432,6 +4437,7 @@
         // Work Challenge is present) let startActivityInPackage handle the intercepting.
         if (!mService.mUserController.shouldConfirmCredentials(task.userId)
                 && task.getRootActivity() != null) {
+            mService.mActivityStarter.sendPowerHintForLaunchStartIfNeeded(true /* forceSend */);
             mActivityMetricsLogger.notifyActivityLaunching();
             mService.moveTaskToFrontLocked(task.taskId, 0, bOptions);
             mActivityMetricsLogger.notifyActivityLaunched(ActivityManager.START_TASK_TO_FRONT,
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 7b3f65a..53289be 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -102,6 +102,7 @@
 import android.os.Build;
 import android.os.Bundle;
 import android.os.IBinder;
+import android.os.PowerManagerInternal;
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.os.UserHandle;
@@ -173,6 +174,7 @@
     private boolean mNoAnimation;
     private boolean mKeepCurTransition;
     private boolean mAvoidMoveToFront;
+    private boolean mPowerHintSent;
 
     private IVoiceInteractionSession mVoiceSession;
     private IVoiceInteractor mVoiceInteractor;
@@ -956,6 +958,28 @@
         return START_SUCCESS;
     }
 
+    void sendPowerHintForLaunchStartIfNeeded(boolean forceSend) {
+        // Trigger launch power hint if activity being launched is not in the current task
+        final ActivityStack focusStack = mSupervisor.getFocusedStack();
+        final ActivityRecord curTop = (focusStack == null)
+            ? null : focusStack.topRunningNonDelayedActivityLocked(mNotTop);
+        if ((forceSend || (!mPowerHintSent && curTop != null &&
+                curTop.task != null && mStartActivity != null &&
+                curTop.task != mStartActivity.task )) &&
+                mService.mLocalPowerManager != null) {
+            mService.mLocalPowerManager.powerHint(PowerManagerInternal.POWER_HINT_LAUNCH, 1);
+            mPowerHintSent = true;
+        }
+    }
+
+    void sendPowerHintForLaunchEndIfNeeded() {
+        // Trigger launch power hint if activity is launched
+        if (mPowerHintSent && mService.mLocalPowerManager != null) {
+            mService.mLocalPowerManager.powerHint(PowerManagerInternal.POWER_HINT_LAUNCH, 0);
+            mPowerHintSent = false;
+        }
+    }
+
     private int startActivityUnchecked(final ActivityRecord r, ActivityRecord sourceRecord,
             IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
             int startFlags, boolean doResume, ActivityOptions options, TaskRecord inTask) {
@@ -1017,6 +1041,8 @@
                 }
             }
 
+            sendPowerHintForLaunchStartIfNeeded(false /* forceSend */);
+
             mReusedActivity = setTargetStackAndMoveToFrontIfNeeded(mReusedActivity);
 
             if ((mStartFlags & START_FLAG_ONLY_IF_NEEDED) != 0) {
@@ -1095,7 +1121,11 @@
                 return START_RETURN_LOCK_TASK_MODE_VIOLATION;
             }
             if (!mMovedOtherTask) {
-                updateTaskReturnToType(mStartActivity.task, mLaunchFlags, topStack);
+                // If stack id is specified in activity options, usually it means that activity is
+                // launched not from currently focused stack (e.g. from SysUI or from shell) - in
+                // that case we check the target stack.
+                updateTaskReturnToType(mStartActivity.task, mLaunchFlags,
+                        preferredLaunchStackId != INVALID_STACK_ID ? mTargetStack : topStack);
             }
         } else if (mSourceRecord != null) {
             if (mSupervisor.isLockTaskModeViolation(mSourceRecord.task)) {
@@ -1138,6 +1168,9 @@
         ActivityStack.logStartActivity(
                 EventLogTags.AM_CREATE_ACTIVITY, mStartActivity, mStartActivity.task);
         mTargetStack.mLastPausedActivity = null;
+
+        sendPowerHintForLaunchStartIfNeeded(false /* forceSend */);
+
         mTargetStack.startActivityLocked(mStartActivity, newTask, mKeepCurTransition, mOptions);
         if (mDoResume) {
             if (!mLaunchTaskBehind) {
diff --git a/services/core/java/com/android/server/am/PreBootBroadcaster.java b/services/core/java/com/android/server/am/PreBootBroadcaster.java
index 1f3ccf5..a7d09d0 100644
--- a/services/core/java/com/android/server/am/PreBootBroadcaster.java
+++ b/services/core/java/com/android/server/am/PreBootBroadcaster.java
@@ -19,17 +19,23 @@
 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
 
 import android.app.AppOpsManager;
+import android.app.Notification;
+import android.app.NotificationManager;
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.IIntentReceiver;
 import android.content.Intent;
 import android.content.pm.ResolveInfo;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.os.Process;
 import android.os.UserHandle;
 import android.util.Slog;
 
 import com.android.internal.R;
 import com.android.internal.util.ProgressReporter;
+import com.android.server.UiThread;
 
 import java.util.List;
 
@@ -51,7 +57,7 @@
     private int mIndex = 0;
 
     public PreBootBroadcaster(ActivityManagerService service, int userId,
-            ProgressReporter progress) {
+            ProgressReporter progress, boolean quiet) {
         mService = service;
         mUserId = userId;
         mProgress = progress;
@@ -61,16 +67,22 @@
 
         mTargets = mService.mContext.getPackageManager().queryBroadcastReceiversAsUser(mIntent,
                 MATCH_SYSTEM_ONLY, UserHandle.of(userId));
+
+        if (!quiet) {
+            mHandler.obtainMessage(MSG_SHOW).sendToTarget();
+        }
     }
 
     public void sendNext() {
         if (mIndex >= mTargets.size()) {
+            mHandler.obtainMessage(MSG_HIDE).sendToTarget();
             onFinished();
             return;
         }
 
         if (!mService.isUserRunning(mUserId, 0)) {
             Slog.i(TAG, "User " + mUserId + " is no longer running; skipping remaining receivers");
+            mHandler.obtainMessage(MSG_HIDE).sendToTarget();
             onFinished();
             return;
         }
@@ -100,5 +112,44 @@
         sendNext();
     }
 
+    private static final int MSG_SHOW = 1;
+    private static final int MSG_HIDE = 2;
+
+    private Handler mHandler = new Handler(UiThread.get().getLooper(), null, true) {
+        @Override
+        public void handleMessage(Message msg) {
+            final Context context = mService.mContext;
+            final NotificationManager notifManager = context
+                    .getSystemService(NotificationManager.class);
+
+            switch (msg.what) {
+                case MSG_SHOW:
+                    final CharSequence title = context
+                            .getText(R.string.android_upgrading_notification_title);
+                    final CharSequence message = context
+                            .getText(R.string.android_upgrading_notification_body);
+                    final Notification notif = new Notification.Builder(mService.mContext)
+                            .setSmallIcon(R.drawable.stat_sys_adb)
+                            .setWhen(0)
+                            .setOngoing(true)
+                            .setTicker(title)
+                            .setDefaults(0)
+                            .setPriority(Notification.PRIORITY_MAX)
+                            .setColor(context.getColor(
+                                    com.android.internal.R.color.system_notification_accent_color))
+                            .setContentTitle(title)
+                            .setContentText(message)
+                            .setVisibility(Notification.VISIBILITY_PUBLIC)
+                            .build();
+                    notifManager.notifyAsUser(TAG, 0, notif, UserHandle.of(mUserId));
+                    break;
+
+                case MSG_HIDE:
+                    notifManager.cancelAsUser(TAG, 0, UserHandle.of(mUserId));
+                    break;
+            }
+        }
+    };
+
     public abstract void onFinished();
 }
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index f073e5c..475b155 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -130,6 +130,9 @@
     static final int SCHED_GROUP_DEFAULT = 1;
     // Activity manager's version of Process.THREAD_GROUP_TOP_APP
     static final int SCHED_GROUP_TOP_APP = 2;
+    // Activity manager's version of Process.THREAD_GROUP_TOP_APP
+    // Disambiguate between actual top app and processes bound to the top app
+    static final int SCHED_GROUP_TOP_APP_BOUND = 3;
 
     // The minimum number of cached apps we want to be able to keep around,
     // without empty apps being able to push them out of memory.
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index 8911a3e..dad383d 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -97,11 +97,14 @@
     int verifiedAdj;            // The last adjustment that was verified as actually being set
     int curSchedGroup;          // Currently desired scheduling class
     int setSchedGroup;          // Last set to background scheduling class
+    int vrThreadTid;            // Thread currently set for VR scheduling
     int trimMemoryLevel;        // Last selected memory trimming level
     int curProcState = PROCESS_STATE_NONEXISTENT; // Currently computed process state
     int repProcState = PROCESS_STATE_NONEXISTENT; // Last reported process state
     int setProcState = PROCESS_STATE_NONEXISTENT; // Last set process state in process tracker
     int pssProcState = PROCESS_STATE_NONEXISTENT; // Currently requesting pss for
+    int savedPriority;          // Previous priority value if we're switching to non-SCHED_OTHER
+    int renderThreadTid;        // TID for RenderThread
     boolean serviceb;           // Process currently is on the service B list
     boolean serviceHighRam;     // We are forcing to service B list due to its RAM use
     boolean setIsForeground;    // Running foreground UI when last set?
@@ -293,6 +296,7 @@
                 pw.print(" setSchedGroup="); pw.print(setSchedGroup);
                 pw.print(" systemNoUi="); pw.print(systemNoUi);
                 pw.print(" trimMemoryLevel="); pw.println(trimMemoryLevel);
+        pw.print(prefix); pw.print("vrThreadTid="); pw.print(vrThreadTid);
         pw.print(prefix); pw.print("curProcState="); pw.print(curProcState);
                 pw.print(" repProcState="); pw.print(repProcState);
                 pw.print(" pssProcState="); pw.print(pssProcState);
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index b685dd3..4de09bd 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -76,6 +76,7 @@
 import android.os.UserManagerInternal;
 import android.os.storage.IMountService;
 import android.os.storage.StorageManager;
+import android.util.ArraySet;
 import android.util.IntArray;
 import android.util.Pair;
 import android.util.Slog;
@@ -86,6 +87,7 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.util.ArrayUtils;
+import com.android.internal.util.Preconditions;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.server.LocalServices;
 import com.android.server.pm.UserManagerService;
@@ -97,6 +99,7 @@
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * Helper class for {@link ActivityManagerService} responsible for multi-user functionality.
@@ -151,9 +154,9 @@
             = new RemoteCallbackList<>();
 
     /**
-     * Currently active user switch.
+     * Currently active user switch callbacks.
      */
-    Object mCurUserSwitchCallback;
+    private volatile ArraySet<String> mCurWaitingUserSwitchCallbacks;
 
     private volatile UserManagerService mUserManager;
 
@@ -224,6 +227,7 @@
 
     private void finishUserBoot(UserState uss, IIntentReceiver resultTo) {
         final int userId = uss.mHandle.getIdentifier();
+
         Slog.d(TAG, "Finishing user boot " + userId);
         synchronized (mService) {
             // Bail if we ended up with a stale user
@@ -347,7 +351,11 @@
                 // PRE_BOOT receivers are finished to avoid ANR'ing apps
                 final UserInfo info = getUserInfo(userId);
                 if (!Objects.equals(info.lastLoggedInFingerprint, Build.FINGERPRINT)) {
-                    new PreBootBroadcaster(mService, userId, null) {
+                    // Suppress double notifications for managed profiles that
+                    // were unlocked automatically (no challenge token required)
+                    // as part of their parent user being unlocked.
+                    final boolean quiet = info.isManagedProfile() && !uss.tokenProvided;
+                    new PreBootBroadcaster(mService, userId, null, quiet) {
                         @Override
                         public void onFinished() {
                             finishUserUnlockedCompleted(uss);
@@ -968,6 +976,7 @@
                 return false;
             } else {
                 uss.mUnlockProgress.addListener(listener);
+                uss.tokenProvided = (token != null);
             }
 
             finishUserUnlocking(uss);
@@ -1039,7 +1048,8 @@
 
     void timeoutUserSwitch(UserState uss, int oldUserId, int newUserId) {
         synchronized (mService) {
-            Slog.wtf(TAG, "User switch timeout: from " + oldUserId + " to " + newUserId);
+            Slog.wtf(TAG, "User switch timeout: from " + oldUserId + " to " + newUserId
+                    + ". Observers that didn't send results: " + mCurWaitingUserSwitchCallbacks);
             sendContinueUserSwitchLocked(uss, oldUserId, newUserId);
         }
     }
@@ -1048,28 +1058,37 @@
         Slog.d(TAG, "Dispatch onUserSwitching oldUser #" + oldUserId + " newUser #" + newUserId);
         final int observerCount = mUserSwitchObservers.beginBroadcast();
         if (observerCount > 0) {
-            final IRemoteCallback callback = new IRemoteCallback.Stub() {
-                int mCount = 0;
-                @Override
-                public void sendResult(Bundle data) throws RemoteException {
-                    synchronized (mService) {
-                        if (mCurUserSwitchCallback == this) {
-                            mCount++;
-                            if (mCount == observerCount) {
-                                sendContinueUserSwitchLocked(uss, oldUserId, newUserId);
-                            }
-                        }
-                    }
-                }
-            };
+            final ArraySet<String> curWaitingUserSwitchCallbacks = new ArraySet<>();
             synchronized (mService) {
                 uss.switching = true;
-                mCurUserSwitchCallback = callback;
+                mCurWaitingUserSwitchCallbacks = curWaitingUserSwitchCallbacks;
             }
+            final AtomicInteger waitingCallbacksCount = new AtomicInteger(observerCount);
             for (int i = 0; i < observerCount; i++) {
                 try {
-                    mUserSwitchObservers.getBroadcastItem(i).onUserSwitching(
-                            newUserId, callback);
+                    // Prepend with unique prefix to guarantee that keys are unique
+                    final String name = "#" + i + " " + mUserSwitchObservers.getBroadcastCookie(i);
+                    synchronized (mService) {
+                        curWaitingUserSwitchCallbacks.add(name);
+                    }
+                    final IRemoteCallback callback = new IRemoteCallback.Stub() {
+                        @Override
+                        public void sendResult(Bundle data) throws RemoteException {
+                            synchronized (mService) {
+                                // Early return if this session is no longer valid
+                                if (curWaitingUserSwitchCallbacks
+                                        != mCurWaitingUserSwitchCallbacks) {
+                                    return;
+                                }
+                                curWaitingUserSwitchCallbacks.remove(name);
+                                // Continue switching if all callbacks have been notified
+                                if (waitingCallbacksCount.decrementAndGet() == 0) {
+                                    sendContinueUserSwitchLocked(uss, oldUserId, newUserId);
+                                }
+                            }
+                        }
+                    };
+                    mUserSwitchObservers.getBroadcastItem(i).onUserSwitching(newUserId, callback);
                 } catch (RemoteException e) {
                 }
             }
@@ -1082,7 +1101,7 @@
     }
 
     void sendContinueUserSwitchLocked(UserState uss, int oldUserId, int newUserId) {
-        mCurUserSwitchCallback = null;
+        mCurWaitingUserSwitchCallbacks = null;
         mHandler.removeMessages(USER_SWITCH_TIMEOUT_MSG);
         mHandler.sendMessage(mHandler.obtainMessage(ActivityManagerService.CONTINUE_USER_SWITCH_MSG,
                 oldUserId, newUserId, uss));
@@ -1247,7 +1266,8 @@
                 ? getCurrentUserIdLocked(): userId;
     }
 
-    void registerUserSwitchObserver(IUserSwitchObserver observer) {
+    void registerUserSwitchObserver(IUserSwitchObserver observer, String name) {
+        Preconditions.checkNotNull(name, "Observer name cannot be null");
         if (mService.checkCallingPermission(INTERACT_ACROSS_USERS_FULL)
                 != PackageManager.PERMISSION_GRANTED) {
             final String msg = "Permission Denial: registerUserSwitchObserver() from pid="
@@ -1257,8 +1277,7 @@
             Slog.w(TAG, msg);
             throw new SecurityException(msg);
         }
-
-        mUserSwitchObservers.register(observer);
+        mUserSwitchObservers.register(observer, name);
     }
 
     void unregisterUserSwitchObserver(IUserSwitchObserver observer) {
diff --git a/services/core/java/com/android/server/am/UserState.java b/services/core/java/com/android/server/am/UserState.java
index 952283e..ff8014c 100644
--- a/services/core/java/com/android/server/am/UserState.java
+++ b/services/core/java/com/android/server/am/UserState.java
@@ -54,6 +54,7 @@
     public int state = STATE_BOOTING;
     public int lastState = STATE_BOOTING;
     public boolean switching;
+    public boolean tokenProvided;
 
     /**
      * The last time that a provider was reported to usage stats as being brought to important
diff --git a/services/core/java/com/android/server/am/UserSwitchingDialog.java b/services/core/java/com/android/server/am/UserSwitchingDialog.java
index 10e88e6..7022856 100644
--- a/services/core/java/com/android/server/am/UserSwitchingDialog.java
+++ b/services/core/java/com/android/server/am/UserSwitchingDialog.java
@@ -68,6 +68,12 @@
         String viewMessage;
         if (UserManager.isSplitSystemUser() && newUser.id == UserHandle.USER_SYSTEM) {
             viewMessage = res.getString(R.string.user_logging_out_message, oldUser.name);
+        } else if (UserManager.isDeviceInDemoMode(context)) {
+            if (oldUser.isDemo()) {
+                viewMessage = res.getString(R.string.demo_restarting_message);
+            } else {
+                viewMessage = res.getString(R.string.demo_starting_message);
+            }
         } else {
             viewMessage = res.getString(R.string.user_switching_message, newUser.name);
         }
diff --git a/services/core/java/com/android/server/connectivity/DnsEventListenerService.java b/services/core/java/com/android/server/connectivity/DnsEventListenerService.java
index 18ab731..8d206ef 100644
--- a/services/core/java/com/android/server/connectivity/DnsEventListenerService.java
+++ b/services/core/java/com/android/server/connectivity/DnsEventListenerService.java
@@ -17,15 +17,17 @@
 package com.android.server.connectivity;
 
 import android.content.Context;
-import android.net.metrics.DnsEvent;
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager.NetworkCallback;
 import android.net.Network;
 import android.net.NetworkRequest;
+import android.net.metrics.DnsEvent;
 import android.net.metrics.IDnsEventListener;
+import android.net.metrics.IpConnectivityLog;
 import android.util.Log;
 
 import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.IndentingPrintWriter;
 
 import java.io.PrintWriter;
@@ -45,12 +47,13 @@
     private static final boolean DBG = true;
     private static final boolean VDBG = false;
 
+    // TODO: read this constant from system property
     private static final int MAX_LOOKUPS_PER_DNS_EVENT = 100;
 
     // Stores the results of a number of consecutive DNS lookups on the same network.
     // This class is not thread-safe and it is the responsibility of the service to call its methods
     // on one thread at a time.
-    private static class DnsEventBatch {
+    private class DnsEventBatch {
         private final int mNetId;
 
         private final byte[] mEventTypes = new byte[MAX_LOOKUPS_PER_DNS_EVENT];
@@ -82,7 +85,7 @@
             byte[] eventTypes = Arrays.copyOf(mEventTypes, mEventCount);
             byte[] returnCodes = Arrays.copyOf(mReturnCodes, mEventCount);
             int[] latenciesMs = Arrays.copyOf(mLatenciesMs, mEventCount);
-            DnsEvent.logEvent(mNetId, eventTypes, returnCodes, latenciesMs);
+            mMetricsLog.log(new DnsEvent(mNetId, eventTypes, returnCodes, latenciesMs));
             maybeLog(String.format("Logging %d results for netId %d", mEventCount, mNetId));
             mEventCount = 0;
         }
@@ -96,13 +99,14 @@
     // Only sorted for ease of debugging. Because we only typically have a handful of networks up
     // at any given time, performance is not a concern.
     @GuardedBy("this")
-    private SortedMap<Integer, DnsEventBatch> mEventBatches = new TreeMap<>();
+    private final SortedMap<Integer, DnsEventBatch> mEventBatches = new TreeMap<>();
 
     // We register a NetworkCallback to ensure that when a network disconnects, we flush the DNS
     // queries we've logged on that network. Because we do not do this periodically, we might lose
     // up to MAX_LOOKUPS_PER_DNS_EVENT lookup stats on each network when the system is shutting
     // down. We believe this to be sufficient for now.
     private final ConnectivityManager mCm;
+    private final IpConnectivityLog mMetricsLog;
     private final NetworkCallback mNetworkCallback = new NetworkCallback() {
         @Override
         public void onLost(Network network) {
@@ -116,11 +120,15 @@
     };
 
     public DnsEventListenerService(Context context) {
+        this(context.getSystemService(ConnectivityManager.class), new IpConnectivityLog());
+    }
+
+    @VisibleForTesting
+    public DnsEventListenerService(ConnectivityManager cm, IpConnectivityLog log) {
         // We are started when boot is complete, so ConnectivityService should already be running.
-        final NetworkRequest request = new NetworkRequest.Builder()
-            .clearCapabilities()
-            .build();
-        mCm = context.getSystemService(ConnectivityManager.class);
+        mCm = cm;
+        mMetricsLog = log;
+        final NetworkRequest request = new NetworkRequest.Builder().clearCapabilities().build();
         mCm.registerNetworkCallback(request, mNetworkCallback);
     }
 
diff --git a/services/core/java/com/android/server/connectivity/MetricsLoggerService.java b/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
index 69ef30f..05f1a6e 100644
--- a/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
+++ b/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
@@ -16,6 +16,7 @@
 
 package com.android.server.connectivity;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.server.SystemService;
 
 import android.app.PendingIntent;
@@ -60,17 +61,11 @@
         }
     }
 
-    // TODO: read from system property
-    private final int MAX_NUMBER_OF_EVENTS = 1000;
-
-    // TODO: read from system property
-    private final int EVENTS_NOTIFICATION_THRESHOLD = 300;
-
-    // TODO: read from system property
-    private final int THROTTLING_TIME_INTERVAL_MILLIS = 60 * 60 * 1000; // 1 hour
-
-    // TODO: read from system property
+    // TODO: read these constants from system property
+    private final int EVENTS_NOTIFICATION_THRESHOLD                   = 300;
+    private final int MAX_NUMBER_OF_EVENTS                            = 1000;
     private final int THROTTLING_MAX_NUMBER_OF_MESSAGES_PER_COMPONENT = 1000;
+    private final long THROTTLING_TIME_INTERVAL_MILLIS                = DateUtils.HOUR_IN_MILLIS;
 
     private int mEventCounter = 0;
 
@@ -127,10 +122,13 @@
         mEvents.addLast(e);
     }
 
+    @VisibleForTesting
+    final MetricsLoggerImpl mBinder = new MetricsLoggerImpl();
+
     /**
      * Implementation of the IConnectivityMetricsLogger interface.
      */
-    private final IConnectivityMetricsLogger.Stub mBinder = new IConnectivityMetricsLogger.Stub() {
+    final class MetricsLoggerImpl extends IConnectivityMetricsLogger.Stub {
 
         private final ArrayList<PendingIntent> mPendingIntents = new ArrayList<>();
 
@@ -223,7 +221,9 @@
             }
 
             pw.println();
-            mDnsListener.dump(pw);
+            if (mDnsListener != null) {
+                mDnsListener.dump(pw);
+            }
         }
 
         public long logEvent(ConnectivityMetricsEvent event) {
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index d487bd0..7a25df6 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -28,14 +28,21 @@
 import android.net.NetworkState;
 import android.os.Handler;
 import android.os.Messenger;
+import android.os.SystemClock;
+import android.util.Log;
 import android.util.SparseArray;
 
 import com.android.internal.util.AsyncChannel;
+import com.android.internal.util.WakeupMessage;
 import com.android.server.ConnectivityService;
 import com.android.server.connectivity.NetworkMonitor;
 
+import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Comparator;
+import java.util.Objects;
+import java.util.SortedSet;
+import java.util.TreeSet;
 
 /**
  * A bag class used by ConnectivityService for holding a collection of most recent
@@ -143,12 +150,69 @@
     // Whether a captive portal was found during the last network validation attempt.
     public boolean lastCaptivePortalDetected;
 
-    // Indicates whether the network is lingering.  Networks are lingered when they become unneeded
-    // as a result of their NetworkRequests being satisfied by a different network, so as to allow
-    // communication to wrap up before the network is taken down.  This usually only happens to the
-    // default network.  Lingering ends with either the linger timeout expiring and the network
-    // being taken down, or the network satisfying a request again.
-    public boolean lingering;
+    // Networks are lingered when they become unneeded as a result of their NetworkRequests being
+    // satisfied by a higher-scoring network. so as to allow communication to wrap up before the
+    // network is taken down.  This usually only happens to the default network. Lingering ends with
+    // either the linger timeout expiring and the network being taken down, or the network
+    // satisfying a request again.
+    public static class LingerTimer implements Comparable<LingerTimer> {
+        public final NetworkRequest request;
+        public final long expiryMs;
+
+        public LingerTimer(NetworkRequest request, long expiryMs) {
+            this.request = request;
+            this.expiryMs = expiryMs;
+        }
+        public boolean equals(Object o) {
+            if (!(o instanceof LingerTimer)) return false;
+            LingerTimer other = (LingerTimer) o;
+            return (request.requestId == other.request.requestId) && (expiryMs == other.expiryMs);
+        }
+        public int hashCode() {
+            return Objects.hash(request.requestId, expiryMs);
+        }
+        public int compareTo(LingerTimer other) {
+            return (expiryMs != other.expiryMs) ?
+                    Long.compare(expiryMs, other.expiryMs) :
+                    Integer.compare(request.requestId, other.request.requestId);
+        }
+        public String toString() {
+            return String.format("%s, expires %dms", request.toString(),
+                    expiryMs - SystemClock.elapsedRealtime());
+        }
+    }
+
+    /**
+     * Inform ConnectivityService that the network LINGER period has
+     * expired.
+     * obj = this NetworkAgentInfo
+     */
+    public static final int EVENT_NETWORK_LINGER_COMPLETE = 1001;
+
+    // All linger timers for this network, sorted by expiry time. A linger timer is added whenever
+    // a request is moved to a network with a better score, regardless of whether the network is or
+    // was lingering or not.
+    // TODO: determine if we can replace this with a smaller or unsorted data structure. (e.g.,
+    // SparseLongArray) combined with the timestamp of when the last timer is scheduled to fire.
+    private final SortedSet<LingerTimer> mLingerTimers = new TreeSet<>();
+
+    // For fast lookups. Indexes into mLingerTimers by request ID.
+    private final SparseArray<LingerTimer> mLingerTimerForRequest = new SparseArray<>();
+
+    // Linger expiry timer. Armed whenever mLingerTimers is non-empty, regardless of whether the
+    // network is lingering or not. Always set to the expiry of the LingerTimer that expires last.
+    // When the timer fires, all linger state is cleared, and if the network has no requests, it is
+    // torn down.
+    private WakeupMessage mLingerMessage;
+
+    // Linger expiry. Holds the expiry time of the linger timer, or 0 if the timer is not armed.
+    private long mLingerExpiryMs;
+
+    // Whether the network is lingering or not. Must be maintained separately from the above because
+    // it depends on the state of other networks and requests, which only ConnectivityService knows.
+    // (Example: we don't linger a network if it would become the best for a NetworkRequest if it
+    // validated).
+    private boolean mLingering;
 
     // This represents the last score received from the NetworkAgent.
     private int currentScore;
@@ -162,11 +226,11 @@
     private static final int MAXIMUM_NETWORK_SCORE = 100;
 
     // The list of NetworkRequests being satisfied by this Network.
-    public final SparseArray<NetworkRequest> networkRequests = new SparseArray<NetworkRequest>();
+    private final SparseArray<NetworkRequest> mNetworkRequests = new SparseArray<>();
     // The list of NetworkRequests that this Network previously satisfied with the highest
     // score.  A non-empty list indicates that if this Network was validated it is lingered.
-    // NOTE: This list is only used for debugging.
-    public final ArrayList<NetworkRequest> networkLingered = new ArrayList<NetworkRequest>();
+    // How many of the satisfied requests are actual requests and not listens.
+    private int mNumRequestNetworkRequests = 0;
 
     public final Messenger messenger;
     public final AsyncChannel asyncChannel;
@@ -174,6 +238,12 @@
     // Used by ConnectivityService to keep track of 464xlat.
     public Nat464Xlat clatd;
 
+    private static final String TAG = ConnectivityService.class.getSimpleName();
+    private static final boolean VDBG = false;
+    private final ConnectivityService mConnService;
+    private final Context mContext;
+    private final Handler mHandler;
+
     public NetworkAgentInfo(Messenger messenger, AsyncChannel ac, Network net, NetworkInfo info,
             LinkProperties lp, NetworkCapabilities nc, int score, Context context, Handler handler,
             NetworkMisc misc, NetworkRequest defaultRequest, ConnectivityService connService) {
@@ -184,22 +254,74 @@
         linkProperties = lp;
         networkCapabilities = nc;
         currentScore = score;
-        networkMonitor = connService.createNetworkMonitor(context, handler, this, defaultRequest);
+        mConnService = connService;
+        mContext = context;
+        mHandler = handler;
+        networkMonitor = mConnService.createNetworkMonitor(context, handler, this, defaultRequest);
         networkMisc = misc;
     }
 
+    // Functions for manipulating the requests satisfied by this network.
+    //
+    // These functions must only called on ConnectivityService's main thread.
+
     /**
      * Add {@code networkRequest} to this network as it's satisfied by this network.
-     * NOTE: This function must only be called on ConnectivityService's main thread.
      * @return true if {@code networkRequest} was added or false if {@code networkRequest} was
      *         already present.
      */
     public boolean addRequest(NetworkRequest networkRequest) {
-        if (networkRequests.get(networkRequest.requestId) == networkRequest) return false;
-        networkRequests.put(networkRequest.requestId, networkRequest);
+        NetworkRequest existing = mNetworkRequests.get(networkRequest.requestId);
+        if (existing == networkRequest) return false;
+        if (existing != null && existing.isRequest()) mNumRequestNetworkRequests--;
+        mNetworkRequests.put(networkRequest.requestId, networkRequest);
+        if (networkRequest.isRequest()) mNumRequestNetworkRequests++;
         return true;
     }
 
+    /**
+     * Remove the specified request from this network.
+     */
+    public void removeRequest(int requestId) {
+        NetworkRequest existing = mNetworkRequests.get(requestId);
+        if (existing == null) return;
+        mNetworkRequests.remove(requestId);
+        if (existing.isRequest()) {
+            mNumRequestNetworkRequests--;
+            unlingerRequest(existing);
+        }
+    }
+
+    /**
+     * Returns whether this network is currently satisfying the request with the specified ID.
+     */
+    public boolean isSatisfyingRequest(int id) {
+        return mNetworkRequests.get(id) != null;
+    }
+
+    /**
+     * Returns the request at the specified position in the list of requests satisfied by this
+     * network.
+     */
+    public NetworkRequest requestAt(int index) {
+        return mNetworkRequests.valueAt(index);
+    }
+
+    /**
+     * Returns the number of requests currently satisfied by this network for which
+     * {@link android.net.NetworkRequest#isRequest} returns {@code true}.
+     */
+    public int numRequestNetworkRequests() {
+        return mNumRequestNetworkRequests;
+    }
+
+    /**
+     * Returns the number of requests of any type currently satisfied by this network.
+     */
+    public int numNetworkRequests() {
+        return mNetworkRequests.size();
+    }
+
     // Does this network satisfy request?
     public boolean satisfies(NetworkRequest request) {
         return created &&
@@ -269,13 +391,100 @@
         }
     }
 
+    /**
+     * Sets the specified request to linger on this network for the specified time. Called by
+     * ConnectivityService when the request is moved to another network with a higher score.
+     */
+    public void lingerRequest(NetworkRequest request, long now, long duration) {
+        if (mLingerTimerForRequest.get(request.requestId) != null) {
+            // Cannot happen. Once a request is lingering on a particular network, we cannot
+            // re-linger it unless that network becomes the best for that request again, in which
+            // case we should have unlingered it.
+            Log.wtf(TAG, this.name() + ": request " + request.requestId + " already lingered");
+        }
+        final long expiryMs = now + duration;
+        LingerTimer timer = new LingerTimer(request, expiryMs);
+        if (VDBG) Log.d(TAG, "Adding LingerTimer " + timer + " to " + this.name());
+        mLingerTimers.add(timer);
+        mLingerTimerForRequest.put(request.requestId, timer);
+    }
+
+    /**
+     * Cancel lingering. Called by ConnectivityService when a request is added to this network.
+     */
+    public void unlingerRequest(NetworkRequest request) {
+        LingerTimer timer = mLingerTimerForRequest.get(request.requestId);
+        if (timer != null) {
+            if (VDBG) Log.d(TAG, "Removing LingerTimer " + timer + " from " + this.name());
+            mLingerTimers.remove(timer);
+            mLingerTimerForRequest.remove(request.requestId);
+        }
+    }
+
+    public long getLingerExpiry() {
+        return mLingerExpiryMs;
+    }
+
+    public void updateLingerTimer() {
+        long newExpiry = mLingerTimers.isEmpty() ? 0 : mLingerTimers.last().expiryMs;
+        if (newExpiry == mLingerExpiryMs) return;
+
+        // Even if we're going to reschedule the timer, cancel it first. This is because the
+        // semantics of WakeupMessage guarantee that if cancel is called then the alarm will
+        // never call its callback (handleLingerComplete), even if it has already fired.
+        // WakeupMessage makes no such guarantees about rescheduling a message, so if mLingerMessage
+        // has already been dispatched, rescheduling to some time in the future it won't stop it
+        // from calling its callback immediately.
+        if (mLingerMessage != null) {
+            mLingerMessage.cancel();
+            mLingerMessage = null;
+        }
+
+        if (newExpiry > 0) {
+            mLingerMessage = mConnService.makeWakeupMessage(
+                    mContext, mHandler,
+                    "NETWORK_LINGER_COMPLETE." + network.netId,
+                    EVENT_NETWORK_LINGER_COMPLETE, this);
+            mLingerMessage.schedule(newExpiry);
+        }
+
+        mLingerExpiryMs = newExpiry;
+    }
+
+    public void linger() {
+        mLingering = true;
+    }
+
+    public void unlinger() {
+        mLingering = false;
+    }
+
+    public boolean isLingering() {
+        return mLingering;
+    }
+
+    public void clearLingerState() {
+        if (mLingerMessage != null) {
+            mLingerMessage.cancel();
+            mLingerMessage = null;
+        }
+        mLingerTimers.clear();
+        mLingerTimerForRequest.clear();
+        updateLingerTimer();  // Sets mLingerExpiryMs, cancels and nulls out mLingerMessage.
+        mLingering = false;
+    }
+
+    public void dumpLingerTimers(PrintWriter pw) {
+        for (LingerTimer timer : mLingerTimers) { pw.println(timer); }
+    }
+
     public String toString() {
         return "NetworkAgentInfo{ ni{" + networkInfo + "}  " +
                 "network{" + network + "}  nethandle{" + network.getNetworkHandle() + "}  " +
                 "lp{" + linkProperties + "}  " +
                 "nc{" + networkCapabilities + "}  Score{" + getCurrentScore() + "}  " +
                 "everValidated{" + everValidated + "}  lastValidated{" + lastValidated + "}  " +
-                "created{" + created + "} lingering{" + lingering + "} " +
+                "created{" + created + "} lingering{" + isLingering() + "} " +
                 "explicitlySelected{" + networkMisc.explicitlySelected + "} " +
                 "acceptUnvalidated{" + networkMisc.acceptUnvalidated + "} " +
                 "everCaptivePortalDetected{" + everCaptivePortalDetected + "} " +
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index f4e1424..92c4577 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -34,8 +34,9 @@
 import android.net.ProxyInfo;
 import android.net.TrafficStats;
 import android.net.Uri;
-import android.net.metrics.ValidationProbeEvent;
+import android.net.metrics.IpConnectivityLog;
 import android.net.metrics.NetworkEvent;
+import android.net.metrics.ValidationProbeEvent;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.util.Stopwatch;
@@ -66,7 +67,6 @@
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
 import com.android.internal.util.WakeupMessage;
-import com.android.server.connectivity.NetworkAgentInfo;
 
 import java.io.IOException;
 import java.net.HttpURLConnection;
@@ -132,31 +132,6 @@
     public static final int EVENT_NETWORK_TESTED = BASE + 2;
 
     /**
-     * Inform NetworkMonitor to linger a network.  The Monitor should
-     * start a timer and/or start watching for zero live connections while
-     * moving towards LINGER_COMPLETE.  After the Linger period expires
-     * (or other events mark the end of the linger state) the LINGER_COMPLETE
-     * event should be sent and the network will be shut down.  If a
-     * CMD_NETWORK_CONNECTED happens before the LINGER completes
-     * it indicates further desire to keep the network alive and so
-     * the LINGER is aborted.
-     */
-    public static final int CMD_NETWORK_LINGER = BASE + 3;
-
-    /**
-     * Message to self indicating linger delay has expired.
-     * arg1 = Token to ignore old messages.
-     */
-    private static final int CMD_LINGER_EXPIRED = BASE + 4;
-
-    /**
-     * Inform ConnectivityService that the network LINGER period has
-     * expired.
-     * obj = NetworkAgentInfo
-     */
-    public static final int EVENT_NETWORK_LINGER_COMPLETE = BASE + 5;
-
-    /**
      * Message to self indicating it's time to evaluate a network's connectivity.
      * arg1 = Token to ignore old messages.
      */
@@ -204,12 +179,6 @@
      */
     private static final int CMD_CAPTIVE_PORTAL_RECHECK = BASE + 12;
 
-    private static final String LINGER_DELAY_PROPERTY = "persist.netmon.linger";
-    // Default to 30s linger time-out.  Modifyable only for testing.
-    private static int DEFAULT_LINGER_DELAY_MS = 30000;
-    private final int mLingerDelayMs;
-    private int mLingerToken = 0;
-
     // Start mReevaluateDelayMs at this value and double.
     private static final int INITIAL_REEVALUATE_DELAY_MS = 1000;
     private static final int MAX_REEVALUATE_DELAY_MS = 10*60*1000;
@@ -231,6 +200,7 @@
     private final WifiManager mWifiManager;
     private final AlarmManager mAlarmManager;
     private final NetworkRequest mDefaultRequest;
+    private final IpConnectivityLog mMetricsLog = new IpConnectivityLog();
 
     private boolean mIsCaptivePortalCheckEnabled;
     private boolean mUseHttps;
@@ -247,7 +217,6 @@
     private final State mMaybeNotifyState = new MaybeNotifyState();
     private final State mEvaluatingState = new EvaluatingState();
     private final State mCaptivePortalState = new CaptivePortalState();
-    private final State mLingeringState = new LingeringState();
 
     private CustomIntentReceiver mLaunchCaptivePortalAppBroadcastReceiver = null;
 
@@ -274,11 +243,8 @@
         addState(mMaybeNotifyState, mDefaultState);
             addState(mEvaluatingState, mMaybeNotifyState);
             addState(mCaptivePortalState, mMaybeNotifyState);
-        addState(mLingeringState, mDefaultState);
         setInitialState(mDefaultState);
 
-        mLingerDelayMs = SystemProperties.getInt(LINGER_DELAY_PROPERTY, DEFAULT_LINGER_DELAY_MS);
-
         mIsCaptivePortalCheckEnabled = Settings.Global.getInt(mContext.getContentResolver(),
                 Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED, 1) == 1;
         mUseHttps = Settings.Global.getInt(mContext.getContentResolver(),
@@ -307,16 +273,12 @@
         @Override
         public boolean processMessage(Message message) {
             switch (message.what) {
-                case CMD_NETWORK_LINGER:
-                    log("Lingering");
-                    transitionTo(mLingeringState);
-                    return HANDLED;
                 case CMD_NETWORK_CONNECTED:
-                    NetworkEvent.logEvent(mNetId, NetworkEvent.NETWORK_CONNECTED);
+                    logNetworkEvent(NetworkEvent.NETWORK_CONNECTED);
                     transitionTo(mEvaluatingState);
                     return HANDLED;
                 case CMD_NETWORK_DISCONNECTED:
-                    NetworkEvent.logEvent(mNetId, NetworkEvent.NETWORK_DISCONNECTED);
+                    logNetworkEvent(NetworkEvent.NETWORK_DISCONNECTED);
                     if (mLaunchCaptivePortalAppBroadcastReceiver != null) {
                         mContext.unregisterReceiver(mLaunchCaptivePortalAppBroadcastReceiver);
                         mLaunchCaptivePortalAppBroadcastReceiver = null;
@@ -381,10 +343,7 @@
     private class ValidatedState extends State {
         @Override
         public void enter() {
-            if (mEvaluationTimer.isRunning()) {
-                NetworkEvent.logValidated(mNetId, mEvaluationTimer.stop());
-                mEvaluationTimer.reset();
-            }
+            maybeLogEvaluationResult(NetworkEvent.NETWORK_VALIDATED);
             mConnectivityServiceHandler.sendMessage(obtainMessage(EVENT_NETWORK_TESTED,
                     NETWORK_TEST_RESULT_VALID, mNetworkAgentInfo.network.netId, null));
         }
@@ -531,7 +490,7 @@
                     } else {
                         final Message msg = obtainMessage(CMD_REEVALUATE, ++mReevaluateToken, 0);
                         sendMessageDelayed(msg, mReevaluateDelayMs);
-                        NetworkEvent.logEvent(mNetId, NetworkEvent.NETWORK_VALIDATION_FAILED);
+                        logNetworkEvent(NetworkEvent.NETWORK_VALIDATION_FAILED);
                         mConnectivityServiceHandler.sendMessage(obtainMessage(
                                 EVENT_NETWORK_TESTED, NETWORK_TEST_RESULT_INVALID, mNetId,
                                 probeResult.mRedirectUrl));
@@ -591,10 +550,7 @@
 
         @Override
         public void enter() {
-            if (mEvaluationTimer.isRunning()) {
-                NetworkEvent.logCaptivePortalFound(mNetId, mEvaluationTimer.stop());
-                mEvaluationTimer.reset();
-            }
+            maybeLogEvaluationResult(NetworkEvent.NETWORK_CAPTIVE_PORTAL_FOUND);
             // Don't annoy user with sign-in notifications.
             if (mDontDisplaySigninNotification) return;
             // Create a CustomIntentReceiver that sends us a
@@ -618,73 +574,7 @@
 
         @Override
         public void exit() {
-             removeMessages(CMD_CAPTIVE_PORTAL_RECHECK);
-        }
-    }
-
-    // Being in the LingeringState State indicates a Network's validated bit is true and it once
-    // was the highest scoring Network satisfying a particular NetworkRequest, but since then
-    // another Network satisfied the NetworkRequest with a higher score and hence this Network
-    // is "lingered" for a fixed period of time before it is disconnected.  This period of time
-    // allows apps to wrap up communication and allows for seamless reactivation if the other
-    // higher scoring Network happens to disconnect.
-    private class LingeringState extends State {
-        private static final String ACTION_LINGER_EXPIRED = "android.net.netmon.lingerExpired";
-
-        private WakeupMessage mWakeupMessage;
-
-        @Override
-        public void enter() {
-            mEvaluationTimer.reset();
-            final String cmdName = ACTION_LINGER_EXPIRED + "." + mNetId;
-            mWakeupMessage = makeWakeupMessage(mContext, getHandler(), cmdName, CMD_LINGER_EXPIRED);
-            long wakeupTime = SystemClock.elapsedRealtime() + mLingerDelayMs;
-            mWakeupMessage.schedule(wakeupTime);
-        }
-
-        @Override
-        public boolean processMessage(Message message) {
-            switch (message.what) {
-                case CMD_NETWORK_CONNECTED:
-                    log("Unlingered");
-                    // If already validated, go straight to validated state.
-                    if (mNetworkAgentInfo.lastValidated) {
-                        transitionTo(mValidatedState);
-                        return HANDLED;
-                    }
-                    return NOT_HANDLED;
-                case CMD_LINGER_EXPIRED:
-                    mConnectivityServiceHandler.sendMessage(
-                            obtainMessage(EVENT_NETWORK_LINGER_COMPLETE, mNetworkAgentInfo));
-                    return HANDLED;
-                case CMD_FORCE_REEVALUATION:
-                    // Ignore reevaluation attempts when lingering.  A reevaluation could result
-                    // in a transition to the validated state which would abort the linger
-                    // timeout.  Lingering is the result of score assessment; validity is
-                    // irrelevant.
-                    return HANDLED;
-                case CMD_CAPTIVE_PORTAL_APP_FINISHED:
-                    // Ignore user network determination as this could abort linger timeout.
-                    // Networks are only lingered once validated because:
-                    // - Unvalidated networks are never lingered (see rematchNetworkAndRequests).
-                    // - Once validated, a Network's validated bit is never cleared.
-                    // Since networks are only lingered after being validated a user's
-                    // determination will not change the death sentence that lingering entails:
-                    // - If the user wants to use the network or bypasses the captive portal,
-                    //   the network's score will not be increased beyond its current value
-                    //   because it is already validated.  Without a score increase there is no
-                    //   chance of reactivation (i.e. aborting linger timeout).
-                    // - If the user does not want the network, lingering will disconnect the
-                    //   network anyhow.
-                    return HANDLED;
-                default:
-                    return NOT_HANDLED;
-            }
-        }
-
-        @Override
-        public void exit() {
-            mWakeupMessage.cancel();
+            removeMessages(CMD_CAPTIVE_PORTAL_RECHECK);
         }
     }
 
@@ -759,11 +649,12 @@
         if (!TextUtils.isEmpty(hostToResolve)) {
             String probeName = ValidationProbeEvent.getProbeName(ValidationProbeEvent.PROBE_DNS);
             final Stopwatch dnsTimer = new Stopwatch().start();
+            int dnsResult;
+            long dnsLatency;
             try {
                 InetAddress[] addresses = mNetworkAgentInfo.network.getAllByName(hostToResolve);
-                long dnsLatency = dnsTimer.stop();
-                ValidationProbeEvent.logEvent(mNetId, dnsLatency,
-                        ValidationProbeEvent.PROBE_DNS, ValidationProbeEvent.DNS_SUCCESS);
+                dnsResult = ValidationProbeEvent.DNS_SUCCESS;
+                dnsLatency = dnsTimer.stop();
                 final StringBuffer connectInfo = new StringBuffer(", " + hostToResolve + "=");
                 for (InetAddress address : addresses) {
                     connectInfo.append(address.getHostAddress());
@@ -771,11 +662,11 @@
                 }
                 validationLog(probeName + " OK " + dnsLatency + "ms" + connectInfo);
             } catch (UnknownHostException e) {
-                long dnsLatency = dnsTimer.stop();
-                ValidationProbeEvent.logEvent(mNetId, dnsLatency,
-                        ValidationProbeEvent.PROBE_DNS, ValidationProbeEvent.DNS_FAILURE);
+                dnsResult = ValidationProbeEvent.DNS_FAILURE;
+                dnsLatency = dnsTimer.stop();
                 validationLog(probeName + " FAIL " + dnsLatency + "ms, " + hostToResolve);
             }
+            logValidationProbe(dnsLatency, ValidationProbeEvent.PROBE_DNS, dnsResult);
         }
 
         CaptivePortalProbeResult result;
@@ -856,7 +747,7 @@
                 urlConnection.disconnect();
             }
         }
-        ValidationProbeEvent.logEvent(mNetId, probeTimer.stop(), probeType, httpResponseCode);
+        logValidationProbe(probeTimer.stop(), probeType, httpResponseCode);
         return new CaptivePortalProbeResult(httpResponseCode, redirectUrl);
     }
 
@@ -1000,17 +891,18 @@
                 PERMISSION_ACCESS_NETWORK_CONDITIONS);
     }
 
-    // Allow tests to override linger time.
-    @VisibleForTesting
-    public static void SetDefaultLingerTime(int time_ms) {
-        if (Process.myUid() == Process.SYSTEM_UID) {
-            throw new SecurityException("SetDefaultLingerTime only for internal testing.");
-        }
-        DEFAULT_LINGER_DELAY_MS = time_ms;
+    private void logNetworkEvent(int evtype) {
+        mMetricsLog.log(new NetworkEvent(mNetId, evtype));
     }
 
-    @VisibleForTesting
-    protected WakeupMessage makeWakeupMessage(Context c, Handler h, String s, int i) {
-        return new WakeupMessage(c, h, s, i);
+    private void maybeLogEvaluationResult(int evtype) {
+        if (mEvaluationTimer.isRunning()) {
+            mMetricsLog.log(new NetworkEvent(mNetId, evtype, mEvaluationTimer.stop()));
+            mEvaluationTimer.reset();
+        }
+    }
+
+    private void logValidationProbe(long durationMs, int probeType, int probeResult) {
+        mMetricsLog.log(new ValidationProbeEvent(mNetId, durationMs, probeType, probeResult));
     }
 }
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 1012f9a..bef48d6 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -34,8 +34,6 @@
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager.NetworkCallback;
 import android.net.INetworkStatsService;
-import android.net.InterfaceConfiguration;
-import android.net.LinkAddress;
 import android.net.LinkProperties;
 import android.net.Network;
 import android.net.NetworkCapabilities;
@@ -58,18 +56,20 @@
 import android.telephony.CarrierConfigManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
+import android.util.ArrayMap;
 import android.util.Log;
 import android.util.SparseArray;
 
 import com.android.internal.telephony.IccCardConstants;
 import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.util.IState;
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.internal.util.MessageUtils;
 import com.android.internal.util.Protocol;
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
 import com.android.server.IoThread;
+import com.android.server.connectivity.tethering.IControlsTethering;
+import com.android.server.connectivity.tethering.TetherInterfaceStateMachine;
 import com.android.server.net.BaseNetworkObserver;
 
 import java.io.FileDescriptor;
@@ -81,18 +81,16 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
 
 
 /**
  * @hide
  *
- * Timeout
- *
- * TODO - look for parent classes and code sharing
+ * This class holds much of the business logic to allow Android devices
+ * to act as IP gateways via USB, BT, and WiFi interfaces.
  */
-public class Tethering extends BaseNetworkObserver {
+public class Tethering extends BaseNetworkObserver implements IControlsTethering {
 
     private final Context mContext;
     private final static String TAG = "Tethering";
@@ -100,7 +98,7 @@
     private final static boolean VDBG = false;
 
     private static final Class[] messageClasses = {
-            Tethering.class, TetherMasterSM.class, TetherInterfaceSM.class
+            Tethering.class, TetherMasterSM.class, TetherInterfaceStateMachine.class
     };
     private static final SparseArray<String> sMagicDecoderRing =
             MessageUtils.findMessageNames(messageClasses);
@@ -126,17 +124,25 @@
     private final INetworkStatsService mStatsService;
     private final Looper mLooper;
 
-    private HashMap<String, TetherInterfaceSM> mIfaces; // all tethered/tetherable ifaces
+    private static class TetherState {
+        public final TetherInterfaceStateMachine mStateMachine;
+        public int mLastState;
+        public int mLastError;
+        public TetherState(TetherInterfaceStateMachine sm) {
+            mStateMachine = sm;
+            // Assume all state machines start out available and with no errors.
+            mLastState = IControlsTethering.STATE_AVAILABLE;
+            mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+        }
+    }
+    private final ArrayMap<String, TetherState> mTetherStates;
 
-    private BroadcastReceiver mStateReceiver;
+    private final BroadcastReceiver mStateReceiver;
 
     // {@link ComponentName} of the Service used to run tether provisioning.
     private static final ComponentName TETHER_SERVICE = ComponentName.unflattenFromString(Resources
             .getSystem().getString(com.android.internal.R.string.config_wifi_tether_enable));
 
-    private static final String USB_NEAR_IFACE_ADDR      = "192.168.42.129";
-    private static final int USB_PREFIX_LENGTH        = 24;
-
     // USB is  192.168.42.1 and 255.255.255.0
     // Wifi is 192.168.43.1 and 255.255.255.0
     // BT is limited to max default of 5 connections. 192.168.44.1 to 192.168.48.1
@@ -166,6 +172,9 @@
     private boolean mUsbTetherRequested; // true if USB tethering should be started
                                          // when RNDIS is enabled
 
+    // True iff WiFi tethering should be started when soft AP is ready.
+    private boolean mWifiTetherRequested;
+
     public Tethering(Context context, INetworkManagementService nmService,
             INetworkStatsService statsService) {
         mContext = context;
@@ -174,7 +183,7 @@
 
         mPublicSync = new Object();
 
-        mIfaces = new HashMap<String, TetherInterfaceSM>();
+        mTetherStates = new ArrayMap<>();
 
         // make our own thread so we don't anr the system
         mLooper = IoThread.get().getLooper();
@@ -187,6 +196,7 @@
         IntentFilter filter = new IntentFilter();
         filter.addAction(UsbManager.ACTION_USB_STATE);
         filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+        filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
         filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
         mContext.registerReceiver(mStateReceiver, filter);
 
@@ -227,7 +237,7 @@
 
         int ifaceTypes[] = mContext.getResources().getIntArray(
                 com.android.internal.R.array.config_tether_upstream_types);
-        Collection<Integer> upstreamIfaceTypes = new ArrayList();
+        Collection<Integer> upstreamIfaceTypes = new ArrayList<>();
         for (int i : ifaceTypes) {
             upstreamIfaceTypes.add(new Integer(i));
         }
@@ -248,34 +258,26 @@
         // Never called directly: only called from interfaceLinkStateChanged.
         // See NetlinkHandler.cpp:71.
         if (VDBG) Log.d(TAG, "interfaceStatusChanged " + iface + ", " + up);
-        boolean found = false;
-        boolean usb = false;
         synchronized (mPublicSync) {
-            if (isWifi(iface)) {
-                found = true;
-            } else if (isUsb(iface)) {
-                found = true;
-                usb = true;
-            } else if (isBluetooth(iface)) {
-                found = true;
+            int interfaceType = ifaceNameToType(iface);
+            if (interfaceType == ConnectivityManager.TETHERING_INVALID) {
+                return;
             }
-            if (found == false) return;
 
-            TetherInterfaceSM sm = mIfaces.get(iface);
+            TetherState tetherState = mTetherStates.get(iface);
             if (up) {
-                if (sm == null) {
-                    sm = new TetherInterfaceSM(iface, mLooper, usb);
-                    mIfaces.put(iface, sm);
-                    sm.start();
+                if (tetherState == null) {
+                    trackNewTetherableInterface(iface, interfaceType);
                 }
             } else {
-                if (isUsb(iface)) {
+                if (interfaceType == ConnectivityManager.TETHERING_USB) {
                     // ignore usb0 down after enabling RNDIS
                     // we will handle disconnect in interfaceRemoved instead
                     if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
-                } else if (sm != null) {
-                    sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN);
-                    mIfaces.remove(iface);
+                } else if (tetherState != null) {
+                    tetherState.mStateMachine.sendMessage(
+                            TetherInterfaceStateMachine.CMD_INTERFACE_DOWN);
+                    mTetherStates.remove(iface);
                 }
             }
         }
@@ -295,7 +297,7 @@
         }
     }
 
-    public boolean isWifi(String iface) {
+    private boolean isWifi(String iface) {
         synchronized (mPublicSync) {
             for (String regex : mTetherableWifiRegexs) {
                 if (iface.matches(regex)) return true;
@@ -304,7 +306,7 @@
         }
     }
 
-    public boolean isBluetooth(String iface) {
+    private boolean isBluetooth(String iface) {
         synchronized (mPublicSync) {
             for (String regex : mTetherableBluetoothRegexs) {
                 if (iface.matches(regex)) return true;
@@ -313,35 +315,33 @@
         }
     }
 
+    private int ifaceNameToType(String iface) {
+        if (isWifi(iface)) {
+            return ConnectivityManager.TETHERING_WIFI;
+        } else if (isUsb(iface)) {
+            return ConnectivityManager.TETHERING_USB;
+        } else if (isBluetooth(iface)) {
+            return ConnectivityManager.TETHERING_BLUETOOTH;
+        }
+        return ConnectivityManager.TETHERING_INVALID;
+    }
+
     @Override
     public void interfaceAdded(String iface) {
         if (VDBG) Log.d(TAG, "interfaceAdded " + iface);
-        boolean found = false;
-        boolean usb = false;
         synchronized (mPublicSync) {
-            if (isWifi(iface)) {
-                found = true;
-            }
-            if (isUsb(iface)) {
-                found = true;
-                usb = true;
-            }
-            if (isBluetooth(iface)) {
-                found = true;
-            }
-            if (found == false) {
+            int interfaceType = ifaceNameToType(iface);
+            if (interfaceType == ConnectivityManager.TETHERING_INVALID) {
                 if (VDBG) Log.d(TAG, iface + " is not a tetherable iface, ignoring");
                 return;
             }
 
-            TetherInterfaceSM sm = mIfaces.get(iface);
-            if (sm != null) {
+            TetherState tetherState = mTetherStates.get(iface);
+            if (tetherState == null) {
+                trackNewTetherableInterface(iface, interfaceType);
+            } else {
                 if (VDBG) Log.d(TAG, "active iface (" + iface + ") reported as added, ignoring");
-                return;
             }
-            sm = new TetherInterfaceSM(iface, mLooper, usb);
-            mIfaces.put(iface, sm);
-            sm.start();
         }
     }
 
@@ -349,15 +349,15 @@
     public void interfaceRemoved(String iface) {
         if (VDBG) Log.d(TAG, "interfaceRemoved " + iface);
         synchronized (mPublicSync) {
-            TetherInterfaceSM sm = mIfaces.get(iface);
-            if (sm == null) {
+            TetherState tetherState = mTetherStates.get(iface);
+            if (tetherState == null) {
                 if (VDBG) {
                     Log.e(TAG, "attempting to remove unknown iface (" + iface + "), ignoring");
                 }
                 return;
             }
-            sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN);
-            mIfaces.remove(iface);
+            tetherState.mStateMachine.sendMessage(TetherInterfaceStateMachine.CMD_INTERFACE_DOWN);
+            mTetherStates.remove(iface);
         }
     }
 
@@ -413,24 +413,19 @@
      * for the specified interface.
      */
     private void enableTetheringInternal(int type, boolean enable, ResultReceiver receiver) {
-        boolean isProvisioningRequired = isTetherProvisioningRequired();
+        boolean isProvisioningRequired = enable && isTetherProvisioningRequired();
+        int result;
         switch (type) {
             case ConnectivityManager.TETHERING_WIFI:
-                final WifiManager wifiManager =
-                        (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-                if (wifiManager.setWifiApEnabled(null, enable)) {
-                    sendTetherResult(receiver, ConnectivityManager.TETHER_ERROR_NO_ERROR);
-                    if (enable && isProvisioningRequired) {
-                        scheduleProvisioningRechecks(type);
-                    }
-                } else{
-                    sendTetherResult(receiver, ConnectivityManager.TETHER_ERROR_MASTER_ERROR);
+                result = setWifiTethering(enable);
+                if (isProvisioningRequired && result == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+                    scheduleProvisioningRechecks(type);
                 }
+                sendTetherResult(receiver, result);
                 break;
             case ConnectivityManager.TETHERING_USB:
-                int result = setUsbTethering(enable);
-                if (enable && isProvisioningRequired &&
-                        result == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+                result = setUsbTethering(enable);
+                if (isProvisioningRequired && result == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
                     scheduleProvisioningRechecks(type);
                 }
                 sendTetherResult(receiver, result);
@@ -450,6 +445,20 @@
         }
     }
 
+    private int setWifiTethering(final boolean enable) {
+        synchronized (mPublicSync) {
+            // Note that we're maintaining a predicate that mWifiTetherRequested always matches
+            // our last request to WifiManager re: its AP enabled status.
+            mWifiTetherRequested = enable;
+            final WifiManager wifiManager =
+                    (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
+            if (wifiManager.setWifiApEnabled(null /* use existing wifi config */, enable)) {
+                return ConnectivityManager.TETHER_ERROR_NO_ERROR;
+            }
+            return ConnectivityManager.TETHER_ERROR_MASTER_ERROR;
+        }
+    }
+
     private void setBluetoothTethering(final boolean enable, final ResultReceiver receiver) {
         final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
         if (adapter == null || !adapter.isEnabled()) {
@@ -576,62 +585,62 @@
 
     public int tether(String iface) {
         if (DBG) Log.d(TAG, "Tethering " + iface);
-        TetherInterfaceSM sm = null;
         synchronized (mPublicSync) {
-            sm = mIfaces.get(iface);
+            TetherState tetherState = mTetherStates.get(iface);
+            if (tetherState == null) {
+                Log.e(TAG, "Tried to Tether an unknown iface :" + iface + ", ignoring");
+                return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
+            }
+            // Ignore the error status of the interface.  If the interface is available,
+            // the errors are referring to past tethering attempts anyway.
+            if (tetherState.mLastState != IControlsTethering.STATE_AVAILABLE) {
+                Log.e(TAG, "Tried to Tether an unavailable iface :" + iface + ", ignoring");
+                return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
+            }
+            tetherState.mStateMachine.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
+            return ConnectivityManager.TETHER_ERROR_NO_ERROR;
         }
-        if (sm == null) {
-            Log.e(TAG, "Tried to Tether an unknown iface :" + iface + ", ignoring");
-            return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
-        }
-        if (!sm.isAvailable() && !sm.isErrored()) {
-            Log.e(TAG, "Tried to Tether an unavailable iface :" + iface + ", ignoring");
-            return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
-        }
-        sm.sendMessage(TetherInterfaceSM.CMD_TETHER_REQUESTED);
-        return ConnectivityManager.TETHER_ERROR_NO_ERROR;
     }
 
     public int untether(String iface) {
         if (DBG) Log.d(TAG, "Untethering " + iface);
-        TetherInterfaceSM sm = null;
         synchronized (mPublicSync) {
-            sm = mIfaces.get(iface);
+            TetherState tetherState = mTetherStates.get(iface);
+            if (tetherState == null) {
+                Log.e(TAG, "Tried to Untether an unknown iface :" + iface + ", ignoring");
+                return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
+            }
+            if (tetherState.mLastState != IControlsTethering.STATE_TETHERED) {
+                Log.e(TAG, "Tried to untether an untethered iface :" + iface + ", ignoring");
+                return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
+            }
+            tetherState.mStateMachine.sendMessage(
+                    TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
+            return ConnectivityManager.TETHER_ERROR_NO_ERROR;
         }
-        if (sm == null) {
-            Log.e(TAG, "Tried to Untether an unknown iface :" + iface + ", ignoring");
-            return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
-        }
-        if (sm.isErrored()) {
-            Log.e(TAG, "Tried to Untethered an errored iface :" + iface + ", ignoring");
-            return ConnectivityManager.TETHER_ERROR_UNAVAIL_IFACE;
-        }
-        sm.sendMessage(TetherInterfaceSM.CMD_TETHER_UNREQUESTED);
-        return ConnectivityManager.TETHER_ERROR_NO_ERROR;
     }
 
     public void untetherAll() {
-        if (DBG) Log.d(TAG, "Untethering " + mIfaces);
-        for (String iface : mIfaces.keySet()) {
-            untether(iface);
+        synchronized (mPublicSync) {
+            if (DBG) Log.d(TAG, "Untethering " + mTetherStates.keySet());
+            for (int i = 0; i < mTetherStates.size(); i++) {
+                untether(mTetherStates.keyAt(i));
+            }
         }
     }
 
     public int getLastTetherError(String iface) {
-        TetherInterfaceSM sm = null;
         synchronized (mPublicSync) {
-            sm = mIfaces.get(iface);
-            if (sm == null) {
+            TetherState tetherState = mTetherStates.get(iface);
+            if (tetherState == null) {
                 Log.e(TAG, "Tried to getLastTetherError on an unknown iface :" + iface +
                         ", ignoring");
                 return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE;
             }
-            return sm.getLastError();
+            return tetherState.mLastError;
         }
     }
 
-    // TODO - move all private methods used only by the state machine into the state machine
-    // to clarify what needs synchronized protection.
     private void sendTetherStateChangedBroadcast() {
         if (!getConnectivityManager().isTetheringSupported()) return;
 
@@ -644,24 +653,22 @@
         boolean bluetoothTethered = false;
 
         synchronized (mPublicSync) {
-            Set ifaces = mIfaces.keySet();
-            for (Object iface : ifaces) {
-                TetherInterfaceSM sm = mIfaces.get(iface);
-                if (sm != null) {
-                    if (sm.isErrored()) {
-                        erroredList.add((String)iface);
-                    } else if (sm.isAvailable()) {
-                        availableList.add((String)iface);
-                    } else if (sm.isTethered()) {
-                        if (isUsb((String)iface)) {
-                            usbTethered = true;
-                        } else if (isWifi((String)iface)) {
-                            wifiTethered = true;
-                      } else if (isBluetooth((String)iface)) {
-                            bluetoothTethered = true;
-                        }
-                        activeList.add((String)iface);
+            for (int i = 0; i < mTetherStates.size(); i++) {
+                TetherState tetherState = mTetherStates.valueAt(i);
+                String iface = mTetherStates.keyAt(i);
+                if (tetherState.mLastError != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+                    erroredList.add(iface);
+                } else if (tetherState.mLastState == IControlsTethering.STATE_AVAILABLE) {
+                    availableList.add(iface);
+                } else if (tetherState.mLastState == IControlsTethering.STATE_TETHERED) {
+                    if (isUsb(iface)) {
+                        usbTethered = true;
+                    } else if (isWifi(iface)) {
+                        wifiTethered = true;
+                    } else if (isBluetooth(iface)) {
+                        bluetoothTethered = true;
                     }
+                    activeList.add(iface);
                 }
             }
         }
@@ -770,7 +777,7 @@
                     mRndisEnabled = intent.getBooleanExtra(UsbManager.USB_FUNCTION_RNDIS, false);
                     // start tethering if we have a request pending
                     if (usbConnected && mRndisEnabled && mUsbTetherRequested) {
-                        tetherUsb(true);
+                        tetherMatchingInterfaces(true, ConnectivityManager.TETHERING_USB);
                     }
                     mUsbTetherRequested = false;
                 }
@@ -782,69 +789,72 @@
                     if (VDBG) Log.d(TAG, "Tethering got CONNECTIVITY_ACTION");
                     mTetherMasterSM.sendMessage(TetherMasterSM.CMD_UPSTREAM_CHANGED);
                 }
+            } else if (action.equals(WifiManager.WIFI_AP_STATE_CHANGED_ACTION)) {
+                synchronized (Tethering.this.mPublicSync) {
+                    if (!mWifiTetherRequested) {
+                        // We only care when we're trying to tether via our WiFi interface.
+                        return;
+                    }
+                    int curState =  intent.getIntExtra(WifiManager.EXTRA_WIFI_AP_STATE,
+                            WifiManager.WIFI_AP_STATE_DISABLED);
+                    switch (curState) {
+                        case WifiManager.WIFI_AP_STATE_ENABLING:
+                            // We can see this state on the way to both enabled and failure states.
+                            break;
+                        case WifiManager.WIFI_AP_STATE_ENABLED:
+                            // Tell an appropriate interface state machine that it should tether.
+                            tetherMatchingInterfaces(true, ConnectivityManager.TETHERING_WIFI);
+                            break;
+                        case WifiManager.WIFI_AP_STATE_DISABLED:
+                        case WifiManager.WIFI_AP_STATE_DISABLING:
+                        case WifiManager.WIFI_AP_STATE_FAILED:
+                        default:
+                            if (DBG) {
+                                Log.d(TAG, "Canceling WiFi tethering request - AP_STATE=" +
+                                    curState);
+                            }
+                            // Tell an appropriate interface state machine that
+                            // it needs to tear itself down.
+                            tetherMatchingInterfaces(false, ConnectivityManager.TETHERING_WIFI);
+                            setWifiTethering(false);
+                            break;
+                    }
+                }
             } else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
                 updateConfiguration();
             }
         }
     }
 
-    private void tetherUsb(boolean enable) {
-        if (VDBG) Log.d(TAG, "tetherUsb " + enable);
+    private void tetherMatchingInterfaces(boolean enable, int interfaceType) {
+        if (VDBG) Log.d(TAG, "tetherMatchingInterfaces(" + enable + ", " + interfaceType + ")");
 
-        String[] ifaces = new String[0];
+        String[] ifaces = null;
         try {
             ifaces = mNMService.listInterfaces();
         } catch (Exception e) {
             Log.e(TAG, "Error listing Interfaces", e);
             return;
         }
-        for (String iface : ifaces) {
-            if (isUsb(iface)) {
-                int result = (enable ? tether(iface) : untether(iface));
-                if (result == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
-                    return;
+        String chosenIface = null;
+        if (ifaces != null) {
+            for (String iface : ifaces) {
+                if (ifaceNameToType(iface) == interfaceType) {
+                    chosenIface = iface;
+                    break;
                 }
             }
         }
-        Log.e(TAG, "unable start or stop USB tethering");
-    }
-
-    // configured when we start tethering and unconfig'd on error or conclusion
-    private boolean configureUsbIface(boolean enabled) {
-        if (VDBG) Log.d(TAG, "configureUsbIface(" + enabled + ")");
-
-        // toggle the USB interfaces
-        String[] ifaces = new String[0];
-        try {
-            ifaces = mNMService.listInterfaces();
-        } catch (Exception e) {
-            Log.e(TAG, "Error listing Interfaces", e);
-            return false;
+        if (chosenIface == null) {
+            Log.e(TAG, "could not find iface of type " + interfaceType);
+            return;
         }
-        for (String iface : ifaces) {
-            if (isUsb(iface)) {
-                InterfaceConfiguration ifcg = null;
-                try {
-                    ifcg = mNMService.getInterfaceConfig(iface);
-                    if (ifcg != null) {
-                        InetAddress addr = NetworkUtils.numericToInetAddress(USB_NEAR_IFACE_ADDR);
-                        ifcg.setLinkAddress(new LinkAddress(addr, USB_PREFIX_LENGTH));
-                        if (enabled) {
-                            ifcg.setInterfaceUp();
-                        } else {
-                            ifcg.setInterfaceDown();
-                        }
-                        ifcg.clearFlag("running");
-                        mNMService.setInterfaceConfig(iface, ifcg);
-                    }
-                } catch (Exception e) {
-                    Log.e(TAG, "Error configuring interface " + iface, e);
-                    return false;
-                }
-            }
-         }
 
-        return true;
+        int result = (enable ? tether(chosenIface) : untether(chosenIface));
+        if (result != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+            Log.e(TAG, "unable start or stop tethering on iface " + chosenIface);
+            return;
+        }
     }
 
     // TODO - return copies so people can't tamper
@@ -869,7 +879,7 @@
                 if (mRndisEnabled) {
                     final long ident = Binder.clearCallingIdentity();
                     try {
-                        tetherUsb(true);
+                        tetherMatchingInterfaces(true, ConnectivityManager.TETHERING_USB);
                     } finally {
                         Binder.restoreCallingIdentity(ident);
                     }
@@ -880,7 +890,7 @@
             } else {
                 final long ident = Binder.clearCallingIdentity();
                 try {
-                    tetherUsb(false);
+                    tetherMatchingInterfaces(false, ConnectivityManager.TETHERING_USB);
                 } finally {
                     Binder.restoreCallingIdentity(ident);
                 }
@@ -952,37 +962,27 @@
     public String[] getTetheredIfaces() {
         ArrayList<String> list = new ArrayList<String>();
         synchronized (mPublicSync) {
-            Set keys = mIfaces.keySet();
-            for (Object key : keys) {
-                TetherInterfaceSM sm = mIfaces.get(key);
-                if (sm.isTethered()) {
-                    list.add((String)key);
+            for (int i = 0; i < mTetherStates.size(); i++) {
+                TetherState tetherState = mTetherStates.valueAt(i);
+                if (tetherState.mLastState == IControlsTethering.STATE_TETHERED) {
+                    list.add(mTetherStates.keyAt(i));
                 }
             }
         }
-        String[] retVal = new String[list.size()];
-        for (int i=0; i < list.size(); i++) {
-            retVal[i] = list.get(i);
-        }
-        return retVal;
+        return list.toArray(new String[list.size()]);
     }
 
     public String[] getTetherableIfaces() {
         ArrayList<String> list = new ArrayList<String>();
         synchronized (mPublicSync) {
-            Set keys = mIfaces.keySet();
-            for (Object key : keys) {
-                TetherInterfaceSM sm = mIfaces.get(key);
-                if (sm.isAvailable()) {
-                    list.add((String)key);
+            for (int i = 0; i < mTetherStates.size(); i++) {
+                TetherState tetherState = mTetherStates.valueAt(i);
+                if (tetherState.mLastState == IControlsTethering.STATE_AVAILABLE) {
+                    list.add(mTetherStates.keyAt(i));
                 }
             }
         }
-        String[] retVal = new String[list.size()];
-        for (int i=0; i < list.size(); i++) {
-            retVal[i] = list.get(i);
-        }
-        return retVal;
+        return list.toArray(new String[list.size()]);
     }
 
     public String[] getTetheredDhcpRanges() {
@@ -992,19 +992,14 @@
     public String[] getErroredIfaces() {
         ArrayList<String> list = new ArrayList<String>();
         synchronized (mPublicSync) {
-            Set keys = mIfaces.keySet();
-            for (Object key : keys) {
-                TetherInterfaceSM sm = mIfaces.get(key);
-                if (sm.isErrored()) {
-                    list.add((String)key);
+            for (int i = 0; i < mTetherStates.size(); i++) {
+                TetherState tetherState = mTetherStates.valueAt(i);
+                if (tetherState.mLastError != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
+                    list.add(mTetherStates.keyAt(i));
                 }
             }
         }
-        String[] retVal = new String[list.size()];
-        for (int i= 0; i< list.size(); i++) {
-            retVal[i] = list.get(i);
-        }
-        return retVal;
+        return list.toArray(new String[list.size()]);
     }
 
     private void maybeLogMessage(State state, int what) {
@@ -1014,401 +1009,6 @@
         }
     }
 
-    class TetherInterfaceSM extends StateMachine {
-        private static final int BASE_IFACE              = Protocol.BASE_TETHERING + 100;
-        // notification from the master SM that it's not in tether mode
-        static final int CMD_TETHER_MODE_DEAD            = BASE_IFACE + 1;
-        // request from the user that it wants to tether
-        static final int CMD_TETHER_REQUESTED            = BASE_IFACE + 2;
-        // request from the user that it wants to untether
-        static final int CMD_TETHER_UNREQUESTED          = BASE_IFACE + 3;
-        // notification that this interface is down
-        static final int CMD_INTERFACE_DOWN              = BASE_IFACE + 4;
-        // notification that this interface is up
-        static final int CMD_INTERFACE_UP                = BASE_IFACE + 5;
-        // notification from the master SM that it had an error turning on cellular dun
-        static final int CMD_CELL_DUN_ERROR              = BASE_IFACE + 6;
-        // notification from the master SM that it had trouble enabling IP Forwarding
-        static final int CMD_IP_FORWARDING_ENABLE_ERROR  = BASE_IFACE + 7;
-        // notification from the master SM that it had trouble disabling IP Forwarding
-        static final int CMD_IP_FORWARDING_DISABLE_ERROR = BASE_IFACE + 8;
-        // notification from the master SM that it had trouble starting tethering
-        static final int CMD_START_TETHERING_ERROR       = BASE_IFACE + 9;
-        // notification from the master SM that it had trouble stopping tethering
-        static final int CMD_STOP_TETHERING_ERROR        = BASE_IFACE + 10;
-        // notification from the master SM that it had trouble setting the DNS forwarders
-        static final int CMD_SET_DNS_FORWARDERS_ERROR    = BASE_IFACE + 11;
-        // the upstream connection has changed
-        static final int CMD_TETHER_CONNECTION_CHANGED   = BASE_IFACE + 12;
-
-        private State mDefaultState;
-
-        private State mInitialState;
-        private State mStartingState;
-        private State mTetheredState;
-
-        private State mUnavailableState;
-
-        private boolean mAvailable;
-        private boolean mTethered;
-        int mLastError;
-
-        String mIfaceName;
-        String mMyUpstreamIfaceName;  // may change over time
-
-        boolean mUsb;
-
-        TetherInterfaceSM(String name, Looper looper, boolean usb) {
-            super(name, looper);
-            mIfaceName = name;
-            mUsb = usb;
-            setLastError(ConnectivityManager.TETHER_ERROR_NO_ERROR);
-
-            mInitialState = new InitialState();
-            addState(mInitialState);
-            mStartingState = new StartingState();
-            addState(mStartingState);
-            mTetheredState = new TetheredState();
-            addState(mTetheredState);
-            mUnavailableState = new UnavailableState();
-            addState(mUnavailableState);
-
-            setInitialState(mInitialState);
-        }
-
-        public String toString() {
-            String res = new String();
-            res += mIfaceName + " - ";
-            IState current = getCurrentState();
-            if (current == mInitialState) res += "InitialState";
-            if (current == mStartingState) res += "StartingState";
-            if (current == mTetheredState) res += "TetheredState";
-            if (current == mUnavailableState) res += "UnavailableState";
-            if (mAvailable) res += " - Available";
-            if (mTethered) res += " - Tethered";
-            res += " - lastError =" + mLastError;
-            return res;
-        }
-
-        public int getLastError() {
-            synchronized (Tethering.this.mPublicSync) {
-                return mLastError;
-            }
-        }
-
-        private void setLastError(int error) {
-            synchronized (Tethering.this.mPublicSync) {
-                mLastError = error;
-
-                if (isErrored()) {
-                    if (mUsb) {
-                        // note everything's been unwound by this point so nothing to do on
-                        // further error..
-                        Tethering.this.configureUsbIface(false);
-                    }
-                }
-            }
-        }
-
-        public boolean isAvailable() {
-            synchronized (Tethering.this.mPublicSync) {
-                return mAvailable;
-            }
-        }
-
-        private void setAvailable(boolean available) {
-            synchronized (Tethering.this.mPublicSync) {
-                mAvailable = available;
-            }
-        }
-
-        public boolean isTethered() {
-            synchronized (Tethering.this.mPublicSync) {
-                return mTethered;
-            }
-        }
-
-        private void setTethered(boolean tethered) {
-            synchronized (Tethering.this.mPublicSync) {
-                mTethered = tethered;
-            }
-        }
-
-        public boolean isErrored() {
-            synchronized (Tethering.this.mPublicSync) {
-                return (mLastError != ConnectivityManager.TETHER_ERROR_NO_ERROR);
-            }
-        }
-
-        class InitialState extends State {
-            @Override
-            public void enter() {
-                setAvailable(true);
-                setTethered(false);
-                sendTetherStateChangedBroadcast();
-            }
-
-            @Override
-            public boolean processMessage(Message message) {
-                maybeLogMessage(this, message.what);
-                boolean retValue = true;
-                switch (message.what) {
-                    case CMD_TETHER_REQUESTED:
-                        setLastError(ConnectivityManager.TETHER_ERROR_NO_ERROR);
-                        mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_REQUESTED,
-                                TetherInterfaceSM.this);
-                        transitionTo(mStartingState);
-                        break;
-                    case CMD_INTERFACE_DOWN:
-                        transitionTo(mUnavailableState);
-                        break;
-                    default:
-                        retValue = false;
-                        break;
-                }
-                return retValue;
-            }
-        }
-
-        class StartingState extends State {
-            @Override
-            public void enter() {
-                setAvailable(false);
-                if (mUsb) {
-                    if (!Tethering.this.configureUsbIface(true)) {
-                        mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED,
-                                TetherInterfaceSM.this);
-                        setLastError(ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR);
-
-                        transitionTo(mInitialState);
-                        return;
-                    }
-                }
-                sendTetherStateChangedBroadcast();
-
-                // Skipping StartingState
-                transitionTo(mTetheredState);
-            }
-            @Override
-            public boolean processMessage(Message message) {
-                maybeLogMessage(this, message.what);
-                boolean retValue = true;
-                switch (message.what) {
-                    // maybe a parent class?
-                    case CMD_TETHER_UNREQUESTED:
-                        mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED,
-                                TetherInterfaceSM.this);
-                        if (mUsb) {
-                            if (!Tethering.this.configureUsbIface(false)) {
-                                setLastErrorAndTransitionToInitialState(
-                                    ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR);
-                                break;
-                            }
-                        }
-                        transitionTo(mInitialState);
-                        break;
-                    case CMD_CELL_DUN_ERROR:
-                    case CMD_IP_FORWARDING_ENABLE_ERROR:
-                    case CMD_IP_FORWARDING_DISABLE_ERROR:
-                    case CMD_START_TETHERING_ERROR:
-                    case CMD_STOP_TETHERING_ERROR:
-                    case CMD_SET_DNS_FORWARDERS_ERROR:
-                        setLastErrorAndTransitionToInitialState(
-                                ConnectivityManager.TETHER_ERROR_MASTER_ERROR);
-                        break;
-                    case CMD_INTERFACE_DOWN:
-                        mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED,
-                                TetherInterfaceSM.this);
-                        transitionTo(mUnavailableState);
-                        break;
-                    default:
-                        retValue = false;
-                }
-                return retValue;
-            }
-        }
-
-        class TetheredState extends State {
-            @Override
-            public void enter() {
-                try {
-                    mNMService.tetherInterface(mIfaceName);
-                } catch (Exception e) {
-                    Log.e(TAG, "Error Tethering: " + e.toString());
-                    setLastError(ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR);
-
-                    try {
-                        mNMService.untetherInterface(mIfaceName);
-                    } catch (Exception ee) {
-                        Log.e(TAG, "Error untethering after failure!" + ee.toString());
-                    }
-                    transitionTo(mInitialState);
-                    return;
-                }
-                if (DBG) Log.d(TAG, "Tethered " + mIfaceName);
-                setAvailable(false);
-                setTethered(true);
-                sendTetherStateChangedBroadcast();
-            }
-
-            private void cleanupUpstream() {
-                if (mMyUpstreamIfaceName != null) {
-                    // note that we don't care about errors here.
-                    // sometimes interfaces are gone before we get
-                    // to remove their rules, which generates errors.
-                    // just do the best we can.
-                    try {
-                        // about to tear down NAT; gather remaining statistics
-                        mStatsService.forceUpdate();
-                    } catch (Exception e) {
-                        if (VDBG) Log.e(TAG, "Exception in forceUpdate: " + e.toString());
-                    }
-                    try {
-                        mNMService.stopInterfaceForwarding(mIfaceName, mMyUpstreamIfaceName);
-                    } catch (Exception e) {
-                        if (VDBG) Log.e(
-                                TAG, "Exception in removeInterfaceForward: " + e.toString());
-                    }
-                    try {
-                        mNMService.disableNat(mIfaceName, mMyUpstreamIfaceName);
-                    } catch (Exception e) {
-                        if (VDBG) Log.e(TAG, "Exception in disableNat: " + e.toString());
-                    }
-                    mMyUpstreamIfaceName = null;
-                }
-                return;
-            }
-
-            @Override
-            public boolean processMessage(Message message) {
-                maybeLogMessage(this, message.what);
-                boolean retValue = true;
-                boolean error = false;
-                switch (message.what) {
-                    case CMD_TETHER_UNREQUESTED:
-                    case CMD_INTERFACE_DOWN:
-                        cleanupUpstream();
-                        try {
-                            mNMService.untetherInterface(mIfaceName);
-                        } catch (Exception e) {
-                            setLastErrorAndTransitionToInitialState(
-                                    ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR);
-                            break;
-                        }
-                        mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED,
-                                TetherInterfaceSM.this);
-                        if (message.what == CMD_TETHER_UNREQUESTED) {
-                            if (mUsb) {
-                                if (!Tethering.this.configureUsbIface(false)) {
-                                    setLastError(
-                                            ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR);
-                                }
-                            }
-                            transitionTo(mInitialState);
-                        } else if (message.what == CMD_INTERFACE_DOWN) {
-                            transitionTo(mUnavailableState);
-                        }
-                        if (DBG) Log.d(TAG, "Untethered " + mIfaceName);
-                        break;
-                    case CMD_TETHER_CONNECTION_CHANGED:
-                        String newUpstreamIfaceName = (String)(message.obj);
-                        if ((mMyUpstreamIfaceName == null && newUpstreamIfaceName == null) ||
-                                (mMyUpstreamIfaceName != null &&
-                                mMyUpstreamIfaceName.equals(newUpstreamIfaceName))) {
-                            if (VDBG) Log.d(TAG, "Connection changed noop - dropping");
-                            break;
-                        }
-                        cleanupUpstream();
-                        if (newUpstreamIfaceName != null) {
-                            try {
-                                mNMService.enableNat(mIfaceName, newUpstreamIfaceName);
-                                mNMService.startInterfaceForwarding(mIfaceName,
-                                        newUpstreamIfaceName);
-                            } catch (Exception e) {
-                                Log.e(TAG, "Exception enabling Nat: " + e.toString());
-                                try {
-                                    mNMService.disableNat(mIfaceName, newUpstreamIfaceName);
-                                } catch (Exception ee) {}
-                                try {
-                                    mNMService.untetherInterface(mIfaceName);
-                                } catch (Exception ee) {}
-
-                                setLastError(ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR);
-                                transitionTo(mInitialState);
-                                return true;
-                            }
-                        }
-                        mMyUpstreamIfaceName = newUpstreamIfaceName;
-                        break;
-                    case CMD_CELL_DUN_ERROR:
-                    case CMD_IP_FORWARDING_ENABLE_ERROR:
-                    case CMD_IP_FORWARDING_DISABLE_ERROR:
-                    case CMD_START_TETHERING_ERROR:
-                    case CMD_STOP_TETHERING_ERROR:
-                    case CMD_SET_DNS_FORWARDERS_ERROR:
-                        error = true;
-                        // fall through
-                    case CMD_TETHER_MODE_DEAD:
-                        cleanupUpstream();
-                        try {
-                            mNMService.untetherInterface(mIfaceName);
-                        } catch (Exception e) {
-                            setLastErrorAndTransitionToInitialState(
-                                    ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR);
-                            break;
-                        }
-                        if (error) {
-                            setLastErrorAndTransitionToInitialState(
-                                    ConnectivityManager.TETHER_ERROR_MASTER_ERROR);
-                            break;
-                        }
-                        if (DBG) Log.d(TAG, "Tether lost upstream connection " + mIfaceName);
-                        sendTetherStateChangedBroadcast();
-                        if (mUsb) {
-                            if (!Tethering.this.configureUsbIface(false)) {
-                                setLastError(ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR);
-                            }
-                        }
-                        transitionTo(mInitialState);
-                        break;
-                    default:
-                        retValue = false;
-                        break;
-                }
-                return retValue;
-            }
-        }
-
-        class UnavailableState extends State {
-            @Override
-            public void enter() {
-                setAvailable(false);
-                setLastError(ConnectivityManager.TETHER_ERROR_NO_ERROR);
-                setTethered(false);
-                sendTetherStateChangedBroadcast();
-            }
-            @Override
-            public boolean processMessage(Message message) {
-                boolean retValue = true;
-                switch (message.what) {
-                    case CMD_INTERFACE_UP:
-                        transitionTo(mInitialState);
-                        break;
-                    default:
-                        retValue = false;
-                        break;
-                }
-                return retValue;
-            }
-        }
-
-        void setLastErrorAndTransitionToInitialState(int error) {
-            setLastError(error);
-            transitionTo(mInitialState);
-        }
-
-    }
-
     /**
      * A NetworkCallback class that relays information of interest to the
      * tethering master state machine thread for subsequent processing.
@@ -1442,7 +1042,7 @@
      * could/should be moved here.
      */
     class UpstreamNetworkMonitor {
-        final HashMap<Network, NetworkState> mNetworkMap = new HashMap();
+        final HashMap<Network, NetworkState> mNetworkMap = new HashMap<>();
         NetworkCallback mDefaultNetworkCallback;
         NetworkCallback mDunTetheringCallback;
 
@@ -1520,12 +1120,6 @@
         static final int EVENT_UPSTREAM_LINKPROPERTIES_CHANGED  = BASE_MASTER + 5;
         static final int EVENT_UPSTREAM_LOST                    = BASE_MASTER + 6;
 
-        // This indicates what a timeout event relates to.  A state that
-        // sends itself a delayed timeout event and handles incoming timeout events
-        // should inc this when it is entered and whenever it sends a new timeout event.
-        // We do not flush the old ones.
-        private int mSequenceNumber;
-
         private State mInitialState;
         private State mTetherModeAliveState;
 
@@ -1535,7 +1129,19 @@
         private State mStopTetheringErrorState;
         private State mSetDnsForwardersErrorState;
 
-        private ArrayList<TetherInterfaceSM> mNotifyList;
+        // This list is a little subtle.  It contains all the interfaces that currently are
+        // requesting tethering, regardless of whether these interfaces are still members of
+        // mTetherStates.  This allows us to maintain the following predicates:
+        //
+        // 1) mTetherStates contains the set of all currently existing, tetherable, link state up
+        //    interfaces.
+        // 2) mNotifyList contains all state machines that may have outstanding tethering state
+        //    that needs to be torn down.
+        //
+        // Because we excise interfaces immediately from mTetherStates, we must maintain mNotifyList
+        // so that the garbage collector does not clean up the state machine before it has a chance
+        // to tear itself down.
+        private ArrayList<TetherInterfaceStateMachine> mNotifyList;
 
         private int mMobileApnReserved = ConnectivityManager.TYPE_NONE;
         private NetworkCallback mMobileUpstreamCallback;
@@ -1562,7 +1168,7 @@
             mSetDnsForwardersErrorState = new SetDnsForwardersErrorState();
             addState(mSetDnsForwardersErrorState);
 
-            mNotifyList = new ArrayList<TetherInterfaceSM>();
+            mNotifyList = new ArrayList<>();
             setInitialState(mInitialState);
         }
 
@@ -1777,8 +1383,8 @@
             protected void notifyTetheredOfNewUpstreamIface(String ifaceName) {
                 if (DBG) Log.d(TAG, "Notifying tethered with upstream=" + ifaceName);
                 mCurrentUpstreamIface = ifaceName;
-                for (TetherInterfaceSM sm : mNotifyList) {
-                    sm.sendMessage(TetherInterfaceSM.CMD_TETHER_CONNECTION_CHANGED,
+                for (TetherInterfaceStateMachine sm : mNotifyList) {
+                    sm.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED,
                             ifaceName);
                 }
             }
@@ -1845,20 +1451,16 @@
                                 config_mobile_hotspot_provision_app_no_ui).isEmpty() == false) {
                             ArrayList<Integer> tethered = new ArrayList<Integer>();
                             synchronized (mPublicSync) {
-                                Set ifaces = mIfaces.keySet();
-                                for (Object iface : ifaces) {
-                                    TetherInterfaceSM sm = mIfaces.get(iface);
-                                    if (sm != null && sm.isTethered()) {
-                                        if (isUsb((String)iface)) {
-                                            tethered.add(new Integer(
-                                                    ConnectivityManager.TETHERING_USB));
-                                        } else if (isWifi((String)iface)) {
-                                            tethered.add(new Integer(
-                                                    ConnectivityManager.TETHERING_WIFI));
-                                        } else if (isBluetooth((String)iface)) {
-                                            tethered.add(new Integer(
-                                                    ConnectivityManager.TETHERING_BLUETOOTH));
-                                        }
+                                for (int i = 0; i < mTetherStates.size(); i++) {
+                                    TetherState tetherState = mTetherStates.valueAt(i);
+                                    if (tetherState.mLastState !=
+                                            IControlsTethering.STATE_TETHERED) {
+                                        continue;  // Skip interfaces that aren't tethered.
+                                    }
+                                    String iface = mTetherStates.keyAt(i);
+                                    int interfaceType = ifaceNameToType(iface);
+                                    if (interfaceType != ConnectivityManager.TETHERING_INVALID) {
+                                        tethered.add(new Integer(interfaceType));
                                     }
                                 }
                             }
@@ -1885,26 +1487,22 @@
 
         class InitialState extends TetherMasterUtilState {
             @Override
-            public void enter() {
-            }
-            @Override
             public boolean processMessage(Message message) {
                 maybeLogMessage(this, message.what);
                 boolean retValue = true;
                 switch (message.what) {
                     case CMD_TETHER_MODE_REQUESTED:
-                        TetherInterfaceSM who = (TetherInterfaceSM)message.obj;
+                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj;
                         if (VDBG) Log.d(TAG, "Tether Mode requested by " + who);
-                        mNotifyList.add(who);
+                        if (mNotifyList.indexOf(who) < 0) {
+                            mNotifyList.add(who);
+                        }
                         transitionTo(mTetherModeAliveState);
                         break;
                     case CMD_TETHER_MODE_UNREQUESTED:
-                        who = (TetherInterfaceSM)message.obj;
+                        who = (TetherInterfaceStateMachine)message.obj;
                         if (VDBG) Log.d(TAG, "Tether Mode unrequested by " + who);
-                        int index = mNotifyList.indexOf(who);
-                        if (index != -1) {
-                            mNotifyList.remove(who);
-                        }
+                        mNotifyList.remove(who);
                         break;
                     default:
                         retValue = false;
@@ -1941,26 +1539,28 @@
                 boolean retValue = true;
                 switch (message.what) {
                     case CMD_TETHER_MODE_REQUESTED:
-                        TetherInterfaceSM who = (TetherInterfaceSM)message.obj;
+                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj;
                         if (VDBG) Log.d(TAG, "Tether Mode requested by " + who);
-                        mNotifyList.add(who);
-                        who.sendMessage(TetherInterfaceSM.CMD_TETHER_CONNECTION_CHANGED,
+                        if (mNotifyList.indexOf(who) < 0) {
+                            mNotifyList.add(who);
+                        }
+                        who.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED,
                                 mCurrentUpstreamIface);
                         break;
                     case CMD_TETHER_MODE_UNREQUESTED:
-                        who = (TetherInterfaceSM)message.obj;
+                        who = (TetherInterfaceStateMachine)message.obj;
                         if (VDBG) Log.d(TAG, "Tether Mode unrequested by " + who);
-                        int index = mNotifyList.indexOf(who);
-                        if (index != -1) {
+                        if (mNotifyList.remove(who)) {
                             if (DBG) Log.d(TAG, "TetherModeAlive removing notifyee " + who);
-                            mNotifyList.remove(index);
                             if (mNotifyList.isEmpty()) {
                                 turnOffMasterTetherSettings(); // transitions appropriately
                             } else {
                                 if (DBG) {
                                     Log.d(TAG, "TetherModeAlive still has " + mNotifyList.size() +
                                             " live requests:");
-                                    for (Object o : mNotifyList) Log.d(TAG, "  " + o);
+                                    for (TetherInterfaceStateMachine o : mNotifyList) {
+                                        Log.d(TAG, "  " + o);
+                                    }
                                 }
                             }
                         } else {
@@ -2010,7 +1610,7 @@
                 boolean retValue = true;
                 switch (message.what) {
                     case CMD_TETHER_MODE_REQUESTED:
-                        TetherInterfaceSM who = (TetherInterfaceSM)message.obj;
+                        TetherInterfaceStateMachine who = (TetherInterfaceStateMachine)message.obj;
                         who.sendMessage(mErrorNotification);
                         break;
                     default:
@@ -2020,8 +1620,7 @@
             }
             void notify(int msgType) {
                 mErrorNotification = msgType;
-                for (Object o : mNotifyList) {
-                    TetherInterfaceSM sm = (TetherInterfaceSM)o;
+                for (TetherInterfaceStateMachine sm : mNotifyList) {
                     sm.sendMessage(msgType);
                 }
             }
@@ -2031,7 +1630,7 @@
             @Override
             public void enter() {
                 Log.e(TAG, "Error in setIpForwardingEnabled");
-                notify(TetherInterfaceSM.CMD_IP_FORWARDING_ENABLE_ERROR);
+                notify(TetherInterfaceStateMachine.CMD_IP_FORWARDING_ENABLE_ERROR);
             }
         }
 
@@ -2039,7 +1638,7 @@
             @Override
             public void enter() {
                 Log.e(TAG, "Error in setIpForwardingDisabled");
-                notify(TetherInterfaceSM.CMD_IP_FORWARDING_DISABLE_ERROR);
+                notify(TetherInterfaceStateMachine.CMD_IP_FORWARDING_DISABLE_ERROR);
             }
         }
 
@@ -2047,7 +1646,7 @@
             @Override
             public void enter() {
                 Log.e(TAG, "Error in startTethering");
-                notify(TetherInterfaceSM.CMD_START_TETHERING_ERROR);
+                notify(TetherInterfaceStateMachine.CMD_START_TETHERING_ERROR);
                 try {
                     mNMService.setIpForwardingEnabled(false);
                 } catch (Exception e) {}
@@ -2058,7 +1657,7 @@
             @Override
             public void enter() {
                 Log.e(TAG, "Error in stopTethering");
-                notify(TetherInterfaceSM.CMD_STOP_TETHERING_ERROR);
+                notify(TetherInterfaceStateMachine.CMD_STOP_TETHERING_ERROR);
                 try {
                     mNMService.setIpForwardingEnabled(false);
                 } catch (Exception e) {}
@@ -2069,7 +1668,7 @@
             @Override
             public void enter() {
                 Log.e(TAG, "Error in setDnsForwarders");
-                notify(TetherInterfaceSM.CMD_SET_DNS_FORWARDERS_ERROR);
+                notify(TetherInterfaceStateMachine.CMD_SET_DNS_FORWARDERS_ERROR);
                 try {
                     mNMService.stopTethering();
                 } catch (Exception e) {}
@@ -2080,9 +1679,11 @@
         }
     }
 
+    @Override
     public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+        // Binder.java closes the resource for us.
+        @SuppressWarnings("resource")
         final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
-
         if (mContext.checkCallingOrSelfPermission(
                 android.Manifest.permission.DUMP) != PackageManager.PERMISSION_GRANTED) {
             pw.println("Permission Denial: can't dump ConnectivityService.Tether " +
@@ -2102,12 +1703,67 @@
 
             pw.println("Tether state:");
             pw.increaseIndent();
-            for (Object o : mIfaces.values()) {
-                pw.println(o);
+            for (int i = 0; i < mTetherStates.size(); i++) {
+                final String iface = mTetherStates.keyAt(i);
+                final TetherState tetherState = mTetherStates.valueAt(i);
+                pw.print(iface + " - ");
+
+                switch (tetherState.mLastState) {
+                    case IControlsTethering.STATE_UNAVAILABLE:
+                        pw.print("UnavailableState");
+                        break;
+                    case IControlsTethering.STATE_AVAILABLE:
+                        pw.print("AvailableState");
+                        break;
+                    case IControlsTethering.STATE_TETHERED:
+                        pw.print("TetheredState");
+                        break;
+                    default:
+                        pw.print("UnknownState");
+                        break;
+                }
+                pw.println(" - lastError = " + tetherState.mLastError);
             }
             pw.decreaseIndent();
         }
         pw.decreaseIndent();
-        return;
+    }
+
+    @Override
+    public void notifyInterfaceStateChange(String iface, TetherInterfaceStateMachine who,
+                                           int state, int error) {
+        synchronized (mPublicSync) {
+            TetherState tetherState = mTetherStates.get(iface);
+            if (tetherState != null && tetherState.mStateMachine.equals(who)) {
+                tetherState.mLastState = state;
+                tetherState.mLastError = error;
+            } else {
+                if (DBG) Log.d(TAG, "got notification from stale iface " + iface);
+            }
+        }
+
+        if (DBG) {
+            Log.d(TAG, "iface " + iface + " notified that it was in state " + state +
+                    " with error " + error);
+        }
+
+        switch (state) {
+            case IControlsTethering.STATE_UNAVAILABLE:
+            case IControlsTethering.STATE_AVAILABLE:
+                mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED, who);
+                break;
+            case IControlsTethering.STATE_TETHERED:
+                mTetherMasterSM.sendMessage(TetherMasterSM.CMD_TETHER_MODE_REQUESTED, who);
+                break;
+        }
+        sendTetherStateChangedBroadcast();
+    }
+
+    private void trackNewTetherableInterface(String iface, int interfaceType) {
+        TetherState tetherState;
+        tetherState = new TetherState(new TetherInterfaceStateMachine(iface, mLooper,
+                interfaceType, mNMService, mStatsService, this));
+        mTetherStates.put(iface, tetherState);
+        tetherState.mStateMachine.start();
     }
 }
diff --git a/services/core/java/com/android/server/connectivity/tethering/IControlsTethering.java b/services/core/java/com/android/server/connectivity/tethering/IControlsTethering.java
new file mode 100644
index 0000000..449b8a8
--- /dev/null
+++ b/services/core/java/com/android/server/connectivity/tethering/IControlsTethering.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity.tethering;
+
+/**
+ * @hide
+ *
+ * Interface with methods necessary to notify that a given interface is ready for tethering.
+ */
+public interface IControlsTethering {
+    public final int STATE_UNAVAILABLE = 0;
+    public final int STATE_AVAILABLE = 1;
+    public final int STATE_TETHERED = 2;
+
+    /**
+     * Notify that |who| has changed its tethering state.  This may be called from any thread.
+     *
+     * @param iface a network interface (e.g. "wlan0")
+     * @param who corresponding instance of a TetherInterfaceStateMachine
+     * @param state one of IControlsTethering.STATE_*
+     * @param lastError one of ConnectivityManager.TETHER_ERROR_*
+     */
+    void notifyInterfaceStateChange(String iface, TetherInterfaceStateMachine who,
+                                    int state, int lastError);
+}
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
new file mode 100644
index 0000000..aebeb69
--- /dev/null
+++ b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
@@ -0,0 +1,322 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity.tethering;
+
+import android.net.ConnectivityManager;
+import android.net.INetworkStatsService;
+import android.net.InterfaceConfiguration;
+import android.net.LinkAddress;
+import android.net.NetworkUtils;
+import android.os.INetworkManagementService;
+import android.os.Looper;
+import android.os.Message;
+import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.internal.util.MessageUtils;
+import com.android.internal.util.Protocol;
+import com.android.internal.util.State;
+import com.android.internal.util.StateMachine;
+
+import java.net.InetAddress;
+
+/**
+ * @hide
+ *
+ * Tracks the eligibility of a given network interface for tethering.
+ */
+public class TetherInterfaceStateMachine extends StateMachine {
+    private static final String USB_NEAR_IFACE_ADDR = "192.168.42.129";
+    private static final int USB_PREFIX_LENGTH = 24;
+    private static final String WIFI_HOST_IFACE_ADDR = "192.168.43.1";
+    private static final int WIFI_HOST_IFACE_PREFIX_LENGTH = 24;
+
+    private final static String TAG = "TetherInterfaceSM";
+    private final static boolean DBG = false;
+    private final static boolean VDBG = false;
+    private static final Class[] messageClasses = {
+            TetherInterfaceStateMachine.class
+    };
+    private static final SparseArray<String> sMagicDecoderRing =
+            MessageUtils.findMessageNames(messageClasses);
+
+    private static final int BASE_IFACE              = Protocol.BASE_TETHERING + 100;
+    // request from the user that it wants to tether
+    public static final int CMD_TETHER_REQUESTED            = BASE_IFACE + 2;
+    // request from the user that it wants to untether
+    public static final int CMD_TETHER_UNREQUESTED          = BASE_IFACE + 3;
+    // notification that this interface is down
+    public static final int CMD_INTERFACE_DOWN              = BASE_IFACE + 4;
+    // notification from the master SM that it had trouble enabling IP Forwarding
+    public static final int CMD_IP_FORWARDING_ENABLE_ERROR  = BASE_IFACE + 7;
+    // notification from the master SM that it had trouble disabling IP Forwarding
+    public static final int CMD_IP_FORWARDING_DISABLE_ERROR = BASE_IFACE + 8;
+    // notification from the master SM that it had trouble starting tethering
+    public static final int CMD_START_TETHERING_ERROR       = BASE_IFACE + 9;
+    // notification from the master SM that it had trouble stopping tethering
+    public static final int CMD_STOP_TETHERING_ERROR        = BASE_IFACE + 10;
+    // notification from the master SM that it had trouble setting the DNS forwarders
+    public static final int CMD_SET_DNS_FORWARDERS_ERROR    = BASE_IFACE + 11;
+    // the upstream connection has changed
+    public static final int CMD_TETHER_CONNECTION_CHANGED   = BASE_IFACE + 12;
+
+    private final State mInitialState;
+    private final State mTetheredState;
+    private final State mUnavailableState;
+
+    private final INetworkManagementService mNMService;
+    private final INetworkStatsService mStatsService;
+    private final IControlsTethering mTetherController;
+
+    private final String mIfaceName;
+    private final int mInterfaceType;
+
+    private int mLastError;
+    private String mMyUpstreamIfaceName;  // may change over time
+
+    public TetherInterfaceStateMachine(String ifaceName, Looper looper, int interfaceType,
+                    INetworkManagementService nMService, INetworkStatsService statsService,
+                    IControlsTethering tetherController) {
+        super(ifaceName, looper);
+        mNMService = nMService;
+        mStatsService = statsService;
+        mTetherController = tetherController;
+        mIfaceName = ifaceName;
+        mInterfaceType = interfaceType;
+        mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+
+        mInitialState = new InitialState();
+        addState(mInitialState);
+        mTetheredState = new TetheredState();
+        addState(mTetheredState);
+        mUnavailableState = new UnavailableState();
+        addState(mUnavailableState);
+
+        setInitialState(mInitialState);
+    }
+
+    // configured when we start tethering and unconfig'd on error or conclusion
+    private boolean configureIfaceIp(boolean enabled) {
+        if (VDBG) Log.d(TAG, "configureIfaceIp(" + enabled + ")");
+
+        String ipAsString = null;
+        int prefixLen = 0;
+        if (mInterfaceType == ConnectivityManager.TETHERING_USB) {
+            ipAsString = USB_NEAR_IFACE_ADDR;
+            prefixLen = USB_PREFIX_LENGTH;
+        } else if (mInterfaceType == ConnectivityManager.TETHERING_WIFI) {
+            ipAsString = WIFI_HOST_IFACE_ADDR;
+            prefixLen = WIFI_HOST_IFACE_PREFIX_LENGTH;
+        } else {
+            // Nothing to do, BT does this elsewhere.
+            return true;
+        }
+
+        InterfaceConfiguration ifcg = null;
+        try {
+            ifcg = mNMService.getInterfaceConfig(mIfaceName);
+            if (ifcg != null) {
+                InetAddress addr = NetworkUtils.numericToInetAddress(ipAsString);
+                ifcg.setLinkAddress(new LinkAddress(addr, prefixLen));
+                if (enabled) {
+                    ifcg.setInterfaceUp();
+                } else {
+                    ifcg.setInterfaceDown();
+                }
+                ifcg.clearFlag("running");
+                mNMService.setInterfaceConfig(mIfaceName, ifcg);
+            }
+        } catch (Exception e) {
+            Log.e(TAG, "Error configuring interface " + mIfaceName, e);
+            return false;
+        }
+
+        return true;
+    }
+
+    private void maybeLogMessage(State state, int what) {
+        if (DBG) {
+            Log.d(TAG, state.getName() + " got " +
+                    sMagicDecoderRing.get(what, Integer.toString(what)));
+        }
+    }
+
+    class InitialState extends State {
+        @Override
+        public void enter() {
+            mTetherController.notifyInterfaceStateChange(
+                    mIfaceName, TetherInterfaceStateMachine.this,
+                    IControlsTethering.STATE_AVAILABLE, mLastError);
+        }
+
+        @Override
+        public boolean processMessage(Message message) {
+            maybeLogMessage(this, message.what);
+            boolean retValue = true;
+            switch (message.what) {
+                case CMD_TETHER_REQUESTED:
+                    mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+                    transitionTo(mTetheredState);
+                    break;
+                case CMD_INTERFACE_DOWN:
+                    transitionTo(mUnavailableState);
+                    break;
+                default:
+                    retValue = false;
+                    break;
+            }
+            return retValue;
+        }
+    }
+
+    class TetheredState extends State {
+        @Override
+        public void enter() {
+            if (!configureIfaceIp(true)) {
+                mLastError = ConnectivityManager.TETHER_ERROR_IFACE_CFG_ERROR;
+                transitionTo(mInitialState);
+                return;
+            }
+
+            try {
+                mNMService.tetherInterface(mIfaceName);
+            } catch (Exception e) {
+                Log.e(TAG, "Error Tethering: " + e.toString());
+                mLastError = ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR;
+                transitionTo(mInitialState);
+                return;
+            }
+            if (DBG) Log.d(TAG, "Tethered " + mIfaceName);
+            mTetherController.notifyInterfaceStateChange(
+                    mIfaceName, TetherInterfaceStateMachine.this,
+                    IControlsTethering.STATE_TETHERED, mLastError);
+        }
+
+        @Override
+        public void exit() {
+            // Note that at this point, we're leaving the tethered state.  We can fail any
+            // of these operations, but it doesn't really change that we have to try them
+            // all in sequence.
+            cleanupUpstream();
+
+            try {
+                mNMService.untetherInterface(mIfaceName);
+            } catch (Exception ee) {
+                mLastError = ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR;
+                Log.e(TAG, "Failed to untether interface: " + ee.toString());
+            }
+
+            configureIfaceIp(false);
+        }
+
+        private void cleanupUpstream() {
+            if (mMyUpstreamIfaceName != null) {
+                // note that we don't care about errors here.
+                // sometimes interfaces are gone before we get
+                // to remove their rules, which generates errors.
+                // just do the best we can.
+                try {
+                    // about to tear down NAT; gather remaining statistics
+                    mStatsService.forceUpdate();
+                } catch (Exception e) {
+                    if (VDBG) Log.e(TAG, "Exception in forceUpdate: " + e.toString());
+                }
+                try {
+                    mNMService.stopInterfaceForwarding(mIfaceName, mMyUpstreamIfaceName);
+                } catch (Exception e) {
+                    if (VDBG) Log.e(
+                            TAG, "Exception in removeInterfaceForward: " + e.toString());
+                }
+                try {
+                    mNMService.disableNat(mIfaceName, mMyUpstreamIfaceName);
+                } catch (Exception e) {
+                    if (VDBG) Log.e(TAG, "Exception in disableNat: " + e.toString());
+                }
+                mMyUpstreamIfaceName = null;
+            }
+            return;
+        }
+
+        @Override
+        public boolean processMessage(Message message) {
+            maybeLogMessage(this, message.what);
+            boolean retValue = true;
+            switch (message.what) {
+                case CMD_TETHER_UNREQUESTED:
+                    transitionTo(mInitialState);
+                    if (DBG) Log.d(TAG, "Untethered (unrequested)" + mIfaceName);
+                    break;
+                case CMD_INTERFACE_DOWN:
+                    transitionTo(mUnavailableState);
+                    if (DBG) Log.d(TAG, "Untethered (ifdown)" + mIfaceName);
+                    break;
+                case CMD_TETHER_CONNECTION_CHANGED:
+                    String newUpstreamIfaceName = (String)(message.obj);
+                    if ((mMyUpstreamIfaceName == null && newUpstreamIfaceName == null) ||
+                            (mMyUpstreamIfaceName != null &&
+                            mMyUpstreamIfaceName.equals(newUpstreamIfaceName))) {
+                        if (VDBG) Log.d(TAG, "Connection changed noop - dropping");
+                        break;
+                    }
+                    cleanupUpstream();
+                    if (newUpstreamIfaceName != null) {
+                        try {
+                            mNMService.enableNat(mIfaceName, newUpstreamIfaceName);
+                            mNMService.startInterfaceForwarding(mIfaceName,
+                                    newUpstreamIfaceName);
+                        } catch (Exception e) {
+                            Log.e(TAG, "Exception enabling Nat: " + e.toString());
+                            mLastError = ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR;
+                            transitionTo(mInitialState);
+                            return true;
+                        }
+                    }
+                    mMyUpstreamIfaceName = newUpstreamIfaceName;
+                    break;
+                case CMD_IP_FORWARDING_ENABLE_ERROR:
+                case CMD_IP_FORWARDING_DISABLE_ERROR:
+                case CMD_START_TETHERING_ERROR:
+                case CMD_STOP_TETHERING_ERROR:
+                case CMD_SET_DNS_FORWARDERS_ERROR:
+                    mLastError = ConnectivityManager.TETHER_ERROR_MASTER_ERROR;
+                    transitionTo(mInitialState);
+                    break;
+                default:
+                    retValue = false;
+                    break;
+            }
+            return retValue;
+        }
+    }
+
+    /**
+     * This state is terminal for the per interface state machine.  At this
+     * point, the master state machine should have removed this interface
+     * specific state machine from its list of possible recipients of
+     * tethering requests.  The state machine itself will hang around until
+     * the garbage collector finds it.
+     */
+    class UnavailableState extends State {
+        @Override
+        public void enter() {
+            mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
+            mTetherController.notifyInterfaceStateChange(
+                    mIfaceName, TetherInterfaceStateMachine.this,
+                    IControlsTethering.STATE_UNAVAILABLE, mLastError);
+        }
+    }
+}
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 8f8afd5..61af8ed 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -1181,6 +1181,10 @@
     }
 
     private static Spline createAutoBrightnessSpline(int[] lux, int[] brightness) {
+        if (lux == null || lux.length == 0 || brightness == null || brightness.length == 0) {
+            Slog.e(TAG, "Could not create auto-brightness spline.");
+            return null;
+        }
         try {
             final int n = brightness.length;
             float[] x = new float[n];
diff --git a/services/core/java/com/android/server/display/NightDisplayService.java b/services/core/java/com/android/server/display/NightDisplayService.java
new file mode 100644
index 0000000..27abd1e
--- /dev/null
+++ b/services/core/java/com/android/server/display/NightDisplayService.java
@@ -0,0 +1,362 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.display;
+
+import android.app.AlarmManager;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.UserHandle;
+import android.provider.Settings.Secure;
+import android.util.Slog;
+
+import com.android.internal.app.NightDisplayController;
+import com.android.server.SystemService;
+import com.android.server.twilight.TwilightListener;
+import com.android.server.twilight.TwilightManager;
+import com.android.server.twilight.TwilightState;
+
+import java.util.Calendar;
+import java.util.TimeZone;
+
+/**
+ * Tints the display at night.
+ */
+public final class NightDisplayService extends SystemService
+        implements NightDisplayController.Callback {
+
+    private static final String TAG = "NightDisplayService";
+    private static final boolean DEBUG = false;
+
+    /**
+     * Night mode ~= 3400 K.
+     */
+    private static final String MATRIX_NIGHT = "1,0,0,0,0,.754,0,0,0,0,.516,0,0,0,0,1";
+
+    private int mCurrentUser = UserHandle.USER_NULL;
+    private boolean mBootCompleted;
+
+    private NightDisplayController mController;
+    private Boolean mIsActivated;
+    private AutoMode mAutoMode;
+
+    public NightDisplayService(Context context) {
+        super(context);
+    }
+
+    @Override
+    public void onStart() {
+        // Nothing to publish.
+    }
+
+    @Override
+    public void onStartUser(int userHandle) {
+        super.onStartUser(userHandle);
+
+        // Register listeners for the new user.
+        if (mCurrentUser == UserHandle.USER_NULL) {
+            mCurrentUser = userHandle;
+            if (mBootCompleted) {
+                setUpNightMode();
+            }
+        }
+    }
+
+    @Override
+    public void onSwitchUser(int userHandle) {
+        super.onSwitchUser(userHandle);
+
+        // Unregister listeners for the old user.
+        if (mBootCompleted && mCurrentUser != UserHandle.USER_NULL) {
+            tearDownNightMode();
+        }
+
+        // Register listeners for the new user.
+        mCurrentUser = userHandle;
+        if (mBootCompleted) {
+            setUpNightMode();
+        }
+    }
+
+    @Override
+    public void onStopUser(int userHandle) {
+        super.onStopUser(userHandle);
+
+        // Unregister listeners for the old user.
+        if (mCurrentUser == userHandle) {
+            if (mBootCompleted) {
+                tearDownNightMode();
+            }
+            mCurrentUser = UserHandle.USER_NULL;
+        }
+    }
+
+    @Override
+    public void onBootPhase(int phase) {
+        if (phase == PHASE_BOOT_COMPLETED) {
+            mBootCompleted = true;
+
+            // Register listeners now that boot is complete.
+            if (mCurrentUser != UserHandle.USER_NULL) {
+                setUpNightMode();
+            }
+        }
+    }
+
+    private void setUpNightMode() {
+        // Create a new controller for the current user and start listening for changes.
+        mController = new NightDisplayController(getContext(), mCurrentUser);
+        mController.setListener(this);
+
+        // Initialize the current auto mode.
+        onAutoModeChanged(mController.getAutoMode());
+
+        // Force the initialization current activated state.
+        if (mIsActivated == null) {
+            onActivated(mController.isActivated());
+        }
+    }
+
+    private void tearDownNightMode() {
+        mController.setListener(null);
+
+        if (mAutoMode != null) {
+            mAutoMode.onStop();
+            mAutoMode = null;
+        }
+
+        mIsActivated = null;
+        mController = null;
+    }
+
+    @Override
+    public void onActivated(boolean activated) {
+        if (mIsActivated == null || mIsActivated != activated) {
+            Slog.i(TAG, activated ? "Turning on night display" : "Turning off night display");
+
+            mIsActivated = activated;
+
+            if (mAutoMode != null) {
+                mAutoMode.onActivated(activated);
+            }
+
+            // Update the current color matrix.
+            final ContentResolver cr = getContext().getContentResolver();
+            Secure.putStringForUser(cr, Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX,
+                    activated ? MATRIX_NIGHT : null, mCurrentUser);
+        }
+    }
+
+    @Override
+    public void onAutoModeChanged(int autoMode) {
+        if (mAutoMode != null) {
+            mAutoMode.onStop();
+            mAutoMode = null;
+        }
+
+        if (autoMode == NightDisplayController.AUTO_MODE_CUSTOM) {
+            mAutoMode = new CustomAutoMode();
+        } else if (autoMode == NightDisplayController.AUTO_MODE_TWILIGHT) {
+            mAutoMode = new TwilightAutoMode();
+        }
+
+        if (mAutoMode != null) {
+            mAutoMode.onStart();
+        }
+    }
+
+    @Override
+    public void onCustomStartTimeChanged(NightDisplayController.LocalTime startTime) {
+        if (mAutoMode != null) {
+            mAutoMode.onCustomStartTimeChanged(startTime);
+        }
+    }
+
+    @Override
+    public void onCustomEndTimeChanged(NightDisplayController.LocalTime endTime) {
+        if (mAutoMode != null) {
+            mAutoMode.onCustomEndTimeChanged(endTime);
+        }
+    }
+
+    private abstract class AutoMode implements NightDisplayController.Callback {
+        public abstract void onStart();
+        public abstract void onStop();
+    }
+
+    private class CustomAutoMode extends AutoMode implements AlarmManager.OnAlarmListener {
+
+        private final AlarmManager mAlarmManager;
+        private final BroadcastReceiver mTimeChangedReceiver;
+
+        private NightDisplayController.LocalTime mStartTime;
+        private NightDisplayController.LocalTime mEndTime;
+
+        private Calendar mLastActivatedTime;
+
+        public CustomAutoMode() {
+            mAlarmManager = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE);
+            mTimeChangedReceiver = new BroadcastReceiver() {
+                @Override
+                public void onReceive(Context context, Intent intent) {
+                    updateActivated();
+                }
+            };
+        }
+
+        private void updateActivated() {
+            final Calendar now = Calendar.getInstance();
+            final Calendar startTime = mStartTime.getDateTimeBefore(now);
+            final Calendar endTime = mEndTime.getDateTimeAfter(startTime);
+            final boolean activated = now.before(endTime);
+
+            boolean setActivated = mIsActivated == null || mLastActivatedTime == null;
+            if (!setActivated && mIsActivated != activated) {
+                final TimeZone currentTimeZone = now.getTimeZone();
+                if (!currentTimeZone.equals(mLastActivatedTime.getTimeZone())) {
+                    final int year = mLastActivatedTime.get(Calendar.YEAR);
+                    final int dayOfYear = mLastActivatedTime.get(Calendar.DAY_OF_YEAR);
+                    final int hourOfDay = mLastActivatedTime.get(Calendar.HOUR_OF_DAY);
+                    final int minute = mLastActivatedTime.get(Calendar.MINUTE);
+
+                    mLastActivatedTime.setTimeZone(currentTimeZone);
+                    mLastActivatedTime.set(Calendar.YEAR, year);
+                    mLastActivatedTime.set(Calendar.DAY_OF_YEAR, dayOfYear);
+                    mLastActivatedTime.set(Calendar.HOUR_OF_DAY, hourOfDay);
+                    mLastActivatedTime.set(Calendar.MINUTE, minute);
+                }
+
+                if (mIsActivated) {
+                    setActivated = now.before(mStartTime.getDateTimeBefore(mLastActivatedTime))
+                            || now.after(mEndTime.getDateTimeAfter(mLastActivatedTime));
+                } else {
+                    setActivated = now.before(mEndTime.getDateTimeBefore(mLastActivatedTime))
+                            || now.after(mStartTime.getDateTimeAfter(mLastActivatedTime));
+                }
+            }
+
+            if (setActivated) {
+                mController.setActivated(activated);
+            }
+            updateNextAlarm();
+        }
+
+        private void updateNextAlarm() {
+            if (mIsActivated != null) {
+                final Calendar now = Calendar.getInstance();
+                final Calendar next = mIsActivated ? mEndTime.getDateTimeAfter(now)
+                        : mStartTime.getDateTimeAfter(now);
+                mAlarmManager.setExact(AlarmManager.RTC, next.getTimeInMillis(), TAG, this, null);
+            }
+        }
+
+        @Override
+        public void onStart() {
+            final IntentFilter intentFilter = new IntentFilter(Intent.ACTION_TIME_CHANGED);
+            intentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+            getContext().registerReceiver(mTimeChangedReceiver, intentFilter);
+
+            mStartTime = mController.getCustomStartTime();
+            mEndTime = mController.getCustomEndTime();
+
+            // Force an update to initialize state.
+            updateActivated();
+        }
+
+        @Override
+        public void onStop() {
+            getContext().unregisterReceiver(mTimeChangedReceiver);
+
+            mAlarmManager.cancel(this);
+            mLastActivatedTime = null;
+        }
+
+        @Override
+        public void onActivated(boolean activated) {
+            mLastActivatedTime = Calendar.getInstance();
+            updateNextAlarm();
+        }
+
+        @Override
+        public void onCustomStartTimeChanged(NightDisplayController.LocalTime startTime) {
+            mStartTime = startTime;
+            mLastActivatedTime = null;
+            updateActivated();
+        }
+
+        @Override
+        public void onCustomEndTimeChanged(NightDisplayController.LocalTime endTime) {
+            mEndTime = endTime;
+            mLastActivatedTime = null;
+            updateActivated();
+        }
+
+        @Override
+        public void onAlarm() {
+            if (DEBUG) Slog.d(TAG, "onAlarm");
+            updateActivated();
+        }
+    }
+
+    private class TwilightAutoMode extends AutoMode implements TwilightListener {
+
+        private final TwilightManager mTwilightManager;
+        private final Handler mHandler;
+
+        private boolean mIsNight;
+
+        public TwilightAutoMode() {
+            mTwilightManager = getLocalService(TwilightManager.class);
+            mHandler = new Handler(Looper.getMainLooper());
+        }
+
+        private void updateActivated() {
+            final TwilightState state = mTwilightManager.getCurrentState();
+            final boolean isNight = state != null && state.isNight();
+            if (mIsNight != isNight) {
+                mIsNight = isNight;
+
+                if (mIsActivated == null || mIsActivated != isNight) {
+                    mController.setActivated(isNight);
+                }
+            }
+        }
+
+        @Override
+        public void onStart() {
+            mTwilightManager.registerListener(this, mHandler);
+
+            // Force an update to initialize state.
+            updateActivated();
+        }
+
+        @Override
+        public void onStop() {
+            mTwilightManager.unregisterListener(this);
+        }
+
+        @Override
+        public void onTwilightStateChanged() {
+            if (DEBUG) Slog.d(TAG, "onTwilightStateChanged");
+            updateActivated();
+        }
+    }
+}
diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java
index 1f6616e..a783fa2 100644
--- a/services/core/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/core/java/com/android/server/dreams/DreamManagerService.java
@@ -20,6 +20,7 @@
 
 import com.android.internal.util.DumpUtils;
 import com.android.server.FgThread;
+import com.android.server.LocalServices;
 import com.android.server.SystemService;
 
 import android.Manifest;
@@ -32,6 +33,8 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ServiceInfo;
+import android.database.ContentObserver;
+import android.hardware.input.InputManagerInternal;
 import android.os.Binder;
 import android.os.Build;
 import android.os.Handler;
@@ -111,11 +114,16 @@
             mContext.registerReceiver(new BroadcastReceiver() {
                 @Override
                 public void onReceive(Context context, Intent intent) {
+                    writePulseGestureEnabled();
                     synchronized (mLock) {
                         stopDreamLocked(false /*immediate*/);
                     }
                 }
             }, new IntentFilter(Intent.ACTION_USER_SWITCHED), null, mHandler);
+            mContext.getContentResolver().registerContentObserver(
+                    Settings.Secure.getUriFor(Settings.Secure.DOZE_ENABLED), false,
+                    mDozeEnabledObserver, UserHandle.USER_ALL);
+            writePulseGestureEnabled();
         }
     }
 
@@ -414,6 +422,12 @@
         }
     }
 
+    private void writePulseGestureEnabled() {
+        ComponentName name = getDozeComponent();
+        boolean dozeEnabled = validateDream(name);
+        LocalServices.getService(InputManagerInternal.class).setPulseGestureEnabled(dozeEnabled);
+    }
+
     private static String componentsToString(ComponentName[] componentNames) {
         StringBuilder names = new StringBuilder();
         if (componentNames != null) {
@@ -450,6 +464,13 @@
         }
     };
 
+    private final ContentObserver mDozeEnabledObserver = new ContentObserver(null) {
+        @Override
+        public void onChange(boolean selfChange) {
+            writePulseGestureEnabled();
+        }
+    };
+
     /**
      * Handler for asynchronous operations performed by the dream manager.
      * Ensures operations to {@link DreamController} are single-threaded.
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index 081a3af..1066434 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -72,6 +72,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -90,10 +91,17 @@
     private static final String ACTION_LOCKOUT_RESET =
             "com.android.server.fingerprint.ACTION_LOCKOUT_RESET";
 
+    private class PerformanceStats {
+        int accept; // number of accepted fingerprints
+        int reject; // number of rejected fingerprints
+        int acquire; // total number of acquisitions. Should be >= accept+reject due to poor image
+                     // acquisition in some cases (too fast, too slow, dirty sensor, etc.)
+        int lockout; // total number of lockouts
+    }
+
     private final ArrayList<FingerprintServiceLockoutResetMonitor> mLockoutMonitors =
             new ArrayList<>();
     private final AppOpsManager mAppOps;
-
     private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30*1000;
     private static final int MAX_FAILED_ATTEMPTS = 5;
     private static final long CANCEL_TIMEOUT_LIMIT = 3000; // max wait for onCancel() from HAL,in ms
@@ -110,6 +118,15 @@
     private ClientMonitor mCurrentClient;
     private ClientMonitor mPendingClient;
     private long mCurrentAuthenticatorId;
+    private PerformanceStats mPerformanceStats;
+
+    // Normal fingerprint authentications are tracked by mPerformanceMap.
+    private HashMap<Integer, PerformanceStats> mPerformanceMap
+            = new HashMap<Integer, PerformanceStats>();
+
+    // Transactions that make use of CryptoObjects are tracked by mCryptoPerformaceMap.
+    private HashMap<Integer, PerformanceStats> mCryptoPerformanceMap
+            = new HashMap<Integer, PerformanceStats>();
 
     private Handler mHandler = new Handler() {
         @Override
@@ -246,6 +263,11 @@
         if (client != null && client.onAuthenticated(fingerId, groupId)) {
             removeClient(client);
         }
+        if (fingerId != 0) {
+            mPerformanceStats.accept++;
+        } else {
+            mPerformanceStats.reject++;
+        }
     }
 
     protected void handleAcquired(long deviceId, int acquiredInfo) {
@@ -253,6 +275,11 @@
         if (client != null && client.onAcquired(acquiredInfo)) {
             removeClient(client);
         }
+        if (mPerformanceStats != null && !inLockoutMode()
+                && client instanceof AuthenticationClient) {
+            // ignore enrollment acquisitions or acquisitions when we're locked out
+            mPerformanceStats.acquire++;
+        }
     }
 
     protected void handleEnrollResult(long deviceId, int fingerId, int groupId, int remaining) {
@@ -505,6 +532,9 @@
             @Override
             public boolean handleFailedAttempt() {
                 mFailedAttempts++;
+                if (mFailedAttempts == MAX_FAILED_ATTEMPTS) {
+                    mPerformanceStats.lockout++;
+                }
                 if (inLockoutMode()) {
                     // Failing multiple times will continue to push out the lockout time.
                     scheduleLockoutReset();
@@ -742,12 +772,24 @@
             mHandler.post(new Runnable() {
                 @Override
                 public void run() {
-                    MetricsLogger.histogram(mContext, "fingerprint_token", opId != 0L ? 1 : 0);
                     if (!canUseFingerprint(opPackageName, true /* foregroundOnly */,
                             callingUid, pid)) {
                         if (DEBUG) Slog.v(TAG, "authenticate(): reject " + opPackageName);
                         return;
                     }
+
+                    MetricsLogger.histogram(mContext, "fingerprint_token", opId != 0L ? 1 : 0);
+
+                    // Get performance stats object for this user.
+                    HashMap<Integer, PerformanceStats> pmap
+                            = (opId == 0) ? mPerformanceMap : mCryptoPerformanceMap;
+                    PerformanceStats stats = pmap.get(mCurrentUserId);
+                    if (stats == null) {
+                        stats = new PerformanceStats();
+                        pmap.put(mCurrentUserId, stats);
+                    }
+                    mPerformanceStats = stats;
+
                     startAuthentication(token, opId, callingUserId, groupId, receiver,
                             flags, restricted, opPackageName);
                 }
@@ -924,9 +966,21 @@
             for (UserInfo user : UserManager.get(getContext()).getUsers()) {
                 final int userId = user.getUserHandle().getIdentifier();
                 final int N = mFingerprintUtils.getFingerprintsForUser(mContext, userId).size();
+                PerformanceStats stats = mPerformanceMap.get(userId);
+                PerformanceStats cryptoStats = mCryptoPerformanceMap.get(userId);
                 JSONObject set = new JSONObject();
                 set.put("id", userId);
                 set.put("count", N);
+                set.put("accept", (stats != null) ? stats.accept : 0);
+                set.put("reject", (stats != null) ? stats.reject : 0);
+                set.put("acquire", (stats != null) ? stats.acquire : 0);
+                set.put("lockout", (stats != null) ? stats.lockout : 0);
+                // cryptoStats measures statistics about secure fingerprint transactions
+                // (e.g. to unlock password storage, make secure purchases, etc.)
+                set.put("acceptCrypto", (cryptoStats != null) ? cryptoStats.accept : 0);
+                set.put("rejectCrypto", (cryptoStats != null) ? cryptoStats.reject : 0);
+                set.put("acquireCrypto", (cryptoStats != null) ? cryptoStats.acquire : 0);
+                set.put("lockoutCrypto", (cryptoStats != null) ? cryptoStats.lockout : 0);
                 sets.put(set);
             }
 
@@ -947,6 +1001,7 @@
 
     private void updateActiveGroup(int userId, String clientPackage) {
         IFingerprintDaemon daemon = getFingerprintDaemon();
+
         if (daemon != null) {
             try {
                 userId = getUserOrWorkProfileId(clientPackage, userId);
@@ -1013,7 +1068,7 @@
                     public void onForegroundProfileSwitch(int newProfileId) {
                         // Ignore.
                     }
-                });
+                }, TAG);
         } catch (RemoteException e) {
             Slog.w(TAG, "Failed to listen for user switching event" ,e);
         }
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index aa1d73f..74095ac 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -18,7 +18,9 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.os.Build;
 import android.os.LocaleList;
+import android.util.Log;
 import android.view.Display;
 import com.android.internal.inputmethod.InputMethodSubtypeHandle;
 import com.android.internal.os.SomeArgs;
@@ -98,8 +100,11 @@
 import java.io.FileDescriptor;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
+import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -109,6 +114,7 @@
 import java.util.List;
 import java.util.Locale;
 
+import libcore.io.IoUtils;
 import libcore.io.Streams;
 import libcore.util.Objects;
 
@@ -136,6 +142,8 @@
     private final Context mContext;
     private final InputManagerHandler mHandler;
 
+    private final File mDoubleTouchGestureEnableFile;
+
     private WindowManagerCallbacks mWindowManagerCallbacks;
     private WiredAccessoryCallbacks mWiredAccessoryCallbacks;
     private boolean mSystemReady;
@@ -301,6 +309,11 @@
                 + mUseDevInputEventForAudioJack);
         mPtr = nativeInit(this, mContext, mHandler.getLooper().getQueue());
 
+        String doubleTouchGestureEnablePath = context.getResources().getString(
+                R.string.config_doubleTouchGestureEnableFile);
+        mDoubleTouchGestureEnableFile = TextUtils.isEmpty(doubleTouchGestureEnablePath) ? null :
+            new File(doubleTouchGestureEnablePath);
+
         LocalServices.addService(InputManagerInternal.class, new LocalService());
     }
 
@@ -2279,5 +2292,20 @@
         public void toggleCapsLock(int deviceId) {
             nativeToggleCapsLock(mPtr, deviceId);
         }
+
+        @Override
+        public void setPulseGestureEnabled(boolean enabled) {
+            if (mDoubleTouchGestureEnableFile != null) {
+                FileWriter writer = null;
+                try {
+                    writer = new FileWriter(mDoubleTouchGestureEnableFile);
+                    writer.write(enabled ? "1" : "0");
+                } catch (IOException e) {
+                    Log.wtf(TAG, "Unable to setPulseGestureEnabled", e);
+                } finally {
+                    IoUtils.closeQuietly(writer);
+                }
+            }
+        }
     }
 }
diff --git a/services/core/java/com/android/server/media/MediaResourceMonitorService.java b/services/core/java/com/android/server/media/MediaResourceMonitorService.java
index e169d63..0eb8b55 100644
--- a/services/core/java/com/android/server/media/MediaResourceMonitorService.java
+++ b/services/core/java/com/android/server/media/MediaResourceMonitorService.java
@@ -24,6 +24,7 @@
 import android.os.Binder;
 import android.os.RemoteException;
 import android.os.UserHandle;
+import android.os.UserManager;
 import android.util.Log;
 import android.util.Slog;
 import com.android.server.SystemService;
@@ -59,12 +60,20 @@
             final long identity = Binder.clearCallingIdentity();
             try {
                 String pkgNames[] = getPackageNamesFromPid(pid);
-                if (pkgNames != null) {
-                    Intent intent = new Intent(Intent.ACTION_MEDIA_RESOURCE_GRANTED);
-                    intent.putExtra(Intent.EXTRA_PACKAGES, pkgNames);
-                    intent.putExtra(Intent.EXTRA_MEDIA_RESOURCE_TYPE, type);
-                    getContext().sendBroadcastAsUser(intent,
-                            new UserHandle(ActivityManager.getCurrentUser()),
+                if (pkgNames == null) {
+                    return;
+                }
+                UserManager manager = (UserManager) getContext().getSystemService(
+                        Context.USER_SERVICE);
+                int[] userIds = manager.getEnabledProfileIds(ActivityManager.getCurrentUser());
+                if (userIds == null || userIds.length == 0) {
+                    return;
+                }
+                Intent intent = new Intent(Intent.ACTION_MEDIA_RESOURCE_GRANTED);
+                intent.putExtra(Intent.EXTRA_PACKAGES, pkgNames);
+                intent.putExtra(Intent.EXTRA_MEDIA_RESOURCE_TYPE, type);
+                for (int userId : userIds) {
+                    getContext().sendBroadcastAsUser(intent, UserHandle.of(userId),
                             android.Manifest.permission.RECEIVE_MEDIA_RESOURCE_USAGE);
                 }
             } finally {
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 228c015..f15fdd5 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -89,6 +89,7 @@
 import static org.xmlpull.v1.XmlPullParser.START_TAG;
 
 import android.Manifest;
+import android.annotation.IntDef;
 import android.app.ActivityManager;
 import android.app.AppGlobals;
 import android.app.AppOpsManager;
@@ -162,6 +163,7 @@
 import android.util.Xml;
 
 import com.android.internal.R;
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.util.ArrayUtils;
@@ -187,6 +189,8 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -199,6 +203,26 @@
  * Derives active rules by combining a given policy with other system status,
  * and delivers to listeners, such as {@link ConnectivityManager}, for
  * enforcement.
+ *
+ * <p>
+ * This class uses 2-3 locks to synchronize state:
+ * <ul>
+ * <li>{@code mUidRulesFirstLock}: used to guard state related to individual UIDs (such as firewall
+ * rules).
+ * <li>{@code mNetworkPoliciesSecondLock}: used to guard state related to network interfaces (such
+ * as network policies).
+ * <li>{@code allLocks}: not a "real" lock, but an indication (through @GuardedBy) that all locks
+ * must be held.
+ * </ul>
+ *
+ * <p>
+ * As such, methods that require synchronization have the following prefixes:
+ * <ul>
+ * <li>{@code UL()}: require the "UID" lock ({@code mUidRulesFirstLock}).
+ * <li>{@code NL()}: require the "Network" lock ({@code mNetworkPoliciesSecondLock}).
+ * <li>{@code AL()}: require all locks, which must be obtained in order ({@code mUidRulesFirstLock}
+ * first, then {@code mNetworkPoliciesSecondLock}, then {@code mYetAnotherGuardThirdLock}, etc..
+ * </ul>
  */
 public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
     static final String TAG = "NetworkPolicy";
@@ -282,13 +306,16 @@
     private PowerManagerInternal mPowerManagerInternal;
     private IDeviceIdleController mDeviceIdleController;
 
-    final Object mRulesLock = new Object();
+    // See main javadoc for instructions on how to use these locks.
+    final Object mUidRulesFirstLock = new Object();
+    final Object mNetworkPoliciesSecondLock = new Object();
 
-    volatile boolean mSystemReady;
-    volatile boolean mScreenOn;
-    volatile boolean mRestrictBackground;
-    volatile boolean mRestrictPower;
-    volatile boolean mDeviceIdleMode;
+    @GuardedBy("allLocks") volatile boolean mSystemReady;
+
+    @GuardedBy("mUidRulesFirstLock") volatile boolean mScreenOn;
+    @GuardedBy("mUidRulesFirstLock") volatile boolean mRestrictBackground;
+    @GuardedBy("mUidRulesFirstLock") volatile boolean mRestrictPower;
+    @GuardedBy("mUidRulesFirstLock") volatile boolean mDeviceIdleMode;
 
     private final boolean mSuppressDefaultPolicy;
 
@@ -298,15 +325,19 @@
     final ArrayMap<NetworkPolicy, String[]> mNetworkRules = new ArrayMap<>();
 
     /** Defined UID policies. */
-    final SparseIntArray mUidPolicy = new SparseIntArray();
+    @GuardedBy("mUidRulesFirstLock") final SparseIntArray mUidPolicy = new SparseIntArray();
     /** Currently derived rules for each UID. */
-    final SparseIntArray mUidRules = new SparseIntArray();
+    @GuardedBy("mUidRulesFirstLock") final SparseIntArray mUidRules = new SparseIntArray();
 
+    @GuardedBy("mUidRulesFirstLock")
     final SparseIntArray mUidFirewallStandbyRules = new SparseIntArray();
+    @GuardedBy("mUidRulesFirstLock")
     final SparseIntArray mUidFirewallDozableRules = new SparseIntArray();
+    @GuardedBy("mUidRulesFirstLock")
     final SparseIntArray mUidFirewallPowerSaveRules = new SparseIntArray();
 
     /** Set of states for the child firewall chains. True if the chain is active. */
+    @GuardedBy("mUidRulesFirstLock")
     final SparseBooleanArray mFirewallChainStates = new SparseBooleanArray();
 
     /**
@@ -314,6 +345,7 @@
      * in power save mode, except device idle (doze) still applies.
      * TODO: An int array might be sufficient
      */
+    @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mPowerSaveWhitelistExceptIdleAppIds = new SparseBooleanArray();
 
     /**
@@ -321,18 +353,22 @@
      * in power save mode.
      * TODO: An int array might be sufficient
      */
+    @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mPowerSaveWhitelistAppIds = new SparseBooleanArray();
 
+    @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mPowerSaveTempWhitelistAppIds = new SparseBooleanArray();
 
     /**
      * UIDs that have been white-listed to avoid restricted background.
      */
+    @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mRestrictBackgroundWhitelistUids = new SparseBooleanArray();
 
     /**
      * UIDs that have been initially white-listed by system to avoid restricted background.
      */
+    @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mDefaultRestrictBackgroundWhitelistUids =
             new SparseBooleanArray();
 
@@ -340,18 +376,23 @@
      * UIDs that have been initially white-listed by system to avoid restricted background,
      * but later revoked by user.
      */
+    @GuardedBy("mUidRulesFirstLock")
     private final SparseBooleanArray mRestrictBackgroundWhitelistRevokedUids =
             new SparseBooleanArray();
 
     /** Set of ifaces that are metered. */
+    @GuardedBy("mNetworkPoliciesSecondLock")
     private ArraySet<String> mMeteredIfaces = new ArraySet<>();
     /** Set of over-limit templates that have been notified. */
+    @GuardedBy("mNetworkPoliciesSecondLock")
     private final ArraySet<NetworkTemplate> mOverLimitNotified = new ArraySet<>();
 
     /** Set of currently active {@link Notification} tags. */
+    @GuardedBy("mNetworkPoliciesSecondLock")
     private final ArraySet<String> mActiveNotifs = new ArraySet<String>();
 
     /** Foreground at UID granularity. */
+    @GuardedBy("mUidRulesFirstLock")
     final SparseIntArray mUidState = new SparseIntArray();
 
     /** Higher priority listener before general event dispatch */
@@ -362,6 +403,7 @@
 
     final Handler mHandler;
 
+    @GuardedBy("allLocks")
     private final AtomicFile mPolicyFile;
 
     private final AppOpsManager mAppOps;
@@ -426,7 +468,7 @@
         mNotifManager = checkNotNull(notifManager, "missing INotificationManager");
     }
 
-    void updatePowerSaveWhitelistLocked() {
+    void updatePowerSaveWhitelistUL() {
         try {
             int[] whitelist = mDeviceIdleController.getAppIdWhitelistExceptIdle();
             mPowerSaveWhitelistExceptIdleAppIds.clear();
@@ -452,19 +494,19 @@
      *
      * @return whether any uid has been added to {@link #mRestrictBackgroundWhitelistUids}.
      */
-    boolean addDefaultRestrictBackgroundWhitelistUidsLocked() {
+    boolean addDefaultRestrictBackgroundWhitelistUidsUL() {
         final List<UserInfo> users = mUserManager.getUsers();
         final int numberUsers = users.size();
 
         boolean changed = false;
         for (int i = 0; i < numberUsers; i++) {
             final UserInfo user = users.get(i);
-            changed = addDefaultRestrictBackgroundWhitelistUidsLocked(user.id) || changed;
+            changed = addDefaultRestrictBackgroundWhitelistUidsUL(user.id) || changed;
         }
         return changed;
     }
 
-    private boolean addDefaultRestrictBackgroundWhitelistUidsLocked(int userId) {
+    private boolean addDefaultRestrictBackgroundWhitelistUidsUL(int userId) {
         final SystemConfig sysConfig = SystemConfig.getInstance();
         final PackageManager pm = mContext.getPackageManager();
         final ArraySet<String> allowDataUsage = sysConfig.getAllowInDataUsageSave();
@@ -502,7 +544,7 @@
         return changed;
     }
 
-    void updatePowerSaveTempWhitelistLocked() {
+    void updatePowerSaveTempWhitelistUL() {
         try {
             // Clear the states of the current whitelist
             final int N = mPowerSaveTempWhitelistAppIds.size();
@@ -523,7 +565,7 @@
     /**
      * Remove unnecessary entries in the temp whitelist
      */
-    void purgePowerSaveTempWhitelistLocked() {
+    void purgePowerSaveTempWhitelistUL() {
         final int N = mPowerSaveTempWhitelistAppIds.size();
         for (int i = N - 1; i >= 0; i--) {
             if (mPowerSaveTempWhitelistAppIds.valueAt(i) == false) {
@@ -542,36 +584,38 @@
 
         mPackageMonitor.register(mContext, mHandler.getLooper(), UserHandle.ALL, true);
 
-        synchronized (mRulesLock) {
-            updatePowerSaveWhitelistLocked();
-            mPowerManagerInternal = LocalServices.getService(PowerManagerInternal.class);
-            mPowerManagerInternal.registerLowPowerModeObserver(
-                    new PowerManagerInternal.LowPowerModeListener() {
-                @Override
-                public void onLowPowerModeChanged(boolean enabled) {
-                    if (LOGD) Slog.d(TAG, "onLowPowerModeChanged(" + enabled + ")");
-                    synchronized (mRulesLock) {
-                        if (mRestrictPower != enabled) {
-                            mRestrictPower = enabled;
-                            updateRulesForRestrictPowerLocked();
-                            updateRulesForGlobalChangeLocked(true);
+        synchronized (mUidRulesFirstLock) {
+            synchronized (mNetworkPoliciesSecondLock) {
+                updatePowerSaveWhitelistUL();
+                mPowerManagerInternal = LocalServices.getService(PowerManagerInternal.class);
+                mPowerManagerInternal.registerLowPowerModeObserver(
+                        new PowerManagerInternal.LowPowerModeListener() {
+                    @Override
+                    public void onLowPowerModeChanged(boolean enabled) {
+                        if (LOGD) Slog.d(TAG, "onLowPowerModeChanged(" + enabled + ")");
+                        synchronized (mUidRulesFirstLock) {
+                            if (mRestrictPower != enabled) {
+                                mRestrictPower = enabled;
+                                updateRulesForRestrictPowerUL();
+                            }
                         }
                     }
+                });
+                mRestrictPower = mPowerManagerInternal.getLowPowerModeEnabled();
+
+                mSystemReady = true;
+
+                // read policy from disk
+                readPolicyAL();
+
+                if (addDefaultRestrictBackgroundWhitelistUidsUL()) {
+                    writePolicyAL();
                 }
-            });
-            mRestrictPower = mPowerManagerInternal.getLowPowerModeEnabled();
 
-            mSystemReady = true;
-
-            // read policy from disk
-            readPolicyLocked();
-
-            if (addDefaultRestrictBackgroundWhitelistUidsLocked()) {
-                writePolicyLocked();
+                setRestrictBackgroundUL(mRestrictBackground);
+                updateRulesForGlobalChangeAL(false);
+                updateNotificationsNL();
             }
-
-            updateRulesForGlobalChangeLocked(false);
-            updateNotificationsLocked();
         }
 
         updateScreenOn();
@@ -650,14 +694,14 @@
 
     final private IUidObserver mUidObserver = new IUidObserver.Stub() {
         @Override public void onUidStateChanged(int uid, int procState) throws RemoteException {
-            synchronized (mRulesLock) {
-                updateUidStateLocked(uid, procState);
+            synchronized (mUidRulesFirstLock) {
+                updateUidStateUL(uid, procState);
             }
         }
 
         @Override public void onUidGone(int uid) throws RemoteException {
-            synchronized (mRulesLock) {
-                removeUidStateLocked(uid);
+            synchronized (mUidRulesFirstLock) {
+                removeUidStateUL(uid);
             }
         }
 
@@ -672,9 +716,9 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             // on background handler thread, and POWER_SAVE_WHITELIST_CHANGED is protected
-            synchronized (mRulesLock) {
-                updatePowerSaveWhitelistLocked();
-                updateRulesForGlobalChangeLocked(false);
+            synchronized (mUidRulesFirstLock) {
+                updatePowerSaveWhitelistUL();
+                updateRulesForRestrictPowerUL();
             }
         }
     };
@@ -682,10 +726,10 @@
     final private Runnable mTempPowerSaveChangedCallback = new Runnable() {
         @Override
         public void run() {
-            synchronized (mRulesLock) {
-                updatePowerSaveTempWhitelistLocked();
-                updateRulesForTempWhitelistChangeLocked();
-                purgePowerSaveTempWhitelistLocked();
+            synchronized (mUidRulesFirstLock) {
+                updatePowerSaveTempWhitelistUL();
+                updateRulesForTempWhitelistChangeUL();
+                purgePowerSaveTempWhitelistUL();
             }
         }
     };
@@ -712,8 +756,8 @@
                 // update rules for UID, since it might be subject to
                 // global background data policy
                 if (LOGV) Slog.v(TAG, "ACTION_PACKAGE_ADDED for uid=" + uid);
-                synchronized (mRulesLock) {
-                    updateRestrictionRulesForUidLocked(uid);
+                synchronized (mUidRulesFirstLock) {
+                    updateRestrictionRulesForUidUL(uid);
                 }
             }
         }
@@ -729,10 +773,12 @@
 
             // remove any policy and update rules to clean up
             if (LOGV) Slog.v(TAG, "ACTION_UID_REMOVED for uid=" + uid);
-            synchronized (mRulesLock) {
+            synchronized (mUidRulesFirstLock) {
                 mUidPolicy.delete(uid);
-                updateRestrictionRulesForUidLocked(uid);
-                writePolicyLocked();
+                updateRestrictionRulesForUidUL(uid);
+                synchronized (mNetworkPoliciesSecondLock) {
+                    writePolicyAL();
+                }
             }
         }
     };
@@ -750,16 +796,18 @@
             switch (action) {
                 case ACTION_USER_REMOVED:
                 case ACTION_USER_ADDED:
-                    synchronized (mRulesLock) {
+                    synchronized (mUidRulesFirstLock) {
                         // Remove any persistable state for the given user; both cleaning up after a
                         // USER_REMOVED, and one last sanity check during USER_ADDED
-                        removeUserStateLocked(userId, true);
+                        removeUserStateUL(userId, true);
                         if (action == ACTION_USER_ADDED) {
                             // Add apps that are whitelisted by default.
-                            addDefaultRestrictBackgroundWhitelistUidsLocked(userId);
+                            addDefaultRestrictBackgroundWhitelistUidsUL(userId);
                         }
                         // Update global restrict for that user
-                        updateRulesForGlobalChangeLocked(true);
+                        synchronized (mNetworkPoliciesSecondLock) {
+                            updateRulesForGlobalChangeAL(true);
+                        }
                     }
                     break;
             }
@@ -777,9 +825,9 @@
             // READ_NETWORK_USAGE_HISTORY permission above.
 
             maybeRefreshTrustedTime();
-            synchronized (mRulesLock) {
-                updateNetworkEnabledLocked();
-                updateNotificationsLocked();
+            synchronized (mNetworkPoliciesSecondLock) {
+                updateNetworkEnabledNL();
+                updateNotificationsNL();
             }
         }
     };
@@ -828,10 +876,12 @@
                         EXTRA_WIFI_CONFIGURATION);
                 if (config.SSID != null) {
                     final NetworkTemplate template = NetworkTemplate.buildTemplateWifi(config.SSID);
-                    synchronized (mRulesLock) {
-                        if (mNetworkPolicy.containsKey(template)) {
-                            mNetworkPolicy.remove(template);
-                            writePolicyLocked();
+                    synchronized (mUidRulesFirstLock) {
+                        synchronized (mNetworkPoliciesSecondLock) {
+                            if (mNetworkPolicy.containsKey(template)) {
+                                mNetworkPolicy.remove(template);
+                                writePolicyAL();
+                            }
                         }
                     }
                 }
@@ -857,13 +907,13 @@
             final boolean meteredHint = info.getMeteredHint();
 
             final NetworkTemplate template = NetworkTemplate.buildTemplateWifi(info.getSSID());
-            synchronized (mRulesLock) {
+            synchronized (mNetworkPoliciesSecondLock) {
                 NetworkPolicy policy = mNetworkPolicy.get(template);
                 if (policy == null && meteredHint) {
                     // policy doesn't exist, and AP is hinting that it's
                     // metered: create an inferred policy.
                     policy = newWifiPolicy(template, meteredHint);
-                    addNetworkPolicyLocked(policy);
+                    addNetworkPolicyNL(policy);
 
                 } else if (policy != null && policy.inferred) {
                     // policy exists, and was inferred: update its current
@@ -872,7 +922,7 @@
 
                     // since this is inferred for each wifi session, just update
                     // rules without persisting.
-                    updateNetworkRulesLocked();
+                    updateNetworkRulesNL();
                 }
             }
         }
@@ -904,8 +954,8 @@
      * Check {@link NetworkPolicy} against current {@link INetworkStatsService}
      * to show visible notifications as needed.
      */
-    void updateNotificationsLocked() {
-        if (LOGV) Slog.v(TAG, "updateNotificationsLocked()");
+    void updateNotificationsNL() {
+        if (LOGV) Slog.v(TAG, "updateNotificationsNL()");
 
         // keep track of previously active notifications
         final ArraySet<String> beforeNotifs = new ArraySet<String>(mActiveNotifs);
@@ -931,11 +981,11 @@
                     enqueueNotification(policy, TYPE_LIMIT_SNOOZED, totalBytes);
                 } else {
                     enqueueNotification(policy, TYPE_LIMIT, totalBytes);
-                    notifyOverLimitLocked(policy.template);
+                    notifyOverLimitNL(policy.template);
                 }
 
             } else {
-                notifyUnderLimitLocked(policy.template);
+                notifyUnderLimitNL(policy.template);
 
                 if (policy.isOverWarning(totalBytes) && policy.lastWarningSnooze < start) {
                     enqueueNotification(policy, TYPE_WARNING, totalBytes);
@@ -983,14 +1033,14 @@
      * Notify that given {@link NetworkTemplate} is over
      * {@link NetworkPolicy#limitBytes}, potentially showing dialog to user.
      */
-    private void notifyOverLimitLocked(NetworkTemplate template) {
+    private void notifyOverLimitNL(NetworkTemplate template) {
         if (!mOverLimitNotified.contains(template)) {
             mContext.startActivity(buildNetworkOverLimitIntent(template));
             mOverLimitNotified.add(template);
         }
     }
 
-    private void notifyUnderLimitLocked(NetworkTemplate template) {
+    private void notifyUnderLimitNL(NetworkTemplate template) {
         mOverLimitNotified.remove(template);
     }
 
@@ -1142,12 +1192,12 @@
             // permission above.
 
             maybeRefreshTrustedTime();
-            synchronized (mRulesLock) {
-                ensureActiveMobilePolicyLocked();
-                normalizePoliciesLocked();
-                updateNetworkEnabledLocked();
-                updateNetworkRulesLocked();
-                updateNotificationsLocked();
+            synchronized (mNetworkPoliciesSecondLock) {
+                ensureActiveMobilePolicyNL();
+                normalizePoliciesNL();
+                updateNetworkEnabledNL();
+                updateNetworkRulesNL();
+                updateNotificationsNL();
             }
         }
     };
@@ -1156,8 +1206,8 @@
      * Proactively control network data connections when they exceed
      * {@link NetworkPolicy#limitBytes}.
      */
-    void updateNetworkEnabledLocked() {
-        if (LOGV) Slog.v(TAG, "updateNetworkEnabledLocked()");
+    void updateNetworkEnabledNL() {
+        if (LOGV) Slog.v(TAG, "updateNetworkEnabledNL()");
 
         // TODO: reset any policy-disabled networks when any policy is removed
         // completely, which is currently rare case.
@@ -1198,8 +1248,8 @@
      * {@link NetworkPolicy} that need to be enforced. When matches found, set
      * remaining quota based on usage cycle and historical stats.
      */
-    void updateNetworkRulesLocked() {
-        if (LOGV) Slog.v(TAG, "updateNetworkRulesLocked()");
+    void updateNetworkRulesNL() {
+        if (LOGV) Slog.v(TAG, "updateNetworkRulesNL()");
 
         final NetworkState[] states;
         try {
@@ -1349,8 +1399,8 @@
      * Once any {@link #mNetworkPolicy} are loaded from disk, ensure that we
      * have at least a default mobile policy defined.
      */
-    private void ensureActiveMobilePolicyLocked() {
-        if (LOGV) Slog.v(TAG, "ensureActiveMobilePolicyLocked()");
+    private void ensureActiveMobilePolicyNL() {
+        if (LOGV) Slog.v(TAG, "ensureActiveMobilePolicyNL()");
         if (mSuppressDefaultPolicy) return;
 
         final TelephonyManager tele = TelephonyManager.from(mContext);
@@ -1359,11 +1409,11 @@
         final int[] subIds = sub.getActiveSubscriptionIdList();
         for (int subId : subIds) {
             final String subscriberId = tele.getSubscriberId(subId);
-            ensureActiveMobilePolicyLocked(subscriberId);
+            ensureActiveMobilePolicyNL(subscriberId);
         }
     }
 
-    private void ensureActiveMobilePolicyLocked(String subscriberId) {
+    private void ensureActiveMobilePolicyNL(String subscriberId) {
         // Poke around to see if we already have a policy
         final NetworkIdentity probeIdent = new NetworkIdentity(TYPE_MOBILE,
                 TelephonyManager.NETWORK_TYPE_UNKNOWN, subscriberId, null, false, true);
@@ -1394,11 +1444,11 @@
         final NetworkTemplate template = buildTemplateMobileAll(subscriberId);
         final NetworkPolicy policy = new NetworkPolicy(template, cycleDay, cycleTimezone,
                 warningBytes, LIMIT_DISABLED, SNOOZE_NEVER, SNOOZE_NEVER, true, true);
-        addNetworkPolicyLocked(policy);
+        addNetworkPolicyNL(policy);
     }
 
-    private void readPolicyLocked() {
-        if (LOGV) Slog.v(TAG, "readPolicyLocked()");
+    private void readPolicyAL() {
+        if (LOGV) Slog.v(TAG, "readPolicyAL()");
 
         // clear any existing policy and read from disk
         mNetworkPolicy.clear();
@@ -1498,7 +1548,7 @@
                         final int policy = readIntAttribute(in, ATTR_POLICY);
 
                         if (UserHandle.isApp(uid)) {
-                            setUidPolicyUncheckedLocked(uid, policy, false);
+                            setUidPolicyUncheckedUL(uid, policy, false);
                         } else {
                             Slog.w(TAG, "unable to apply policy to UID " + uid + "; ignoring");
                         }
@@ -1510,7 +1560,7 @@
                         // app policy is deprecated so this is only used in pre system user split.
                         final int uid = UserHandle.getUid(UserHandle.USER_SYSTEM, appId);
                         if (UserHandle.isApp(uid)) {
-                            setUidPolicyUncheckedLocked(uid, policy, false);
+                            setUidPolicyUncheckedUL(uid, policy, false);
                         } else {
                             Slog.w(TAG, "unable to apply policy to UID " + uid + "; ignoring");
                         }
@@ -1533,7 +1583,7 @@
 
         } catch (FileNotFoundException e) {
             // missing policy is okay, probably first boot
-            upgradeLegacyBackgroundData();
+            upgradeLegacyBackgroundDataUL();
         } catch (IOException e) {
             Log.wtf(TAG, "problem reading network policy", e);
         } catch (XmlPullParserException e) {
@@ -1547,7 +1597,7 @@
      * Upgrade legacy background data flags, notifying listeners of one last
      * change to always-true.
      */
-    private void upgradeLegacyBackgroundData() {
+    private void upgradeLegacyBackgroundDataUL() {
         mRestrictBackground = Settings.Secure.getInt(
                 mContext.getContentResolver(), Settings.Secure.BACKGROUND_DATA, 1) != 1;
 
@@ -1559,8 +1609,8 @@
         }
     }
 
-    void writePolicyLocked() {
-        if (LOGV) Slog.v(TAG, "writePolicyLocked()");
+    void writePolicyAL() {
+        if (LOGV) Slog.v(TAG, "writePolicyAL()");
 
         FileOutputStream fos = null;
         try {
@@ -1657,13 +1707,12 @@
         if (!UserHandle.isApp(uid)) {
             throw new IllegalArgumentException("cannot apply policy to UID " + uid);
         }
-
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             final long token = Binder.clearCallingIdentity();
             try {
                 final int oldPolicy = mUidPolicy.get(uid, POLICY_NONE);
                 if (oldPolicy != policy) {
-                    setUidPolicyUncheckedLocked(uid, oldPolicy, policy, true);
+                    setUidPolicyUncheckedUL(uid, oldPolicy, policy, true);
                 }
             } finally {
                 Binder.restoreCallingIdentity(token);
@@ -1679,11 +1728,11 @@
             throw new IllegalArgumentException("cannot apply policy to UID " + uid);
         }
 
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             final int oldPolicy = mUidPolicy.get(uid, POLICY_NONE);
             policy |= oldPolicy;
             if (oldPolicy != policy) {
-                setUidPolicyUncheckedLocked(uid, oldPolicy, policy, true);
+                setUidPolicyUncheckedUL(uid, oldPolicy, policy, true);
             }
         }
     }
@@ -1696,17 +1745,17 @@
             throw new IllegalArgumentException("cannot apply policy to UID " + uid);
         }
 
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             final int oldPolicy = mUidPolicy.get(uid, POLICY_NONE);
             policy = oldPolicy & ~policy;
             if (oldPolicy != policy) {
-                setUidPolicyUncheckedLocked(uid, oldPolicy, policy, true);
+                setUidPolicyUncheckedUL(uid, oldPolicy, policy, true);
             }
         }
     }
 
-    private void setUidPolicyUncheckedLocked(int uid, int oldPolicy, int policy, boolean persist) {
-        setUidPolicyUncheckedLocked(uid, policy, persist);
+    private void setUidPolicyUncheckedUL(int uid, int oldPolicy, int policy, boolean persist) {
+        setUidPolicyUncheckedUL(uid, policy, persist);
 
         final boolean isBlacklisted = policy == POLICY_REJECT_METERED_BACKGROUND;
         mHandler.obtainMessage(MSG_RESTRICT_BACKGROUND_BLACKLIST_CHANGED, uid,
@@ -1721,13 +1770,15 @@
         }
     }
 
-    private void setUidPolicyUncheckedLocked(int uid, int policy, boolean persist) {
+    private void setUidPolicyUncheckedUL(int uid, int policy, boolean persist) {
         mUidPolicy.put(uid, policy);
 
         // uid policy changed, recompute rules and persist policy.
-        updateRulesForDataUsageRestrictionsLocked(uid);
+        updateRulesForDataUsageRestrictionsUL(uid);
         if (persist) {
-            writePolicyLocked();
+            synchronized (mNetworkPoliciesSecondLock) {
+                writePolicyAL();
+            }
         }
     }
 
@@ -1735,7 +1786,7 @@
     public int getUidPolicy(int uid) {
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
 
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             return mUidPolicy.get(uid, POLICY_NONE);
         }
     }
@@ -1745,7 +1796,7 @@
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
 
         int[] uids = new int[0];
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             for (int i = 0; i < mUidPolicy.size(); i++) {
                 final int uid = mUidPolicy.keyAt(i);
                 final int uidPolicy = mUidPolicy.valueAt(i);
@@ -1761,9 +1812,9 @@
      * Removes any persistable state associated with given {@link UserHandle}, persisting
      * if any changes that are made.
      */
-    boolean removeUserStateLocked(int userId, boolean writePolicy) {
+    boolean removeUserStateUL(int userId, boolean writePolicy) {
 
-        if (LOGV) Slog.v(TAG, "removeUserStateLocked()");
+        if (LOGV) Slog.v(TAG, "removeUserStateUL()");
         boolean changed = false;
 
         // Remove entries from restricted background UID whitelist
@@ -1777,7 +1828,7 @@
 
         if (wlUids.length > 0) {
             for (int uid : wlUids) {
-                removeRestrictBackgroundWhitelistedUidLocked(uid, false, false);
+                removeRestrictBackgroundWhitelistedUidUL(uid, false, false);
             }
             changed = true;
         }
@@ -1806,11 +1857,11 @@
             }
             changed = true;
         }
-
-        updateRulesForGlobalChangeLocked(true);
-
-        if (writePolicy && changed) {
-            writePolicyLocked();
+        synchronized (mNetworkPoliciesSecondLock) {
+            updateRulesForGlobalChangeAL(true);
+            if (writePolicy && changed) {
+                writePolicyAL();
+            }
         }
         return changed;
     }
@@ -1845,19 +1896,21 @@
         final long token = Binder.clearCallingIdentity();
         try {
             maybeRefreshTrustedTime();
-            synchronized (mRulesLock) {
-                normalizePoliciesLocked(policies);
-                updateNetworkEnabledLocked();
-                updateNetworkRulesLocked();
-                updateNotificationsLocked();
-                writePolicyLocked();
+            synchronized (mUidRulesFirstLock) {
+                synchronized (mNetworkPoliciesSecondLock) {
+                    normalizePoliciesNL(policies);
+                    updateNetworkEnabledNL();
+                    updateNetworkRulesNL();
+                    updateNotificationsNL();
+                    writePolicyAL();
+                }
             }
         } finally {
             Binder.restoreCallingIdentity(token);
         }
     }
 
-    void addNetworkPolicyLocked(NetworkPolicy policy) {
+    void addNetworkPolicyNL(NetworkPolicy policy) {
         NetworkPolicy[] policies = getNetworkPolicies(mContext.getOpPackageName());
         policies = ArrayUtils.appendElement(NetworkPolicy.class, policies, policy);
         setNetworkPolicies(policies);
@@ -1879,7 +1932,7 @@
             }
         }
 
-        synchronized (mRulesLock) {
+        synchronized (mNetworkPoliciesSecondLock) {
             final int size = mNetworkPolicy.size();
             final NetworkPolicy[] policies = new NetworkPolicy[size];
             for (int i = 0; i < size; i++) {
@@ -1889,11 +1942,11 @@
         }
     }
 
-    private void normalizePoliciesLocked() {
-        normalizePoliciesLocked(getNetworkPolicies(mContext.getOpPackageName()));
+    private void normalizePoliciesNL() {
+        normalizePoliciesNL(getNetworkPolicies(mContext.getOpPackageName()));
     }
 
-    private void normalizePoliciesLocked(NetworkPolicy[] policies) {
+    private void normalizePoliciesNL(NetworkPolicy[] policies) {
         final TelephonyManager tele = TelephonyManager.from(mContext);
         final String[] merged = tele.getMergedSubscriberIds();
 
@@ -1927,29 +1980,31 @@
     void performSnooze(NetworkTemplate template, int type) {
         maybeRefreshTrustedTime();
         final long currentTime = currentTimeMillis();
-        synchronized (mRulesLock) {
-            // find and snooze local policy that matches
-            final NetworkPolicy policy = mNetworkPolicy.get(template);
-            if (policy == null) {
-                throw new IllegalArgumentException("unable to find policy for " + template);
-            }
+        synchronized (mUidRulesFirstLock) {
+            synchronized (mNetworkPoliciesSecondLock) {
+                // find and snooze local policy that matches
+                final NetworkPolicy policy = mNetworkPolicy.get(template);
+                if (policy == null) {
+                    throw new IllegalArgumentException("unable to find policy for " + template);
+                }
 
-            switch (type) {
-                case TYPE_WARNING:
-                    policy.lastWarningSnooze = currentTime;
-                    break;
-                case TYPE_LIMIT:
-                    policy.lastLimitSnooze = currentTime;
-                    break;
-                default:
-                    throw new IllegalArgumentException("unexpected type");
-            }
+                switch (type) {
+                    case TYPE_WARNING:
+                        policy.lastWarningSnooze = currentTime;
+                        break;
+                    case TYPE_LIMIT:
+                        policy.lastLimitSnooze = currentTime;
+                        break;
+                    default:
+                        throw new IllegalArgumentException("unexpected type");
+                }
 
-            normalizePoliciesLocked();
-            updateNetworkEnabledLocked();
-            updateNetworkRulesLocked();
-            updateNotificationsLocked();
-            writePolicyLocked();
+                normalizePoliciesNL();
+                updateNetworkEnabledNL();
+                updateNetworkRulesNL();
+                updateNotificationsNL();
+                writePolicyAL();
+            }
         }
     }
 
@@ -1957,7 +2012,7 @@
     public void onTetheringChanged(String iface, boolean tethering) {
         // No need to enforce permission because setRestrictBackground() will do it.
         if (LOGD) Log.d(TAG, "onTetherStateChanged(" + iface + ", " + tethering + ")");
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             if (mRestrictBackground && tethering) {
                 Log.d(TAG, "Tethering on (" + iface +"); disable Data Saver");
                 setRestrictBackground(false);
@@ -1971,13 +2026,13 @@
         final long token = Binder.clearCallingIdentity();
         try {
             maybeRefreshTrustedTime();
-            synchronized (mRulesLock) {
+            synchronized (mUidRulesFirstLock) {
                 if (restrictBackground == mRestrictBackground) {
                     // Ideally, UI should never allow this scenario...
                     Slog.w(TAG, "setRestrictBackground: already " + restrictBackground);
                     return;
                 }
-                setRestrictBackgroundLocked(restrictBackground);
+                setRestrictBackgroundUL(restrictBackground);
             }
 
         } finally {
@@ -1988,27 +2043,29 @@
                 .sendToTarget();
     }
 
-    private void setRestrictBackgroundLocked(boolean restrictBackground) {
-        Slog.d(TAG, "setRestrictBackgroundLocked(): " + restrictBackground);
+    private void setRestrictBackgroundUL(boolean restrictBackground) {
+        Slog.d(TAG, "setRestrictBackgroundUL(): " + restrictBackground);
         final boolean oldRestrictBackground = mRestrictBackground;
         mRestrictBackground = restrictBackground;
         // Must whitelist foreground apps before turning data saver mode on.
         // TODO: there is no need to iterate through all apps here, just those in the foreground,
         // so it could call AM to get the UIDs of such apps, and iterate through them instead.
-        updateRulesForRestrictBackgroundLocked();
+        updateRulesForAllAppsUL(TYPE_RESTRICT_BACKGROUND);
         try {
             if (!mNetworkManager.setDataSaverModeEnabled(mRestrictBackground)) {
                 Slog.e(TAG, "Could not change Data Saver Mode on NMS to " + mRestrictBackground);
                 mRestrictBackground = oldRestrictBackground;
                 // TODO: if it knew the foreground apps (see TODO above), it could call
-                // updateRulesForRestrictBackgroundLocked() again to restore state.
+                // updateRulesForRestrictBackgroundUL() again to restore state.
                 return;
             }
         } catch (RemoteException e) {
             // ignored; service lives in system_server
         }
-        updateNotificationsLocked();
-        writePolicyLocked();
+        synchronized (mNetworkPoliciesSecondLock) {
+            updateNotificationsNL();
+            writePolicyAL();
+        }
     }
 
     @Override
@@ -2016,7 +2073,8 @@
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
         final boolean oldStatus;
         final boolean needFirewallRules;
-        synchronized (mRulesLock) {
+        int changed;
+        synchronized (mUidRulesFirstLock) {
             oldStatus = mRestrictBackgroundWhitelistUids.get(uid);
             if (oldStatus) {
                 if (LOGD) Slog.d(TAG, "uid " + uid + " is already whitelisted");
@@ -2033,12 +2091,14 @@
             }
             if (needFirewallRules) {
                 // Only update firewall rules if necessary...
-                updateRulesForDataUsageRestrictionsLocked(uid);
+                updateRulesForDataUsageRestrictionsUL(uid);
             }
             // ...but always persists the whitelist request.
-            writePolicyLocked();
+            synchronized (mNetworkPoliciesSecondLock) {
+                writePolicyAL();
+            }
+            changed = (mRestrictBackground && !oldStatus && needFirewallRules) ? 1 : 0;
         }
-        int changed = (mRestrictBackground && !oldStatus && needFirewallRules) ? 1 : 0;
         mHandler.obtainMessage(MSG_RESTRICT_BACKGROUND_WHITELIST_CHANGED, uid, changed,
                 Boolean.TRUE).sendToTarget();
     }
@@ -2047,8 +2107,8 @@
     public void removeRestrictBackgroundWhitelistedUid(int uid) {
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
         final boolean changed;
-        synchronized (mRulesLock) {
-            changed = removeRestrictBackgroundWhitelistedUidLocked(uid, false, true);
+        synchronized (mUidRulesFirstLock) {
+            changed = removeRestrictBackgroundWhitelistedUidUL(uid, false, true);
         }
         mHandler.obtainMessage(MSG_RESTRICT_BACKGROUND_WHITELIST_CHANGED, uid, changed ? 1 : 0,
                 Boolean.FALSE).sendToTarget();
@@ -2058,7 +2118,7 @@
      * Removes a uid from the restricted background whitelist, returning whether its current
      * {@link ConnectivityManager.RestrictBackgroundStatus} changed.
      */
-    private boolean removeRestrictBackgroundWhitelistedUidLocked(int uid, boolean uidDeleted,
+    private boolean removeRestrictBackgroundWhitelistedUidUL(int uid, boolean uidDeleted,
             boolean updateNow) {
         final boolean oldStatus = mRestrictBackgroundWhitelistUids.get(uid);
         if (!oldStatus && !uidDeleted) {
@@ -2078,11 +2138,13 @@
         }
         if (needFirewallRules) {
             // Only update firewall rules if necessary...
-            updateRulesForDataUsageRestrictionsLocked(uid, uidDeleted);
+            updateRulesForDataUsageRestrictionsUL(uid, uidDeleted);
         }
         if (updateNow) {
             // ...but always persists the whitelist request.
-            writePolicyLocked();
+            synchronized (mNetworkPoliciesSecondLock) {
+                writePolicyAL();
+            }
         }
         // Status only changes if Data Saver is turned on (otherwise it is DISABLED, even if the
         // app was whitelisted before).
@@ -2092,7 +2154,7 @@
     @Override
     public int[] getRestrictBackgroundWhitelistedUids() {
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             final int size = mRestrictBackgroundWhitelistUids.size();
             final int[] whitelist = new int[size];
             for (int i = 0; i < size; i++) {
@@ -2111,7 +2173,7 @@
         mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
         final int uid = Binder.getCallingUid();
 
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             // Must clear identity because getUidPolicy() is restricted to system.
             final long token = Binder.clearCallingIdentity();
             final int policy;
@@ -2137,7 +2199,7 @@
     public boolean getRestrictBackground() {
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
 
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             return mRestrictBackground;
         }
     }
@@ -2146,13 +2208,13 @@
     public void setDeviceIdleMode(boolean enabled) {
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
 
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             if (mDeviceIdleMode != enabled) {
                 mDeviceIdleMode = enabled;
                 if (mSystemReady) {
                     // Device idle change means we need to rebuild rules for all
                     // known apps, so do a global refresh.
-                    updateRulesForGlobalChangeLocked(false);
+                    updateRulesForRestrictPowerUL();
                 }
                 if (enabled) {
                     EventLogTags.writeDeviceIdleOnPhase("net");
@@ -2163,7 +2225,7 @@
         }
     }
 
-    private NetworkPolicy findPolicyForNetworkLocked(NetworkIdentity ident) {
+    private NetworkPolicy findPolicyForNetworkNL(NetworkIdentity ident) {
         for (int i = mNetworkPolicy.size()-1; i >= 0; i--) {
             NetworkPolicy policy = mNetworkPolicy.valueAt(i);
             if (policy.template.matches(ident)) {
@@ -2191,8 +2253,8 @@
         final NetworkIdentity ident = NetworkIdentity.buildNetworkIdentity(mContext, state);
 
         final NetworkPolicy policy;
-        synchronized (mRulesLock) {
-            policy = findPolicyForNetworkLocked(ident);
+        synchronized (mNetworkPoliciesSecondLock) {
+            policy = findPolicyForNetworkNL(ident);
         }
 
         if (policy == null || !policy.hasCycle()) {
@@ -2224,21 +2286,16 @@
 
         final NetworkIdentity ident = NetworkIdentity.buildNetworkIdentity(mContext, state);
 
-        // roaming networks are always considered metered
-        if (ident.getRoaming()) {
-            return true;
-        }
-
         final NetworkPolicy policy;
-        synchronized (mRulesLock) {
-            policy = findPolicyForNetworkLocked(ident);
+        synchronized (mNetworkPoliciesSecondLock) {
+            policy = findPolicyForNetworkNL(ident);
         }
 
         if (policy != null) {
             return policy.metered;
         } else {
             final int type = state.networkInfo.getType();
-            if (isNetworkTypeMobile(type) || type == TYPE_WIMAX) {
+            if ((isNetworkTypeMobile(type) && ident.getMetered()) || type == TYPE_WIMAX) {
                 return true;
             }
             return false;
@@ -2256,155 +2313,157 @@
             argSet.add(arg);
         }
 
-        synchronized (mRulesLock) {
-            if (argSet.contains("--unsnooze")) {
-                for (int i = mNetworkPolicy.size()-1; i >= 0; i--) {
-                    mNetworkPolicy.valueAt(i).clearSnooze();
+        synchronized (mUidRulesFirstLock) {
+            synchronized (mNetworkPoliciesSecondLock) {
+                if (argSet.contains("--unsnooze")) {
+                    for (int i = mNetworkPolicy.size()-1; i >= 0; i--) {
+                        mNetworkPolicy.valueAt(i).clearSnooze();
+                    }
+
+                    normalizePoliciesNL();
+                    updateNetworkEnabledNL();
+                    updateNetworkRulesNL();
+                    updateNotificationsNL();
+                    writePolicyAL();
+
+                    fout.println("Cleared snooze timestamps");
+                    return;
                 }
 
-                normalizePoliciesLocked();
-                updateNetworkEnabledLocked();
-                updateNetworkRulesLocked();
-                updateNotificationsLocked();
-                writePolicyLocked();
-
-                fout.println("Cleared snooze timestamps");
-                return;
-            }
-
-            fout.print("System ready: "); fout.println(mSystemReady);
-            fout.print("Restrict background: "); fout.println(mRestrictBackground);
-            fout.print("Restrict power: "); fout.println(mRestrictPower);
-            fout.print("Device idle: "); fout.println(mDeviceIdleMode);
-            fout.println("Network policies:");
-            fout.increaseIndent();
-            for (int i = 0; i < mNetworkPolicy.size(); i++) {
-                fout.println(mNetworkPolicy.valueAt(i).toString());
-            }
-            fout.decreaseIndent();
-
-            fout.print("Metered ifaces: "); fout.println(String.valueOf(mMeteredIfaces));
-
-            fout.println("Policy for UIDs:");
-            fout.increaseIndent();
-            int size = mUidPolicy.size();
-            for (int i = 0; i < size; i++) {
-                final int uid = mUidPolicy.keyAt(i);
-                final int policy = mUidPolicy.valueAt(i);
-                fout.print("UID=");
-                fout.print(uid);
-                fout.print(" policy=");
-                fout.print(DebugUtils.flagsToString(NetworkPolicyManager.class, "POLICY_", policy));
-                fout.println();
-            }
-            fout.decreaseIndent();
-
-            size = mPowerSaveWhitelistExceptIdleAppIds.size();
-            if (size > 0) {
-                fout.println("Power save whitelist (except idle) app ids:");
+                fout.print("System ready: "); fout.println(mSystemReady);
+                fout.print("Restrict background: "); fout.println(mRestrictBackground);
+                fout.print("Restrict power: "); fout.println(mRestrictPower);
+                fout.print("Device idle: "); fout.println(mDeviceIdleMode);
+                fout.println("Network policies:");
                 fout.increaseIndent();
+                for (int i = 0; i < mNetworkPolicy.size(); i++) {
+                    fout.println(mNetworkPolicy.valueAt(i).toString());
+                }
+                fout.decreaseIndent();
+
+                fout.print("Metered ifaces: "); fout.println(String.valueOf(mMeteredIfaces));
+
+                fout.println("Policy for UIDs:");
+                fout.increaseIndent();
+                int size = mUidPolicy.size();
                 for (int i = 0; i < size; i++) {
+                    final int uid = mUidPolicy.keyAt(i);
+                    final int policy = mUidPolicy.valueAt(i);
                     fout.print("UID=");
-                    fout.print(mPowerSaveWhitelistExceptIdleAppIds.keyAt(i));
-                    fout.print(": ");
-                    fout.print(mPowerSaveWhitelistExceptIdleAppIds.valueAt(i));
+                    fout.print(uid);
+                    fout.print(" policy=");
+                    fout.print(DebugUtils.flagsToString(NetworkPolicyManager.class, "POLICY_", policy));
+                    fout.println();
+                }
+                fout.decreaseIndent();
+
+                size = mPowerSaveWhitelistExceptIdleAppIds.size();
+                if (size > 0) {
+                    fout.println("Power save whitelist (except idle) app ids:");
+                    fout.increaseIndent();
+                    for (int i = 0; i < size; i++) {
+                        fout.print("UID=");
+                        fout.print(mPowerSaveWhitelistExceptIdleAppIds.keyAt(i));
+                        fout.print(": ");
+                        fout.print(mPowerSaveWhitelistExceptIdleAppIds.valueAt(i));
+                        fout.println();
+                    }
+                    fout.decreaseIndent();
+                }
+
+                size = mPowerSaveWhitelistAppIds.size();
+                if (size > 0) {
+                    fout.println("Power save whitelist app ids:");
+                    fout.increaseIndent();
+                    for (int i = 0; i < size; i++) {
+                        fout.print("UID=");
+                        fout.print(mPowerSaveWhitelistAppIds.keyAt(i));
+                        fout.print(": ");
+                        fout.print(mPowerSaveWhitelistAppIds.valueAt(i));
+                        fout.println();
+                    }
+                    fout.decreaseIndent();
+                }
+
+                size = mRestrictBackgroundWhitelistUids.size();
+                if (size > 0) {
+                    fout.println("Restrict background whitelist uids:");
+                    fout.increaseIndent();
+                    for (int i = 0; i < size; i++) {
+                        fout.print("UID=");
+                        fout.print(mRestrictBackgroundWhitelistUids.keyAt(i));
+                        fout.println();
+                    }
+                    fout.decreaseIndent();
+                }
+
+                size = mDefaultRestrictBackgroundWhitelistUids.size();
+                if (size > 0) {
+                    fout.println("Default restrict background whitelist uids:");
+                    fout.increaseIndent();
+                    for (int i = 0; i < size; i++) {
+                        fout.print("UID=");
+                        fout.print(mDefaultRestrictBackgroundWhitelistUids.keyAt(i));
+                        fout.println();
+                    }
+                    fout.decreaseIndent();
+                }
+
+                size = mRestrictBackgroundWhitelistRevokedUids.size();
+                if (size > 0) {
+                    fout.println("Default restrict background whitelist uids revoked by users:");
+                    fout.increaseIndent();
+                    for (int i = 0; i < size; i++) {
+                        fout.print("UID=");
+                        fout.print(mRestrictBackgroundWhitelistRevokedUids.keyAt(i));
+                        fout.println();
+                    }
+                    fout.decreaseIndent();
+                }
+
+                final SparseBooleanArray knownUids = new SparseBooleanArray();
+                collectKeys(mUidState, knownUids);
+                collectKeys(mUidRules, knownUids);
+
+                fout.println("Status for all known UIDs:");
+                fout.increaseIndent();
+                size = knownUids.size();
+                for (int i = 0; i < size; i++) {
+                    final int uid = knownUids.keyAt(i);
+                    fout.print("UID=");
+                    fout.print(uid);
+
+                    final int state = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
+                    fout.print(" state=");
+                    fout.print(state);
+                    if (state <= ActivityManager.PROCESS_STATE_TOP) {
+                        fout.print(" (fg)");
+                    } else {
+                        fout.print(state <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
+                                ? " (fg svc)" : " (bg)");
+                    }
+
+                    final int uidRules = mUidRules.get(uid, RULE_NONE);
+                    fout.print(" rules=");
+                    fout.print(uidRulesToString(uidRules));
+                    fout.println();
+                }
+                fout.decreaseIndent();
+
+                fout.println("Status for just UIDs with rules:");
+                fout.increaseIndent();
+                size = mUidRules.size();
+                for (int i = 0; i < size; i++) {
+                    final int uid = mUidRules.keyAt(i);
+                    fout.print("UID=");
+                    fout.print(uid);
+                    final int uidRules = mUidRules.get(uid, RULE_NONE);
+                    fout.print(" rules=");
+                    fout.print(uidRulesToString(uidRules));
                     fout.println();
                 }
                 fout.decreaseIndent();
             }
-
-            size = mPowerSaveWhitelistAppIds.size();
-            if (size > 0) {
-                fout.println("Power save whitelist app ids:");
-                fout.increaseIndent();
-                for (int i = 0; i < size; i++) {
-                    fout.print("UID=");
-                    fout.print(mPowerSaveWhitelistAppIds.keyAt(i));
-                    fout.print(": ");
-                    fout.print(mPowerSaveWhitelistAppIds.valueAt(i));
-                    fout.println();
-                }
-                fout.decreaseIndent();
-            }
-
-            size = mRestrictBackgroundWhitelistUids.size();
-            if (size > 0) {
-                fout.println("Restrict background whitelist uids:");
-                fout.increaseIndent();
-                for (int i = 0; i < size; i++) {
-                    fout.print("UID=");
-                    fout.print(mRestrictBackgroundWhitelistUids.keyAt(i));
-                    fout.println();
-                }
-                fout.decreaseIndent();
-            }
-
-            size = mDefaultRestrictBackgroundWhitelistUids.size();
-            if (size > 0) {
-                fout.println("Default restrict background whitelist uids:");
-                fout.increaseIndent();
-                for (int i = 0; i < size; i++) {
-                    fout.print("UID=");
-                    fout.print(mDefaultRestrictBackgroundWhitelistUids.keyAt(i));
-                    fout.println();
-                }
-                fout.decreaseIndent();
-            }
-
-            size = mRestrictBackgroundWhitelistRevokedUids.size();
-            if (size > 0) {
-                fout.println("Default restrict background whitelist uids revoked by users:");
-                fout.increaseIndent();
-                for (int i = 0; i < size; i++) {
-                    fout.print("UID=");
-                    fout.print(mRestrictBackgroundWhitelistRevokedUids.keyAt(i));
-                    fout.println();
-                }
-                fout.decreaseIndent();
-            }
-
-            final SparseBooleanArray knownUids = new SparseBooleanArray();
-            collectKeys(mUidState, knownUids);
-            collectKeys(mUidRules, knownUids);
-
-            fout.println("Status for all known UIDs:");
-            fout.increaseIndent();
-            size = knownUids.size();
-            for (int i = 0; i < size; i++) {
-                final int uid = knownUids.keyAt(i);
-                fout.print("UID=");
-                fout.print(uid);
-
-                final int state = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
-                fout.print(" state=");
-                fout.print(state);
-                if (state <= ActivityManager.PROCESS_STATE_TOP) {
-                    fout.print(" (fg)");
-                } else {
-                    fout.print(state <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
-                            ? " (fg svc)" : " (bg)");
-                }
-
-                final int uidRules = mUidRules.get(uid, RULE_NONE);
-                fout.print(" rules=");
-                fout.print(uidRulesToString(uidRules));
-                fout.println();
-            }
-            fout.decreaseIndent();
-
-            fout.println("Status for just UIDs with rules:");
-            fout.increaseIndent();
-            size = mUidRules.size();
-            for (int i = 0; i < size; i++) {
-                final int uid = mUidRules.keyAt(i);
-                fout.print("UID=");
-                fout.print(uid);
-                final int uidRules = mUidRules.get(uid, RULE_NONE);
-                fout.print(" rules=");
-                fout.print(uidRulesToString(uidRules));
-                fout.println();
-            }
-            fout.decreaseIndent();
         }
     }
 
@@ -2419,74 +2478,74 @@
     public boolean isUidForeground(int uid) {
         mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
 
-        synchronized (mRulesLock) {
-            return isUidForegroundLocked(uid);
+        synchronized (mUidRulesFirstLock) {
+            return isUidForegroundUL(uid);
         }
     }
 
-    private boolean isUidForegroundLocked(int uid) {
-        return isUidStateForegroundLocked(
+    private boolean isUidForegroundUL(int uid) {
+        return isUidStateForegroundUL(
                 mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY));
     }
 
-    private boolean isUidForegroundOnRestrictBackgroundLocked(int uid) {
+    private boolean isUidForegroundOnRestrictBackgroundUL(int uid) {
         final int procState = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
-        return isProcStateAllowedWhileOnRestrictBackgroundLocked(procState);
+        return isProcStateAllowedWhileOnRestrictBackground(procState);
     }
 
-    private boolean isUidForegroundOnRestrictPowerLocked(int uid) {
+    private boolean isUidForegroundOnRestrictPowerUL(int uid) {
         final int procState = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
         return isProcStateAllowedWhileIdleOrPowerSaveMode(procState);
     }
 
-    private boolean isUidStateForegroundLocked(int state) {
+    private boolean isUidStateForegroundUL(int state) {
         // only really in foreground when screen is also on
         return mScreenOn && state <= ActivityManager.PROCESS_STATE_TOP;
     }
 
     /**
      * Process state of UID changed; if needed, will trigger
-     * {@link #updateRulesForDataUsageRestrictionsLocked(int)} and
-     * {@link #updateRulesForPowerRestrictionsLocked(int)}
+     * {@link #updateRulesForDataUsageRestrictionsUL(int)} and
+     * {@link #updateRulesForPowerRestrictionsUL(int)}
      */
-    private void updateUidStateLocked(int uid, int uidState) {
+    private void updateUidStateUL(int uid, int uidState) {
         final int oldUidState = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
         if (oldUidState != uidState) {
             // state changed, push updated rules
             mUidState.put(uid, uidState);
-            updateRestrictBackgroundRulesOnUidStatusChangedLocked(uid, oldUidState, uidState);
+            updateRestrictBackgroundRulesOnUidStatusChangedUL(uid, oldUidState, uidState);
             if (isProcStateAllowedWhileIdleOrPowerSaveMode(oldUidState)
                     != isProcStateAllowedWhileIdleOrPowerSaveMode(uidState) ) {
                 if (isUidIdle(uid)) {
-                    updateRuleForAppIdleLocked(uid);
+                    updateRuleForAppIdleUL(uid);
                 }
                 if (mDeviceIdleMode) {
-                    updateRuleForDeviceIdleLocked(uid);
+                    updateRuleForDeviceIdleUL(uid);
                 }
                 if (mRestrictPower) {
-                    updateRuleForRestrictPowerLocked(uid);
+                    updateRuleForRestrictPowerUL(uid);
                 }
-                updateRulesForPowerRestrictionsLocked(uid);
+                updateRulesForPowerRestrictionsUL(uid);
             }
-            updateNetworkStats(uid, isUidStateForegroundLocked(uidState));
+            updateNetworkStats(uid, isUidStateForegroundUL(uidState));
         }
     }
 
-    private void removeUidStateLocked(int uid) {
+    private void removeUidStateUL(int uid) {
         final int index = mUidState.indexOfKey(uid);
         if (index >= 0) {
             final int oldUidState = mUidState.valueAt(index);
             mUidState.removeAt(index);
             if (oldUidState != ActivityManager.PROCESS_STATE_CACHED_EMPTY) {
-                updateRestrictBackgroundRulesOnUidStatusChangedLocked(uid, oldUidState,
+                updateRestrictBackgroundRulesOnUidStatusChangedUL(uid, oldUidState,
                         ActivityManager.PROCESS_STATE_CACHED_EMPTY);
                 if (mDeviceIdleMode) {
-                    updateRuleForDeviceIdleLocked(uid);
+                    updateRuleForDeviceIdleUL(uid);
                 }
                 if (mRestrictPower) {
-                    updateRuleForRestrictPowerLocked(uid);
+                    updateRuleForRestrictPowerUL(uid);
                 }
-                updateRulesForPowerRestrictionsLocked(uid);
+                updateRulesForPowerRestrictionsUL(uid);
                 updateNetworkStats(uid, false);
             }
         }
@@ -2501,38 +2560,38 @@
         }
     }
 
-    private void updateRestrictBackgroundRulesOnUidStatusChangedLocked(int uid, int oldUidState,
+    private void updateRestrictBackgroundRulesOnUidStatusChangedUL(int uid, int oldUidState,
             int newUidState) {
         final boolean oldForeground =
-                isProcStateAllowedWhileOnRestrictBackgroundLocked(oldUidState);
+                isProcStateAllowedWhileOnRestrictBackground(oldUidState);
         final boolean newForeground =
-                isProcStateAllowedWhileOnRestrictBackgroundLocked(newUidState);
+                isProcStateAllowedWhileOnRestrictBackground(newUidState);
         if (oldForeground != newForeground) {
-            updateRulesForDataUsageRestrictionsLocked(uid);
+            updateRulesForDataUsageRestrictionsUL(uid);
         }
     }
 
     private void updateScreenOn() {
-        synchronized (mRulesLock) {
+        synchronized (mUidRulesFirstLock) {
             try {
                 mScreenOn = mPowerManager.isInteractive();
             } catch (RemoteException e) {
                 // ignored; service lives in system_server
             }
-            updateRulesForScreenLocked();
+            updateRulesForScreenUL();
         }
     }
 
     /**
      * Update rules that might be changed by {@link #mScreenOn} value.
      */
-    private void updateRulesForScreenLocked() {
+    private void updateRulesForScreenUL() {
         // only update rules for anyone with foreground activities
         final int size = mUidState.size();
         for (int i = 0; i < size; i++) {
             if (mUidState.valueAt(i) <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) {
                 final int uid = mUidState.keyAt(i);
-                updateRestrictionRulesForUidLocked(uid);
+                updateRestrictionRulesForUidUL(uid);
             }
         }
     }
@@ -2541,31 +2600,31 @@
         return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
     }
 
-    static boolean isProcStateAllowedWhileOnRestrictBackgroundLocked(int procState) {
+    static boolean isProcStateAllowedWhileOnRestrictBackground(int procState) {
         return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
     }
 
-    void updateRulesForRestrictPowerLocked() {
-        updateRulesForWhitelistedPowerSaveLocked(mRestrictPower, FIREWALL_CHAIN_POWERSAVE,
+    void updateRulesForPowerSaveUL() {
+        updateRulesForWhitelistedPowerSaveUL(mRestrictPower, FIREWALL_CHAIN_POWERSAVE,
                 mUidFirewallPowerSaveRules);
     }
 
-    void updateRuleForRestrictPowerLocked(int uid) {
-        updateRulesForWhitelistedPowerSaveLocked(uid, mRestrictPower, FIREWALL_CHAIN_POWERSAVE);
+    void updateRuleForRestrictPowerUL(int uid) {
+        updateRulesForWhitelistedPowerSaveUL(uid, mRestrictPower, FIREWALL_CHAIN_POWERSAVE);
     }
 
-    void updateRulesForDeviceIdleLocked() {
-        updateRulesForWhitelistedPowerSaveLocked(mDeviceIdleMode, FIREWALL_CHAIN_DOZABLE,
+    void updateRulesForDeviceIdleUL() {
+        updateRulesForWhitelistedPowerSaveUL(mDeviceIdleMode, FIREWALL_CHAIN_DOZABLE,
                 mUidFirewallDozableRules);
     }
 
-    void updateRuleForDeviceIdleLocked(int uid) {
-        updateRulesForWhitelistedPowerSaveLocked(uid, mDeviceIdleMode, FIREWALL_CHAIN_DOZABLE);
+    void updateRuleForDeviceIdleUL(int uid) {
+        updateRulesForWhitelistedPowerSaveUL(uid, mDeviceIdleMode, FIREWALL_CHAIN_DOZABLE);
     }
 
     // NOTE: since both fw_dozable and fw_powersave uses the same map
     // (mPowerSaveTempWhitelistAppIds) for whitelisting, we can reuse their logic in this method.
-    private void updateRulesForWhitelistedPowerSaveLocked(boolean enabled, int chain,
+    private void updateRulesForWhitelistedPowerSaveUL(boolean enabled, int chain,
             SparseIntArray rules) {
         if (enabled) {
             // Sync the whitelists before enabling the chain.  We don't care about the rules if
@@ -2596,23 +2655,19 @@
             setUidFirewallRules(chain, uidRules);
         }
 
-        enableFirewallChainLocked(chain, enabled);
+        enableFirewallChainUL(chain, enabled);
     }
 
-    private void updateRulesForNonMeteredNetworksLocked() {
-
-    }
-
-    private boolean isWhitelistedBatterySaverLocked(int uid) {
+    private boolean isWhitelistedBatterySaverUL(int uid) {
         final int appId = UserHandle.getAppId(uid);
         return mPowerSaveTempWhitelistAppIds.get(appId) || mPowerSaveWhitelistAppIds.get(appId);
     }
 
     // NOTE: since both fw_dozable and fw_powersave uses the same map
     // (mPowerSaveTempWhitelistAppIds) for whitelisting, we can reuse their logic in this method.
-    private void updateRulesForWhitelistedPowerSaveLocked(int uid, boolean enabled, int chain) {
+    private void updateRulesForWhitelistedPowerSaveUL(int uid, boolean enabled, int chain) {
         if (enabled) {
-            if (isWhitelistedBatterySaverLocked(uid)
+            if (isWhitelistedBatterySaverUL(uid)
                     || isProcStateAllowedWhileIdleOrPowerSaveMode(mUidState.get(uid))) {
                 setUidFirewallRule(chain, uid, FIREWALL_RULE_ALLOW);
             } else {
@@ -2621,7 +2676,7 @@
         }
     }
 
-    void updateRulesForAppIdleLocked() {
+    void updateRulesForAppIdleUL() {
         final SparseIntArray uidRules = mUidFirewallStandbyRules;
         uidRules.clear();
 
@@ -2645,50 +2700,69 @@
         setUidFirewallRules(FIREWALL_CHAIN_STANDBY, uidRules);
     }
 
-    void updateRuleForAppIdleLocked(int uid) {
+    void updateRuleForAppIdleUL(int uid) {
         if (!isUidValidForBlacklistRules(uid)) return;
 
         int appId = UserHandle.getAppId(uid);
         if (!mPowerSaveTempWhitelistAppIds.get(appId) && isUidIdle(uid)
-                && !isUidForegroundOnRestrictPowerLocked(uid)) {
+                && !isUidForegroundOnRestrictPowerUL(uid)) {
             setUidFirewallRule(FIREWALL_CHAIN_STANDBY, uid, FIREWALL_RULE_DENY);
         } else {
             setUidFirewallRule(FIREWALL_CHAIN_STANDBY, uid, FIREWALL_RULE_DEFAULT);
         }
     }
 
-    void updateRulesForAppIdleParoleLocked() {
+    void updateRulesForAppIdleParoleUL() {
         boolean enableChain = !mUsageStats.isAppIdleParoleOn();
-        enableFirewallChainLocked(FIREWALL_CHAIN_STANDBY, enableChain);
+        enableFirewallChainUL(FIREWALL_CHAIN_STANDBY, enableChain);
     }
 
     /**
      * Update rules that might be changed by {@link #mRestrictBackground},
      * {@link #mRestrictPower}, or {@link #mDeviceIdleMode} value.
      */
-    private void updateRulesForGlobalChangeLocked(boolean restrictedNetworksChanged) {
+    private void updateRulesForGlobalChangeAL(boolean restrictedNetworksChanged) {
         long start;
         if (LOGD) start = System.currentTimeMillis();
 
-        updateRulesForDeviceIdleLocked();
-        updateRulesForAppIdleLocked();
-        updateRulesForRestrictPowerLocked();
-        updateRulesForRestrictBackgroundLocked();
-        setRestrictBackgroundLocked(mRestrictBackground);
+        updateRulesForRestrictPowerUL();
+        updateRulesForRestrictBackgroundUL();
 
         // If the set of restricted networks may have changed, re-evaluate those.
         if (restrictedNetworksChanged) {
-            normalizePoliciesLocked();
-            updateNetworkRulesLocked();
+            normalizePoliciesNL();
+            updateNetworkRulesNL();
         }
         if (LOGD) {
             final long delta = System.currentTimeMillis() - start;
-            Slog.d(TAG, "updateRulesForGlobalChangeLocked(" + restrictedNetworksChanged + ") took "
+            Slog.d(TAG, "updateRulesForGlobalChangeAL(" + restrictedNetworksChanged + ") took "
                     + delta + "ms");
         }
     }
 
-    private void updateRulesForRestrictBackgroundLocked() {
+    private void updateRulesForRestrictPowerUL() {
+        updateRulesForDeviceIdleUL();
+        updateRulesForAppIdleUL();
+        updateRulesForPowerSaveUL();
+        updateRulesForAllAppsUL(TYPE_RESTRICT_POWER);
+    }
+
+    private void updateRulesForRestrictBackgroundUL() {
+        updateRulesForAllAppsUL(TYPE_RESTRICT_BACKGROUND);
+    }
+
+    private static final int TYPE_RESTRICT_BACKGROUND = 1;
+    private static final int TYPE_RESTRICT_POWER = 2;
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(flag = false, value = {
+            TYPE_RESTRICT_BACKGROUND,
+            TYPE_RESTRICT_POWER,
+    })
+    public @interface RestrictType {
+    }
+
+    // TODO: refactor / consolidate all those updateXyz methods, there are way too many of them...
+    private void updateRulesForAllAppsUL(@RestrictType int type) {
         final PackageManager pm = mContext.getPackageManager();
 
         // update rules for all installed applications
@@ -2705,25 +2779,34 @@
             for (int j = 0; j < appsSize; j++) {
                 final ApplicationInfo app = apps.get(j);
                 final int uid = UserHandle.getUid(user.id, app.uid);
-                updateRulesForDataUsageRestrictionsLocked(uid);
-                updateRulesForPowerRestrictionsLocked(uid);
+                switch (type) {
+                    case TYPE_RESTRICT_BACKGROUND:
+                        updateRulesForDataUsageRestrictionsUL(uid);
+                        break;
+                    case TYPE_RESTRICT_POWER:
+                        updateRulesForPowerRestrictionsUL(uid);
+                        break;
+                    default:
+                        Slog.w(TAG, "Invalid type for updateRulesForAllApps: " + type);
+                }
             }
         }
     }
 
-    private void updateRulesForTempWhitelistChangeLocked() {
+    private void updateRulesForTempWhitelistChangeUL() {
         final List<UserInfo> users = mUserManager.getUsers();
         for (int i = 0; i < users.size(); i++) {
             final UserInfo user = users.get(i);
             for (int j = mPowerSaveTempWhitelistAppIds.size() - 1; j >= 0; j--) {
                 int appId = mPowerSaveTempWhitelistAppIds.keyAt(j);
                 int uid = UserHandle.getUid(user.id, appId);
+                updateRulesForRestrictPowerUL();
                 // Update external firewall rules.
-                updateRuleForAppIdleLocked(uid);
-                updateRuleForDeviceIdleLocked(uid);
-                updateRuleForRestrictPowerLocked(uid);
+                updateRuleForAppIdleUL(uid);
+                updateRuleForDeviceIdleUL(uid);
+                updateRuleForRestrictPowerUL(uid);
                 // Update internal rules.
-                updateRulesForPowerRestrictionsLocked(uid);
+                updateRulesForPowerRestrictionsUL(uid);
             }
         }
     }
@@ -2787,17 +2870,17 @@
      *
      * <p>This method changes both the external firewall rules and the internal state.
      */
-    private void updateRestrictionRulesForUidLocked(int uid) {
+    private void updateRestrictionRulesForUidUL(int uid) {
         // Methods below only changes the firewall rules for the power-related modes.
-        updateRuleForDeviceIdleLocked(uid);
-        updateRuleForAppIdleLocked(uid);
-        updateRuleForRestrictPowerLocked(uid);
+        updateRuleForDeviceIdleUL(uid);
+        updateRuleForAppIdleUL(uid);
+        updateRuleForRestrictPowerUL(uid);
 
         // Update internal state for power-related modes.
-        updateRulesForPowerRestrictionsLocked(uid);
+        updateRulesForPowerRestrictionsUL(uid);
 
         // Update firewall and internal rules for Data Saver Mode.
-        updateRulesForDataUsageRestrictionsLocked(uid);
+        updateRulesForDataUsageRestrictionsUL(uid);
     }
 
     /**
@@ -2819,7 +2902,7 @@
      * {@link #setUidPolicy(int, int)} and {@link #addRestrictBackgroundWhitelistedUid(int)} /
      * {@link #removeRestrictBackgroundWhitelistedUid(int)} methods (for blacklist and whitelist
      * respectively): these methods set the proper internal state (blacklist / whitelist), then call
-     * this ({@link #updateRulesForDataUsageRestrictionsLocked(int)}) to propagate the rules to
+     * this ({@link #updateRulesForDataUsageRestrictionsUL(int)}) to propagate the rules to
      * {@link INetworkManagementService}, but this method should also be called in events (like
      * Data Saver Mode flips or UID state changes) that might affect the foreground app, since the
      * following rules should also be applied:
@@ -2839,15 +2922,15 @@
      * <p>The {@link #mUidRules} map is used to define the transtion of states of an UID.
      *
      */
-    private void updateRulesForDataUsageRestrictionsLocked(int uid) {
-        updateRulesForDataUsageRestrictionsLocked(uid, false);
+    private void updateRulesForDataUsageRestrictionsUL(int uid) {
+        updateRulesForDataUsageRestrictionsUL(uid, false);
     }
 
     /**
-     * Overloaded version of {@link #updateRulesForDataUsageRestrictionsLocked(int)} called when an
+     * Overloaded version of {@link #updateRulesForDataUsageRestrictionsUL(int)} called when an
      * app is removed - it ignores the UID validity check.
      */
-    private void updateRulesForDataUsageRestrictionsLocked(int uid, boolean uidDeleted) {
+    private void updateRulesForDataUsageRestrictionsUL(int uid, boolean uidDeleted) {
         if (!uidDeleted && !isUidValidForWhitelistRules(uid)) {
             if (LOGD) Slog.d(TAG, "no need to update restrict data rules for uid " + uid);
             return;
@@ -2855,7 +2938,7 @@
 
         final int uidPolicy = mUidPolicy.get(uid, POLICY_NONE);
         final int oldUidRules = mUidRules.get(uid, RULE_NONE);
-        final boolean isForeground = isUidForegroundOnRestrictBackgroundLocked(uid);
+        final boolean isForeground = isUidForegroundOnRestrictBackgroundUL(uid);
 
         final boolean isBlacklisted = (uidPolicy & POLICY_REJECT_METERED_BACKGROUND) != 0;
         final boolean isWhitelisted = mRestrictBackgroundWhitelistUids.get(uid);
@@ -2879,7 +2962,7 @@
         final int newUidRules = newRule | (oldUidRules & MASK_ALL_NETWORKS);
 
         if (LOGV) {
-            Log.v(TAG, "updateRuleForRestrictBackgroundLocked(" + uid + ")"
+            Log.v(TAG, "updateRuleForRestrictBackgroundUL(" + uid + ")"
                     + ": isForeground=" +isForeground
                     + ", isBlacklisted=" + isBlacklisted
                     + ", isWhitelisted=" + isWhitelisted
@@ -2972,7 +3055,7 @@
      * <p>
      * <strong>NOTE: </strong>This method does not update the firewall rules on {@code netd}.
      */
-    private void updateRulesForPowerRestrictionsLocked(int uid) {
+    private void updateRulesForPowerRestrictionsUL(int uid) {
         if (!isUidValidForBlacklistRules(uid)) {
             if (LOGD) Slog.d(TAG, "no need to update restrict power rules for uid " + uid);
             return;
@@ -2982,9 +3065,9 @@
         final boolean restrictMode = isIdle || mRestrictPower || mDeviceIdleMode;
         final int uidPolicy = mUidPolicy.get(uid, POLICY_NONE);
         final int oldUidRules = mUidRules.get(uid, RULE_NONE);
-        final boolean isForeground = isUidForegroundOnRestrictPowerLocked(uid);
+        final boolean isForeground = isUidForegroundOnRestrictPowerUL(uid);
 
-        final boolean isWhitelisted = isWhitelistedBatterySaverLocked(uid);
+        final boolean isWhitelisted = isWhitelistedBatterySaverUL(uid);
         final int oldRule = oldUidRules & MASK_ALL_NETWORKS;
         int newRule = RULE_NONE;
 
@@ -3003,7 +3086,7 @@
         final int newUidRules = (oldUidRules & MASK_METERED_NETWORKS) | newRule;
 
         if (LOGV) {
-            Log.v(TAG, "updateRulesForNonMeteredNetworksLocked(" + uid + ")"
+            Log.v(TAG, "updateRulesForNonMeteredNetworksUL(" + uid + ")"
                     + ", isIdle: " + isIdle
                     + ", mRestrictPower: " + mRestrictPower
                     + ", mDeviceIdleMode: " + mDeviceIdleMode
@@ -3048,9 +3131,9 @@
                 final int uid = mContext.getPackageManager().getPackageUidAsUser(packageName,
                         PackageManager.MATCH_UNINSTALLED_PACKAGES, userId);
                 if (LOGV) Log.v(TAG, "onAppIdleStateChanged(): uid=" + uid + ", idle=" + idle);
-                synchronized (mRulesLock) {
-                    updateRuleForAppIdleLocked(uid);
-                    updateRulesForPowerRestrictionsLocked(uid);
+                synchronized (mUidRulesFirstLock) {
+                    updateRuleForAppIdleUL(uid);
+                    updateRulesForPowerRestrictionsUL(uid);
                 }
             } catch (NameNotFoundException nnfe) {
             }
@@ -3058,8 +3141,8 @@
 
         @Override
         public void onParoleStateChanged(boolean isParoleOn) {
-            synchronized (mRulesLock) {
-                updateRulesForAppIdleParoleLocked();
+            synchronized (mUidRulesFirstLock) {
+                updateRulesForAppIdleParoleUL();
             }
         }
     }
@@ -3144,7 +3227,7 @@
                     final String iface = (String) msg.obj;
 
                     maybeRefreshTrustedTime();
-                    synchronized (mRulesLock) {
+                    synchronized (mNetworkPoliciesSecondLock) {
                         if (mMeteredIfaces.contains(iface)) {
                             try {
                                 // force stats update to make sure we have
@@ -3154,8 +3237,8 @@
                                 // ignored; service lives in system_server
                             }
 
-                            updateNetworkEnabledLocked();
-                            updateNotificationsLocked();
+                            updateNetworkEnabledNL();
+                            updateNotificationsNL();
                         }
                     }
                     return true;
@@ -3355,7 +3438,7 @@
     /**
      * Add or remove a uid to the firewall blacklist for all network ifaces.
      */
-    private void enableFirewallChainLocked(int chain, boolean enable) {
+    private void enableFirewallChainUL(int chain, boolean enable) {
         if (mFirewallChainStates.indexOfKey(chain) >= 0 &&
                 mFirewallChainStates.get(chain) == enable) {
             // All is the same, nothing to do.
@@ -3484,9 +3567,9 @@
         @Override
         public void onPackageRemoved(String packageName, int uid) {
             if (LOGV) Slog.v(TAG, "onPackageRemoved: " + packageName + " ->" + uid);
-            synchronized (mRulesLock) {
-                removeRestrictBackgroundWhitelistedUidLocked(uid, true, true);
-                updateRestrictionRulesForUidLocked(uid);
+            synchronized (mUidRulesFirstLock) {
+                removeRestrictBackgroundWhitelistedUidUL(uid, true, true);
+                updateRestrictionRulesForUidUL(uid);
             }
         }
     }
@@ -3495,11 +3578,13 @@
 
         @Override
         public void resetUserState(int userId) {
-            synchronized (mRulesLock) {
-                boolean changed = removeUserStateLocked(userId, false);
-                changed = addDefaultRestrictBackgroundWhitelistUidsLocked(userId) || changed;
+            synchronized (mUidRulesFirstLock) {
+                boolean changed = removeUserStateUL(userId, false);
+                changed = addDefaultRestrictBackgroundWhitelistUidsUL(userId) || changed;
                 if (changed) {
-                    writePolicyLocked();
+                    synchronized (mNetworkPoliciesSecondLock) {
+                        writePolicyAL();
+                    }
                 }
             }
         }
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index 23c111e..4658c046 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -31,6 +31,7 @@
 import static android.net.NetworkStats.SET_ALL;
 import static android.net.NetworkStats.SET_DEFAULT;
 import static android.net.NetworkStats.SET_FOREGROUND;
+import static android.net.NetworkStats.TAG_ALL;
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static android.net.NetworkTemplate.buildTemplateMobileWildcard;
@@ -79,6 +80,7 @@
 import android.net.INetworkStatsService;
 import android.net.INetworkStatsSession;
 import android.net.LinkProperties;
+import android.net.NetworkCapabilities;
 import android.net.NetworkIdentity;
 import android.net.NetworkInfo;
 import android.net.NetworkState;
@@ -179,6 +181,11 @@
     private static final String PREFIX_UID_TAG = "uid_tag";
 
     /**
+     * Virtual network interface for video telephony. This is for VT data usage counting purpose.
+     */
+    public static final String VT_INTERFACE = "vt_data0";
+
+    /**
      * Settings that can be changed externally.
      */
     public interface NetworkStatsSettings {
@@ -967,6 +974,23 @@
                 if (baseIface != null) {
                     findOrCreateNetworkIdentitySet(mActiveIfaces, baseIface).add(ident);
                     findOrCreateNetworkIdentitySet(mActiveUidIfaces, baseIface).add(ident);
+
+                    // Build a separate virtual interface for VT (Video Telephony) data usage.
+                    // Only do this when IMS is not metered, but VT is metered.
+                    // If IMS is metered, then the IMS network usage has already included VT usage.
+                    // VT is considered always metered in framework's layer. If VT is not metered
+                    // per carrier's policy, modem will report 0 usage for VT calls.
+                    if (state.networkCapabilities.hasCapability(
+                            NetworkCapabilities.NET_CAPABILITY_IMS) && !ident.getMetered()) {
+
+                        // Copy the identify from IMS one but mark it as metered.
+                        NetworkIdentity vtIdent = new NetworkIdentity(ident.getType(),
+                                ident.getSubType(), ident.getSubscriberId(), ident.getNetworkId(),
+                                ident.getRoaming(), true);
+                        findOrCreateNetworkIdentitySet(mActiveIfaces, VT_INTERFACE).add(vtIdent);
+                        findOrCreateNetworkIdentitySet(mActiveUidIfaces, VT_INTERFACE).add(vtIdent);
+                    }
+
                     if (isMobile) {
                         mobileIfaces.add(baseIface);
                     }
@@ -1004,9 +1028,9 @@
 
     private void recordSnapshotLocked(long currentTime) throws RemoteException {
         // snapshot and record current counters; read UID stats first to
-        // avoid overcounting dev stats.
+        // avoid over counting dev stats.
         final NetworkStats uidSnapshot = getNetworkStatsUidDetail();
-        final NetworkStats xtSnapshot = mNetworkManager.getNetworkStatsSummaryXt();
+        final NetworkStats xtSnapshot = getNetworkStatsXtAndVt();
         final NetworkStats devSnapshot = mNetworkManager.getNetworkStatsSummaryDev();
 
 
@@ -1312,6 +1336,42 @@
     }
 
     /**
+     * Return snapshot of current XT plus VT statistics.
+     */
+    private NetworkStats getNetworkStatsXtAndVt() throws RemoteException {
+        final NetworkStats xtSnapshot = mNetworkManager.getNetworkStatsSummaryXt();
+
+        TelephonyManager tm = (TelephonyManager) mContext.getSystemService(
+                Context.TELEPHONY_SERVICE);
+
+        long usage = tm.getVtDataUsage();
+
+        if (LOGV) Slog.d(TAG, "VT call data usage = " + usage);
+
+        final NetworkStats vtSnapshot = new NetworkStats(SystemClock.elapsedRealtime(), 1);
+
+        final NetworkStats.Entry entry = new NetworkStats.Entry();
+        entry.iface = VT_INTERFACE;
+        entry.uid = -1;
+        entry.set = TAG_ALL;
+        entry.tag = TAG_NONE;
+
+        // Since modem only tell us the total usage instead of each usage for RX and TX,
+        // we need to split it up (though it might not quite accurate). At
+        // least we can make sure the data usage report to the user will still be accurate.
+        entry.rxBytes = usage / 2;
+        entry.rxPackets = 0;
+        entry.txBytes = usage - entry.rxBytes;
+        entry.txPackets = 0;
+        vtSnapshot.combineValues(entry);
+
+        // Merge VT int XT
+        xtSnapshot.combineAllValues(vtSnapshot);
+
+        return xtSnapshot;
+    }
+
+    /**
      * Return snapshot of current tethering statistics. Will return empty
      * {@link NetworkStats} if any problems are encountered.
      */
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 11c65250..ec77daf 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -305,6 +305,7 @@
     private RankingHandler mRankingHandler;
     private long mLastOverRateLogTime;
     private float mMaxPackageEnqueueRate = DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE;
+    private String mSystemNotificationSound;
 
     private static class Archive {
         final int mBufferSize;
@@ -817,6 +818,8 @@
     private final class SettingsObserver extends ContentObserver {
         private final Uri NOTIFICATION_LIGHT_PULSE_URI
                 = Settings.System.getUriFor(Settings.System.NOTIFICATION_LIGHT_PULSE);
+        private final Uri NOTIFICATION_SOUND_URI
+                = Settings.System.getUriFor(Settings.System.NOTIFICATION_SOUND);
         private final Uri NOTIFICATION_RATE_LIMIT_URI
                 = Settings.Global.getUriFor(Settings.Global.MAX_NOTIFICATION_ENQUEUE_RATE);
 
@@ -828,6 +831,8 @@
             ContentResolver resolver = getContext().getContentResolver();
             resolver.registerContentObserver(NOTIFICATION_LIGHT_PULSE_URI,
                     false, this, UserHandle.USER_ALL);
+            resolver.registerContentObserver(NOTIFICATION_SOUND_URI,
+                    false, this, UserHandle.USER_ALL);
             resolver.registerContentObserver(NOTIFICATION_RATE_LIMIT_URI,
                     false, this, UserHandle.USER_ALL);
             update(null);
@@ -851,6 +856,10 @@
                 mMaxPackageEnqueueRate = Settings.Global.getFloat(resolver,
                             Settings.Global.MAX_NOTIFICATION_ENQUEUE_RATE, mMaxPackageEnqueueRate);
             }
+            if (uri == null || NOTIFICATION_SOUND_URI.equals(uri)) {
+                mSystemNotificationSound = Settings.System.getString(resolver,
+                        Settings.System.NOTIFICATION_SOUND);
+            }
         }
     }
 
@@ -903,6 +912,11 @@
         mHandler = handler;
     }
 
+    @VisibleForTesting
+    void setSystemNotificationSound(String systemNotificationSound) {
+        mSystemNotificationSound = systemNotificationSound;
+    }
+
     @Override
     public void onStart() {
         Resources resources = getContext().getResources();
@@ -1983,6 +1997,7 @@
                     android.Manifest.permission.MANAGE_NOTIFICATIONS)) {
                 return;
             }
+            checkCallerIsSameApp(pkg);
             if (!checkPolicyAccess(pkg)) {
                 Slog.w(TAG, "Notification policy access denied calling " + method);
                 throw new SecurityException("Notification policy access denied");
@@ -2271,6 +2286,7 @@
                                         .setFlag(Notification.FLAG_AUTOGROUP_SUMMARY, true)
                                         .setFlag(Notification.FLAG_GROUP_SUMMARY, true)
                                         .setColor(adjustedSbn.getNotification().color)
+                                        .setLocalOnly(true)
                                         .build();
                         summaryNotification.extras.putAll(extras);
                         Intent appIntent = getContext().getPackageManager()
@@ -2823,9 +2839,7 @@
                 soundUri = Settings.System.DEFAULT_NOTIFICATION_URI;
 
                 // check to see if the default notification sound is silent
-                ContentResolver resolver = getContext().getContentResolver();
-                hasValidSound = Settings.System.getString(resolver,
-                       Settings.System.NOTIFICATION_SOUND) != null;
+                hasValidSound = mSystemNotificationSound != null;
             } else if (notification.sound != null) {
                 soundUri = notification.sound;
                 hasValidSound = (soundUri != null);
@@ -3643,6 +3657,10 @@
         if (isCallerSystem()) {
             return;
         }
+        checkCallerIsSameApp(pkg);
+    }
+
+    private static void checkCallerIsSameApp(String pkg) {
         final int uid = Binder.getCallingUid();
         try {
             ApplicationInfo ai = AppGlobals.getPackageManager().getApplicationInfo(
diff --git a/services/core/java/com/android/server/pm/EphemeralResolverConnection.java b/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
index fe6fb1f..b25ef175 100644
--- a/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
+++ b/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
@@ -64,11 +64,12 @@
         mIntent = new Intent().setComponent(componentName);
     }
 
-    public final List<EphemeralResolveInfo> getEphemeralResolveInfoList(int hashPrefix) {
+    public final List<EphemeralResolveInfo> getEphemeralResolveInfoList(
+            int hashPrefix[], int prefixMask) {
         throwIfCalledOnMainThread();
         try {
             return mGetEphemeralResolveInfoCaller.getEphemeralResolveInfoList(
-                    getRemoteInstanceLazy(), hashPrefix);
+                    getRemoteInstanceLazy(), hashPrefix, prefixMask);
         } catch (RemoteException re) {
         } catch (TimeoutException te) {
         } finally {
@@ -177,10 +178,10 @@
         }
 
         public List<EphemeralResolveInfo> getEphemeralResolveInfoList(
-                IEphemeralResolver target, int hashPrefix)
+                IEphemeralResolver target, int hashPrefix[], int prefixMask)
                         throws RemoteException, TimeoutException {
             final int sequence = onBeforeRemoteCall();
-            target.getEphemeralResolveInfoList(mCallback, hashPrefix, sequence);
+            target.getEphemeralResolveInfoList(mCallback, hashPrefix, prefixMask, sequence);
             return getResultTimed(sequence);
         }
     }
diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java
index 7b85a4f..72c549f 100644
--- a/services/core/java/com/android/server/pm/Installer.java
+++ b/services/core/java/com/android/server/pm/Installer.java
@@ -61,6 +61,13 @@
         mInstaller = new InstallerConnection();
     }
 
+    // Package-private installer that accepts a custom InstallerConnection. Used for
+    // OtaDexoptService.
+    Installer(Context context, InstallerConnection connection) {
+        super(context);
+        mInstaller = connection;
+    }
+
     /**
      * Yell loudly if someone tries making future calls while holding a lock on
      * the given object.
diff --git a/services/core/java/com/android/server/pm/IntentFilterVerificationState.java b/services/core/java/com/android/server/pm/IntentFilterVerificationState.java
index c6e7911..a4e9d10 100644
--- a/services/core/java/com/android/server/pm/IntentFilterVerificationState.java
+++ b/services/core/java/com/android/server/pm/IntentFilterVerificationState.java
@@ -96,7 +96,12 @@
             if (i > 0) {
                 sb.append(" ");
             }
-            sb.append(mHosts.valueAt(i));
+            String host = mHosts.valueAt(i);
+            // "*.example.tld" is validated via https://example.tld
+            if (host.startsWith("*.")) {
+                host = host.substring(2);
+            }
+            sb.append(host);
         }
         return sb.toString();
     }
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index ffe8f75..03d5645f 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -19,9 +19,13 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.UserIdInt;
+import android.app.ActivityManagerInternal;
+import android.app.ActivityManagerNative;
 import android.app.AppGlobals;
+import android.app.PendingIntent;
 import android.content.ComponentName;
 import android.content.Context;
+import android.content.IIntentSender;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
@@ -98,6 +102,7 @@
         private final Context mContext;
         private final PackageManager mPm;
         private final UserManager mUm;
+        private final ActivityManagerInternal mActivityManagerInternal;
         private final ShortcutServiceInternal mShortcutServiceInternal;
         private final PackageCallbackList<IOnAppsChangedListener> mListeners
                 = new PackageCallbackList<IOnAppsChangedListener>();
@@ -110,6 +115,8 @@
             mContext = context;
             mPm = mContext.getPackageManager();
             mUm = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
+            mActivityManagerInternal = Preconditions.checkNotNull(
+                    LocalServices.getService(ActivityManagerInternal.class));
             mShortcutServiceInternal = Preconditions.checkNotNull(
                     LocalServices.getService(ShortcutServiceInternal.class));
             mShortcutServiceInternal.addListener(mPackageMonitor);
@@ -380,7 +387,8 @@
                         "To query by shortcut ID, package name must also be set");
             }
 
-            return new ParceledListSlice<>(
+            // TODO(b/29399275): Eclipse compiler requires explicit List<ShortcutInfo> cast below.
+            return new ParceledListSlice<>((List<ShortcutInfo>)
                     mShortcutServiceInternal.getShortcuts(getCallingUserId(),
                             callingPackage, changedSince, packageName, shortcutIds,
                             componentName, flags, user.getIdentifier()));
@@ -431,7 +439,7 @@
         }
 
         @Override
-        public boolean startShortcut(String callingPackage, String packageName, String shortcutId,
+        public void startShortcut(String callingPackage, String packageName, String shortcutId,
                 Rect sourceBounds, Bundle startActivityOptions, int userId) {
             verifyCallingPackage(callingPackage);
             ensureInUserProfiles(userId, "Cannot start activity for unrelated profile " + userId);
@@ -450,20 +458,40 @@
             final Intent intent = mShortcutServiceInternal.createShortcutIntent(getCallingUserId(),
                     callingPackage, packageName, shortcutId, userId);
             if (intent == null) {
-                return false;
+                return;
             }
             // Note the target activity doesn't have to be exported.
 
-            intent.setSourceBounds(sourceBounds);
             prepareIntentForLaunch(intent, sourceBounds);
 
-            final long ident = Binder.clearCallingIdentity();
+            startShortcutIntentAsPublisher(
+                    intent, packageName, startActivityOptions, userId);
+        }
+
+        @VisibleForTesting
+        protected void startShortcutIntentAsPublisher(@NonNull Intent intent,
+                @NonNull String publisherPackage, Bundle startActivityOptions, int userId) {
+
             try {
-                mContext.startActivityAsUser(intent, startActivityOptions, UserHandle.of(userId));
-            } finally {
-                Binder.restoreCallingIdentity(ident);
+                final IIntentSender intentSender;
+
+                final long ident = Binder.clearCallingIdentity();
+                try {
+                    intentSender = mActivityManagerInternal.getActivityIntentSenderAsPackage(
+                            publisherPackage, userId, /* requestCode= */ 0,
+                            intent, PendingIntent.FLAG_ONE_SHOT,
+                            /* options= */ startActivityOptions);
+                } finally {
+                    Binder.restoreCallingIdentity(ident);
+                }
+
+                // Negative result means a failure.
+                ActivityManagerNative.getDefault().sendIntentSender(
+                        intentSender, 0, null, null, null, null, null);
+
+            } catch (RemoteException e) {
+                return;
             }
-            return true;
         }
 
         @Override
@@ -745,9 +773,6 @@
             @Override
             public void onShortcutChanged(@NonNull String packageName,
                     @UserIdInt int userId) {
-                if (!ShortcutService.FEATURE_ENABLED) {
-                    return;
-                }
                 postToPackageMonitorHandler(() -> onShortcutChangedInner(packageName, userId));
             }
 
@@ -778,8 +803,7 @@
                                     /* changedSince= */ 0, packageName, /* shortcutIds=*/ null,
                                     /* component= */ null,
                                     ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY
-                                    | ShortcutQuery.FLAG_GET_PINNED
-                                    | ShortcutQuery.FLAG_GET_DYNAMIC
+                                    | ShortcutQuery.FLAG_GET_ALL_KINDS
                                     , userId);
                     try {
                         listener.onShortcutChanged(user, packageName,
diff --git a/services/core/java/com/android/server/pm/OtaDexoptService.java b/services/core/java/com/android/server/pm/OtaDexoptService.java
index 649a27c..01b3dc2 100644
--- a/services/core/java/com/android/server/pm/OtaDexoptService.java
+++ b/services/core/java/com/android/server/pm/OtaDexoptService.java
@@ -32,10 +32,12 @@
 import android.util.Log;
 import android.util.Slog;
 
+import com.android.internal.os.InstallerConnection;
 import com.android.internal.os.InstallerConnection.InstallerException;
 
 import java.io.File;
 import java.io.FileDescriptor;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
@@ -49,20 +51,28 @@
     private final static boolean DEBUG_DEXOPT = true;
 
     private final Context mContext;
-    private final PackageDexOptimizer mPackageDexOptimizer;
     private final PackageManagerService mPackageManagerService;
 
     // TODO: Evaluate the need for WeakReferences here.
+
+    /**
+     * The list of packages to dexopt.
+     */
     private List<PackageParser.Package> mDexoptPackages;
 
+    /**
+     * The list of dexopt invocations for the current package (which will no longer be in
+     * mDexoptPackages). This can be more than one as a package may have multiple code paths,
+     * e.g., in the split-APK case.
+     */
+    private List<String> mCommandsForCurrentPackage;
+
+    private int completeSize;
+
     public OtaDexoptService(Context context, PackageManagerService packageManagerService) {
         this.mContext = context;
         this.mPackageManagerService = packageManagerService;
 
-        // Use the package manager install and install lock here for the OTA dex optimizer.
-        mPackageDexOptimizer = new OTADexoptPackageDexOptimizer(packageManagerService.mInstaller,
-                packageManagerService.mInstallLock, context);
-
         // Now it's time to check whether we need to move any A/B artifacts.
         moveAbArtifacts(packageManagerService.mInstaller);
     }
@@ -91,6 +101,8 @@
             mDexoptPackages = PackageManagerServiceUtils.getPackagesForDexopt(
                     mPackageManagerService.mPackages.values(), mPackageManagerService);
         }
+        completeSize = mDexoptPackages.size();
+        mCommandsForCurrentPackage = null;
     }
 
     @Override
@@ -99,6 +111,7 @@
             Log.i(TAG, "Cleaning up OTA Dexopt state.");
         }
         mDexoptPackages = null;
+        mCommandsForCurrentPackage = null;
     }
 
     @Override
@@ -107,7 +120,109 @@
             throw new IllegalStateException("done() called before prepare()");
         }
 
-        return mDexoptPackages.isEmpty();
+        return mDexoptPackages.isEmpty() && (mCommandsForCurrentPackage == null);
+    }
+
+    @Override
+    public synchronized float getProgress() throws RemoteException {
+        // We approximate by number of packages here. We could track all compiles, if we
+        // generated them ahead of time. Right now we're trying to conserve memory.
+        if (completeSize == 0) {
+            return 1f;
+        }
+        int packagesLeft = mDexoptPackages.size() + (mCommandsForCurrentPackage != null ? 1 : 0);
+        return (completeSize - packagesLeft) / ((float)completeSize);
+    }
+
+    /**
+     * Return the next dexopt command for the current package. Enforces the invariant
+     */
+    private String getNextPackageDexopt() {
+        if (mCommandsForCurrentPackage != null) {
+            String next = mCommandsForCurrentPackage.remove(0);
+            if (mCommandsForCurrentPackage.isEmpty()) {
+                mCommandsForCurrentPackage = null;
+            }
+            return next;
+        }
+        return null;
+    }
+
+    @Override
+    public synchronized String nextDexoptCommand() throws RemoteException {
+        if (mDexoptPackages == null) {
+            throw new IllegalStateException("dexoptNextPackage() called before prepare()");
+        }
+
+        // Get the next command.
+        for (;;) {
+            // Check whether there's one for the current package.
+            String next = getNextPackageDexopt();
+            if (next != null) {
+                return next;
+            }
+
+            // Move to the next package, if possible.
+            if (mDexoptPackages.isEmpty()) {
+                return "Nothing to do";
+            }
+
+            PackageParser.Package nextPackage = mDexoptPackages.remove(0);
+
+            if (DEBUG_DEXOPT) {
+                Log.i(TAG, "Processing " + nextPackage.packageName + " for OTA dexopt.");
+            }
+
+            // Generate the next mPackageDexopts state. Ignore errors, this loop is strongly
+            // monotonically increasing, anyways.
+            generatePackageDexopts(nextPackage);
+
+            // Invariant check: mPackageDexopts is null or not empty.
+            if (mCommandsForCurrentPackage != null && mCommandsForCurrentPackage.isEmpty()) {
+                cleanup();
+                throw new IllegalStateException("mPackageDexopts empty for " + nextPackage);
+            }
+        }
+    }
+
+    /**
+     * Generate all dexopt commands for the given package and place them into mPackageDexopts.
+     * Returns true on success, false in an error situation like low disk space.
+     */
+    private synchronized boolean generatePackageDexopts(PackageParser.Package nextPackage) {
+        // Check for low space.
+        // TODO: If apps are not installed in the internal /data partition, we should compare
+        //       against that storage's free capacity.
+        File dataDir = Environment.getDataDirectory();
+        @SuppressWarnings("deprecation")
+        long lowThreshold = StorageManager.from(mContext).getStorageLowBytes(dataDir);
+        if (lowThreshold == 0) {
+            throw new IllegalStateException("Invalid low memory threshold");
+        }
+        long usableSpace = dataDir.getUsableSpace();
+        if (usableSpace < lowThreshold) {
+            Log.w(TAG, "Not running dexopt on " + nextPackage.packageName + " due to low memory: " +
+                    usableSpace);
+            return false;
+        }
+
+        // Use our custom connection that just collects the commands.
+        RecordingInstallerConnection collectingConnection = new RecordingInstallerConnection();
+        Installer collectingInstaller = new Installer(mContext, collectingConnection);
+
+        // Use the package manager install and install lock here for the OTA dex optimizer.
+        PackageDexOptimizer optimizer = new OTADexoptPackageDexOptimizer(
+                collectingInstaller, mPackageManagerService.mInstallLock, mContext);
+        optimizer.performDexOpt(nextPackage, nextPackage.usesLibraryFiles,
+                null /* ISAs */, false /* checkProfiles */,
+                getCompilerFilterForReason(PackageManagerService.REASON_AB_OTA));
+
+        mCommandsForCurrentPackage = collectingConnection.commands;
+        if (mCommandsForCurrentPackage.isEmpty()) {
+            mCommandsForCurrentPackage = null;
+        }
+
+        return true;
     }
 
     @Override
@@ -142,8 +257,10 @@
             return;
         }
 
-        mPackageDexOptimizer.performDexOpt(nextPackage, nextPackage.usesLibraryFiles,
-                null /* ISAs */, false /* checkProfiles */,
+        PackageDexOptimizer optimizer = new OTADexoptPackageDexOptimizer(
+                mPackageManagerService.mInstaller, mPackageManagerService.mInstallLock, mContext);
+        optimizer.performDexOpt(nextPackage, nextPackage.usesLibraryFiles, null /* ISAs */,
+                false /* checkProfiles */,
                 getCompilerFilterForReason(PackageManagerService.REASON_AB_OTA));
     }
 
@@ -208,4 +325,40 @@
         }
 
     }
+
+    private static class RecordingInstallerConnection extends InstallerConnection {
+        public List<String> commands = new ArrayList<String>(1);
+
+        @Override
+        public void setWarnIfHeld(Object warnIfHeld) {
+            throw new IllegalStateException("Should not reach here");
+        }
+
+        @Override
+        public synchronized String transact(String cmd) {
+            commands.add(cmd);
+            return "0";
+        }
+
+        @Override
+        public boolean mergeProfiles(int uid, String pkgName) throws InstallerException {
+            throw new IllegalStateException("Should not reach here");
+        }
+
+        @Override
+        public boolean dumpProfiles(String gid, String packageName, String codePaths)
+                throws InstallerException {
+            throw new IllegalStateException("Should not reach here");
+        }
+
+        @Override
+        public void disconnect() {
+            throw new IllegalStateException("Should not reach here");
+        }
+
+        @Override
+        public void waitForConnection() {
+            throw new IllegalStateException("Should not reach here");
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/pm/OtaDexoptShellCommand.java b/services/core/java/com/android/server/pm/OtaDexoptShellCommand.java
index ea9cf17..bbd4048 100644
--- a/services/core/java/com/android/server/pm/OtaDexoptShellCommand.java
+++ b/services/core/java/com/android/server/pm/OtaDexoptShellCommand.java
@@ -46,6 +46,10 @@
                     return runOtaDone();
                 case "step":
                     return runOtaStep();
+                case "next":
+                    return runOtaNext();
+                case "progress":
+                    return runOtaProgress();
                 default:
                     return handleDefaultCommands(cmd);
             }
@@ -81,6 +85,18 @@
         return 0;
     }
 
+    private int runOtaNext() throws RemoteException {
+        getOutPrintWriter().println(mInterface.nextDexoptCommand());
+        return 0;
+    }
+
+    private int runOtaProgress() throws RemoteException {
+        final float progress = mInterface.getProgress();
+        final PrintWriter pw = getOutPrintWriter();
+        pw.format("%.2f", progress);
+        return 0;
+    }
+
     @Override
     public void onHelp() {
         final PrintWriter pw = getOutPrintWriter();
@@ -94,6 +110,8 @@
         pw.println("    Replies whether the OTA is complete or not.");
         pw.println("  step");
         pw.println("    OTA dexopt the next package.");
+        pw.println("  next");
+        pw.println("    Get parameters for OTA dexopt of the next package.");
         pw.println("  cleanup");
         pw.println("    Clean up internal states. Ends an OTA session.");
     }
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 00199730..84ebdd1 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -125,6 +125,7 @@
 import android.content.pm.ComponentInfo;
 import android.content.pm.EphemeralApplicationInfo;
 import android.content.pm.EphemeralResolveInfo;
+import android.content.pm.EphemeralResolveInfo.EphemeralDigest;
 import android.content.pm.EphemeralResolveInfo.EphemeralResolveIntentInfo;
 import android.content.pm.FeatureInfo;
 import android.content.pm.IOnPermissionsChangeListener;
@@ -197,6 +198,7 @@
 import android.os.storage.StorageManager;
 import android.os.storage.VolumeInfo;
 import android.os.storage.VolumeRecord;
+import android.provider.Settings.Global;
 import android.security.KeyStore;
 import android.security.SystemKeyStore;
 import android.system.ErrnoException;
@@ -362,13 +364,13 @@
     static final boolean DEBUG_DEXOPT = false;
 
     private static final boolean DEBUG_ABI_SELECTION = false;
-    private static final boolean DEBUG_EPHEMERAL = false;
+    private static final boolean DEBUG_EPHEMERAL = Build.IS_DEBUGGABLE;
     private static final boolean DEBUG_TRIAGED_MISSING = false;
     private static final boolean DEBUG_APP_DATA = false;
 
     static final boolean CLEAR_RUNTIME_PERMISSIONS_ON_UPGRADE = false;
 
-    private static final boolean DISABLE_EPHEMERAL_APPS = true;
+    private static final boolean DISABLE_EPHEMERAL_APPS = !Build.IS_DEBUGGABLE;
 
     private static final int RADIO_UID = Process.PHONE_UID;
     private static final int LOG_UID = Process.LOG_UID;
@@ -462,6 +464,9 @@
 
     private static final String VENDOR_OVERLAY_DIR = "/vendor/overlay";
 
+    private static int DEFAULT_EPHEMERAL_HASH_PREFIX_MASK = 0xFFFFF000;
+    private static int DEFAULT_EPHEMERAL_HASH_PREFIX_COUNT = 5;
+
     /** Permission grant: not grant the permission. */
     private static final int GRANT_DENIED = 1;
 
@@ -622,9 +627,9 @@
     @GuardedBy("mPackages")
     final ArraySet<String> mFrozenPackages = new ArraySet<>();
 
-    final ProtectedPackages mProtectedPackages = new ProtectedPackages();
+    final ProtectedPackages mProtectedPackages;
 
-    boolean mRestoredSettings;
+    boolean mFirstBoot;
 
     // System configuration read by SystemConfig.
     final int[] mGlobalGids;
@@ -2217,6 +2222,34 @@
         displayManager.getDisplay(Display.DEFAULT_DISPLAY).getMetrics(metrics);
     }
 
+    /**
+     * Requests that files preopted on a secondary system partition be copied to the data partition
+     * if possible.  Note that the actual copying of the files is accomplished by init for security
+     * reasons. This simply requests that the copy takes place and awaits confirmation of its
+     * completion. See platform/system/extras/cppreopt/ for the implementation of the actual copy.
+     */
+    private static void requestCopyPreoptedFiles() {
+        final int WAIT_TIME_MS = 100;
+        final String CP_PREOPT_PROPERTY = "sys.cppreopt";
+        if (SystemProperties.getInt("ro.cp_system_other_odex", 0) == 1) {
+            SystemProperties.set(CP_PREOPT_PROPERTY, "requested");
+            // We will wait for up to 100 seconds.
+            final long timeEnd = SystemClock.uptimeMillis() + 100 * 1000;
+            while (!SystemProperties.get(CP_PREOPT_PROPERTY).equals("finished")) {
+                try {
+                    Thread.sleep(WAIT_TIME_MS);
+                } catch (InterruptedException e) {
+                    // Do nothing
+                }
+                if (SystemClock.uptimeMillis() > timeEnd) {
+                    SystemProperties.set(CP_PREOPT_PROPERTY, "timed-out");
+                    Slog.wtf(TAG, "cppreopt did not finish!");
+                    break;
+                }
+            }
+        }
+    }
+
     public PackageManagerService(Context context, Installer installer,
             boolean factoryTest, boolean onlyCore) {
         EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_START,
@@ -2276,6 +2309,8 @@
         mSystemPermissions = systemConfig.getSystemPermissions();
         mAvailableFeatures = systemConfig.getAvailableFeatures();
 
+        mProtectedPackages = new ProtectedPackages(mContext);
+
         synchronized (mInstallLock) {
         // writer
         synchronized (mPackages) {
@@ -2318,7 +2353,11 @@
 
             mFoundPolicyFile = SELinuxMMAC.readInstallPolicy();
 
-            mRestoredSettings = mSettings.readLPw(sUserManager.getUsers(false));
+            mFirstBoot = !mSettings.readLPw(sUserManager.getUsers(false));
+
+            if (mFirstBoot) {
+                requestCopyPreoptedFiles();
+            }
 
             String customResolverActivity = Resources.getSystem().getString(
                     R.string.config_customResolverActivity);
@@ -2695,7 +2734,7 @@
             // If this is the first boot or an update from pre-M, and it is a normal
             // boot, then we need to initialize the default preferred apps across
             // all defined users.
-            if (!onlyCore && (mPromoteSystemApps || !mRestoredSettings)) {
+            if (!onlyCore && (mPromoteSystemApps || mFirstBoot)) {
                 for (UserInfo user : sUserManager.getUsers(true)) {
                     mSettings.applyDefaultPreferredAppsLPw(this, user.id);
                     applyFactoryDefaultBrowserLPw(user.id);
@@ -2853,7 +2892,7 @@
 
     @Override
     public boolean isFirstBoot() {
-        return !mRestoredSettings;
+        return mFirstBoot;
     }
 
     @Override
@@ -2940,17 +2979,20 @@
     private @Nullable ComponentName getEphemeralResolverLPr() {
         final String[] packageArray =
                 mContext.getResources().getStringArray(R.array.config_ephemeralResolverPackage);
-        if (packageArray.length == 0) {
+        if (packageArray.length == 0 && !Build.IS_DEBUGGABLE) {
             if (DEBUG_EPHEMERAL) {
                 Slog.d(TAG, "Ephemeral resolver NOT found; empty package list");
             }
             return null;
         }
 
+        final int resolveFlags =
+                MATCH_DIRECT_BOOT_AWARE
+                | MATCH_DIRECT_BOOT_UNAWARE
+                | (!Build.IS_DEBUGGABLE ? MATCH_SYSTEM_ONLY : 0);
         final Intent resolverIntent = new Intent(Intent.ACTION_RESOLVE_EPHEMERAL_PACKAGE);
         final List<ResolveInfo> resolvers = queryIntentServicesInternal(resolverIntent, null,
-                MATCH_SYSTEM_ONLY | MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE,
-                UserHandle.USER_SYSTEM);
+                resolveFlags, UserHandle.USER_SYSTEM);
 
         final int N = resolvers.size();
         if (N == 0) {
@@ -2969,7 +3011,7 @@
             }
 
             final String packageName = info.serviceInfo.packageName;
-            if (!possiblePackages.contains(packageName)) {
+            if (!possiblePackages.contains(packageName) && !Build.IS_DEBUGGABLE) {
                 if (DEBUG_EPHEMERAL) {
                     Slog.d(TAG, "Ephemeral resolver not in allowed package list;"
                             + " pkg: " + packageName + ", info:" + info);
@@ -2994,9 +3036,12 @@
         intent.addCategory(Intent.CATEGORY_DEFAULT);
         intent.setDataAndType(Uri.fromFile(new File("foo.apk")), PACKAGE_MIME_TYPE);
 
+        final int resolveFlags =
+                MATCH_DIRECT_BOOT_AWARE
+                | MATCH_DIRECT_BOOT_UNAWARE
+                | (!Build.IS_DEBUGGABLE ? MATCH_SYSTEM_ONLY : 0);
         final List<ResolveInfo> matches = queryIntentActivitiesInternal(intent, PACKAGE_MIME_TYPE,
-                MATCH_SYSTEM_ONLY | MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE,
-                UserHandle.USER_SYSTEM);
+                resolveFlags, UserHandle.USER_SYSTEM);
         if (matches.size() == 0) {
             return null;
         } else if (matches.size() == 1) {
@@ -3171,8 +3216,12 @@
 
         final PermissionsState permissionsState = ps.getPermissionsState();
 
-        final int[] gids = permissionsState.computeGids(userId);
-        final Set<String> permissions = permissionsState.getPermissions(userId);
+        // Compute GIDs only if requested
+        final int[] gids = (flags & PackageManager.GET_GIDS) == 0
+                ? EMPTY_INT_ARRAY : permissionsState.computeGids(userId);
+        // Compute granted permissions only if package has requested permissions
+        final Set<String> permissions = ArrayUtils.isEmpty(p.requestedPermissions)
+                ? Collections.<String>emptySet() : permissionsState.getPermissions(userId);
         final PackageUserState state = ps.readUserState(userId);
 
         return PackageParser.generatePackageInfo(p, gids, flags,
@@ -4985,48 +5034,45 @@
 
     private EphemeralResolveInfo getEphemeralResolveInfo(Intent intent, String resolvedType,
             int userId) {
-        MessageDigest digest = null;
-        try {
-            digest = MessageDigest.getInstance(EphemeralResolveInfo.SHA_ALGORITHM);
-        } catch (NoSuchAlgorithmException e) {
-            // If we can't create a digest, ignore ephemeral apps.
-            return null;
-        }
-
-        final byte[] hostBytes = intent.getData().getHost().getBytes();
-        final byte[] digestBytes = digest.digest(hostBytes);
-        int shaPrefix =
-                digestBytes[0] << 24
-                | digestBytes[1] << 16
-                | digestBytes[2] << 8
-                | digestBytes[3] << 0;
+        final int ephemeralPrefixMask = Global.getInt(mContext.getContentResolver(),
+                Global.EPHEMERAL_HASH_PREFIX_MASK, DEFAULT_EPHEMERAL_HASH_PREFIX_MASK);
+        final int ephemeralPrefixCount = Global.getInt(mContext.getContentResolver(),
+                Global.EPHEMERAL_HASH_PREFIX_COUNT, DEFAULT_EPHEMERAL_HASH_PREFIX_COUNT);
+        final EphemeralDigest digest = new EphemeralDigest(intent.getData(), ephemeralPrefixMask,
+                ephemeralPrefixCount);
+        final int[] shaPrefix = digest.getDigestPrefix();
+        final byte[][] digestBytes = digest.getDigestBytes();
         final List<EphemeralResolveInfo> ephemeralResolveInfoList =
-                mEphemeralResolverConnection.getEphemeralResolveInfoList(shaPrefix);
+                mEphemeralResolverConnection.getEphemeralResolveInfoList(
+                        shaPrefix, ephemeralPrefixMask);
         if (ephemeralResolveInfoList == null || ephemeralResolveInfoList.size() == 0) {
             // No hash prefix match; there are no ephemeral apps for this domain.
             return null;
         }
-        for (int i = ephemeralResolveInfoList.size() - 1; i >= 0; --i) {
-            EphemeralResolveInfo ephemeralApplication = ephemeralResolveInfoList.get(i);
-            if (!Arrays.equals(digestBytes, ephemeralApplication.getDigestBytes())) {
-                continue;
-            }
-            final List<IntentFilter> filters = ephemeralApplication.getFilters();
-            // No filters; this should never happen.
-            if (filters.isEmpty()) {
-                continue;
-            }
-            // We have a domain match; resolve the filters to see if anything matches.
-            final EphemeralIntentResolver ephemeralResolver = new EphemeralIntentResolver();
-            for (int j = filters.size() - 1; j >= 0; --j) {
-                final EphemeralResolveIntentInfo intentInfo =
-                        new EphemeralResolveIntentInfo(filters.get(j), ephemeralApplication);
-                ephemeralResolver.addFilter(intentInfo);
-            }
-            List<EphemeralResolveInfo> matchedResolveInfoList = ephemeralResolver.queryIntent(
-                    intent, resolvedType, false /*defaultOnly*/, userId);
-            if (!matchedResolveInfoList.isEmpty()) {
-                return matchedResolveInfoList.get(0);
+
+        // Go in reverse order so we match the narrowest scope first.
+        for (int i = shaPrefix.length - 1; i >= 0 ; --i) {
+            for (EphemeralResolveInfo ephemeralApplication : ephemeralResolveInfoList) {
+                if (!Arrays.equals(digestBytes[i], ephemeralApplication.getDigestBytes())) {
+                    continue;
+                }
+                final List<IntentFilter> filters = ephemeralApplication.getFilters();
+                // No filters; this should never happen.
+                if (filters.isEmpty()) {
+                    continue;
+                }
+                // We have a domain match; resolve the filters to see if anything matches.
+                final EphemeralIntentResolver ephemeralResolver = new EphemeralIntentResolver();
+                for (int j = filters.size() - 1; j >= 0; --j) {
+                    final EphemeralResolveIntentInfo intentInfo =
+                            new EphemeralResolveIntentInfo(filters.get(j), ephemeralApplication);
+                    ephemeralResolver.addFilter(intentInfo);
+                }
+                List<EphemeralResolveInfo> matchedResolveInfoList = ephemeralResolver.queryIntent(
+                        intent, resolvedType, false /*defaultOnly*/, userId);
+                if (!matchedResolveInfoList.isEmpty()) {
+                    return matchedResolveInfoList.get(0);
+                }
             }
         }
         // Hash or filter mis-match; no ephemeral apps for this domain.
@@ -6755,11 +6801,26 @@
         }
     }
 
+    private long getLastModifiedTime(PackageParser.Package pkg, File srcFile) {
+        if (srcFile.isDirectory()) {
+            final File baseFile = new File(pkg.baseCodePath);
+            long maxModifiedTime = baseFile.lastModified();
+            if (pkg.splitCodePaths != null) {
+                for (int i = pkg.splitCodePaths.length - 1; i >=0; --i) {
+                    final File splitFile = new File(pkg.splitCodePaths[i]);
+                    maxModifiedTime = Math.max(maxModifiedTime, splitFile.lastModified());
+                }
+            }
+            return maxModifiedTime;
+        }
+        return srcFile.lastModified();
+    }
+
     private void collectCertificatesLI(PackageSetting ps, PackageParser.Package pkg, File srcFile,
             final int policyFlags) throws PackageManagerException {
         if (ps != null
                 && ps.codePath.equals(srcFile)
-                && ps.timeStamp == srcFile.lastModified()
+                && ps.timeStamp == getLastModifiedTime(pkg, srcFile)
                 && !isCompatSignatureUpdateNeeded(pkg)
                 && !isRecoverSignatureUpdateNeeded(pkg)) {
             long mSigningKeySetId = ps.keySetData.getProperSigningKeySet();
@@ -7961,7 +8022,9 @@
         } catch (IOException ignore) {
         } finally {
             try {
-                jarFile.close();
+                if (jarFile != null) {
+                    jarFile.close();
+                }
             } catch (IOException ignore) {}
         }
         return false;
@@ -8395,7 +8458,7 @@
 
         final String pkgName = pkg.packageName;
 
-        final long scanFileTime = scanFile.lastModified();
+        final long scanFileTime = getLastModifiedTime(pkg, scanFile);
         final boolean forceDex = (scanFlags & SCAN_FORCE_DEX) != 0;
         pkg.applicationInfo.processName = fixProcessName(
                 pkg.applicationInfo.packageName,
@@ -11638,6 +11701,12 @@
                 if (pkgSetting == null) {
                     return false;
                 }
+                // Only allow protected packages to hide themselves.
+                if (hidden && !UserHandle.isSameApp(uid, pkgSetting.appId)
+                        && mProtectedPackages.isPackageStateProtected(userId, packageName)) {
+                    Slog.w(TAG, "Not hiding protected package: " + packageName);
+                    return false;
+                }
                 if (pkgSetting.getHidden(userId) != hidden) {
                     pkgSetting.setHidden(hidden, userId);
                     mSettings.writePackageRestrictionsLPr(userId);
@@ -11878,6 +11947,12 @@
             return false;
         }
 
+        if (mProtectedPackages.isPackageStateProtected(userId, packageName)) {
+            Slog.w(TAG, "Cannot suspend/un-suspend package \"" + packageName
+                    + "\": protected package");
+            return false;
+        }
+
         return true;
     }
 
@@ -16408,8 +16483,9 @@
         enforceCrossUserPermission(Binder.getCallingUid(), userId,
                 true /* requireFullPermission */, false /* checkShell */, "clear application data");
 
-        if (mProtectedPackages.canPackageBeWiped(userId, packageName)) {
-            throw new SecurityException("Cannot clear data for a device owner or a profile owner");
+        if (mProtectedPackages.isPackageDataProtected(userId, packageName)) {
+            throw new SecurityException("Cannot clear data for a protected package: "
+                    + packageName);
         }
         // Queue up an async operation since the package deletion may take a little while.
         mHandler.post(new Runnable() {
@@ -17595,6 +17671,7 @@
     private Intent getHomeIntent() {
         Intent intent = new Intent(Intent.ACTION_MAIN);
         intent.addCategory(Intent.CATEGORY_HOME);
+        intent.addCategory(Intent.CATEGORY_DEFAULT);
         return intent;
     }
 
@@ -17735,9 +17812,9 @@
                         + Binder.getCallingPid()
                         + ", uid=" + uid + ", package uid=" + pkgSetting.appId);
             }
-            // Don't allow changing profile and device owners.
-            if (mProtectedPackages.canPackageStateBeChanged(userId, packageName)) {
-                throw new SecurityException("Cannot disable a device owner or a profile owner");
+            // Don't allow changing protected packages.
+            if (mProtectedPackages.isPackageStateProtected(userId, packageName)) {
+                throw new SecurityException("Cannot disable a protected package: " + packageName);
             }
         }
 
@@ -20869,9 +20946,8 @@
         }
 
         @Override
-        public boolean canPackageBeWiped(int userId, String packageName) {
-            return mProtectedPackages.canPackageBeWiped(userId,
-                    packageName);
+        public boolean isPackageDataProtected(int userId, String packageName) {
+            return mProtectedPackages.isPackageDataProtected(userId, packageName);
         }
     }
 
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index 07dc404..5787bdb 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -1099,8 +1099,9 @@
 
         try {
             mInterface.setHomeActivity(componentName, userId);
+            pw.println("Success");
             return 0;
-        } catch (RemoteException e) {
+        } catch (Exception e) {
             pw.println(e.toString());
             return 1;
         }
diff --git a/services/core/java/com/android/server/pm/PermissionsState.java b/services/core/java/com/android/server/pm/PermissionsState.java
index 007b738..8f9968ec 100644
--- a/services/core/java/com/android/server/pm/PermissionsState.java
+++ b/services/core/java/com/android/server/pm/PermissionsState.java
@@ -274,7 +274,7 @@
             return Collections.emptySet();
         }
 
-        Set<String> permissions = new ArraySet<>();
+        Set<String> permissions = new ArraySet<>(mPermissions.size());
 
         final int permissionCount = mPermissions.size();
         for (int i = 0; i < permissionCount; i++) {
@@ -282,6 +282,7 @@
 
             if (hasInstallPermission(permission)) {
                 permissions.add(permission);
+                continue;
             }
 
             if (userId != UserHandle.USER_ALL) {
diff --git a/services/core/java/com/android/server/pm/ProtectedPackages.java b/services/core/java/com/android/server/pm/ProtectedPackages.java
index 7bdea18..e67364a 100644
--- a/services/core/java/com/android/server/pm/ProtectedPackages.java
+++ b/services/core/java/com/android/server/pm/ProtectedPackages.java
@@ -16,10 +16,15 @@
 
 package com.android.server.pm;
 
+import android.annotation.Nullable;
 import android.annotation.UserIdInt;
+import android.content.Context;
 import android.os.UserHandle;
 import android.util.SparseArray;
 
+import com.android.internal.R;
+import com.android.internal.annotations.GuardedBy;
+
 /**
  * Manages package names that need special protection.
  *
@@ -29,61 +34,87 @@
  */
 public class ProtectedPackages {
     @UserIdInt
+    @GuardedBy("this")
     private int mDeviceOwnerUserId;
 
+    @Nullable
+    @GuardedBy("this")
     private String mDeviceOwnerPackage;
 
+    @Nullable
+    @GuardedBy("this")
     private SparseArray<String> mProfileOwnerPackages;
 
-    private final Object mLock = new Object();
+    @Nullable
+    @GuardedBy("this")
+    private final String mDeviceProvisioningPackage;
+
+    private final Context mContext;
+
+    public ProtectedPackages(Context context) {
+        mContext = context;
+        mDeviceProvisioningPackage = mContext.getResources().getString(
+                R.string.config_deviceProvisioningPackage);
+    }
 
     /**
      * Sets the device/profile owner information.
      */
-    public void setDeviceAndProfileOwnerPackages(
+    public synchronized void setDeviceAndProfileOwnerPackages(
             int deviceOwnerUserId, String deviceOwnerPackage,
             SparseArray<String> profileOwnerPackages) {
-        synchronized (mLock) {
-            mDeviceOwnerUserId = deviceOwnerUserId;
-            mDeviceOwnerPackage =
-                    (deviceOwnerUserId == UserHandle.USER_NULL) ? null : deviceOwnerPackage;
-            mProfileOwnerPackages = (profileOwnerPackages == null) ? null
-                    : profileOwnerPackages.clone();
-        }
+        mDeviceOwnerUserId = deviceOwnerUserId;
+        mDeviceOwnerPackage =
+                (deviceOwnerUserId == UserHandle.USER_NULL) ? null : deviceOwnerPackage;
+        mProfileOwnerPackages = (profileOwnerPackages == null) ? null
+                : profileOwnerPackages.clone();
     }
 
-    private boolean hasDeviceOwnerOrProfileOwner(int userId, String packageName) {
+    private synchronized boolean hasDeviceOwnerOrProfileOwner(int userId, String packageName) {
         if (packageName == null) {
             return false;
         }
-        synchronized (mLock) {
-            if (mDeviceOwnerPackage != null) {
-                if ((mDeviceOwnerUserId == userId)
-                        && (packageName.equals(mDeviceOwnerPackage))) {
-                    return true;
-                }
+        if (mDeviceOwnerPackage != null) {
+            if ((mDeviceOwnerUserId == userId)
+                    && (packageName.equals(mDeviceOwnerPackage))) {
+                return true;
             }
-            if (mProfileOwnerPackages != null) {
-                if (packageName.equals(mProfileOwnerPackages.get(userId))) {
-                    return true;
-                }
+        }
+        if (mProfileOwnerPackages != null) {
+            if (packageName.equals(mProfileOwnerPackages.get(userId))) {
+                return true;
             }
         }
         return false;
     }
 
     /**
-     * Whether a package or the components in a package's enabled state can be changed
-     * by other callers than itself.
+     * Returns {@code true} if a given package is protected. Otherwise, returns {@code false}.
+     *
+     * <p>A protected package means that, apart from the package owner, no system or privileged apps
+     * can modify its data or package state.
      */
-    public boolean canPackageStateBeChanged(@UserIdInt int userId, String packageName) {
-        return hasDeviceOwnerOrProfileOwner(userId, packageName);
+    private synchronized boolean isProtectedPackage(String packageName) {
+        return packageName != null && packageName.equals(mDeviceProvisioningPackage);
     }
 
     /**
-     * Whether a package's data be cleared.
+     * Returns {@code true} if a given package's state is protected. Otherwise, returns
+     * {@code false}.
+     *
+     * <p>This is not applicable if the caller is the package owner.
      */
-    public boolean canPackageBeWiped(@UserIdInt int userId, String packageName) {
-        return hasDeviceOwnerOrProfileOwner(userId, packageName);
+    public boolean isPackageStateProtected(@UserIdInt int userId, String packageName) {
+        return hasDeviceOwnerOrProfileOwner(userId, packageName)
+                || isProtectedPackage(packageName);
+    }
+
+    /**
+     * Returns {@code true} if a given package's data is protected. Otherwise, returns
+     * {@code false}.
+     */
+    public boolean isPackageDataProtected(@UserIdInt int userId, String packageName) {
+        return hasDeviceOwnerOrProfileOwner(userId, packageName)
+                || isProtectedPackage(packageName);
     }
 }
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index dfd6dfe..5126305 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -4011,7 +4011,7 @@
         file.delete();
         removeCrossProfileIntentFiltersLPw(userId);
 
-        mRuntimePermissionsPersistence.onUserRemoved(userId);
+        mRuntimePermissionsPersistence.onUserRemovedLPw(userId);
 
         writePackageListLPr();
     }
@@ -5108,7 +5108,7 @@
             }
         }
 
-        private void onUserRemoved(int userId) {
+        private void onUserRemovedLPw(int userId) {
             // Make sure we do not
             mHandler.removeMessages(userId);
 
@@ -5119,6 +5119,9 @@
             for (SettingBase sb : mSharedUsers.values()) {
                 revokeRuntimePermissionsAndClearFlags(sb, userId);
             }
+
+            mDefaultPermissionsGranted.delete(userId);
+            mFingerprints.remove(userId);
         }
 
         private void revokeRuntimePermissionsAndClearFlags(SettingBase sb, int userId) {
diff --git a/services/core/java/com/android/server/pm/ShortcutLauncher.java b/services/core/java/com/android/server/pm/ShortcutLauncher.java
index 76d47a8..e667838 100644
--- a/services/core/java/com/android/server/pm/ShortcutLauncher.java
+++ b/services/core/java/com/android/server/pm/ShortcutLauncher.java
@@ -36,6 +36,8 @@
 
 /**
  * Launcher information used by {@link ShortcutService}.
+ *
+ * All methods should be guarded by {@code #mShortcutUser.mService.mLock}.
  */
 class ShortcutLauncher extends ShortcutPackageItem {
     private static final String TAG = ShortcutService.TAG;
@@ -80,26 +82,31 @@
      * Called when the new package can't receive the backup, due to signature or version mismatch.
      */
     @Override
-    protected void onRestoreBlocked(ShortcutService s) {
+    protected void onRestoreBlocked() {
         final ArrayList<PackageWithUser> pinnedPackages =
                 new ArrayList<>(mPinnedShortcuts.keySet());
         mPinnedShortcuts.clear();
         for (int i = pinnedPackages.size() - 1; i >= 0; i--) {
             final PackageWithUser pu = pinnedPackages.get(i);
-            s.getPackageShortcutsLocked(pu.packageName, pu.userId)
-                    .refreshPinnedFlags(s);
+            final ShortcutPackage p = mShortcutUser.getPackageShortcutsIfExists(pu.packageName);
+            if (p != null) {
+                p.refreshPinnedFlags();
+            }
         }
     }
 
     @Override
-    protected void onRestored(ShortcutService s) {
+    protected void onRestored() {
         // Nothing to do.
     }
 
-    public void pinShortcuts(@NonNull ShortcutService s, @UserIdInt int packageUserId,
+    public void pinShortcuts(@UserIdInt int packageUserId,
             @NonNull String packageName, @NonNull List<String> ids) {
         final ShortcutPackage packageShortcuts =
-                s.getPackageShortcutsLocked(packageName, packageUserId);
+                mShortcutUser.getPackageShortcutsIfExists(packageName);
+        if (packageShortcuts == null) {
+            return; // No need to instantiate.
+        }
 
         final PackageWithUser pu = PackageWithUser.of(packageUserId, packageName);
 
@@ -120,13 +127,14 @@
                 if (si == null) {
                     continue;
                 }
-                if (si.isDynamic() || (prevSet != null && prevSet.contains(id))) {
+                if (si.isDynamic() || si.isManifestShortcut()
+                        || (prevSet != null && prevSet.contains(id))) {
                     newSet.add(id);
                 }
             }
             mPinnedShortcuts.put(pu, newSet);
         }
-        packageShortcuts.refreshPinnedFlags(s);
+        packageShortcuts.refreshPinnedFlags();
     }
 
     /**
@@ -240,7 +248,7 @@
         return ret;
     }
 
-    public void dump(@NonNull ShortcutService s, @NonNull PrintWriter pw, @NonNull String prefix) {
+    public void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
         pw.println();
 
         pw.print(prefix);
@@ -252,7 +260,7 @@
         pw.print(getOwnerUserId());
         pw.println();
 
-        getPackageInfo().dump(s, pw, prefix + "  ");
+        getPackageInfo().dump(pw, prefix + "  ");
         pw.println();
 
         final int size = mPinnedShortcuts.size();
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
index 151f61e..1a4e4e0 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
@@ -20,15 +20,20 @@
 import android.annotation.UserIdInt;
 import android.content.ComponentName;
 import android.content.Intent;
+import android.content.pm.PackageInfo;
 import android.content.pm.ShortcutInfo;
+import android.content.res.Resources;
 import android.os.PersistableBundle;
 import android.text.format.Formatter;
 import android.util.ArrayMap;
 import android.util.ArraySet;
+import android.util.Log;
 import android.util.Slog;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.Preconditions;
 import com.android.internal.util.XmlUtils;
+import com.android.server.pm.ShortcutService.ShortcutOperation;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
@@ -38,15 +43,21 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Set;
 import java.util.function.Predicate;
 
 /**
  * Package information used by {@link ShortcutService}.
+ * User information used by {@link ShortcutService}.
+ *
+ * All methods should be guarded by {@code #mShortcutUser.mService.mLock}.
  */
 class ShortcutPackage extends ShortcutPackageItem {
     private static final String TAG = ShortcutService.TAG;
+    private static final String TAG_VERIFY = ShortcutService.TAG + ".verify";
 
     static final String TAG_ROOT = "package";
     private static final String TAG_INTENT_EXTRAS = "intent-extras";
@@ -55,18 +66,25 @@
     private static final String TAG_CATEGORIES = "categories";
 
     private static final String ATTR_NAME = "name";
-    private static final String ATTR_DYNAMIC_COUNT = "dynamic-count";
     private static final String ATTR_CALL_COUNT = "call-count";
     private static final String ATTR_LAST_RESET = "last-reset";
     private static final String ATTR_ID = "id";
     private static final String ATTR_ACTIVITY = "activity";
     private static final String ATTR_TITLE = "title";
+    private static final String ATTR_TITLE_RES_ID = "titleid";
+    private static final String ATTR_TITLE_RES_NAME = "titlename";
     private static final String ATTR_TEXT = "text";
+    private static final String ATTR_TEXT_RES_ID = "textid";
+    private static final String ATTR_TEXT_RES_NAME = "textname";
+    private static final String ATTR_DISABLED_MESSAGE = "dmessage";
+    private static final String ATTR_DISABLED_MESSAGE_RES_ID = "dmessageid";
+    private static final String ATTR_DISABLED_MESSAGE_RES_NAME = "dmessagename";
     private static final String ATTR_INTENT = "intent";
-    private static final String ATTR_WEIGHT = "weight";
+    private static final String ATTR_RANK = "rank";
     private static final String ATTR_TIMESTAMP = "timestamp";
     private static final String ATTR_FLAGS = "flags";
-    private static final String ATTR_ICON_RES = "icon-res";
+    private static final String ATTR_ICON_RES_ID = "icon-res";
+    private static final String ATTR_ICON_RES_NAME = "icon-resname";
     private static final String ATTR_BITMAP_PATH = "bitmap-path";
 
     private static final String NAME_CATEGORIES = "categories";
@@ -80,11 +98,6 @@
     final private ArrayMap<String, ShortcutInfo> mShortcuts = new ArrayMap<>();
 
     /**
-     * # of dynamic shortcuts.
-     */
-    private int mDynamicShortcutCount = 0;
-
-    /**
      * # of times the package has called rate-limited APIs.
      */
     private int mApiCallCount;
@@ -98,17 +111,16 @@
 
     private long mLastKnownForegroundElapsedTime;
 
-    private ShortcutPackage(ShortcutService s, ShortcutUser shortcutUser,
+    private ShortcutPackage(ShortcutUser shortcutUser,
             int packageUserId, String packageName, ShortcutPackageInfo spi) {
         super(shortcutUser, packageUserId, packageName,
                 spi != null ? spi : ShortcutPackageInfo.newEmpty());
 
-        mPackageUid = s.injectGetPackageUid(packageName, packageUserId);
+        mPackageUid = shortcutUser.mService.injectGetPackageUid(packageName, packageUserId);
     }
 
-    public ShortcutPackage(ShortcutService s, ShortcutUser shortcutUser,
-            int packageUserId, String packageName) {
-        this(s, shortcutUser, packageUserId, packageName, null);
+    public ShortcutPackage(ShortcutUser shortcutUser, int packageUserId, String packageName) {
+        this(shortcutUser, packageUserId, packageName, null);
     }
 
     @Override
@@ -122,37 +134,46 @@
     }
 
     /**
-     * Called when a shortcut is about to be published.  At this point we know the publisher package
+     * Called when a shortcut is about to be published.  At this point we know the publisher
+     * package
      * exists (as opposed to Launcher trying to fetch shortcuts from a non-existent package), so
      * we do some initialization for the package.
      */
-    private void onShortcutPublish(ShortcutService s) {
+    private void ensurePackageVersionInfo() {
         // Make sure we have the version code for the app.  We need the version code in
         // handlePackageUpdated().
         if (getPackageInfo().getVersionCode() < 0) {
-            final int versionCode = s.getApplicationVersionCode(getPackageName(), getOwnerUserId());
-            if (ShortcutService.DEBUG) {
-                Slog.d(TAG, String.format("Package %s version = %d", getPackageName(),
-                        versionCode));
-            }
-            if (versionCode >= 0) {
-                getPackageInfo().setVersionCode(versionCode);
+            final ShortcutService s = mShortcutUser.mService;
+
+            final PackageInfo pi = s.getPackageInfo(getPackageName(), getOwnerUserId());
+            if (pi != null) {
+                if (ShortcutService.DEBUG) {
+                    Slog.d(TAG, String.format("Package %s version = %d", getPackageName(),
+                            pi.versionCode));
+                }
+                getPackageInfo().updateVersionInfo(pi);
                 s.scheduleSaveUser(getOwnerUserId());
             }
         }
     }
 
+    @Nullable
+    public Resources getPackageResources() {
+        return mShortcutUser.mService.injectGetResourcesForApplicationAsUser(
+                getPackageName(), getPackageUserId());
+    }
+
     @Override
-    protected void onRestoreBlocked(ShortcutService s) {
+    protected void onRestoreBlocked() {
         // Can't restore due to version/signature mismatch.  Remove all shortcuts.
         mShortcuts.clear();
     }
 
     @Override
-    protected void onRestored(ShortcutService s) {
+    protected void onRestored() {
         // Because some launchers may not have been restored (e.g. allowBackup=false),
         // we need to re-calculate the pinned shortcuts.
-        refreshPinnedFlags(s);
+        refreshPinnedFlags();
     }
 
     /**
@@ -163,19 +184,48 @@
         return mShortcuts.get(id);
     }
 
-    private ShortcutInfo deleteShortcut(@NonNull ShortcutService s,
-            @NonNull String id) {
+    private void ensureNotImmutable(@Nullable ShortcutInfo shortcut) {
+        if (shortcut != null && shortcut.isImmutable()) {
+            throw new IllegalArgumentException(
+                    "Manifest shortcut ID=" + shortcut.getId()
+                            + " may not be manipulated via APIs");
+        }
+    }
+
+    private void ensureNotImmutable(@NonNull String id) {
+        ensureNotImmutable(mShortcuts.get(id));
+    }
+
+    public void ensureImmutableShortcutsNotIncludedWithIds(@NonNull List<String> shortcutIds) {
+        for (int i = shortcutIds.size() - 1; i >= 0; i--) {
+            ensureNotImmutable(shortcutIds.get(i));
+        }
+    }
+
+    public void ensureImmutableShortcutsNotIncluded(@NonNull List<ShortcutInfo> shortcuts) {
+        for (int i = shortcuts.size() - 1; i >= 0; i--) {
+            ensureNotImmutable(shortcuts.get(i).getId());
+        }
+    }
+
+    private ShortcutInfo deleteShortcutInner(@NonNull String id) {
         final ShortcutInfo shortcut = mShortcuts.remove(id);
         if (shortcut != null) {
-            s.removeIcon(getPackageUserId(), shortcut);
-            shortcut.clearFlags(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_PINNED);
+            mShortcutUser.mService.removeIcon(getPackageUserId(), shortcut);
+            shortcut.clearFlags(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_PINNED
+                    | ShortcutInfo.FLAG_MANIFEST);
         }
         return shortcut;
     }
 
-    void addShortcut(@NonNull ShortcutService s, @NonNull ShortcutInfo newShortcut) {
-        deleteShortcut(s, newShortcut.getId());
+    private void addShortcutInner(@NonNull ShortcutInfo newShortcut) {
+        final ShortcutService s = mShortcutUser.mService;
+
+        deleteShortcutInner(newShortcut.getId());
+
+        // Extract Icon and update the icon res ID and the bitmap path.
         s.saveIconAndFixUpShortcut(getPackageUserId(), newShortcut);
+        s.fixUpShortcutResourceNamesAndValues(newShortcut);
         mShortcuts.put(newShortcut.getId(), newShortcut);
     }
 
@@ -184,52 +234,47 @@
      *
      * It checks the max number of dynamic shortcuts.
      */
-    public void addDynamicShortcut(@NonNull ShortcutService s,
-            @NonNull ShortcutInfo newShortcut) {
+    public void addOrUpdateDynamicShortcut(@NonNull ShortcutInfo newShortcut) {
 
-        onShortcutPublish(s);
+        Preconditions.checkArgument(newShortcut.isEnabled(),
+                "add/setDynamicShortcuts() cannot publish disabled shortcuts");
+
+        ensurePackageVersionInfo();
 
         newShortcut.addFlags(ShortcutInfo.FLAG_DYNAMIC);
 
         final ShortcutInfo oldShortcut = mShortcuts.get(newShortcut.getId());
 
         final boolean wasPinned;
-        final int newDynamicCount;
 
         if (oldShortcut == null) {
             wasPinned = false;
-            newDynamicCount = mDynamicShortcutCount + 1; // adding a dynamic shortcut.
         } else {
+            // It's an update case.
+            // Make sure the target is updatable. (i.e. should be mutable.)
+            oldShortcut.ensureUpdatableWith(newShortcut);
+
             wasPinned = oldShortcut.isPinned();
-            if (oldShortcut.isDynamic()) {
-                newDynamicCount = mDynamicShortcutCount; // not adding a dynamic shortcut.
-            } else {
-                newDynamicCount = mDynamicShortcutCount + 1; // adding a dynamic shortcut.
-            }
         }
 
-        // Make sure there's still room.
-        s.enforceMaxDynamicShortcuts(newDynamicCount);
-
-        // Okay, make it dynamic and add.
+        // If it was originally pinned, the new one should be pinned too.
         if (wasPinned) {
             newShortcut.addFlags(ShortcutInfo.FLAG_PINNED);
         }
 
-        addShortcut(s, newShortcut);
-        mDynamicShortcutCount = newDynamicCount;
+        addShortcutInner(newShortcut);
     }
 
     /**
      * Remove all shortcuts that aren't pinned nor dynamic.
      */
-    private void removeOrphans(@NonNull ShortcutService s) {
+    private void removeOrphans() {
         ArrayList<String> removeList = null; // Lazily initialize.
 
         for (int i = mShortcuts.size() - 1; i >= 0; i--) {
             final ShortcutInfo si = mShortcuts.valueAt(i);
 
-            if (si.isPinned() || si.isDynamic()) continue;
+            if (si.isAlive()) continue;
 
             if (removeList == null) {
                 removeList = new ArrayList<>();
@@ -238,7 +283,7 @@
         }
         if (removeList != null) {
             for (int i = removeList.size() - 1; i >= 0; i--) {
-                deleteShortcut(s, removeList.get(i));
+                deleteShortcutInner(removeList.get(i));
             }
         }
     }
@@ -246,30 +291,103 @@
     /**
      * Remove all dynamic shortcuts.
      */
-    public void deleteAllDynamicShortcuts(@NonNull ShortcutService s) {
+    public void deleteAllDynamicShortcuts() {
+        final long now = mShortcutUser.mService.injectCurrentTimeMillis();
+
+        boolean changed = false;
         for (int i = mShortcuts.size() - 1; i >= 0; i--) {
-            mShortcuts.valueAt(i).clearFlags(ShortcutInfo.FLAG_DYNAMIC);
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+            if (si.isDynamic()) {
+                changed = true;
+
+                si.setTimestamp(now);
+                si.clearFlags(ShortcutInfo.FLAG_DYNAMIC);
+                si.setRank(0); // It may still be pinned, so clear the rank.
+            }
         }
-        removeOrphans(s);
-        mDynamicShortcutCount = 0;
+        if (changed) {
+            removeOrphans();
+        }
     }
 
     /**
-     * Remove a dynamic shortcut by ID.
+     * Remove a dynamic shortcut by ID.  It'll be removed from the dynamic set, but if the shortcut
+     * is pinned, it'll remain as a pinned shortcut, and is still enabled.
+     *
+     * @return true if it's actually removed because it wasn't pinned, or false if it's still
+     * pinned.
      */
-    public void deleteDynamicWithId(@NonNull ShortcutService s, @NonNull String shortcutId) {
+    public boolean deleteDynamicWithId(@NonNull String shortcutId) {
+        final ShortcutInfo removed = deleteOrDisableWithId(
+                shortcutId, /* disable =*/ false, /* overrideImmutable=*/ false);
+        return removed == null;
+    }
+
+    /**
+     * Disable a dynamic shortcut by ID.  It'll be removed from the dynamic set, but if the shortcut
+     * is pinned, it'll remain as a pinned shortcut, but will be disabled.
+     *
+     * @return true if it's actually removed because it wasn't pinned, or false if it's still
+     * pinned.
+     */
+    private boolean disableDynamicWithId(@NonNull String shortcutId) {
+        final ShortcutInfo disabled = deleteOrDisableWithId(
+                shortcutId, /* disable =*/ true, /* overrideImmutable=*/ false);
+        return disabled == null;
+    }
+
+    /**
+     * Disable a dynamic shortcut by ID.  It'll be removed from the dynamic set, but if the shortcut
+     * is pinned, it'll remain as a pinned shortcut but will be disabled.
+     */
+    public void disableWithId(@NonNull String shortcutId, String disabledMessage,
+            int disabledMessageResId, boolean overrideImmutable) {
+        final ShortcutInfo disabled = deleteOrDisableWithId(shortcutId, /* disable =*/ true,
+                overrideImmutable);
+
+        if (disabled != null) {
+            if (disabledMessage != null) {
+                disabled.setDisabledMessage(disabledMessage);
+            } else if (disabledMessageResId != 0) {
+                disabled.setDisabledMessageResId(disabledMessageResId);
+
+                mShortcutUser.mService.fixUpShortcutResourceNamesAndValues(disabled);
+            }
+        }
+    }
+
+    @Nullable
+    private ShortcutInfo deleteOrDisableWithId(@NonNull String shortcutId, boolean disable,
+            boolean overrideImmutable) {
         final ShortcutInfo oldShortcut = mShortcuts.get(shortcutId);
 
-        if (oldShortcut == null) {
-            return;
+        if (oldShortcut == null || !oldShortcut.isEnabled()) {
+            return null; // Doesn't exist or already disabled.
         }
-        if (oldShortcut.isDynamic()) {
-            mDynamicShortcutCount--;
+        if (!overrideImmutable) {
+            ensureNotImmutable(oldShortcut);
         }
         if (oldShortcut.isPinned()) {
-            oldShortcut.clearFlags(ShortcutInfo.FLAG_DYNAMIC);
+
+            oldShortcut.setRank(0);
+            oldShortcut.clearFlags(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_MANIFEST);
+            if (disable) {
+                oldShortcut.addFlags(ShortcutInfo.FLAG_DISABLED);
+            }
+            oldShortcut.setTimestamp(mShortcutUser.mService.injectCurrentTimeMillis());
+
+            return oldShortcut;
         } else {
-            deleteShortcut(s, shortcutId);
+            deleteShortcutInner(shortcutId);
+            return null;
+        }
+    }
+
+    public void enableWithId(@NonNull String shortcutId) {
+        final ShortcutInfo shortcut = mShortcuts.get(shortcutId);
+        if (shortcut != null) {
+            ensureNotImmutable(shortcut);
+            shortcut.clearFlags(ShortcutInfo.FLAG_DISABLED);
         }
     }
 
@@ -279,14 +397,15 @@
      *
      * <p>Then remove all shortcuts that are not dynamic and no longer pinned either.
      */
-    public void refreshPinnedFlags(@NonNull ShortcutService s) {
+    public void refreshPinnedFlags() {
         // First, un-pin all shortcuts
         for (int i = mShortcuts.size() - 1; i >= 0; i--) {
             mShortcuts.valueAt(i).clearFlags(ShortcutInfo.FLAG_PINNED);
         }
 
         // Then, for the pinned set for each launcher, set the pin flag one by one.
-        s.getUserShortcutsLocked(getPackageUserId()).forAllLaunchers(launcherShortcuts -> {
+        mShortcutUser.mService.getUserShortcutsLocked(getPackageUserId())
+                .forAllLaunchers(launcherShortcuts -> {
             final ArraySet<String> pinned = launcherShortcuts.getPinnedShortcutIds(
                     getPackageName(), getPackageUserId());
 
@@ -308,7 +427,7 @@
         });
 
         // Lastly, remove the ones that are no longer pinned nor dynamic.
-        removeOrphans(s);
+        removeOrphans();
     }
 
     /**
@@ -317,8 +436,10 @@
      * <p>This takes care of the resetting the counter for foreground apps as well as after
      * locale changes.
      */
-    public int getApiCallCount(@NonNull ShortcutService s) {
-        mShortcutUser.resetThrottlingIfNeeded(s);
+    public int getApiCallCount() {
+        mShortcutUser.resetThrottlingIfNeeded();
+
+        final ShortcutService s = mShortcutUser.mService;
 
         // Reset the counter if:
         // - the package is in foreground now.
@@ -328,7 +449,7 @@
                 || mLastKnownForegroundElapsedTime
                     < s.getUidLastForegroundElapsedTimeLocked(mPackageUid)) {
             mLastKnownForegroundElapsedTime = s.injectElapsedRealtime();
-            resetRateLimiting(s);
+            resetRateLimiting();
         }
 
         // Note resetThrottlingIfNeeded() and resetRateLimiting() will set 0 to mApiCallCount,
@@ -349,8 +470,8 @@
         // If not reset yet, then reset.
         if (mLastResetTime < last) {
             if (ShortcutService.DEBUG) {
-                Slog.d(TAG, String.format("My last reset=%d, now=%d, last=%d: resetting",
-                        mLastResetTime, now, last));
+                Slog.d(TAG, String.format("%s: last reset=%d, now=%d, last=%d: resetting",
+                        getPackageName(), mLastResetTime, now, last));
             }
             mApiCallCount = 0;
             mLastResetTime = last;
@@ -365,8 +486,10 @@
      * <p>This takes care of the resetting the counter for foreground apps as well as after
      * locale changes, which is done internally by {@link #getApiCallCount}.
      */
-    public boolean tryApiCall(@NonNull ShortcutService s) {
-        if (getApiCallCount(s) >= s.mMaxUpdatesPerInterval) {
+    public boolean tryApiCall() {
+        final ShortcutService s = mShortcutUser.mService;
+
+        if (getApiCallCount() >= s.mMaxUpdatesPerInterval) {
             return false;
         }
         mApiCallCount++;
@@ -374,13 +497,13 @@
         return true;
     }
 
-    public void resetRateLimiting(@NonNull ShortcutService s) {
+    public void resetRateLimiting() {
         if (ShortcutService.DEBUG) {
             Slog.d(TAG, "resetRateLimiting: " + getPackageName());
         }
         if (mApiCallCount > 0) {
             mApiCallCount = 0;
-            s.scheduleSaveUser(getOwnerUserId());
+            mShortcutUser.mService.scheduleSaveUser(getOwnerUserId());
         }
     }
 
@@ -392,9 +515,9 @@
     /**
      * Find all shortcuts that match {@code query}.
      */
-    public void findAll(@NonNull ShortcutService s, @NonNull List<ShortcutInfo> result,
+    public void findAll(@NonNull List<ShortcutInfo> result,
             @Nullable Predicate<ShortcutInfo> query, int cloneFlag) {
-        findAll(s, result, query, cloneFlag, null, 0);
+        findAll(result, query, cloneFlag, null, 0);
     }
 
     /**
@@ -404,7 +527,7 @@
      * by the calling launcher will not be included in the result, and also "isPinned" will be
      * adjusted for the caller too.
      */
-    public void findAll(@NonNull ShortcutService s, @NonNull List<ShortcutInfo> result,
+    public void findAll(@NonNull List<ShortcutInfo> result,
             @Nullable Predicate<ShortcutInfo> query, int cloneFlag,
             @Nullable String callingLauncher, int launcherUserId) {
         if (getPackageInfo().isShadow()) {
@@ -412,6 +535,8 @@
             return;
         }
 
+        final ShortcutService s = mShortcutUser.mService;
+
         // Set of pinned shortcuts by the calling launcher.
         final ArraySet<String> pinnedByCallerSet = (callingLauncher == null) ? null
                 : s.getLauncherShortcutsLocked(callingLauncher, getPackageUserId(), launcherUserId)
@@ -420,22 +545,19 @@
         for (int i = 0; i < mShortcuts.size(); i++) {
             final ShortcutInfo si = mShortcuts.valueAt(i);
 
-            // If it's called by non-launcher (i.e. publisher, always include -> true.
-            // Otherwise, only include non-dynamic pinned one, if the calling launcher has pinned
-            // it.
+            // Need to adjust PINNED flag depending on the caller.
+            // Basically if the caller is a launcher (callingLauncher != null) and the launcher
+            // isn't pinning it, then we need to clear PINNED for this caller.
             final boolean isPinnedByCaller = (callingLauncher == null)
                     || ((pinnedByCallerSet != null) && pinnedByCallerSet.contains(si.getId()));
-            if (!si.isDynamic()) {
-                if (!si.isPinned()) {
-                    s.wtf("Shortcut not pinned: package " + getPackageName()
-                            + ", user=" + getPackageUserId() + ", id=" + si.getId());
-                    continue;
-                }
+
+            if (si.isFloating()) {
                 if (!isPinnedByCaller) {
                     continue;
                 }
             }
             final ShortcutInfo clone = si.clone(cloneFlag);
+
             // Fix up isPinned for the caller.  Note we need to do it before the "test" callback,
             // since it may check isPinned.
             if (!isPinnedByCaller) {
@@ -452,30 +574,140 @@
     }
 
     /**
-     * Called when the package is updated.  If there are shortcuts with resource icons, update
-     * their timestamps.
+     * Return the filenames (excluding path names) of icon bitmap files from this package.
      */
-    public void handlePackageUpdated(ShortcutService s, int newVersionCode) {
-        if (getPackageInfo().getVersionCode() >= newVersionCode) {
-            // Version hasn't changed; nothing to do.
-            return;
-        }
-        if (ShortcutService.DEBUG) {
-            Slog.d(TAG, String.format("Package %s updated, version %d -> %d", getPackageName(),
-                    getPackageInfo().getVersionCode(), newVersionCode));
-        }
+    public ArraySet<String> getUsedBitmapFiles() {
+        final ArraySet<String> usedFiles = new ArraySet<>(mShortcuts.size());
 
-        getPackageInfo().setVersionCode(newVersionCode);
-
-        boolean changed = false;
         for (int i = mShortcuts.size() - 1; i >= 0; i--) {
             final ShortcutInfo si = mShortcuts.valueAt(i);
-
-            if (si.hasIconResource()) {
-                changed = true;
-                si.setTimestamp(s.injectCurrentTimeMillis());
+            if (si.getBitmapPath() != null) {
+                usedFiles.add(getFileName(si.getBitmapPath()));
             }
         }
+        return usedFiles;
+    }
+
+    private static String getFileName(@NonNull String path) {
+        final int sep = path.lastIndexOf(File.separatorChar);
+        if (sep == -1) {
+            return path;
+        } else {
+            return path.substring(sep + 1);
+        }
+    }
+
+    /**
+     * Called when the package is updated or added.
+     *
+     * Add case:
+     * - Publish manifest shortcuts.
+     *
+     * Update case:
+     * - Re-publish manifest shortcuts.
+     * - If there are shortcuts with resources (icons or strings), update their timestamps.
+     *
+     * @return TRUE if any shortcuts have been changed.
+     */
+    public boolean handlePackageAddedOrUpdated(boolean isNewApp, boolean forceRescan) {
+        final PackageInfo pi = mShortcutUser.mService.getPackageInfo(
+                getPackageName(), getPackageUserId());
+        if (pi == null) {
+            return false; // Shouldn't happen.
+        }
+
+        if (!isNewApp && !forceRescan) {
+            // Make sure the version code or last update time has changed.
+            // Otherwise, nothing to do.
+            if (getPackageInfo().getVersionCode() >= pi.versionCode
+                    && getPackageInfo().getLastUpdateTime() >= pi.lastUpdateTime) {
+                return false;
+            }
+        }
+
+        // Now prepare to publish manifest shortcuts.
+        List<ShortcutInfo> newManifestShortcutList = null;
+        try {
+            newManifestShortcutList = ShortcutParser.parseShortcuts(mShortcutUser.mService,
+                    getPackageName(), getPackageUserId());
+        } catch (IOException|XmlPullParserException e) {
+            Slog.e(TAG, "Failed to load shortcuts from AndroidManifest.xml.", e);
+        }
+        final int manifestShortcutSize = newManifestShortcutList == null ? 0
+                : newManifestShortcutList.size();
+        if (ShortcutService.DEBUG) {
+            Slog.d(TAG, String.format("Package %s has %d manifest shortcut(s)",
+                    getPackageName(), manifestShortcutSize));
+        }
+        if (isNewApp && (manifestShortcutSize == 0)) {
+            // If it's a new app, and it doesn't have manifest shortcuts, then nothing to do.
+
+            // If it's an update, then it may already have manifest shortcuts, which need to be
+            // disabled.
+            return false;
+        }
+        if (ShortcutService.DEBUG) {
+            Slog.d(TAG, String.format("Package %s %s, version %d -> %d", getPackageName(),
+                    (isNewApp ? "added" : "updated"),
+                    getPackageInfo().getVersionCode(), pi.versionCode));
+        }
+
+        getPackageInfo().updateVersionInfo(pi);
+
+        final ShortcutService s = mShortcutUser.mService;
+
+        boolean changed = false;
+
+        // For existing shortcuts, update timestamps if they have any resources.
+        // Also check if shortcuts' activities are still main activities.  Otherwise, disable them.
+        if (!isNewApp) {
+            Resources publisherRes = null;
+
+            for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+                final ShortcutInfo si = mShortcuts.valueAt(i);
+
+                if (si.isDynamic()) {
+                    if (!s.injectIsMainActivity(si.getActivity(), getPackageUserId())) {
+                        Slog.w(TAG, String.format(
+                                "%s is no longer main activity. Disabling shorcut %s.",
+                                getPackageName(), si.getId()));
+                        if (disableDynamicWithId(si.getId())) {
+                            continue; // Actually removed.
+                        }
+                        // Still pinned, so fall-through and possibly update the resources.
+                    }
+                    changed = true;
+                }
+
+                if (si.hasAnyResources()) {
+                    if (!si.isOriginallyFromManifest()) {
+                        if (publisherRes == null) {
+                            publisherRes = getPackageResources();
+                            if (publisherRes == null) {
+                                break; // Resources couldn't be loaded.
+                            }
+                        }
+
+                        // If this shortcut is not from a manifest, then update all resource IDs
+                        // from resource names.  (We don't allow resource strings for
+                        // non-manifest at the moment, but icons can still be resources.)
+                        si.lookupAndFillInResourceIds(publisherRes);
+                    }
+                    changed = true;
+                    si.setTimestamp(s.injectCurrentTimeMillis());
+                }
+            }
+        }
+
+        // (Re-)publish manifest shortcut.
+        changed |= publishManifestShortcuts(newManifestShortcutList);
+
+        if (newManifestShortcutList != null) {
+            changed |= pushOutExcessShortcuts();
+        }
+
+        s.verifyStates();
+
         if (changed) {
             // This will send a notification to the launcher, and also save .
             s.packageShortcutsChanged(getPackageName(), getPackageUserId());
@@ -483,9 +715,387 @@
             // Still save the version code.
             s.scheduleSaveUser(getPackageUserId());
         }
+        return changed;
     }
 
-    public void dump(@NonNull ShortcutService s, @NonNull PrintWriter pw, @NonNull String prefix) {
+    private boolean publishManifestShortcuts(List<ShortcutInfo> newManifestShortcutList) {
+        if (ShortcutService.DEBUG) {
+            Slog.d(TAG, String.format(
+                    "Package %s: publishing manifest shortcuts", getPackageName()));
+        }
+        boolean changed = false;
+
+        // Keep the previous IDs.
+        ArraySet<String> toDisableList = null;
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+
+            if (si.isManifestShortcut()) {
+                if (toDisableList == null) {
+                    toDisableList = new ArraySet<>();
+                }
+                toDisableList.add(si.getId());
+            }
+        }
+
+        // Publish new ones.
+        if (newManifestShortcutList != null) {
+            final int newListSize = newManifestShortcutList.size();
+
+            for (int i = 0; i < newListSize; i++) {
+                changed = true;
+
+                final ShortcutInfo newShortcut = newManifestShortcutList.get(i);
+                final boolean newDisabled = !newShortcut.isEnabled();
+
+                final String id = newShortcut.getId();
+                final ShortcutInfo oldShortcut = mShortcuts.get(id);
+
+                boolean wasPinned = false;
+
+                if (oldShortcut != null) {
+                    if (!oldShortcut.isOriginallyFromManifest()) {
+                        Slog.e(TAG, "Shortcut with ID=" + newShortcut.getId()
+                                + " exists but is not from AndroidManifest.xml, not updating.");
+                        continue;
+                    }
+                    // Take over the pinned flag.
+                    if (oldShortcut.isPinned()) {
+                        wasPinned = true;
+                        newShortcut.addFlags(ShortcutInfo.FLAG_PINNED);
+                    }
+                }
+                if (newDisabled && !wasPinned) {
+                    // If the shortcut is disabled, and it was *not* pinned, then this
+                    // just doesn't have to be published.
+                    // Just keep it in toDisableList, so the previous one would be removed.
+                    continue;
+                }
+
+                // Note even if enabled=false, we still need to update all fields, so do it
+                // regardless.
+                addShortcutInner(newShortcut); // This will clean up the old one too.
+
+                if (!newDisabled && toDisableList != null) {
+                    // Still alive, don't remove.
+                    toDisableList.remove(id);
+                }
+            }
+        }
+
+        // Disable the previous manifest shortcuts that are no longer in the manifest.
+        if (toDisableList != null) {
+            if (ShortcutService.DEBUG) {
+                Slog.d(TAG, String.format(
+                        "Package %s: disabling %d stale shortcuts", getPackageName(),
+                        toDisableList.size()));
+            }
+            for (int i = toDisableList.size() - 1; i >= 0; i--) {
+                changed = true;
+
+                final String id = toDisableList.valueAt(i);
+
+                disableWithId(id, /* disable message =*/ null, /* disable message resid */ 0,
+                        /* overrideImmutable=*/ true);
+            }
+            removeOrphans();
+        }
+        adjustRanks();
+        return changed;
+    }
+
+    /**
+     * For each target activity, make sure # of dynamic + manifest shortcuts <= max.
+     * If too many, we'll remove the dynamic with the lowest ranks.
+     */
+    private boolean pushOutExcessShortcuts() {
+        final ShortcutService service = mShortcutUser.mService;
+        final int maxShortcuts = service.getMaxActivityShortcuts();
+
+        boolean changed = false;
+
+        final ArrayMap<ComponentName, ArrayList<ShortcutInfo>> all =
+                sortShortcutsToActivities();
+        for (int outer = all.size() - 1; outer >= 0; outer--) {
+            final ArrayList<ShortcutInfo> list = all.valueAt(outer);
+            if (list.size() <= maxShortcuts) {
+                continue;
+            }
+            // Sort by isManifestShortcut() and getRank().
+            Collections.sort(list, mShortcutTypeAndRankComparator);
+
+            // Keep [0 .. max), and remove (as dynamic) [max .. size)
+            for (int inner = list.size() - 1; inner >= maxShortcuts; inner--) {
+                final ShortcutInfo shortcut = list.get(inner);
+
+                if (shortcut.isManifestShortcut()) {
+                    // This shouldn't happen -- excess shortcuts should all be non-manifest.
+                    // But just in case.
+                    service.wtf("Found manifest shortcuts in excess list.");
+                    continue;
+                }
+                deleteDynamicWithId(shortcut.getId());
+            }
+        }
+
+        return changed;
+    }
+
+    /**
+     * To sort by isManifestShortcut() and getRank(). i.e.  manifest shortcuts come before
+     * non-manifest shortcuts, then sort by rank.
+     *
+     * This is used to decide which dynamic shortcuts to remove when an upgraded version has more
+     * manifest shortcuts than before and as a result we need to remove some of the dynamic
+     * shortcuts.  We sort manifest + dynamic shortcuts by this order, and remove the ones with
+     * the last ones.
+     *
+     * (Note the number of manifest shortcuts is always <= the max number, because if there are
+     * more, ShortcutParser would ignore the rest.)
+     */
+    final Comparator<ShortcutInfo> mShortcutTypeAndRankComparator = (ShortcutInfo a,
+            ShortcutInfo b) -> {
+        if (a.isManifestShortcut() && !b.isManifestShortcut()) {
+            return -1;
+        }
+        if (!a.isManifestShortcut() && b.isManifestShortcut()) {
+            return 1;
+        }
+        return Integer.compare(a.getRank(), b.getRank());
+    };
+
+    /**
+     * Build a list of shortcuts for each target activity and return as a map. The result won't
+     * contain "floating" shortcuts because they don't belong on any activities.
+     */
+    private ArrayMap<ComponentName, ArrayList<ShortcutInfo>> sortShortcutsToActivities() {
+        final ArrayMap<ComponentName, ArrayList<ShortcutInfo>> activitiesToShortcuts
+                = new ArrayMap<>();
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+            if (si.isFloating()) {
+                continue; // Ignore floating shortcuts, which are not tied to any activities.
+            }
+
+            final ComponentName activity = si.getActivity();
+
+            ArrayList<ShortcutInfo> list = activitiesToShortcuts.get(activity);
+            if (list == null) {
+                list = new ArrayList<>();
+                activitiesToShortcuts.put(activity, list);
+            }
+            list.add(si);
+        }
+        return activitiesToShortcuts;
+    }
+
+    /** Used by {@link #enforceShortcutCountsBeforeOperation} */
+    private void incrementCountForActivity(ArrayMap<ComponentName, Integer> counts,
+            ComponentName cn, int increment) {
+        Integer oldValue = counts.get(cn);
+        if (oldValue == null) {
+            oldValue = 0;
+        }
+
+        counts.put(cn, oldValue + increment);
+    }
+
+    /**
+     * Called by
+     * {@link android.content.pm.ShortcutManager#setDynamicShortcuts},
+     * {@link android.content.pm.ShortcutManager#addDynamicShortcuts}, and
+     * {@link android.content.pm.ShortcutManager#updateShortcuts} before actually performing
+     * the operation to make sure the operation wouldn't result in the target activities having
+     * more than the allowed number of dynamic/manifest shortcuts.
+     *
+     * @param newList shortcut list passed to set, add or updateShortcuts().
+     * @param operation add, set or update.
+     * @throws IllegalArgumentException if the operation would result in going over the max
+     *                                  shortcut count for any activity.
+     */
+    public void enforceShortcutCountsBeforeOperation(List<ShortcutInfo> newList,
+            @ShortcutOperation int operation) {
+        final ShortcutService service = mShortcutUser.mService;
+
+        // Current # of dynamic / manifest shortcuts for each activity.
+        // (If it's for update, then don't count dynamic shortcuts, since they'll be replaced
+        // anyway.)
+        final ArrayMap<ComponentName, Integer> counts = new ArrayMap<>(4);
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo shortcut = mShortcuts.valueAt(i);
+
+            if (shortcut.isManifestShortcut()) {
+                incrementCountForActivity(counts, shortcut.getActivity(), 1);
+            } else if (shortcut.isDynamic() && (operation != ShortcutService.OPERATION_SET)) {
+                incrementCountForActivity(counts, shortcut.getActivity(), 1);
+            }
+        }
+
+        for (int i = newList.size() - 1; i >= 0; i--) {
+            final ShortcutInfo newShortcut = newList.get(i);
+            final ComponentName newActivity = newShortcut.getActivity();
+            if (newActivity == null) {
+                if (operation != ShortcutService.OPERATION_UPDATE) {
+                    service.wtf("Activity must not be null at this point");
+                    continue; // Just ignore this invalid case.
+                }
+                continue; // Activity can be null for update.
+            }
+
+            final ShortcutInfo original = mShortcuts.get(newShortcut.getId());
+            if (original == null) {
+                if (operation == ShortcutService.OPERATION_UPDATE) {
+                    continue; // When updating, ignore if there's no target.
+                }
+                // Add() or set(), and there's no existing shortcut with the same ID.  We're
+                // simply publishing (as opposed to updating) this shortcut, so just +1.
+                incrementCountForActivity(counts, newActivity, 1);
+                continue;
+            }
+            if (original.isFloating() && (operation == ShortcutService.OPERATION_UPDATE)) {
+                // Updating floating shortcuts doesn't affect the count, so ignore.
+                continue;
+            }
+
+            // If it's add() or update(), then need to decrement for the previous activity.
+            // Skip it for set() since it's already been taken care of by not counting the original
+            // dynamic shortcuts in the first loop.
+            if (operation != ShortcutService.OPERATION_SET) {
+                final ComponentName oldActivity = original.getActivity();
+                if (!original.isFloating()) {
+                    incrementCountForActivity(counts, oldActivity, -1);
+                }
+            }
+            incrementCountForActivity(counts, newActivity, 1);
+        }
+
+        // Then make sure none of the activities have more than the max number of shortcuts.
+        for (int i = counts.size() - 1; i >= 0; i--) {
+            service.enforceMaxActivityShortcuts(counts.valueAt(i));
+        }
+    }
+
+    /**
+     * For all the text fields, refresh the string values if they're from resources.
+     */
+    public void resolveResourceStrings() {
+        final ShortcutService s = mShortcutUser.mService;
+        boolean changed = false;
+
+        Resources publisherRes = null;
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+
+            if (si.hasStringResources()) {
+                changed = true;
+
+                if (publisherRes == null) {
+                    publisherRes = getPackageResources();
+                    if (publisherRes == null) {
+                        break; // Resources couldn't be loaded.
+                    }
+                }
+
+                si.resolveResourceStrings(publisherRes);
+                si.setTimestamp(s.injectCurrentTimeMillis());
+            }
+        }
+        if (changed) {
+            s.scheduleSaveUser(getPackageUserId());
+        }
+    }
+
+    /** Clears the implicit ranks for all shortcuts. */
+    public void clearAllImplicitRanks() {
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+            si.clearImplicitRankAndRankChangedFlag();
+        }
+    }
+
+    /**
+     * Used to sort shortcuts for rank auto-adjusting.
+     */
+    final Comparator<ShortcutInfo> mShortcutRankComparator = (ShortcutInfo a, ShortcutInfo b) -> {
+        // First, sort by rank.
+        int ret = Integer.compare(a.getRank(), b.getRank());
+        if (ret != 0) {
+            return ret;
+        }
+        // When ranks are tie, then prioritize the ones that have just been assigned new ranks.
+        // e.g. when there are 3 shortcuts, "s1" "s2" and "s3" with rank 0, 1, 2 respectively,
+        // adding a shortcut "s4" with rank 1 will "insert" it between "s1" and "s2", because
+        // "s2" and "s4" have the same rank 1 but s4 has isRankChanged() set.
+        // Similarly, updating s3's rank to 1 will insert it between s1 and s2.
+        if (a.isRankChanged() != b.isRankChanged()) {
+            return a.isRankChanged() ? -1 : 1;
+        }
+        // If they're still tie, sort by implicit rank -- i.e. preserve the order in which
+        // they're passed to the API.
+        ret = Integer.compare(a.getImplicitRank(), b.getImplicitRank());
+        if (ret != 0) {
+            return ret;
+        }
+        // If they're stil tie, just sort by their IDs.
+        // This may happen with updateShortcuts() -- see
+        // the testUpdateShortcuts_noManifestShortcuts() test.
+        return a.getId().compareTo(b.getId());
+    };
+
+    /**
+     * Re-calculate the ranks for all shortcuts.
+     */
+    public void adjustRanks() {
+        final ShortcutService s = mShortcutUser.mService;
+        final long now = s.injectCurrentTimeMillis();
+
+        // First, clear ranks for floating shortcuts.
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+            if (si.isFloating()) {
+                if (si.getRank() != 0) {
+                    si.setTimestamp(now);
+                    si.setRank(0);
+                }
+            }
+        }
+
+        // Then adjust ranks.  Ranks are unique for each activity, so we first need to sort
+        // shortcuts to each activity.
+        // Then sort the shortcuts within each activity with mShortcutRankComparator, and
+        // assign ranks from 0.
+        final ArrayMap<ComponentName, ArrayList<ShortcutInfo>> all =
+                sortShortcutsToActivities();
+        for (int outer = all.size() - 1; outer >= 0; outer--) { // For each activity.
+            final ArrayList<ShortcutInfo> list = all.valueAt(outer);
+
+            // Sort by ranks and other signals.
+            Collections.sort(list, mShortcutRankComparator);
+
+            int rank = 0;
+
+            final int size = list.size();
+            for (int i = 0; i < size; i++) {
+                final ShortcutInfo si = list.get(i);
+                if (si.isManifestShortcut()) {
+                    // Don't adjust ranks for manifest shortcuts.
+                    continue;
+                }
+                // At this point, it must be dynamic.
+                if (!si.isDynamic()) {
+                    s.wtf("Non-dynamic shortcut found.");
+                    continue;
+                }
+                final int thisRank = rank++;
+                if (si.getRank() != thisRank) {
+                    si.setTimestamp(now);
+                    si.setRank(thisRank);
+                }
+            }
+        }
+    }
+
+    public void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
         pw.println();
 
         pw.print(prefix);
@@ -498,7 +1108,7 @@
         pw.print(prefix);
         pw.print("  ");
         pw.print("Calls: ");
-        pw.print(getApiCallCount(s));
+        pw.print(getApiCallCount());
         pw.println();
 
         // getApiCallCount() may have updated mLastKnownForegroundElapsedTime.
@@ -514,10 +1124,10 @@
         pw.print("Last reset: [");
         pw.print(mLastResetTime);
         pw.print("] ");
-        pw.print(s.formatTime(mLastResetTime));
+        pw.print(ShortcutService.formatTime(mLastResetTime));
         pw.println();
 
-        getPackageInfo().dump(s, pw, prefix + "  ");
+        getPackageInfo().dump(pw, prefix + "  ");
         pw.println();
 
         pw.print(prefix);
@@ -545,7 +1155,7 @@
         pw.print("Total bitmap size: ");
         pw.print(totalBitmapSize);
         pw.print(" (");
-        pw.print(Formatter.formatFileSize(s.mContext, totalBitmapSize));
+        pw.print(Formatter.formatFileSize(mShortcutUser.mService.mContext, totalBitmapSize));
         pw.println(")");
     }
 
@@ -561,7 +1171,6 @@
         out.startTag(null, TAG_ROOT);
 
         ShortcutService.writeAttr(out, ATTR_NAME, getPackageName());
-        ShortcutService.writeAttr(out, ATTR_DYNAMIC_COUNT, mDynamicShortcutCount);
         ShortcutService.writeAttr(out, ATTR_CALL_COUNT, mApiCallCount);
         ShortcutService.writeAttr(out, ATTR_LAST_RESET, mLastResetTime);
         getPackageInfo().saveToXml(out);
@@ -583,12 +1192,20 @@
         out.startTag(null, TAG_SHORTCUT);
         ShortcutService.writeAttr(out, ATTR_ID, si.getId());
         // writeAttr(out, "package", si.getPackageName()); // not needed
-        ShortcutService.writeAttr(out, ATTR_ACTIVITY, si.getActivityComponent());
+        ShortcutService.writeAttr(out, ATTR_ACTIVITY, si.getActivity());
         // writeAttr(out, "icon", si.getIcon());  // We don't save it.
         ShortcutService.writeAttr(out, ATTR_TITLE, si.getTitle());
+        ShortcutService.writeAttr(out, ATTR_TITLE_RES_ID, si.getTitleResId());
+        ShortcutService.writeAttr(out, ATTR_TITLE_RES_NAME, si.getTitleResName());
         ShortcutService.writeAttr(out, ATTR_TEXT, si.getText());
+        ShortcutService.writeAttr(out, ATTR_TEXT_RES_ID, si.getTextResId());
+        ShortcutService.writeAttr(out, ATTR_TEXT_RES_NAME, si.getTextResName());
+        ShortcutService.writeAttr(out, ATTR_DISABLED_MESSAGE, si.getDisabledMessage());
+        ShortcutService.writeAttr(out, ATTR_DISABLED_MESSAGE_RES_ID,
+                si.getDisabledMessageResourceId());
+        ShortcutService.writeAttr(out, ATTR_DISABLED_MESSAGE_RES_NAME,
+                si.getDisabledMessageResName());
         ShortcutService.writeAttr(out, ATTR_INTENT, si.getIntentNoExtras());
-        ShortcutService.writeAttr(out, ATTR_WEIGHT, si.getWeight());
         ShortcutService.writeAttr(out, ATTR_TIMESTAMP,
                 si.getLastChangedTimestamp());
         if (forBackup) {
@@ -598,8 +1215,13 @@
                             ~(ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_HAS_ICON_RES
                             | ShortcutInfo.FLAG_DYNAMIC));
         } else {
+            // When writing for backup, ranks shouldn't be saved, since shortcuts won't be restored
+            // as dynamic.
+            ShortcutService.writeAttr(out, ATTR_RANK, si.getRank());
+
             ShortcutService.writeAttr(out, ATTR_FLAGS, si.getFlags());
-            ShortcutService.writeAttr(out, ATTR_ICON_RES, si.getIconResourceId());
+            ShortcutService.writeAttr(out, ATTR_ICON_RES_ID, si.getIconResourceId());
+            ShortcutService.writeAttr(out, ATTR_ICON_RES_NAME, si.getIconResName());
             ShortcutService.writeAttr(out, ATTR_BITMAP_PATH, si.getBitmapPath());
         }
 
@@ -627,11 +1249,9 @@
         final String packageName = ShortcutService.parseStringAttribute(parser,
                 ATTR_NAME);
 
-        final ShortcutPackage ret = new ShortcutPackage(s, shortcutUser,
+        final ShortcutPackage ret = new ShortcutPackage(shortcutUser,
                 shortcutUser.getUserId(), packageName);
 
-        ret.mDynamicShortcutCount =
-                ShortcutService.parseIntAttribute(parser, ATTR_DYNAMIC_COUNT);
         ret.mApiCallCount =
                 ShortcutService.parseIntAttribute(parser, ATTR_CALL_COUNT);
         ret.mLastResetTime =
@@ -671,14 +1291,22 @@
         ComponentName activityComponent;
         // Icon icon;
         String title;
+        int titleResId;
+        String titleResName;
         String text;
+        int textResId;
+        String textResName;
+        String disabledMessage;
+        int disabledMessageResId;
+        String disabledMessageResName;
         Intent intent;
         PersistableBundle intentPersistableExtras = null;
-        int weight;
+        int rank;
         PersistableBundle extras = null;
         long lastChangedTimestamp;
         int flags;
-        int iconRes;
+        int iconResId;
+        String iconResName;
         String bitmapPath;
         ArraySet<String> categories = null;
 
@@ -686,12 +1314,22 @@
         activityComponent = ShortcutService.parseComponentNameAttribute(parser,
                 ATTR_ACTIVITY);
         title = ShortcutService.parseStringAttribute(parser, ATTR_TITLE);
+        titleResId = ShortcutService.parseIntAttribute(parser, ATTR_TITLE_RES_ID);
+        titleResName = ShortcutService.parseStringAttribute(parser, ATTR_TITLE_RES_NAME);
         text = ShortcutService.parseStringAttribute(parser, ATTR_TEXT);
+        textResId = ShortcutService.parseIntAttribute(parser, ATTR_TEXT_RES_ID);
+        textResName = ShortcutService.parseStringAttribute(parser, ATTR_TEXT_RES_NAME);
+        disabledMessage = ShortcutService.parseStringAttribute(parser, ATTR_DISABLED_MESSAGE);
+        disabledMessageResId = ShortcutService.parseIntAttribute(parser,
+                ATTR_DISABLED_MESSAGE_RES_ID);
+        disabledMessageResName = ShortcutService.parseStringAttribute(parser,
+                ATTR_DISABLED_MESSAGE_RES_NAME);
         intent = ShortcutService.parseIntentAttribute(parser, ATTR_INTENT);
-        weight = (int) ShortcutService.parseLongAttribute(parser, ATTR_WEIGHT);
+        rank = (int) ShortcutService.parseLongAttribute(parser, ATTR_RANK);
         lastChangedTimestamp = ShortcutService.parseLongAttribute(parser, ATTR_TIMESTAMP);
         flags = (int) ShortcutService.parseLongAttribute(parser, ATTR_FLAGS);
-        iconRes = (int) ShortcutService.parseLongAttribute(parser, ATTR_ICON_RES);
+        iconResId = (int) ShortcutService.parseLongAttribute(parser, ATTR_ICON_RES_ID);
+        iconResName = ShortcutService.parseStringAttribute(parser, ATTR_ICON_RES_NAME);
         bitmapPath = ShortcutService.parseStringAttribute(parser, ATTR_BITMAP_PATH);
 
         final int outerDepth = parser.getDepth();
@@ -733,14 +1371,107 @@
         }
 
         return new ShortcutInfo(
-                userId, id, packageName, activityComponent, /* icon =*/ null, title, text,
+                userId, id, packageName, activityComponent, /* icon =*/ null,
+                title, titleResId, titleResName, text, textResId, textResName,
+                disabledMessage, disabledMessageResId, disabledMessageResName,
                 categories, intent,
-                intentPersistableExtras, weight, extras, lastChangedTimestamp, flags,
-                iconRes, bitmapPath);
+                intentPersistableExtras, rank, extras, lastChangedTimestamp, flags,
+                iconResId, iconResName, bitmapPath);
     }
 
     @VisibleForTesting
     List<ShortcutInfo> getAllShortcutsForTest() {
         return new ArrayList<>(mShortcuts.values());
     }
+
+    @Override
+    public void verifyStates() {
+        super.verifyStates();
+
+        boolean failed = false;
+
+        final ArrayMap<ComponentName, ArrayList<ShortcutInfo>> all =
+                sortShortcutsToActivities();
+
+        // Make sure each activity won't have more than max shortcuts.
+        for (int outer = all.size() - 1; outer >= 0; outer--) {
+            final ArrayList<ShortcutInfo> list = all.valueAt(outer);
+            if (list.size() > mShortcutUser.mService.getMaxActivityShortcuts()) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": activity " + all.keyAt(outer)
+                        + " has " + all.valueAt(outer).size() + " shortcuts.");
+            }
+
+            // Sort by rank.
+            Collections.sort(list, (a, b) -> Integer.compare(a.getRank(), b.getRank()));
+
+            // Split into two arrays for each kind.
+            final ArrayList<ShortcutInfo> dynamicList = new ArrayList<>(list);
+            dynamicList.removeIf((si) -> !si.isDynamic());
+
+            final ArrayList<ShortcutInfo> manifestList = new ArrayList<>(list);
+            dynamicList.removeIf((si) -> !si.isManifestShortcut());
+
+            verifyRanksSequential(dynamicList);
+            verifyRanksSequential(manifestList);
+        }
+
+        // Verify each shortcut's status.
+        for (int i = mShortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = mShortcuts.valueAt(i);
+            if (!(si.isDeclaredInManifest() || si.isDynamic() || si.isPinned())) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " is not manifest, dynamic or pinned.");
+            }
+            if (si.isDeclaredInManifest() && si.isDynamic()) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " is both dynamic and manifest at the same time.");
+            }
+            if (si.getActivity() == null) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " has null activity.");
+            }
+            if ((si.isDynamic() || si.isManifestShortcut()) && !si.isEnabled()) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " is not floating, but is disabled.");
+            }
+            if (si.isFloating() && si.getRank() != 0) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " is floating, but has rank=" + si.getRank());
+            }
+            if (si.getIcon() != null) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " still has an icon");
+            }
+            if (si.hasIconFile() && si.hasIconResource()) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " has both resource and bitmap icons");
+            }
+        }
+
+        if (failed) {
+            throw new IllegalStateException("See logcat for errors");
+        }
+    }
+
+    private boolean verifyRanksSequential(List<ShortcutInfo> list) {
+        boolean failed = false;
+
+        for (int i = 0; i < list.size(); i++) {
+            final ShortcutInfo si = list.get(i);
+            if (si.getRank() != i) {
+                failed = true;
+                Log.e(TAG_VERIFY, "Package " + getPackageName() + ": shortcut " + si.getId()
+                        + " rank=" + si.getRank() + " but expected to be "+ i);
+            }
+        }
+        return failed;
+    }
 }
diff --git a/services/core/java/com/android/server/pm/ShortcutPackageInfo.java b/services/core/java/com/android/server/pm/ShortcutPackageInfo.java
index 74969f0..7f5d931 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackageInfo.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackageInfo.java
@@ -15,6 +15,7 @@
  */
 package com.android.server.pm;
 
+import android.annotation.NonNull;
 import android.annotation.UserIdInt;
 import android.content.pm.PackageInfo;
 import android.util.Slog;
@@ -34,12 +35,15 @@
 
 /**
  * Package information used by {@link android.content.pm.ShortcutManager} for backup / restore.
+ *
+ * All methods should be guarded by {@code ShortcutService.mLock}.
  */
 class ShortcutPackageInfo {
     private static final String TAG = ShortcutService.TAG;
 
     static final String TAG_ROOT = "package-info";
     private static final String ATTR_VERSION = "version";
+    private static final String ATTR_LAST_UPDATE_TIME = "last_udpate_time";
     private static final String ATTR_SHADOW = "shadow";
 
     private static final String TAG_SIGNATURE = "signature";
@@ -53,16 +57,20 @@
      */
     private boolean mIsShadow;
     private int mVersionCode = VERSION_UNKNOWN;
+    private long mLastUpdateTime;
     private ArrayList<byte[]> mSigHashes;
 
-    private ShortcutPackageInfo(int versionCode, ArrayList<byte[]> sigHashes, boolean isShadow) {
+    private ShortcutPackageInfo(int versionCode, long lastUpdateTime,
+            ArrayList<byte[]> sigHashes, boolean isShadow) {
         mVersionCode = versionCode;
+        mLastUpdateTime = lastUpdateTime;
         mIsShadow = isShadow;
         mSigHashes = sigHashes;
     }
 
     public static ShortcutPackageInfo newEmpty() {
-        return new ShortcutPackageInfo(VERSION_UNKNOWN, new ArrayList<>(0), /* isShadow */ false);
+        return new ShortcutPackageInfo(VERSION_UNKNOWN, /* last update time =*/ 0,
+                new ArrayList<>(0), /* isShadow */ false);
     }
 
     public boolean isShadow() {
@@ -77,8 +85,15 @@
         return mVersionCode;
     }
 
-    public void setVersionCode(int versionCode) {
-        mVersionCode = versionCode;
+    public long getLastUpdateTime() {
+        return mLastUpdateTime;
+    }
+
+    public void updateVersionInfo(@NonNull PackageInfo pi) {
+        if (pi != null) {
+            mVersionCode = pi.versionCode;
+            mLastUpdateTime = pi.lastUpdateTime;
+        }
     }
 
     public boolean hasSignatures() {
@@ -111,7 +126,7 @@
             Slog.e(TAG, "Can't get signatures: package=" + packageName);
             return null;
         }
-        final ShortcutPackageInfo ret = new ShortcutPackageInfo(pi.versionCode,
+        final ShortcutPackageInfo ret = new ShortcutPackageInfo(pi.versionCode, pi.lastUpdateTime,
                 BackupUtils.hashSignatureArray(pi.signatures), /* shadow=*/ false);
 
         return ret;
@@ -131,6 +146,7 @@
             return;
         }
         mVersionCode = pi.versionCode;
+        mLastUpdateTime = pi.lastUpdateTime;
         mSigHashes = BackupUtils.hashSignatureArray(pi.signatures);
     }
 
@@ -139,6 +155,7 @@
         out.startTag(null, TAG_ROOT);
 
         ShortcutService.writeAttr(out, ATTR_VERSION, mVersionCode);
+        ShortcutService.writeAttr(out, ATTR_LAST_UPDATE_TIME, mLastUpdateTime);
         ShortcutService.writeAttr(out, ATTR_SHADOW, mIsShadow);
 
         for (int i = 0; i < mSigHashes.size(); i++) {
@@ -154,6 +171,9 @@
 
         final int versionCode = ShortcutService.parseIntAttribute(parser, ATTR_VERSION);
 
+        final long lastUpdateTime = ShortcutService.parseIntAttribute(
+                parser, ATTR_LAST_UPDATE_TIME);
+
         // When restoring from backup, it's always shadow.
         final boolean shadow =
                 fromBackup || ShortcutService.parseBooleanAttribute(parser, ATTR_SHADOW);
@@ -185,11 +205,12 @@
 
         // Successfully loaded; replace the feilds.
         mVersionCode = versionCode;
+        mLastUpdateTime = lastUpdateTime;
         mIsShadow = shadow;
         mSigHashes = hashes;
     }
 
-    public void dump(ShortcutService s, PrintWriter pw, String prefix) {
+    public void dump(PrintWriter pw, String prefix) {
         pw.println();
 
         pw.print(prefix);
@@ -205,6 +226,11 @@
         pw.print(mVersionCode);
         pw.println();
 
+        pw.print(prefix);
+        pw.print("  Last package update time: ");
+        pw.print(mLastUpdateTime);
+        pw.println();
+
         for (int i = 0; i < mSigHashes.size(); i++) {
             pw.print(prefix);
             pw.print("    ");
diff --git a/services/core/java/com/android/server/pm/ShortcutPackageItem.java b/services/core/java/com/android/server/pm/ShortcutPackageItem.java
index 6fbdb82..757dd19 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackageItem.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackageItem.java
@@ -26,6 +26,9 @@
 
 import java.io.IOException;
 
+/**
+ * All methods should be guarded by {@code #mShortcutUser.mService.mLock}.
+ */
 abstract class ShortcutPackageItem {
     private static final String TAG = ShortcutService.TAG;
 
@@ -69,18 +72,20 @@
         return mPackageInfo;
     }
 
-    public void refreshPackageInfoAndSave(ShortcutService s) {
+    public void refreshPackageInfoAndSave() {
         if (mPackageInfo.isShadow()) {
             return; // Don't refresh for shadow user.
         }
+        final ShortcutService s = mShortcutUser.mService;
         mPackageInfo.refresh(s, this);
         s.scheduleSaveUser(getOwnerUserId());
     }
 
-    public void attemptToRestoreIfNeededAndSave(ShortcutService s) {
+    public void attemptToRestoreIfNeededAndSave() {
         if (!mPackageInfo.isShadow()) {
             return; // Already installed, nothing to do.
         }
+        final ShortcutService s = mShortcutUser.mService;
         if (!s.isPackageInstalled(mPackageName, mPackageUserId)) {
             if (ShortcutService.DEBUG) {
                 Slog.d(TAG, String.format("Package still not installed: %s user=%d",
@@ -91,14 +96,14 @@
         if (!mPackageInfo.hasSignatures()) {
             s.wtf("Attempted to restore package " + mPackageName + ", user=" + mPackageUserId
                     + " but signatures not found in the restore data.");
-            onRestoreBlocked(s);
+            onRestoreBlocked();
             return;
         }
 
         final PackageInfo pi = s.getPackageInfoWithSignatures(mPackageName, mPackageUserId);
         if (!mPackageInfo.canRestoreTo(s, pi)) {
             // Package is now installed, but can't restore.  Let the subclass do the cleanup.
-            onRestoreBlocked(s);
+            onRestoreBlocked();
             return;
         }
         if (ShortcutService.DEBUG) {
@@ -106,7 +111,7 @@
                     mPackageUserId, getOwnerUserId()));
         }
 
-        onRestored(s);
+        onRestored();
 
         // Now the package is not shadow.
         mPackageInfo.setShadow(false);
@@ -118,13 +123,19 @@
      * Called when the new package can't be restored because it has a lower version number
      * or different signatures.
      */
-    protected abstract void onRestoreBlocked(ShortcutService s);
+    protected abstract void onRestoreBlocked();
 
     /**
      * Called when the new package is successfully restored.
      */
-    protected abstract void onRestored(ShortcutService s);
+    protected abstract void onRestored();
 
     public abstract void saveToXml(@NonNull XmlSerializer out, boolean forBackup)
             throws IOException, XmlPullParserException;
+
+    /**
+     * Verify various internal states.
+     */
+    public void verifyStates() {
+    }
 }
diff --git a/services/core/java/com/android/server/pm/ShortcutParser.java b/services/core/java/com/android/server/pm/ShortcutParser.java
new file mode 100644
index 0000000..0762c0b
--- /dev/null
+++ b/services/core/java/com/android/server/pm/ShortcutParser.java
@@ -0,0 +1,347 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import android.annotation.Nullable;
+import android.annotation.UserIdInt;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ShortcutInfo;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.text.TextUtils;
+import android.util.ArraySet;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.Slog;
+import android.util.Xml;
+
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+public class ShortcutParser {
+    private static final String TAG = ShortcutService.TAG;
+
+    private static final boolean DEBUG = ShortcutService.DEBUG || false; // DO NOT SUBMIT WITH TRUE
+
+    @VisibleForTesting
+    static final String METADATA_KEY = "android.app.shortcuts";
+
+    private static final String TAG_SHORTCUTS = "shortcuts";
+    private static final String TAG_SHORTCUT = "shortcut";
+    private static final String TAG_INTENT = "intent";
+    private static final String TAG_CATEGORIES = "categories";
+
+    @Nullable
+    public static List<ShortcutInfo> parseShortcuts(ShortcutService service,
+            String packageName, @UserIdInt int userId) throws IOException, XmlPullParserException {
+        if (ShortcutService.DEBUG) {
+            Slog.d(TAG, String.format("Scanning package %s for manifest shortcuts on user %d",
+                    packageName, userId));
+        }
+        final List<ResolveInfo> activities = service.injectGetMainActivities(packageName, userId);
+        if (activities == null || activities.size() == 0) {
+            return null;
+        }
+
+        List<ShortcutInfo> result = null;
+
+        try {
+            final int size = activities.size();
+            for (int i = 0; i < size; i++) {
+                final ActivityInfo activityInfoNoMetadata = activities.get(i).activityInfo;
+                if (activityInfoNoMetadata == null) {
+                    continue;
+                }
+
+                final ActivityInfo activityInfoWithMetadata =
+                        service.getActivityInfoWithMetadata(
+                        activityInfoNoMetadata.getComponentName(), userId);
+                if (activityInfoWithMetadata != null) {
+                    result = parseShortcutsOneFile(
+                            service, activityInfoWithMetadata, packageName, userId, result);
+                }
+            }
+        } catch (RuntimeException e) {
+            // Resource ID mismatch may cause various runtime exceptions when parsing XMLs,
+            // But we don't crash the device, so just swallow them.
+            service.wtf(
+                    "Exception caught while parsing shortcut XML for package=" + packageName, e);
+            return null;
+        }
+        return result;
+    }
+
+    private static List<ShortcutInfo> parseShortcutsOneFile(
+            ShortcutService service,
+            ActivityInfo activityInfo, String packageName, @UserIdInt int userId,
+            List<ShortcutInfo> result) throws IOException, XmlPullParserException {
+        if (ShortcutService.DEBUG) {
+            Slog.d(TAG, String.format(
+                    "Checking main activity %s", activityInfo.getComponentName()));
+        }
+
+        XmlResourceParser parser = null;
+        try {
+            parser = service.injectXmlMetaData(activityInfo, METADATA_KEY);
+            if (parser == null) {
+                return result;
+            }
+
+            final ComponentName activity = new ComponentName(packageName, activityInfo.name);
+
+            final AttributeSet attrs = Xml.asAttributeSet(parser);
+
+            int type;
+
+            int rank = 0;
+            final int maxShortcuts = service.getMaxActivityShortcuts();
+            int numShortcuts = 0;
+
+            // We instantiate ShortcutInfo at <shortcut>, but we add it to the list at </shortcut>,
+            // after parsing <intent>.  We keep the current one in here.
+            ShortcutInfo currentShortcut = null;
+
+            Set<String> categories = null;
+
+            outer:
+            while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+                    && (type != XmlPullParser.END_TAG || parser.getDepth() > 0)) {
+                final int depth = parser.getDepth();
+                final String tag = parser.getName();
+
+                // When a shortcut tag is closing, publish.
+                if ((type == XmlPullParser.END_TAG) && (depth == 2) && (TAG_SHORTCUT.equals(tag))) {
+                    if (currentShortcut == null) {
+                        // Shortcut was invalid.
+                        continue;
+                    }
+                    final ShortcutInfo si = currentShortcut;
+                    currentShortcut = null; // Make sure to null out for the next iteration.
+
+                    if (si.getIntent() == null) {
+                        Log.e(TAG, "Shortcut " + si.getId() + " has no intent. Skipping it.");
+                        continue;
+                    }
+
+                    if (numShortcuts >= maxShortcuts) {
+                        Log.e(TAG, "More than " + maxShortcuts + " shortcuts found for "
+                                + activityInfo.getComponentName() + ". Skipping the rest.");
+                        return result;
+                    }
+                    if (categories != null) {
+                        si.setCategories(categories);
+                        categories = null;
+                    }
+
+                    if (result == null) {
+                        result = new ArrayList<>();
+                    }
+                    result.add(si);
+                    numShortcuts++;
+                    rank++;
+                    if (ShortcutService.DEBUG) {
+                        Slog.d(TAG, "Shortcut added: " + si.toInsecureString());
+                    }
+                    continue;
+                }
+
+                // Otherwise, just look at start tags.
+                if (type != XmlPullParser.START_TAG) {
+                    continue;
+                }
+
+                if (depth == 1 && TAG_SHORTCUTS.equals(tag)) {
+                    continue; // Root tag.
+                }
+                if (depth == 2 && TAG_SHORTCUT.equals(tag)) {
+                    final ShortcutInfo si = parseShortcutAttributes(
+                            service, attrs, packageName, activity, userId, rank);
+                    if (si == null) {
+                        // Shortcut was invalid.
+                        continue;
+                    }
+                    if (ShortcutService.DEBUG) {
+                        Slog.d(TAG, "Shortcut found: " + si.toInsecureString());
+                    }
+                    if (result != null) {
+                        for (int i = result.size() - 1; i >= 0; i--) {
+                            if (si.getId().equals(result.get(i).getId())) {
+                                Log.e(TAG, "Duplicate shortcut ID detected. Skipping it.");
+                                continue outer;
+                            }
+                        }
+                    }
+                    if (!si.isEnabled()) {
+                        // Just set the default intent to disabled shortcuts.
+                        si.setIntent(new Intent(Intent.ACTION_VIEW));
+                    }
+                    currentShortcut = si;
+                    categories = null;
+                    continue;
+                }
+                if (depth == 3 && TAG_INTENT.equals(tag)) {
+                    if ((currentShortcut == null)
+                            || (currentShortcut.getIntentNoExtras() != null)
+                            || !currentShortcut.isEnabled()) {
+                        Log.e(TAG, "Ignoring excessive intent tag.");
+                        continue;
+                    }
+
+                    final Intent intent = Intent.parseIntent(service.mContext.getResources(),
+                            parser, attrs);
+                    if (TextUtils.isEmpty(intent.getAction())) {
+                        Log.e(TAG, "Shortcut intent action must be provided. activity=" + activity);
+                        continue;
+                    }
+                    try {
+                        currentShortcut.setIntent(intent);
+                    } catch (RuntimeException e) {
+                        // This shouldn't happen because intents in XML can't have complicated
+                        // extras, but just in case Intent.parseIntent() supports such a thing one
+                        // day.
+                        Log.e(TAG, "Shortcut's extras contain un-persistable values. Skipping it.");
+                        continue;
+                    }
+                    continue;
+                }
+                if (depth == 3 && TAG_CATEGORIES.equals(tag)) {
+                    if ((currentShortcut == null)
+                            || (currentShortcut.getCategories() != null)) {
+                        continue;
+                    }
+                    final String name = parseCategories(service, attrs);
+                    if (TextUtils.isEmpty(name)) {
+                        Log.e(TAG, "Empty category found. activity=" + activity);
+                        continue;
+                    }
+
+                    if (categories == null) {
+                        categories = new ArraySet<>();
+                    }
+                    categories.add(name);
+                    continue;
+                }
+
+                ShortcutService.warnForInvalidTag(depth, tag);
+            }
+        } finally {
+            if (parser != null) {
+                parser.close();
+            }
+        }
+        return result;
+    }
+
+    private static String parseCategories(ShortcutService service, AttributeSet attrs) {
+        final TypedArray sa = service.mContext.getResources().obtainAttributes(attrs,
+                R.styleable.ShortcutCategories);
+        try {
+            return sa.getString(R.styleable.ShortcutCategories_name);
+        } finally {
+            sa.recycle();
+        }
+    }
+
+    private static ShortcutInfo parseShortcutAttributes(ShortcutService service,
+            AttributeSet attrs, String packageName, ComponentName activity,
+            @UserIdInt int userId, int rank) {
+        final TypedArray sa = service.mContext.getResources().obtainAttributes(attrs,
+                R.styleable.Shortcut);
+        try {
+            final String id = sa.getString(R.styleable.Shortcut_shortcutId);
+            final boolean enabled = sa.getBoolean(R.styleable.Shortcut_enabled, true);
+            final int iconResId = sa.getResourceId(R.styleable.Shortcut_icon, 0);
+            final int titleResId = sa.getResourceId(R.styleable.Shortcut_shortcutShortLabel, 0);
+            final int textResId = sa.getResourceId(R.styleable.Shortcut_shortcutLongLabel, 0);
+            final int disabledMessageResId = sa.getResourceId(
+                    R.styleable.Shortcut_shortcutDisabledMessage, 0);
+
+            if (TextUtils.isEmpty(id)) {
+                Slog.w(TAG, "Shortcut ID must be provided. activity=" + activity);
+                return null;
+            }
+            if (titleResId == 0) {
+                Slog.w(TAG, "Shortcut title must be provided. activity=" + activity);
+                return null;
+            }
+
+            return createShortcutFromManifest(
+                    service,
+                    userId,
+                    id,
+                    packageName,
+                    activity,
+                    titleResId,
+                    textResId,
+                    disabledMessageResId,
+                    rank,
+                    iconResId,
+                    enabled);
+        } finally {
+            sa.recycle();
+        }
+    }
+
+    private static ShortcutInfo createShortcutFromManifest(ShortcutService service,
+            @UserIdInt int userId, String id, String packageName, ComponentName activityComponent,
+            int titleResId, int textResId, int disabledMessageResId,
+            int rank, int iconResId, boolean enabled) {
+
+        final int flags =
+                (enabled ? ShortcutInfo.FLAG_MANIFEST : ShortcutInfo.FLAG_DISABLED)
+                | ShortcutInfo.FLAG_IMMUTABLE
+                | ((iconResId != 0) ? ShortcutInfo.FLAG_HAS_ICON_RES : 0);
+
+        // Note we don't need to set resource names here yet.  They'll be set when they're about
+        // to be published.
+        return new ShortcutInfo(
+                userId,
+                id,
+                packageName,
+                activityComponent,
+                null, // icon
+                null, // title string
+                titleResId,
+                null, // title res name
+                null, // text string
+                textResId,
+                null, // text res name
+                null, // disabled message string
+                disabledMessageResId,
+                null, // disabled message res name
+                null, // categories
+                null, // intent
+                null, // intent extras
+                rank,
+                null, // extras
+                service.injectCurrentTimeMillis(),
+                flags,
+                iconResId,
+                null, // icon res name
+                null); // bitmap path
+    }
+}
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index 8268776..c6949e4 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -15,6 +15,7 @@
  */
 package com.android.server.pm;
 
+import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.UserIdInt;
@@ -22,9 +23,11 @@
 import android.app.ActivityManagerNative;
 import android.app.AppGlobals;
 import android.app.IUidObserver;
+import android.app.usage.UsageStatsManagerInternal;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
 import android.content.pm.IShortcutService;
@@ -32,12 +35,15 @@
 import android.content.pm.LauncherApps.ShortcutQuery;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.PackageManagerInternal;
 import android.content.pm.ParceledListSlice;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ShortcutInfo;
 import android.content.pm.ShortcutServiceInternal;
 import android.content.pm.ShortcutServiceInternal.ShortcutChangeListener;
+import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.CompressFormat;
 import android.graphics.Canvas;
@@ -54,6 +60,7 @@
 import android.os.RemoteException;
 import android.os.ResultReceiver;
 import android.os.SELinux;
+import android.os.ServiceManager;
 import android.os.ShellCommand;
 import android.os.SystemClock;
 import android.os.UserHandle;
@@ -63,18 +70,19 @@
 import android.util.ArraySet;
 import android.util.AtomicFile;
 import android.util.KeyValueListParser;
+import android.util.Log;
 import android.util.Slog;
 import android.util.SparseArray;
 import android.util.SparseIntArray;
 import android.util.SparseLongArray;
 import android.util.TypedValue;
 import android.util.Xml;
+import android.view.IWindowManager;
 
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.os.BackgroundThread;
-import com.android.internal.util.ArrayUtils;
 import com.android.internal.util.FastXmlSerializer;
 import com.android.internal.util.Preconditions;
 import com.android.server.LocalServices;
@@ -100,33 +108,36 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintWriter;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.net.URISyntaxException;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Consumer;
 import java.util.function.Predicate;
 
 /**
  * TODO:
+ * - Deal with the async nature of PACKAGE_ADD.  Basically when a publisher does anything after
+ *   it's upgraded, the manager should make sure the upgrade process has been executed.
+ *
+ * - getIconMaxWidth()/getIconMaxHeight() should use xdpi and ydpi.
+ *   -> But TypedValue.applyDimension() doesn't differentiate x and y..?
  *
  * - Default launcher check does take a few ms.  Worth caching.
  *
- * - Clear data -> remove all dynamic?  but not the pinned?
- *
- * - Scan and remove orphan bitmaps (just in case).
- *
  * - Detect when already registered instances are passed to APIs again, which might break
- *   internal bitmap handling.
+ * internal bitmap handling.
  *
  * - Add more call stats.
  */
 public class ShortcutService extends IShortcutService.Stub {
     static final String TAG = "ShortcutService";
 
-    public static final boolean FEATURE_ENABLED = false;
-
     static final boolean DEBUG = false; // STOPSHIP if true
     static final boolean DEBUG_LOAD = false; // STOPSHIP if true
     static final boolean DEBUG_PROCSTATE = false; // STOPSHIP if true
@@ -172,6 +183,8 @@
 
     private static final String ATTR_VALUE = "value";
 
+    private static final String LAUNCHER_INTENT_CATEGORY = Intent.CATEGORY_LAUNCHER;
+
     @VisibleForTesting
     interface ConfigConstants {
         /**
@@ -200,7 +213,7 @@
         String KEY_MAX_ICON_DIMENSION_DP_LOWRAM = "max_icon_dimension_dp_lowram";
 
         /**
-         * Key name for the max dynamic shortcuts per app. (int)
+         * Key name for the max dynamic shortcuts per activity. (int)
          */
         String KEY_MAX_SHORTCUTS = "max_shortcuts";
 
@@ -219,6 +232,13 @@
 
     private final Object mLock = new Object();
 
+    private static List<ResolveInfo> EMPTY_RESOLVE_INFO = new ArrayList<>(0);
+
+    private static Predicate<ResolveInfo> ACTIVITY_NOT_EXPORTED =
+            ri -> !ri.activityInfo.exported;
+
+    private static Predicate<PackageInfo> PACKAGE_NOT_INSTALLED = pi -> !isInstalled(pi);
+
     private final Handler mHandler;
 
     @GuardedBy("mLock")
@@ -234,9 +254,9 @@
     private final SparseArray<ShortcutUser> mUsers = new SparseArray<>();
 
     /**
-     * Max number of dynamic shortcuts that each application can have at a time.
+     * Max number of dynamic + manifest shortcuts that each application can have at a time.
      */
-    private int mMaxDynamicShortcuts;
+    private int mMaxShortcuts;
 
     /**
      * Max number of updating API calls that each application can make during the interval.
@@ -261,6 +281,7 @@
     private final IPackageManager mIPackageManager;
     private final PackageManagerInternal mPackageManagerInternal;
     private final UserManager mUserManager;
+    private final UsageStatsManagerInternal mUsageStatsManagerInternal;
 
     @GuardedBy("mLock")
     final SparseIntArray mUidState = new SparseIntArray();
@@ -272,7 +293,8 @@
     private List<Integer> mDirtyUserIds = new ArrayList<>();
 
     /**
-     * A counter that increments every time the system locale changes.  We keep track of it to reset
+     * A counter that increments every time the system locale changes.  We keep track of it to
+     * reset
      * throttling counters on the first call from each package after the last locale change.
      *
      * We need this mechanism because we can't do much in the locale change callback, which is
@@ -280,10 +302,12 @@
      */
     private final AtomicLong mLocaleChangeSequenceNumber = new AtomicLong();
 
+    private final AtomicBoolean mBootCompleted = new AtomicBoolean();
+
     private static final int PACKAGE_MATCH_FLAGS =
             PackageManager.MATCH_DIRECT_BOOT_AWARE
-            | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
-            | PackageManager.MATCH_UNINSTALLED_PACKAGES;
+                    | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
+                    | PackageManager.MATCH_UNINSTALLED_PACKAGES;
 
     // Stats
     @VisibleForTesting
@@ -293,8 +317,17 @@
         int GET_PACKAGE_INFO_WITH_SIG = 2;
         int GET_APPLICATION_INFO = 3;
         int LAUNCHER_PERMISSION_CHECK = 4;
+        int CLEANUP_DANGLING_BITMAPS = 5;
+        int GET_ACTIVITY_WITH_METADATA = 6;
+        int GET_INSTALLED_PACKAGES = 7;
+        int CHECK_PACKAGE_CHANGES = 8;
+        int GET_APPLICATION_RESOURCES = 9;
+        int RESOURCE_NAME_LOOKUP = 10;
+        int GET_LAUNCHER_ACTIVITY = 11;
+        int CHECK_LAUNCHER_ACTIVITY = 12;
+        int IS_ACTIVITY_ENABLED = 13;
 
-        int COUNT = LAUNCHER_PERMISSION_CHECK + 1;
+        int COUNT = IS_ACTIVITY_ENABLED + 1;
     }
 
     final Object mStatLock = new Object();
@@ -308,22 +341,40 @@
     private static final int PROCESS_STATE_FOREGROUND_THRESHOLD =
             ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
 
+    static final int OPERATION_SET = 0;
+    static final int OPERATION_ADD = 1;
+    static final int OPERATION_UPDATE = 2;
+
+    /** @hide */
+    @IntDef(value = {
+            OPERATION_SET,
+            OPERATION_ADD,
+            OPERATION_UPDATE
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    @interface ShortcutOperation {
+    }
+
     public ShortcutService(Context context) {
-        this(context, BackgroundThread.get().getLooper());
+        this(context, BackgroundThread.get().getLooper(), /*onyForPackgeManagerApis*/ false);
     }
 
     @VisibleForTesting
-    ShortcutService(Context context, Looper looper) {
+    ShortcutService(Context context, Looper looper, boolean onlyForPackageManagerApis) {
         mContext = Preconditions.checkNotNull(context);
         LocalServices.addService(ShortcutServiceInternal.class, new LocalService());
         mHandler = new Handler(looper);
         mIPackageManager = AppGlobals.getPackageManager();
-        mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class);
-        mUserManager = context.getSystemService(UserManager.class);
+        mPackageManagerInternal = Preconditions.checkNotNull(
+                LocalServices.getService(PackageManagerInternal.class));
+        mUserManager = Preconditions.checkNotNull(context.getSystemService(UserManager.class));
+        mUsageStatsManagerInternal = Preconditions.checkNotNull(
+                LocalServices.getService(UsageStatsManagerInternal.class));
 
-        if (!FEATURE_ENABLED) {
-            return;
+        if (onlyForPackageManagerApis) {
+            return; // Don't do anything further.  For unit tests only.
         }
+
         mPackageMonitor.register(context, looper, UserHandle.ALL, /* externalStorage= */ false);
 
         injectRegisterUidObserver(mUidObserver, ActivityManager.UID_OBSERVER_PROCSTATE
@@ -333,7 +384,7 @@
     void logDurationStat(int statId, long start) {
         synchronized (mStatLock) {
             mCountStats[statId]++;
-            mDurationStats[statId] += (System.currentTimeMillis() - start);
+            mDurationStats[statId] += (injectElapsedRealtime() - start);
         }
     }
 
@@ -342,18 +393,22 @@
     }
 
     final private IUidObserver mUidObserver = new IUidObserver.Stub() {
-        @Override public void onUidStateChanged(int uid, int procState) throws RemoteException {
+        @Override
+        public void onUidStateChanged(int uid, int procState) throws RemoteException {
             handleOnUidStateChanged(uid, procState);
         }
 
-        @Override public void onUidGone(int uid) throws RemoteException {
+        @Override
+        public void onUidGone(int uid) throws RemoteException {
             handleOnUidStateChanged(uid, ActivityManager.MAX_PROCESS_STATE);
         }
 
-        @Override public void onUidActive(int uid) throws RemoteException {
+        @Override
+        public void onUidActive(int uid) throws RemoteException {
         }
 
-        @Override public void onUidIdle(int uid) throws RemoteException {
+        @Override
+        public void onUidIdle(int uid) throws RemoteException {
         }
     };
 
@@ -424,7 +479,6 @@
 
     /** lifecycle event */
     void onBootPhase(int phase) {
-        // We want to call initialize() to initialize the configurations, so we don't disable this.
         if (DEBUG) {
             Slog.d(TAG, "onBootPhase: " + phase);
         }
@@ -432,13 +486,16 @@
             case SystemService.PHASE_LOCK_SETTINGS_READY:
                 initialize();
                 break;
+            case SystemService.PHASE_BOOT_COMPLETED:
+                mBootCompleted.set(true);
+                break;
         }
     }
 
     /** lifecycle event */
     void handleUnlockUser(int userId) {
-        if (!FEATURE_ENABLED) {
-            return;
+        if (DEBUG) {
+            Slog.d(TAG, "handleUnlockUser: user=" + userId);
         }
         synchronized (mLock) {
             // Preload
@@ -450,9 +507,6 @@
 
     /** lifecycle event */
     void handleCleanupUser(int userId) {
-        if (!FEATURE_ENABLED) {
-            return;
-        }
         synchronized (mLock) {
             unloadUserLocked(userId);
         }
@@ -520,16 +574,16 @@
         mMaxUpdatesPerInterval = Math.max(0, (int) parser.getLong(
                 ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL, DEFAULT_MAX_UPDATES_PER_INTERVAL));
 
-        mMaxDynamicShortcuts = Math.max(0, (int) parser.getLong(
+        mMaxShortcuts = Math.max(0, (int) parser.getLong(
                 ConfigConstants.KEY_MAX_SHORTCUTS, DEFAULT_MAX_SHORTCUTS_PER_APP));
 
         final int iconDimensionDp = Math.max(1, injectIsLowRamDevice()
                 ? (int) parser.getLong(
-                    ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM,
-                    DEFAULT_MAX_ICON_DIMENSION_LOWRAM_DP)
+                ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM,
+                DEFAULT_MAX_ICON_DIMENSION_LOWRAM_DP)
                 : (int) parser.getLong(
-                    ConfigConstants.KEY_MAX_ICON_DIMENSION_DP,
-                    DEFAULT_MAX_ICON_DIMENSION_DP));
+                ConfigConstants.KEY_MAX_ICON_DIMENSION_DP,
+                DEFAULT_MAX_ICON_DIMENSION_DP));
 
         mMaxIconDimension = injectDipToPixel(iconDimensionDp);
 
@@ -604,15 +658,19 @@
     @Nullable
     static Intent parseIntentAttribute(XmlPullParser parser, String attribute) {
         final String value = parseStringAttribute(parser, attribute);
-        if (TextUtils.isEmpty(value)) {
-            return null;
+        Intent parsed = null;
+        if (!TextUtils.isEmpty(value)) {
+            try {
+                parsed = Intent.parseUri(value, /* flags =*/ 0);
+            } catch (URISyntaxException e) {
+                Slog.e(TAG, "Error parsing intent", e);
+            }
         }
-        try {
-            return Intent.parseUri(value, /* flags =*/ 0);
-        } catch (URISyntaxException e) {
-            Slog.e(TAG, "Error parsing intent", e);
-            return null;
+        if (parsed == null) {
+            // Default intent.
+            parsed = new Intent(Intent.ACTION_VIEW);
         }
+        return parsed;
     }
 
     static void writeTagValue(XmlSerializer out, String tag, String value) throws IOException {
@@ -641,10 +699,10 @@
         out.endTag(null, tag);
     }
 
-    static void writeAttr(XmlSerializer out, String name, String value) throws IOException {
+    static void writeAttr(XmlSerializer out, String name, CharSequence value) throws IOException {
         if (TextUtils.isEmpty(value)) return;
 
-        out.attribute(null, name, value);
+        out.attribute(null, name, value.toString());
     }
 
     static void writeAttr(XmlSerializer out, String name, long value) throws IOException {
@@ -743,7 +801,7 @@
             }
         } catch (FileNotFoundException e) {
             // Use the default
-        } catch (IOException|XmlPullParserException e) {
+        } catch (IOException | XmlPullParserException e) {
             Slog.e(TAG, "Failed to read file " + file.getBaseFile(), e);
 
             mRawLastResetTime = 0;
@@ -766,7 +824,7 @@
             saveUserInternalLocked(userId, os, /* forBackup= */ false);
 
             file.finishWrite(os);
-        } catch (XmlPullParserException|IOException e) {
+        } catch (XmlPullParserException | IOException e) {
             Slog.e(TAG, "Failed to write to file " + file.getBaseFile(), e);
             file.failWrite(os);
         }
@@ -782,7 +840,7 @@
         out.setOutput(bos, StandardCharsets.UTF_8.name());
         out.startDocument(null, true);
 
-        getUserShortcutsLocked(userId).saveToXml(this, out, forBackup);
+        getUserShortcutsLocked(userId).saveToXml(out, forBackup);
 
         out.endDocument();
 
@@ -816,8 +874,10 @@
             return null;
         }
         try {
-            return loadUserInternal(userId, in, /* forBackup= */ false);
-        } catch (IOException|XmlPullParserException e) {
+            final ShortcutUser ret = loadUserInternal(userId, in, /* forBackup= */ false);
+            cleanupDanglingBitmapDirectoriesLocked(userId, ret);
+            return ret;
+        } catch (IOException | XmlPullParserException e) {
             Slog.e(TAG, "Failed to read file " + file.getBaseFile(), e);
             return null;
         } finally {
@@ -958,7 +1018,7 @@
         if (userPackages == null) {
             userPackages = loadUserLocked(userId);
             if (userPackages == null) {
-                userPackages = new ShortcutUser(userId);
+                userPackages = new ShortcutUser(this, userId);
             }
             mUsers.put(userId, userPackages);
         }
@@ -976,7 +1036,7 @@
     @NonNull
     ShortcutPackage getPackageShortcutsLocked(
             @NonNull String packageName, @UserIdInt int userId) {
-        return getUserShortcutsLocked(userId).getPackageShortcuts(this, packageName);
+        return getUserShortcutsLocked(userId).getPackageShortcuts(packageName);
     }
 
     @GuardedBy("mLock")
@@ -985,7 +1045,7 @@
             @NonNull String packageName, @UserIdInt int ownerUserId,
             @UserIdInt int launcherUserId) {
         return getUserShortcutsLocked(ownerUserId)
-                .getLauncherShortcuts(this, packageName, launcherUserId);
+                .getLauncherShortcuts(packageName, launcherUserId);
     }
 
     // === Caller validation ===
@@ -998,9 +1058,10 @@
             new File(shortcut.getBitmapPath()).delete();
 
             shortcut.setBitmapPath(null);
-            shortcut.setIconResourceId(0);
-            shortcut.clearFlags(ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_HAS_ICON_RES);
         }
+        shortcut.setIconResourceId(0);
+        shortcut.setIconResName(null);
+        shortcut.clearFlags(ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_HAS_ICON_RES);
     }
 
     public void cleanupBitmapsForPackage(@UserIdInt int userId, String packageName) {
@@ -1013,6 +1074,57 @@
         }
     }
 
+    private void cleanupDanglingBitmapDirectoriesLocked(
+            @UserIdInt int userId, @NonNull ShortcutUser user) {
+        if (DEBUG) {
+            Slog.d(TAG, "cleanupDanglingBitmaps: userId=" + userId);
+        }
+        final long start = injectElapsedRealtime();
+
+        final File bitmapDir = getUserBitmapFilePath(userId);
+        final File[] children = bitmapDir.listFiles();
+        if (children == null) {
+            return;
+        }
+        for (File child : children) {
+            if (!child.isDirectory()) {
+                continue;
+            }
+            final String packageName = child.getName();
+            if (DEBUG) {
+                Slog.d(TAG, "cleanupDanglingBitmaps: Found directory=" + packageName);
+            }
+            if (!user.hasPackage(packageName)) {
+                if (DEBUG) {
+                    Slog.d(TAG, "Removing dangling bitmap directory: " + packageName);
+                }
+                cleanupBitmapsForPackage(userId, packageName);
+            } else {
+                cleanupDanglingBitmapFilesLocked(userId, user, packageName, child);
+            }
+        }
+        logDurationStat(Stats.CLEANUP_DANGLING_BITMAPS, start);
+    }
+
+    private void cleanupDanglingBitmapFilesLocked(@UserIdInt int userId, @NonNull ShortcutUser user,
+            @NonNull String packageName, @NonNull File path) {
+        final ArraySet<String> usedFiles =
+                user.getPackageShortcuts(packageName).getUsedBitmapFiles();
+
+        for (File child : path.listFiles()) {
+            if (!child.isFile()) {
+                continue;
+            }
+            final String name = child.getName();
+            if (!usedFiles.contains(name)) {
+                if (DEBUG) {
+                    Slog.d(TAG, "Removing dangling bitmap file: " + child.getAbsolutePath());
+                }
+                child.delete();
+            }
+        }
+    }
+
     @VisibleForTesting
     static class FileOutputStreamWithPath extends FileOutputStream {
         private final File mFile;
@@ -1036,7 +1148,7 @@
     FileOutputStreamWithPath openIconFileForWrite(@UserIdInt int userId, ShortcutInfo shortcut)
             throws IOException {
         final File packagePath = new File(getUserBitmapFilePath(userId),
-                shortcut.getPackageName());
+                shortcut.getPackage());
         if (!packagePath.isDirectory()) {
             packagePath.mkdirs();
             if (!packagePath.isDirectory()) {
@@ -1046,7 +1158,7 @@
         }
 
         final String baseName = String.valueOf(injectCurrentTimeMillis());
-        for (int suffix = 0;; suffix++) {
+        for (int suffix = 0; ; suffix++) {
             final String filename = (suffix == 0 ? baseName : baseName + "_" + suffix) + ".png";
             final File file = new File(packagePath, filename);
             if (!file.exists()) {
@@ -1066,8 +1178,7 @@
         final long token = injectClearCallingIdentity();
         try {
             // Clear icon info on the shortcut.
-            shortcut.setIconResourceId(0);
-            shortcut.setBitmapPath(null);
+            removeIcon(userId, shortcut);
 
             final Icon icon = shortcut.getIcon();
             if (icon == null) {
@@ -1075,7 +1186,6 @@
             }
 
             Bitmap bitmap;
-            Bitmap bitmapToRecycle = null;
             try {
                 switch (icon.getType()) {
                     case Icon.TYPE_RESOURCE: {
@@ -1119,7 +1229,7 @@
                     } finally {
                         IoUtils.closeQuietly(out);
                     }
-                } catch (IOException|RuntimeException e) {
+                } catch (IOException | RuntimeException e) {
                     // STOPSHIP Change wtf to e
                     Slog.wtf(ShortcutService.TAG, "Unable to write bitmap to file", e);
                     if (path != null && path.exists()) {
@@ -1127,9 +1237,6 @@
                     }
                 }
             } finally {
-                if (bitmapToRecycle != null) {
-                    bitmapToRecycle.recycle();
-                }
                 // Once saved, we won't use the original icon information, so null it out.
                 shortcut.clearIcon();
             }
@@ -1142,7 +1249,7 @@
     // so override in unit tests.
     // TODO CTS this case.
     void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) {
-        if (!shortcut.getPackageName().equals(icon.getResPackage())) {
+        if (!shortcut.getPackage().equals(icon.getResPackage())) {
             throw new IllegalArgumentException(
                     "Icon resource must reside in shortcut owner package");
         }
@@ -1179,11 +1286,29 @@
         return scaledBitmap;
     }
 
+    /**
+     * For a shortcut, update all resource names from resource IDs, and also update all
+     * resource-based strings.
+     */
+    void fixUpShortcutResourceNamesAndValues(ShortcutInfo si) {
+        final Resources publisherRes = injectGetResourcesForApplicationAsUser(
+                si.getPackage(), si.getUserId());
+        if (publisherRes != null) {
+            final long start = injectElapsedRealtime();
+            try {
+                si.lookupAndFillInResourceNames(publisherRes);
+            } finally {
+                logDurationStat(Stats.RESOURCE_NAME_LOOKUP, start);
+            }
+            si.resolveResourceStrings(publisherRes);
+        }
+    }
+
     // === Caller validation ===
 
     private boolean isCallerSystem() {
         final int callingUid = injectBinderCallingUid();
-         return UserHandle.isSameApp(callingUid, Process.SYSTEM_UID);
+        return UserHandle.isSameApp(callingUid, Process.SYSTEM_UID);
     }
 
     private boolean isCallerShell() {
@@ -1241,20 +1366,29 @@
         throw new SecurityException("Calling package name mismatch");
     }
 
-    void postToHandler(Runnable r) {
+    // Overridden in unit tests to execute r synchronously.
+    void injectPostToHandler(Runnable r) {
         mHandler.post(r);
     }
 
     /**
-     * Throw if {@code numShortcuts} is bigger than {@link #mMaxDynamicShortcuts}.
+     * @throws IllegalArgumentException if {@code numShortcuts} is bigger than
+     *                                  {@link #getMaxActivityShortcuts()}.
      */
-    void enforceMaxDynamicShortcuts(int numShortcuts) {
-        if (numShortcuts > mMaxDynamicShortcuts) {
+    void enforceMaxActivityShortcuts(int numShortcuts) {
+        if (numShortcuts > mMaxShortcuts) {
             throw new IllegalArgumentException("Max number of dynamic shortcuts exceeded");
         }
     }
 
     /**
+     * Return the max number of dynamic + manifest shortcuts for each launcher icon.
+     */
+    int getMaxActivityShortcuts() {
+        return mMaxShortcuts;
+    }
+
+    /**
      * - Sends a notification to LauncherApps
      * - Write to file
      */
@@ -1268,10 +1402,15 @@
     }
 
     private void notifyListeners(@NonNull String packageName, @UserIdInt int userId) {
-        if (!mUserManager.isUserRunning(userId)) {
-            return;
+        final long token = injectClearCallingIdentity();
+        try {
+            if (!mUserManager.isUserRunning(userId)) {
+                return;
+            }
+        } finally {
+            injectRestoreCallingIdentity(token);
         }
-        postToHandler(() -> {
+        injectPostToHandler(() -> {
             final ArrayList<ShortcutChangeListener> copy;
             synchronized (mLock) {
                 copy = new ArrayList<>(mListeners);
@@ -1287,72 +1426,57 @@
      * Clean up / validate an incoming shortcut.
      * - Make sure all mandatory fields are set.
      * - Make sure the intent's extras are persistable, and them to set
-     *  {@link ShortcutInfo#mIntentPersistableExtras}.  Also clear its extras.
+     * {@link ShortcutInfo#mIntentPersistableExtras}.  Also clear its extras.
      * - Clear flags.
      *
      * TODO Detailed unit tests
      */
     private void fixUpIncomingShortcutInfo(@NonNull ShortcutInfo shortcut, boolean forUpdate) {
         Preconditions.checkNotNull(shortcut, "Null shortcut detected");
-        if (shortcut.getActivityComponent() != null) {
+        if (shortcut.getActivity() != null) {
             Preconditions.checkState(
-                    shortcut.getPackageName().equals(
-                            shortcut.getActivityComponent().getPackageName()),
-                    "Activity package name mismatch");
+                    shortcut.getPackage().equals(shortcut.getActivity().getPackageName()),
+                    "Cannot publish shortcut: activity " + shortcut.getActivity() + " does not"
+                    + " belong to package " + shortcut.getPackage());
         }
 
         if (!forUpdate) {
             shortcut.enforceMandatoryFields();
+            Preconditions.checkArgument(
+                    injectIsMainActivity(shortcut.getActivity(), shortcut.getUserId()),
+                    "Cannot publish shortcut: " + shortcut.getActivity() + " is not main activity");
         }
         if (shortcut.getIcon() != null) {
             ShortcutInfo.validateIcon(shortcut.getIcon());
         }
 
-        validateForXml(shortcut.getId());
-        validateForXml(shortcut.getTitle());
-        validatePersistableBundleForXml(shortcut.getIntentPersistableExtras());
-        validatePersistableBundleForXml(shortcut.getExtras());
-
         shortcut.replaceFlags(0);
     }
 
-    // KXmlSerializer is strict and doesn't allow certain characters, so we disallow those
-    // characters.
+    /**
+     * When a shortcut has no target activity, set the default one from the package.
+     */
+    private void fillInDefaultActivity(List<ShortcutInfo> shortcuts) {
 
-    private static void validatePersistableBundleForXml(PersistableBundle b) {
-        if (b == null || b.size() == 0) {
-            return;
-        }
-        for (String key : b.keySet()) {
-            validateForXml(key);
-            final Object value = b.get(key);
-            if (value == null) {
-                continue;
-            } else if (value instanceof String) {
-                validateForXml((String) value);
-            } else if (value instanceof String[]) {
-                for (String v : (String[]) value) {
-                    validateForXml(v);
+        ComponentName defaultActivity = null;
+        for (int i = shortcuts.size() - 1; i >= 0; i--) {
+            final ShortcutInfo si = shortcuts.get(i);
+            if (si.getActivity() == null) {
+                if (defaultActivity == null) {
+                    defaultActivity = injectGetDefaultMainActivity(
+                            si.getPackage(), si.getUserId());
+                    Preconditions.checkState(defaultActivity != null,
+                            "Launcher activity not found for package " + si.getPackage());
                 }
-            } else if (value instanceof PersistableBundle) {
-                validatePersistableBundleForXml((PersistableBundle) value);
+                si.setActivity(defaultActivity);
             }
         }
     }
 
-    private static void validateForXml(String s) {
-        if (TextUtils.isEmpty(s)) {
-            return;
+    private void assignImplicitRanks(List<ShortcutInfo> shortcuts) {
+        for (int i = shortcuts.size() - 1; i >= 0; i--) {
+            shortcuts.get(i).setImplicitRank(i);
         }
-        for (int i = s.length() - 1; i >= 0; i--) {
-            if (!isAllowedInXml(s.charAt(i))) {
-                throw new IllegalArgumentException("Unsupported character detected in: " + s);
-            }
-        }
-    }
-
-    private static boolean isAllowedInXml(char c) {
-        return (c >= 0x20 && c <= 0xd7ff) || (c >= 0xe000 && c <= 0xfffd);
     }
 
     // === APIs ===
@@ -1368,27 +1492,41 @@
         synchronized (mLock) {
             final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
 
+            ps.ensureImmutableShortcutsNotIncluded(newShortcuts);
+
+            fillInDefaultActivity(newShortcuts);
+
+            ps.enforceShortcutCountsBeforeOperation(newShortcuts, OPERATION_SET);
+
             // Throttling.
-            if (!ps.tryApiCall(this)) {
+            if (!ps.tryApiCall()) {
                 return false;
             }
-            enforceMaxDynamicShortcuts(size);
 
-            // Validate the shortcuts.
+            // Initialize the implicit ranks for ShortcutPackage.adjustRanks().
+            ps.clearAllImplicitRanks();
+            assignImplicitRanks(newShortcuts);
+
             for (int i = 0; i < size; i++) {
                 fixUpIncomingShortcutInfo(newShortcuts.get(i), /* forUpdate= */ false);
             }
 
             // First, remove all un-pinned; dynamic shortcuts
-            ps.deleteAllDynamicShortcuts(this);
+            ps.deleteAllDynamicShortcuts();
 
             // Then, add/update all.  We need to make sure to take over "pinned" flag.
             for (int i = 0; i < size; i++) {
                 final ShortcutInfo newShortcut = newShortcuts.get(i);
-                ps.addDynamicShortcut(this, newShortcut);
+                ps.addOrUpdateDynamicShortcut(newShortcut);
             }
+
+            // Lastly, adjust the ranks.
+            ps.adjustRanks();
         }
         packageShortcutsChanged(packageName, userId);
+
+        verifyStates();
+
         return true;
     }
 
@@ -1403,32 +1541,70 @@
         synchronized (mLock) {
             final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
 
+            ps.ensureImmutableShortcutsNotIncluded(newShortcuts);
+
+            // For update, don't fill in the default activity.  Having null activity means
+            // "don't update the activity" here.
+
+            ps.enforceShortcutCountsBeforeOperation(newShortcuts, OPERATION_UPDATE);
+
             // Throttling.
-            if (!ps.tryApiCall(this)) {
+            if (!ps.tryApiCall()) {
                 return false;
             }
 
+            // Initialize the implicit ranks for ShortcutPackage.adjustRanks().
+            ps.clearAllImplicitRanks();
+            assignImplicitRanks(newShortcuts);
+
             for (int i = 0; i < size; i++) {
                 final ShortcutInfo source = newShortcuts.get(i);
                 fixUpIncomingShortcutInfo(source, /* forUpdate= */ true);
 
                 final ShortcutInfo target = ps.findShortcutById(source.getId());
-                if (target != null) {
-                    final boolean replacingIcon = (source.getIcon() != null);
-                    if (replacingIcon) {
-                        removeIcon(userId, target);
-                    }
+                if (target == null) {
+                    continue;
+                }
 
-                    target.copyNonNullFieldsFrom(source);
+                if (target.isEnabled() != source.isEnabled()) {
+                    Slog.w(TAG,
+                            "ShortcutInfo.enabled cannot be changed with updateShortcuts()");
+                }
 
-                    if (replacingIcon) {
-                        saveIconAndFixUpShortcut(userId, target);
-                    }
+                // When updating the rank, we need to insert between existing ranks, so set
+                // this setRankChanged, and also copy the implicit rank fo adjustRanks().
+                if (source.hasRank()) {
+                    target.setRankChanged();
+                    target.setImplicitRank(source.getImplicitRank());
+                }
+
+                final boolean replacingIcon = (source.getIcon() != null);
+                if (replacingIcon) {
+                    removeIcon(userId, target);
+                }
+
+                // Note copyNonNullFieldsFrom() does the "updatable with?" check too.
+                target.copyNonNullFieldsFrom(source);
+                target.setTimestamp(injectCurrentTimeMillis());
+
+                if (replacingIcon) {
+                    saveIconAndFixUpShortcut(userId, target);
+                }
+
+                // When we're updating any resource related fields, re-extract the res names and
+                // the values.
+                if (replacingIcon || source.hasStringResources()) {
+                    fixUpShortcutResourceNamesAndValues(target);
                 }
             }
+
+            // Lastly, adjust the ranks.
+            ps.adjustRanks();
         }
         packageShortcutsChanged(packageName, userId);
 
+        verifyStates();
+
         return true;
     }
 
@@ -1443,8 +1619,18 @@
         synchronized (mLock) {
             final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
 
+            ps.ensureImmutableShortcutsNotIncluded(newShortcuts);
+
+            fillInDefaultActivity(newShortcuts);
+
+            ps.enforceShortcutCountsBeforeOperation(newShortcuts, OPERATION_ADD);
+
+            // Initialize the implicit ranks for ShortcutPackage.adjustRanks().
+            ps.clearAllImplicitRanks();
+            assignImplicitRanks(newShortcuts);
+
             // Throttling.
-            if (!ps.tryApiCall(this)) {
+            if (!ps.tryApiCall()) {
                 return false;
             }
             for (int i = 0; i < size; i++) {
@@ -1453,13 +1639,69 @@
                 // Validate the shortcut.
                 fixUpIncomingShortcutInfo(newShortcut, /* forUpdate= */ false);
 
+                // When ranks are changing, we need to insert between ranks, so set the
+                // "rank changed" flag.
+                newShortcut.setRankChanged();
+
                 // Add it.
-                ps.addDynamicShortcut(this, newShortcut);
+                ps.addOrUpdateDynamicShortcut(newShortcut);
+            }
+
+            // Lastly, adjust the ranks.
+            ps.adjustRanks();
+        }
+        packageShortcutsChanged(packageName, userId);
+
+        verifyStates();
+
+        return true;
+    }
+
+    @Override
+    public void disableShortcuts(String packageName, List shortcutIds,
+            CharSequence disabledMessage, int disabledMessageResId, @UserIdInt int userId) {
+        verifyCaller(packageName, userId);
+        Preconditions.checkNotNull(shortcutIds, "shortcutIds must be provided");
+
+        synchronized (mLock) {
+            final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
+
+            ps.ensureImmutableShortcutsNotIncludedWithIds((List<String>) shortcutIds);
+
+            final String disabledMessageString =
+                    (disabledMessage == null) ? null : disabledMessage.toString();
+
+            for (int i = shortcutIds.size() - 1; i >= 0; i--) {
+                ps.disableWithId(Preconditions.checkStringNotEmpty((String) shortcutIds.get(i)),
+                        disabledMessageString, disabledMessageResId,
+                        /* overrideImmutable=*/ false);
+            }
+
+            // We may have removed dynamic shortcuts which may have left a gap, so adjust the ranks.
+            ps.adjustRanks();
+        }
+        packageShortcutsChanged(packageName, userId);
+
+        verifyStates();
+    }
+
+    @Override
+    public void enableShortcuts(String packageName, List shortcutIds, @UserIdInt int userId) {
+        verifyCaller(packageName, userId);
+        Preconditions.checkNotNull(shortcutIds, "shortcutIds must be provided");
+
+        synchronized (mLock) {
+            final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
+
+            ps.ensureImmutableShortcutsNotIncludedWithIds((List<String>) shortcutIds);
+
+            for (int i = shortcutIds.size() - 1; i >= 0; i--) {
+                ps.enableWithId((String) shortcutIds.get(i));
             }
         }
         packageShortcutsChanged(packageName, userId);
 
-        return true;
+        verifyStates();
     }
 
     @Override
@@ -1469,12 +1711,21 @@
         Preconditions.checkNotNull(shortcutIds, "shortcutIds must be provided");
 
         synchronized (mLock) {
+            final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
+
+            ps.ensureImmutableShortcutsNotIncludedWithIds((List<String>) shortcutIds);
+
             for (int i = shortcutIds.size() - 1; i >= 0; i--) {
-                getPackageShortcutsLocked(packageName, userId).deleteDynamicWithId(this,
+                ps.deleteDynamicWithId(
                         Preconditions.checkStringNotEmpty((String) shortcutIds.get(i)));
             }
+
+            // We may have removed dynamic shortcuts which may have left a gap, so adjust the ranks.
+            ps.adjustRanks();
         }
         packageShortcutsChanged(packageName, userId);
+
+        verifyStates();
     }
 
     @Override
@@ -1482,9 +1733,11 @@
         verifyCaller(packageName, userId);
 
         synchronized (mLock) {
-            getPackageShortcutsLocked(packageName, userId).deleteAllDynamicShortcuts(this);
+            getPackageShortcutsLocked(packageName, userId).deleteAllDynamicShortcuts();
         }
         packageShortcutsChanged(packageName, userId);
+
+        verifyStates();
     }
 
     @Override
@@ -1499,6 +1752,17 @@
     }
 
     @Override
+    public ParceledListSlice<ShortcutInfo> getManifestShortcuts(String packageName,
+            @UserIdInt int userId) {
+        verifyCaller(packageName, userId);
+        synchronized (mLock) {
+            return getShortcutsWithQueryLocked(
+                    packageName, userId, ShortcutInfo.CLONE_REMOVE_FOR_CREATOR,
+                    ShortcutInfo::isManifestShortcut);
+        }
+    }
+
+    @Override
     public ParceledListSlice<ShortcutInfo> getPinnedShortcuts(String packageName,
             @UserIdInt int userId) {
         verifyCaller(packageName, userId);
@@ -1514,17 +1778,17 @@
 
         final ArrayList<ShortcutInfo> ret = new ArrayList<>();
 
-        getPackageShortcutsLocked(packageName, userId).findAll(this, ret, query, cloneFlags);
+        getPackageShortcutsLocked(packageName, userId).findAll(ret, query, cloneFlags);
 
         return new ParceledListSlice<>(ret);
     }
 
     @Override
-    public int getMaxDynamicShortcutCount(String packageName, @UserIdInt int userId)
+    public int getMaxShortcutCountPerActivity(String packageName, @UserIdInt int userId)
             throws RemoteException {
         verifyCaller(packageName, userId);
 
-        return mMaxDynamicShortcuts;
+        return mMaxShortcuts;
     }
 
     @Override
@@ -1533,7 +1797,7 @@
 
         synchronized (mLock) {
             return mMaxUpdatesPerInterval
-                    - getPackageShortcutsLocked(packageName, userId).getApiCallCount(this);
+                    - getPackageShortcutsLocked(packageName, userId).getApiCallCount();
         }
     }
 
@@ -1547,7 +1811,7 @@
     }
 
     @Override
-    public int getIconMaxDimensions(String packageName, int userId) throws RemoteException {
+    public int getIconMaxDimensions(String packageName, int userId) {
         verifyCaller(packageName, userId);
 
         synchronized (mLock) {
@@ -1555,8 +1819,37 @@
         }
     }
 
+    @Override
+    public void reportShortcutUsed(String packageName, String shortcutId, int userId) {
+        verifyCaller(packageName, userId);
+
+        Preconditions.checkNotNull(shortcutId);
+
+        if (DEBUG) {
+            Slog.d(TAG, String.format("reportShortcutUsed: Shortcut %s package %s used on user %d",
+                    shortcutId, packageName, userId));
+        }
+
+        synchronized (mLock) {
+            final ShortcutPackage ps = getPackageShortcutsLocked(packageName, userId);
+            if (ps.findShortcutById(shortcutId) == null) {
+                Log.w(TAG, String.format("reportShortcutUsed: package %s doesn't have shortcut %s",
+                        packageName, shortcutId));
+                return;
+            }
+        }
+
+        final long token = injectClearCallingIdentity();
+        try {
+            mUsageStatsManagerInternal.reportShortcutUsage(packageName, shortcutId, userId);
+        } finally {
+            injectRestoreCallingIdentity(token);
+        }
+    }
+
     /**
-     * Reset all throttling, for developer options and command line.  Only system/shell can call it.
+     * Reset all throttling, for developer options and command line.  Only system/shell can call
+     * it.
      */
     @Override
     public void resetThrottling() {
@@ -1608,14 +1901,14 @@
     @VisibleForTesting
     boolean hasShortcutHostPermissionInner(@NonNull String callingPackage, int userId) {
         synchronized (mLock) {
-            final long start = System.currentTimeMillis();
+            final long start = injectElapsedRealtime();
 
             final ShortcutUser user = getUserShortcutsLocked(userId);
 
             final List<ResolveInfo> allHomeCandidates = new ArrayList<>();
 
             // Default launcher from package manager.
-            final long startGetHomeActivitiesAsUser = System.currentTimeMillis();
+            final long startGetHomeActivitiesAsUser = injectElapsedRealtime();
             final ComponentName defaultLauncher = injectPackageManagerInternal()
                     .getHomeActivitiesAsUser(allHomeCandidates, userId);
             logDurationStat(Stats.GET_DEFAULT_HOME, startGetHomeActivitiesAsUser);
@@ -1627,11 +1920,18 @@
                     Slog.v(TAG, "Default launcher from PM: " + detected);
                 }
             } else {
-                detected = user.getLauncherComponent();
+                detected = user.getDefaultLauncherComponent();
 
-                // TODO: Make sure it's still enabled.
-                if (DEBUG) {
-                    Slog.v(TAG, "Cached launcher: " + detected);
+                if (detected != null) {
+                    if (injectIsActivityEnabledAndExported(detected, userId)) {
+                        if (DEBUG) {
+                            Slog.v(TAG, "Cached launcher: " + detected);
+                        }
+                    } else {
+                        Slog.w(TAG, "Cached launcher " + detected + " no longer exists");
+                        detected = null;
+                        user.setDefaultLauncherComponent(null);
+                    }
                 }
             }
 
@@ -1667,7 +1967,7 @@
                 if (DEBUG) {
                     Slog.v(TAG, "Detected launcher: " + detected);
                 }
-                user.setLauncherComponent(this, detected);
+                user.setDefaultLauncherComponent(detected);
                 return detected.getPackageName().equals(callingPackage);
             } else {
                 // Default launcher not found.
@@ -1678,10 +1978,12 @@
 
     // === House keeping ===
 
-    private void cleanUpPackageForAllLoadedUsers(String packageName, @UserIdInt int packageUserId) {
+    private void cleanUpPackageForAllLoadedUsers(String packageName, @UserIdInt int packageUserId,
+            boolean appStillExists) {
         synchronized (mLock) {
             forEachLoadedUserLocked(user ->
-                    cleanUpPackageLocked(packageName, user.getUserId(), packageUserId));
+                    cleanUpPackageLocked(packageName, user.getUserId(), packageUserId,
+                            appStillExists));
         }
     }
 
@@ -1693,7 +1995,8 @@
      * This is called when an app is uninstalled, or an app gets "clear data"ed.
      */
     @VisibleForTesting
-    void cleanUpPackageLocked(String packageName, int owningUserId, int packageUserId) {
+    void cleanUpPackageLocked(String packageName, int owningUserId, int packageUserId,
+            boolean appStillExists) {
         final boolean wasUserLoaded = isUserLoadedLocked(owningUserId);
 
         final ShortcutUser user = getUserShortcutsLocked(owningUserId);
@@ -1701,7 +2004,7 @@
 
         // First, remove the package from the package list (if the package is a publisher).
         if (packageUserId == owningUserId) {
-            if (user.removePackage(this, packageName) != null) {
+            if (user.removePackage(packageName) != null) {
                 doNotify = true;
             }
         }
@@ -1714,7 +2017,7 @@
 
         // Now there may be orphan shortcuts because we removed pinned shortcuts at the previous
         // step.  Remove them too.
-        user.forAllPackages(p -> p.refreshPinnedFlags(this));
+        user.forAllPackages(p -> p.refreshPinnedFlags());
 
         scheduleSaveUser(owningUserId);
 
@@ -1722,6 +2025,13 @@
             notifyListeners(packageName, owningUserId);
         }
 
+        // If the app still exists (i.e. data cleared), we need to re-publish manifest shortcuts.
+        if (appStillExists && (packageUserId == owningUserId)) {
+            // This will do the notification and save when needed, so do it after the above
+            // notifyListeners.
+            user.handlePackageAddedOrUpdated(packageName, /* forceRescan=*/ true);
+        }
+
         if (!wasUserLoaded) {
             // Note this will execute the scheduled save.
             unloadUserLocked(owningUserId);
@@ -1740,17 +2050,17 @@
                 @Nullable ComponentName componentName,
                 int queryFlags, int userId) {
             final ArrayList<ShortcutInfo> ret = new ArrayList<>();
-            final int cloneFlag =
-                    ((queryFlags & ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY) == 0)
-                            ? ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER
-                            : ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO;
+            final boolean cloneKeyFieldOnly =
+                    ((queryFlags & ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY) != 0);
+            final int cloneFlag = cloneKeyFieldOnly ? ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO
+                    : ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER;
             if (packageName == null) {
                 shortcutIds = null; // LauncherAppsService already threw for it though.
             }
 
             synchronized (mLock) {
                 getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
-                        .attemptToRestoreIfNeededAndSave(ShortcutService.this);
+                        .attemptToRestoreIfNeededAndSave();
 
                 if (packageName != null) {
                     getShortcutsInnerLocked(launcherUserId,
@@ -1775,7 +2085,13 @@
             final ArraySet<String> ids = shortcutIds == null ? null
                     : new ArraySet<>(shortcutIds);
 
-            getPackageShortcutsLocked(packageName, userId).findAll(ShortcutService.this, ret,
+            final ShortcutPackage p = getUserShortcutsLocked(userId)
+                    .getPackageShortcutsIfExists(packageName);
+            if (p == null) {
+                return; // No need to instantiate ShortcutPackage.
+            }
+
+            p.findAll(ret,
                     (ShortcutInfo si) -> {
                         if (si.getLastChangedTimestamp() < changedSince) {
                             return false;
@@ -1783,17 +2099,25 @@
                         if (ids != null && !ids.contains(si.getId())) {
                             return false;
                         }
-                        if (componentName != null
-                                && !componentName.equals(si.getActivityComponent())) {
-                            return false;
+                        if (componentName != null) {
+                            if (si.getActivity() != null
+                                    && !si.getActivity().equals(componentName)) {
+                                return false;
+                            }
                         }
-                        final boolean matchDynamic =
-                                ((queryFlags & ShortcutQuery.FLAG_GET_DYNAMIC) != 0)
-                                        && si.isDynamic();
-                        final boolean matchPinned =
-                                ((queryFlags & ShortcutQuery.FLAG_GET_PINNED) != 0)
-                                        && si.isPinned();
-                        return matchDynamic || matchPinned;
+                        if (((queryFlags & ShortcutQuery.FLAG_GET_DYNAMIC) != 0)
+                                && si.isDynamic()) {
+                            return true;
+                        }
+                        if (((queryFlags & ShortcutQuery.FLAG_GET_PINNED) != 0)
+                                && si.isPinned()) {
+                            return true;
+                        }
+                        if (((queryFlags & ShortcutQuery.FLAG_GET_MANIFEST) != 0)
+                                && si.isManifestShortcut()) {
+                            return true;
+                        }
+                        return false;
                     }, cloneFlag, callingPackage, launcherUserId);
         }
 
@@ -1805,7 +2129,7 @@
 
             synchronized (mLock) {
                 getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
-                        .attemptToRestoreIfNeededAndSave(ShortcutService.this);
+                        .attemptToRestoreIfNeededAndSave();
 
                 final ShortcutInfo si = getShortcutInfoLocked(
                         launcherUserId, callingPackage, packageName, shortcutId, userId);
@@ -1819,9 +2143,14 @@
             Preconditions.checkStringNotEmpty(packageName, "packageName");
             Preconditions.checkStringNotEmpty(shortcutId, "shortcutId");
 
+            final ShortcutPackage p = getUserShortcutsLocked(userId)
+                    .getPackageShortcutsIfExists(packageName);
+            if (p == null) {
+                return null;
+            }
+
             final ArrayList<ShortcutInfo> list = new ArrayList<>(1);
-            getPackageShortcutsLocked(packageName, userId).findAll(
-                    ShortcutService.this, list,
+            p.findAll(list,
                     (ShortcutInfo si) -> shortcutId.equals(si.getId()),
                     /* clone flags=*/ 0, callingPackage, launcherUserId);
             return list.size() == 0 ? null : list.get(0);
@@ -1838,12 +2167,13 @@
             synchronized (mLock) {
                 final ShortcutLauncher launcher =
                         getLauncherShortcutsLocked(callingPackage, userId, launcherUserId);
-                launcher.attemptToRestoreIfNeededAndSave(ShortcutService.this);
+                launcher.attemptToRestoreIfNeededAndSave();
 
-                launcher.pinShortcuts(
-                        ShortcutService.this, userId, packageName, shortcutIds);
+                launcher.pinShortcuts(userId, packageName, shortcutIds);
             }
             packageShortcutsChanged(packageName, userId);
+
+            verifyStates();
         }
 
         @Override
@@ -1856,13 +2186,13 @@
 
             synchronized (mLock) {
                 getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
-                        .attemptToRestoreIfNeededAndSave(ShortcutService.this);
+                        .attemptToRestoreIfNeededAndSave();
 
                 // Make sure the shortcut is actually visible to the launcher.
                 final ShortcutInfo si = getShortcutInfoLocked(
                         launcherUserId, callingPackage, packageName, shortcutId, userId);
                 // "si == null" should suffice here, but check the flags too just to make sure.
-                if (si == null || !(si.isDynamic() || si.isPinned())) {
+                if (si == null || !si.isEnabled() || !si.isAlive()) {
                     return null;
                 }
                 return si.getIntent();
@@ -1885,10 +2215,15 @@
 
             synchronized (mLock) {
                 getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
-                        .attemptToRestoreIfNeededAndSave(ShortcutService.this);
+                        .attemptToRestoreIfNeededAndSave();
 
-                final ShortcutInfo shortcutInfo = getPackageShortcutsLocked(
-                        packageName, userId).findShortcutById(shortcutId);
+                final ShortcutPackage p = getUserShortcutsLocked(userId)
+                        .getPackageShortcutsIfExists(packageName);
+                if (p == null) {
+                    return 0;
+                }
+
+                final ShortcutInfo shortcutInfo = p.findShortcutById(shortcutId);
                 return (shortcutInfo != null && shortcutInfo.hasIconResource())
                         ? shortcutInfo.getIconResourceId() : 0;
             }
@@ -1904,10 +2239,15 @@
 
             synchronized (mLock) {
                 getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
-                        .attemptToRestoreIfNeededAndSave(ShortcutService.this);
+                        .attemptToRestoreIfNeededAndSave();
 
-                final ShortcutInfo shortcutInfo = getPackageShortcutsLocked(
-                        packageName, userId).findShortcutById(shortcutId);
+                final ShortcutPackage p = getUserShortcutsLocked(userId)
+                        .getPackageShortcutsIfExists(packageName);
+                if (p == null) {
+                    return null;
+                }
+
+                final ShortcutInfo shortcutInfo = p.findShortcutById(shortcutId);
                 if (shortcutInfo == null || !shortcutInfo.hasIconFile()) {
                     return null;
                 }
@@ -1938,9 +2278,6 @@
          */
         @Override
         public void onSystemLocaleChangedNoLock() {
-            if (!FEATURE_ENABLED) {
-                return;
-            }
             // DO NOT HOLD ANY LOCKS HERE.
 
             // We want to reset throttling for all packages for all users.  But we can't just do so
@@ -1953,8 +2290,29 @@
             //
             // This allows ShortcutUser's to detect the system locale change, so they can reset
             // counters.
-            mLocaleChangeSequenceNumber.incrementAndGet();
-            postToHandler(() -> scheduleSaveBaseState());
+
+            // Ignore all callback during system boot.
+            if (mBootCompleted.get()) {
+                mLocaleChangeSequenceNumber.incrementAndGet();
+                if (DEBUG) {
+                    Slog.d(TAG, "onSystemLocaleChangedNoLock: " + mLocaleChangeSequenceNumber.get());
+                }
+                injectPostToHandler(() -> handleLocaleChanged());
+            }
+        }
+    }
+
+    void handleLocaleChanged() {
+        if (DEBUG) {
+            Slog.d(TAG, "handleLocaleChanged");
+        }
+        scheduleSaveBaseState();
+
+        final long token = injectClearCallingIdentity();
+        try {
+            forEachLoadedUserLocked(u -> u.forAllPackages(p -> p.resolveResourceStrings()));
+        } finally {
+            injectRestoreCallingIdentity(token);
         }
     }
 
@@ -1982,45 +2340,73 @@
         public void onPackageDataCleared(String packageName, int uid) {
             handlePackageDataCleared(packageName, getChangingUserId());
         }
+
+        @Override
+        public boolean onPackageChanged(String packageName, int uid, String[] components) {
+            handlePackageChanged(packageName, getChangingUserId());
+            return false; // We don't need to receive onSomePackagesChanged(), so just false.
+        }
     };
 
     /**
      * Called when a user is unlocked.
      * - Check all known packages still exist, and otherwise perform cleanup.
      * - If a package still exists, check the version code.  If it's been updated, may need to
-     *   update timestamps of its shortcuts.
+     * update timestamps of its shortcuts.
      */
     @VisibleForTesting
     void checkPackageChanges(@UserIdInt int ownerUserId) {
         if (DEBUG) {
             Slog.d(TAG, "checkPackageChanges() ownerUserId=" + ownerUserId);
         }
-        final ArrayList<PackageWithUser> gonePackages = new ArrayList<>();
-
-        synchronized (mLock) {
-            final ShortcutUser user = getUserShortcutsLocked(ownerUserId);
-
-            user.forAllPackageItems(spi -> {
-                if (spi.getPackageInfo().isShadow()) {
-                    return; // Don't delete shadow information.
-                }
-                final int versionCode = getApplicationVersionCode(
-                        spi.getPackageName(), spi.getPackageUserId());
-                if (versionCode >= 0) {
-                    // Package still installed, see if it's updated.
-                    getUserShortcutsLocked(ownerUserId).handlePackageUpdated(
-                            this, spi.getPackageName(), versionCode);
-                } else {
-                    gonePackages.add(PackageWithUser.of(spi));
-                }
-            });
-            if (gonePackages.size() > 0) {
-                for (int i = gonePackages.size() - 1; i >= 0; i--) {
-                    final PackageWithUser pu = gonePackages.get(i);
-                    cleanUpPackageLocked(pu.packageName, ownerUserId, pu.userId);
-                }
-            }
+        if (injectIsSafeModeEnabled()) {
+            Slog.i(TAG, "Safe mode, skipping checkPackageChanges()");
+            return;
         }
+
+        final long start = injectElapsedRealtime();
+        try {
+            final ArrayList<PackageWithUser> gonePackages = new ArrayList<>();
+
+            synchronized (mLock) {
+                final ShortcutUser user = getUserShortcutsLocked(ownerUserId);
+
+                // Find packages that have been uninstalled.
+                user.forAllPackageItems(spi -> {
+                    if (spi.getPackageInfo().isShadow()) {
+                        return; // Don't delete shadow information.
+                    }
+                    if (!isPackageInstalled(spi.getPackageName(), spi.getPackageUserId())) {
+                        if (DEBUG) {
+                            Slog.d(TAG, "Uninstalled: " + spi.getPackageName()
+                                    + " user " + spi.getPackageUserId());
+                        }
+                        gonePackages.add(PackageWithUser.of(spi));
+                    }
+                });
+                if (gonePackages.size() > 0) {
+                    for (int i = gonePackages.size() - 1; i >= 0; i--) {
+                        final PackageWithUser pu = gonePackages.get(i);
+                        cleanUpPackageLocked(pu.packageName, ownerUserId, pu.userId,
+                                /* appStillExists = */ false);
+                    }
+                }
+                final long now = injectCurrentTimeMillis();
+
+                // Then for each installed app, publish manifest shortcuts when needed.
+                forUpdatedPackages(ownerUserId, user.getLastAppScanTime(), ai -> {
+                    user.handlePackageAddedOrUpdated(ai.packageName, /* forceRescan=*/ false);
+                });
+
+                // Write the time just before the scan, because there may be apps that have just
+                // been updated, and we want to catch them in the next time.
+                user.setLastAppScanTime(now);
+                scheduleSaveUser(ownerUserId);
+            }
+        } finally {
+            logDurationStat(Stats.CHECK_PACKAGE_CHANGES, start);
+        }
+        verifyStates();
     }
 
     private void handlePackageAdded(String packageName, @UserIdInt int userId) {
@@ -2028,9 +2414,11 @@
             Slog.d(TAG, String.format("handlePackageAdded: %s user=%d", packageName, userId));
         }
         synchronized (mLock) {
-            forEachLoadedUserLocked(user ->
-                    user.attemptToRestoreIfNeededAndSave(this, packageName, userId));
+            final ShortcutUser user = getUserShortcutsLocked(userId);
+            user.attemptToRestoreIfNeededAndSave(this, packageName, userId);
+            user.handlePackageAddedOrUpdated(packageName, /* forceRescan=*/ false);
         }
+        verifyStates();
     }
 
     private void handlePackageUpdateFinished(String packageName, @UserIdInt int userId) {
@@ -2039,15 +2427,14 @@
                     packageName, userId));
         }
         synchronized (mLock) {
-            forEachLoadedUserLocked(user ->
-                    user.attemptToRestoreIfNeededAndSave(this, packageName, userId));
+            final ShortcutUser user = getUserShortcutsLocked(userId);
+            user.attemptToRestoreIfNeededAndSave(this, packageName, userId);
 
-            final int versionCode = getApplicationVersionCode(packageName, userId);
-            if (versionCode < 0) {
-                return; // shouldn't happen
+            if (isPackageInstalled(packageName, userId)) {
+                user.handlePackageAddedOrUpdated(packageName, /* forceRescan=*/ false);
             }
-            getUserShortcutsLocked(userId).handlePackageUpdated(this, packageName, versionCode);
         }
+        verifyStates();
     }
 
     private void handlePackageRemoved(String packageName, @UserIdInt int packageUserId) {
@@ -2055,7 +2442,9 @@
             Slog.d(TAG, String.format("handlePackageRemoved: %s user=%d", packageName,
                     packageUserId));
         }
-        cleanUpPackageForAllLoadedUsers(packageName, packageUserId);
+        cleanUpPackageForAllLoadedUsers(packageName, packageUserId, /* appStillExists = */ false);
+
+        verifyStates();
     }
 
     private void handlePackageDataCleared(String packageName, int packageUserId) {
@@ -2063,20 +2452,49 @@
             Slog.d(TAG, String.format("handlePackageDataCleared: %s user=%d", packageName,
                     packageUserId));
         }
-        cleanUpPackageForAllLoadedUsers(packageName, packageUserId);
+        cleanUpPackageForAllLoadedUsers(packageName, packageUserId, /* appStillExists = */ true);
+
+        verifyStates();
+    }
+
+    private void handlePackageChanged(String packageName, int packageUserId) {
+        if (DEBUG) {
+            Slog.d(TAG, String.format("handlePackageChanged: %s user=%d", packageName,
+                    packageUserId));
+        }
+
+        // Activities may be disabled or enabled.  Just rescan the package.
+        synchronized (mLock) {
+            final ShortcutUser user = getUserShortcutsLocked(packageUserId);
+
+            user.handlePackageAddedOrUpdated(packageName, /* forceRescan=*/ true);
+        }
+
+        verifyStates();
     }
 
     // === PackageManager interaction ===
 
-    PackageInfo getPackageInfoWithSignatures(String packageName, @UserIdInt int userId) {
-        return injectPackageInfo(packageName, userId, true);
+    /**
+     * Returns {@link PackageInfo} unless it's uninstalled or disabled.
+     */
+    @Nullable
+    final PackageInfo getPackageInfoWithSignatures(String packageName, @UserIdInt int userId) {
+        return getPackageInfo(packageName, userId, true);
+    }
+
+    /**
+     * Returns {@link PackageInfo} unless it's uninstalled or disabled.
+     */
+    @Nullable
+    final PackageInfo getPackageInfo(String packageName, @UserIdInt int userId) {
+        return getPackageInfo(packageName, userId, false);
     }
 
     int injectGetPackageUid(@NonNull String packageName, @UserIdInt int userId) {
         final long token = injectClearCallingIdentity();
         try {
-            return mIPackageManager.getPackageUid(packageName, PACKAGE_MATCH_FLAGS
-                    , userId);
+            return mIPackageManager.getPackageUid(packageName, PACKAGE_MATCH_FLAGS, userId);
         } catch (RemoteException e) {
             // Shouldn't happen.
             Slog.wtf(TAG, "RemoteException", e);
@@ -2086,15 +2504,30 @@
         }
     }
 
+    /**
+     * Returns {@link PackageInfo} unless it's uninstalled or disabled.
+     */
+    @Nullable
     @VisibleForTesting
-    PackageInfo injectPackageInfo(String packageName, @UserIdInt int userId,
+    final PackageInfo getPackageInfo(String packageName, @UserIdInt int userId,
             boolean getSignatures) {
-        final long start = System.currentTimeMillis();
+        return isInstalledOrNull(injectPackageInfoWithUninstalled(
+                packageName, userId, getSignatures));
+    }
+
+    /**
+     * Do not use directly; this returns uninstalled packages too.
+     */
+    @Nullable
+    @VisibleForTesting
+    PackageInfo injectPackageInfoWithUninstalled(String packageName, @UserIdInt int userId,
+            boolean getSignatures) {
+        final long start = injectElapsedRealtime();
         final long token = injectClearCallingIdentity();
         try {
-            return mIPackageManager.getPackageInfo(packageName, PACKAGE_MATCH_FLAGS
-                    | (getSignatures ? PackageManager.GET_SIGNATURES : 0)
-                    , userId);
+            return mIPackageManager.getPackageInfo(
+                    packageName, PACKAGE_MATCH_FLAGS
+                            | (getSignatures ? PackageManager.GET_SIGNATURES : 0), userId);
         } catch (RemoteException e) {
             // Shouldn't happen.
             Slog.wtf(TAG, "RemoteException", e);
@@ -2108,9 +2541,23 @@
         }
     }
 
+    /**
+     * Returns {@link ApplicationInfo} unless it's uninstalled or disabled.
+     */
+    @Nullable
     @VisibleForTesting
-    ApplicationInfo injectApplicationInfo(String packageName, @UserIdInt int userId) {
-        final long start = System.currentTimeMillis();
+    final ApplicationInfo getApplicationInfo(String packageName, @UserIdInt int userId) {
+        return isInstalledOrNull(injectApplicationInfoWithUninstalled(packageName, userId));
+    }
+
+    /**
+     * Do not use directly; this returns uninstalled packages too.
+     */
+    @Nullable
+    @VisibleForTesting
+    ApplicationInfo injectApplicationInfoWithUninstalled(
+            String packageName, @UserIdInt int userId) {
+        final long start = injectElapsedRealtime();
         final long token = injectClearCallingIdentity();
         try {
             return mIPackageManager.getApplicationInfo(packageName, PACKAGE_MATCH_FLAGS, userId);
@@ -2125,24 +2572,267 @@
         }
     }
 
-    private boolean isApplicationFlagSet(String packageName, int userId, int flags) {
-        final ApplicationInfo ai = injectApplicationInfo(packageName, userId);
-        return (ai != null) && ((ai.flags & flags) == flags);
-    }
-
-    boolean isPackageInstalled(String packageName, int userId) {
-        return isApplicationFlagSet(packageName, userId, ApplicationInfo.FLAG_INSTALLED);
+    /**
+     * Returns {@link ActivityInfo} with its metadata unless it's uninstalled or disabled.
+     */
+    @Nullable
+    final ActivityInfo getActivityInfoWithMetadata(ComponentName activity, @UserIdInt int userId) {
+        return isInstalledOrNull(injectGetActivityInfoWithMetadataWithUninstalled(
+                activity, userId));
     }
 
     /**
-     * @return the version code of the package, or -1 if the app is not installed.
+     * Do not use directly; this returns uninstalled packages too.
      */
-    int getApplicationVersionCode(String packageName, int userId) {
-        final ApplicationInfo ai = injectApplicationInfo(packageName, userId);
-        if ((ai == null) || ((ai.flags & ApplicationInfo.FLAG_INSTALLED) == 0)) {
-            return -1;
+    @Nullable
+    @VisibleForTesting
+    ActivityInfo injectGetActivityInfoWithMetadataWithUninstalled(
+            ComponentName activity, @UserIdInt int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            return mIPackageManager.getActivityInfo(activity,
+                    (PACKAGE_MATCH_FLAGS | PackageManager.GET_META_DATA), userId);
+        } catch (RemoteException e) {
+            // Shouldn't happen.
+            Slog.wtf(TAG, "RemoteException", e);
+            return null;
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.GET_ACTIVITY_WITH_METADATA, start);
         }
-        return ai.versionCode;
+    }
+
+    /**
+     * Return all installed and enabled packages.
+     */
+    @NonNull
+    @VisibleForTesting
+    final List<PackageInfo> getInstalledPackages(@UserIdInt int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            final List<PackageInfo> all = injectGetPackagesWithUninstalled(userId);
+
+            all.removeIf(PACKAGE_NOT_INSTALLED);
+
+            return all;
+        } catch (RemoteException e) {
+            // Shouldn't happen.
+            Slog.wtf(TAG, "RemoteException", e);
+            return null;
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.GET_INSTALLED_PACKAGES, start);
+        }
+    }
+
+    /**
+     * Do not use directly; this returns uninstalled packages too.
+     */
+    @NonNull
+    @VisibleForTesting
+    List<PackageInfo> injectGetPackagesWithUninstalled(@UserIdInt int userId)
+            throws RemoteException {
+        final ParceledListSlice<PackageInfo> parceledList =
+                mIPackageManager.getInstalledPackages(PACKAGE_MATCH_FLAGS, userId);
+        if (parceledList == null) {
+            return Collections.emptyList();
+        }
+        return parceledList.getList();
+    }
+
+    private void forUpdatedPackages(@UserIdInt int userId, long lastScanTime,
+            Consumer<ApplicationInfo> callback) {
+        if (DEBUG) {
+            Slog.d(TAG, "forUpdatedPackages for user " + userId + ", lastScanTime=" + lastScanTime);
+        }
+        final List<PackageInfo> list = getInstalledPackages(userId);
+        for (int i = list.size() - 1; i >= 0; i--) {
+            final PackageInfo pi = list.get(i);
+
+            if (pi.lastUpdateTime >= lastScanTime) {
+                if (DEBUG) {
+                    Slog.d(TAG, "Found updated package " + pi.packageName);
+                }
+                callback.accept(pi.applicationInfo);
+            }
+        }
+    }
+
+    private boolean isApplicationFlagSet(@NonNull String packageName, int userId, int flags) {
+        final ApplicationInfo ai = injectApplicationInfoWithUninstalled(packageName, userId);
+        return (ai != null) && ((ai.flags & flags) == flags);
+    }
+
+    private static boolean isInstalled(@Nullable ApplicationInfo ai) {
+        return (ai != null) && (ai.flags & ApplicationInfo.FLAG_INSTALLED) != 0;
+    }
+
+    private static boolean isInstalled(@Nullable PackageInfo pi) {
+        return (pi != null) && isInstalled(pi.applicationInfo);
+    }
+
+    private static boolean isInstalled(@Nullable ActivityInfo ai) {
+        return (ai != null) && isInstalled(ai.applicationInfo);
+    }
+
+    private static ApplicationInfo isInstalledOrNull(ApplicationInfo ai) {
+        return isInstalled(ai) ? ai : null;
+    }
+
+    private static PackageInfo isInstalledOrNull(PackageInfo pi) {
+        return isInstalled(pi) ? pi : null;
+    }
+
+    private static ActivityInfo isInstalledOrNull(ActivityInfo ai) {
+        return isInstalled(ai) ? ai : null;
+    }
+
+    boolean isPackageInstalled(String packageName, int userId) {
+        return getApplicationInfo(packageName, userId) != null;
+    }
+
+    @Nullable
+    XmlResourceParser injectXmlMetaData(ActivityInfo activityInfo, String key) {
+        return activityInfo.loadXmlMetaData(mContext.getPackageManager(), key);
+    }
+
+    @Nullable
+    Resources injectGetResourcesForApplicationAsUser(String packageName, int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            return mContext.getPackageManager().getResourcesForApplicationAsUser(
+                    packageName, userId);
+        } catch (NameNotFoundException e) {
+            Slog.e(TAG, "Resources for package " + packageName + " not found");
+            return null;
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.GET_APPLICATION_RESOURCES, start);
+        }
+    }
+
+    private Intent getMainActivityIntent() {
+        final Intent intent = new Intent(Intent.ACTION_MAIN);
+        intent.addCategory(LAUNCHER_INTENT_CATEGORY);
+        return intent;
+    }
+
+    /**
+     * Same as queryIntentActivitiesAsUser, except it makes sure the package is installed,
+     * and only returns exported activities.
+     */
+    @NonNull
+    @VisibleForTesting
+    List<ResolveInfo> queryActivities(@NonNull Intent baseIntent,
+            @NonNull String packageName, @Nullable ComponentName activity, int userId) {
+
+        baseIntent.setPackage(Preconditions.checkNotNull(packageName));
+        if (activity != null) {
+            baseIntent.setComponent(activity);
+        }
+
+        final List<ResolveInfo> resolved =
+                mContext.getPackageManager().queryIntentActivitiesAsUser(
+                        baseIntent, PACKAGE_MATCH_FLAGS, userId);
+        if (resolved == null || resolved.size() == 0) {
+            return EMPTY_RESOLVE_INFO;
+        }
+        // Make sure the package is installed.
+        if (!isInstalled(resolved.get(0).activityInfo)) {
+            return EMPTY_RESOLVE_INFO;
+        }
+        resolved.removeIf(ACTIVITY_NOT_EXPORTED);
+        return resolved;
+    }
+
+    /**
+     * Return the main activity that is enabled and exported.  If multiple activities are found,
+     * return the first one.
+     */
+    @Nullable
+    ComponentName injectGetDefaultMainActivity(@NonNull String packageName, int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            final List<ResolveInfo> resolved =
+                    queryActivities(getMainActivityIntent(), packageName, null, userId);
+            return resolved.size() == 0 ? null : resolved.get(0).activityInfo.getComponentName();
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.GET_LAUNCHER_ACTIVITY, start);
+        }
+    }
+
+    /**
+     * Return whether an activity is enabled, exported and main.
+     */
+    boolean injectIsMainActivity(@NonNull ComponentName activity, int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            final List<ResolveInfo> resolved =
+                    queryActivities(getMainActivityIntent(), activity.getPackageName(),
+                            activity, userId);
+            return resolved.size() > 0;
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.CHECK_LAUNCHER_ACTIVITY, start);
+        }
+    }
+
+    /**
+     * Return all the enabled, exported and main activities from a package.
+     */
+    @NonNull
+    List<ResolveInfo> injectGetMainActivities(@NonNull String packageName, int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            return queryActivities(getMainActivityIntent(), packageName, null, userId);
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.CHECK_LAUNCHER_ACTIVITY, start);
+        }
+    }
+
+    /**
+     * Return whether an activity is enabled and exported.
+     */
+    @VisibleForTesting
+    boolean injectIsActivityEnabledAndExported(
+            @NonNull ComponentName activity, @UserIdInt int userId) {
+        final long start = injectElapsedRealtime();
+        final long token = injectClearCallingIdentity();
+        try {
+            return queryActivities(new Intent(), activity.getPackageName(), activity, userId)
+                    .size() > 0;
+        } finally {
+            injectRestoreCallingIdentity(token);
+
+            logDurationStat(Stats.IS_ACTIVITY_ENABLED, start);
+        }
+    }
+
+    boolean injectIsSafeModeEnabled() {
+        final long token = injectClearCallingIdentity();
+        try {
+            return IWindowManager.Stub
+                    .asInterface(ServiceManager.getService(Context.WINDOW_SERVICE))
+                    .isSafeModeEnabled();
+        } catch (RemoteException e) {
+            return false; // Shouldn't happen though.
+        } finally {
+            injectRestoreCallingIdentity(token);
+        }
     }
 
     // === Backup & restore ===
@@ -2168,13 +2858,13 @@
                 return null;
             }
 
-            user.forAllPackageItems(spi -> spi.refreshPackageInfoAndSave(this));
+            user.forAllPackageItems(spi -> spi.refreshPackageInfoAndSave());
 
             // Then save.
             final ByteArrayOutputStream os = new ByteArrayOutputStream(32 * 1024);
             try {
                 saveUserInternalLocked(userId, os, /* forBackup */ true);
-            } catch (XmlPullParserException|IOException e) {
+            } catch (XmlPullParserException | IOException e) {
                 // Shouldn't happen.
                 Slog.w(TAG, "Backup failed.", e);
                 return null;
@@ -2193,7 +2883,7 @@
         final ByteArrayInputStream is = new ByteArrayInputStream(payload);
         try {
             user = loadUserInternal(userId, is, /* fromBackup */ true);
-        } catch (XmlPullParserException|IOException e) {
+        } catch (XmlPullParserException | IOException e) {
             Slog.w(TAG, "Restoration failed.", e);
             return;
         }
@@ -2270,8 +2960,8 @@
             pw.println(mResetInterval);
             pw.print("    maxUpdatesPerInterval: ");
             pw.println(mMaxUpdatesPerInterval);
-            pw.print("    maxDynamicShortcuts: ");
-            pw.println(mMaxDynamicShortcuts);
+            pw.print("    maxShortcutsPerActivity: ");
+            pw.println(mMaxShortcuts);
             pw.println();
 
             pw.println("  Stats:");
@@ -2283,11 +2973,20 @@
                 dumpStatLS(pw, p, Stats.GET_PACKAGE_INFO, "getPackageInfo()");
                 dumpStatLS(pw, p, Stats.GET_PACKAGE_INFO_WITH_SIG, "getPackageInfo(SIG)");
                 dumpStatLS(pw, p, Stats.GET_APPLICATION_INFO, "getApplicationInfo");
+                dumpStatLS(pw, p, Stats.CLEANUP_DANGLING_BITMAPS, "cleanupDanglingBitmaps");
+                dumpStatLS(pw, p, Stats.GET_ACTIVITY_WITH_METADATA, "getActivity+metadata");
+                dumpStatLS(pw, p, Stats.GET_INSTALLED_PACKAGES, "getInstalledPackages");
+                dumpStatLS(pw, p, Stats.CHECK_PACKAGE_CHANGES, "checkPackageChanges");
+                dumpStatLS(pw, p, Stats.GET_APPLICATION_RESOURCES, "getApplicationResources");
+                dumpStatLS(pw, p, Stats.RESOURCE_NAME_LOOKUP, "resourceNameLookup");
+                dumpStatLS(pw, p, Stats.GET_LAUNCHER_ACTIVITY, "getLauncherActivity");
+                dumpStatLS(pw, p, Stats.CHECK_LAUNCHER_ACTIVITY, "checkLauncherActivity");
+                dumpStatLS(pw, p, Stats.IS_ACTIVITY_ENABLED, "isActivityEnabled");
             }
 
             for (int i = 0; i < mUsers.size(); i++) {
                 pw.println();
-                mUsers.valueAt(i).dump(this, pw, "  ");
+                mUsers.valueAt(i).dump(pw, "  ");
             }
 
             pw.println();
@@ -2333,7 +3032,9 @@
 
         enforceShell();
 
-        (new MyShellCommand()).exec(this, in, out, err, args, resultReceiver);
+        final int status = (new MyShellCommand()).exec(this, in, out, err, args, resultReceiver);
+
+        resultReceiver.send(status, null);
     }
 
     static class CommandException extends Exception {
@@ -2404,6 +3105,9 @@
                     case "clear-shortcuts":
                         handleClearShortcuts();
                         break;
+                    case "verify-states": // hidden command to verify various internal states.
+                        handleVerifyStates();
+                        break;
                     default:
                         return handleDefaultCommands(cmd);
                 }
@@ -2499,8 +3203,7 @@
 
         private void clearLauncher() {
             synchronized (mLock) {
-                getUserShortcutsLocked(mUserId).setLauncherComponent(
-                        ShortcutService.this, null);
+                getUserShortcutsLocked(mUserId).setDefaultLauncherComponent(null);
             }
         }
 
@@ -2510,7 +3213,7 @@
                 hasShortcutHostPermissionInner("-", mUserId);
 
                 getOutPrintWriter().println("Launcher: "
-                        + getUserShortcutsLocked(mUserId).getLauncherComponent());
+                        + getUserShortcutsLocked(mUserId).getDefaultLauncherComponent());
             }
         }
 
@@ -2547,7 +3250,16 @@
 
             Slog.i(TAG, "cmd: handleClearShortcuts: " + mUserId + ", " + packageName);
 
-            ShortcutService.this.cleanUpPackageForAllLoadedUsers(packageName, mUserId);
+            ShortcutService.this.cleanUpPackageForAllLoadedUsers(packageName, mUserId,
+                    /* appStillExists = */ true);
+        }
+
+        private void handleVerifyStates() throws CommandException {
+            try {
+                verifyStatesForce(); // This will throw when there's an issue.
+            } catch (Throwable th) {
+                throw new CommandException(th.getMessage() + "\n" + Log.getStackTraceString(th));
+            }
         }
     }
 
@@ -2587,7 +3299,7 @@
     }
 
     final void wtf(String message) {
-        wtf( message, /* exception= */ null);
+        wtf(message, /* exception= */ null);
     }
 
     // Injection point.
@@ -2633,8 +3345,8 @@
     }
 
     @VisibleForTesting
-    int getMaxDynamicShortcutsForTest() {
-        return mMaxDynamicShortcuts;
+    int getMaxShortcutsForTest() {
+        return mMaxShortcuts;
     }
 
     @VisibleForTesting
@@ -2663,15 +3375,51 @@
     }
 
     @VisibleForTesting
-    ShortcutInfo getPackageShortcutForTest(String packageName, String shortcutId, int userId) {
+    ShortcutPackage getPackageShortcutForTest(String packageName, int userId) {
         synchronized (mLock) {
             final ShortcutUser user = mUsers.get(userId);
             if (user == null) return null;
 
-            final ShortcutPackage pkg = user.getAllPackagesForTest().get(packageName);
+            return user.getAllPackagesForTest().get(packageName);
+        }
+    }
+
+    @VisibleForTesting
+    ShortcutInfo getPackageShortcutForTest(String packageName, String shortcutId, int userId) {
+        synchronized (mLock) {
+            final ShortcutPackage pkg = getPackageShortcutForTest(packageName, userId);
             if (pkg == null) return null;
 
             return pkg.findShortcutById(shortcutId);
         }
     }
+
+    /**
+     * Control whether {@link #verifyStates} should be performed.  We always perform it during unit
+     * tests.
+     */
+    @VisibleForTesting
+    boolean injectShouldPerformVerification() {
+        return DEBUG;
+    }
+
+    /**
+     * Check various internal states and throws if there's any inconsistency.
+     * This is normally only enabled during unit tests.
+     */
+    final void verifyStates() {
+        if (injectShouldPerformVerification()) {
+            verifyStatesInner();
+        }
+    }
+
+    private final void verifyStatesForce() {
+        verifyStatesInner();
+    }
+
+    private void verifyStatesInner() {
+        synchronized (this) {
+            forEachLoadedUserLocked(u -> u.forAllPackageItems(ShortcutPackageItem::verifyStates));
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/pm/ShortcutUser.java b/services/core/java/com/android/server/pm/ShortcutUser.java
index 7d19a78..7ea89c9 100644
--- a/services/core/java/com/android/server/pm/ShortcutUser.java
+++ b/services/core/java/com/android/server/pm/ShortcutUser.java
@@ -16,6 +16,7 @@
 package com.android.server.pm;
 
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.annotation.UserIdInt;
 import android.content.ComponentName;
 import android.text.format.Formatter;
@@ -23,6 +24,7 @@
 import android.util.Slog;
 import android.util.SparseArray;
 
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.Preconditions;
 
@@ -39,6 +41,8 @@
 
 /**
  * User information used by {@link ShortcutService}.
+ *
+ * All methods should be guarded by {@code #mService.mLock}.
  */
 class ShortcutUser {
     private static final String TAG = ShortcutService.TAG;
@@ -48,6 +52,7 @@
 
     private static final String ATTR_VALUE = "value";
     private static final String ATTR_KNOWN_LOCALE_CHANGE_SEQUENCE_NUMBER = "locale-seq-no";
+    private static final String ATTR_LAST_APP_SCAN_TIME = "last-app-scan-time";
 
     static final class PackageWithUser {
         final int userId;
@@ -83,25 +88,28 @@
 
         @Override
         public String toString() {
-            return String.format("{Package: %d, %s}", userId, packageName);
+            return String.format("[Package: %d, %s]", userId, packageName);
         }
     }
 
+    final ShortcutService mService;
+
     @UserIdInt
     private final int mUserId;
 
     private final ArrayMap<String, ShortcutPackage> mPackages = new ArrayMap<>();
 
-    private final SparseArray<ShortcutPackage> mPackagesFromUid = new SparseArray<>();
-
     private final ArrayMap<PackageWithUser, ShortcutLauncher> mLaunchers = new ArrayMap<>();
 
     /** Default launcher that can access the launcher apps APIs. */
-    private ComponentName mLauncherComponent;
+    private ComponentName mDefaultLauncherComponent;
 
     private long mKnownLocaleChangeSequenceNumber;
 
-    public ShortcutUser(int userId) {
+    private long mLastAppScanTime;
+
+    public ShortcutUser(ShortcutService service, int userId) {
+        mService = service;
         mUserId = userId;
     }
 
@@ -109,6 +117,14 @@
         return mUserId;
     }
 
+    public long getLastAppScanTime() {
+        return mLastAppScanTime;
+    }
+
+    public void setLastAppScanTime(long lastAppScanTime) {
+        mLastAppScanTime = lastAppScanTime;
+    }
+
     // We don't expose this directly to non-test code because only ShortcutUser should add to/
     // remove from it.
     @VisibleForTesting
@@ -116,10 +132,14 @@
         return mPackages;
     }
 
-    public ShortcutPackage removePackage(@NonNull ShortcutService s, @NonNull String packageName) {
+    public boolean hasPackage(@NonNull String packageName) {
+        return mPackages.containsKey(packageName);
+    }
+
+    public ShortcutPackage removePackage(@NonNull String packageName) {
         final ShortcutPackage removed = mPackages.remove(packageName);
 
-        s.cleanupBitmapsForPackage(mUserId, packageName);
+        mService.cleanupBitmapsForPackage(mUserId, packageName);
 
         return removed;
     }
@@ -136,23 +156,33 @@
                 launcher.getPackageName()), launcher);
     }
 
+    @Nullable
     public ShortcutLauncher removeLauncher(
             @UserIdInt int packageUserId, @NonNull String packageName) {
         return mLaunchers.remove(PackageWithUser.of(packageUserId, packageName));
     }
 
-    public ShortcutPackage getPackageShortcuts(ShortcutService s, @NonNull String packageName) {
-        ShortcutPackage ret = mPackages.get(packageName);
-        if (ret == null) {
-            ret = new ShortcutPackage(s, this, mUserId, packageName);
-            mPackages.put(packageName, ret);
-        } else {
-            ret.attemptToRestoreIfNeededAndSave(s);
+    @Nullable
+    public ShortcutPackage getPackageShortcutsIfExists(@NonNull String packageName) {
+        final ShortcutPackage ret = mPackages.get(packageName);
+        if (ret != null) {
+            ret.attemptToRestoreIfNeededAndSave();
         }
         return ret;
     }
 
-    public ShortcutLauncher getLauncherShortcuts(ShortcutService s, @NonNull String packageName,
+    @NonNull
+    public ShortcutPackage getPackageShortcuts(@NonNull String packageName) {
+        ShortcutPackage ret = getPackageShortcutsIfExists(packageName);
+        if (ret == null) {
+            ret = new ShortcutPackage(this, mUserId, packageName);
+            mPackages.put(packageName, ret);
+        }
+        return ret;
+    }
+
+    @NonNull
+    public ShortcutLauncher getLauncherShortcuts(@NonNull String packageName,
             @UserIdInt int launcherUserId) {
         final PackageWithUser key = PackageWithUser.of(launcherUserId, packageName);
         ShortcutLauncher ret = mLaunchers.get(key);
@@ -160,7 +190,7 @@
             ret = new ShortcutLauncher(this, mUserId, packageName, launcherUserId);
             mLaunchers.put(key, ret);
         } else {
-            ret.attemptToRestoreIfNeededAndSave(s);
+            ret.attemptToRestoreIfNeededAndSave();
         }
         return ret;
     }
@@ -197,8 +227,8 @@
     /**
      * Reset all throttling counters for all packages, if there has been a system locale change.
      */
-    public void resetThrottlingIfNeeded(ShortcutService s) {
-        final long currentNo = s.getLocaleChangeSequenceNumber();
+    public void resetThrottlingIfNeeded() {
+        final long currentNo = mService.getLocaleChangeSequenceNumber();
         if (mKnownLocaleChangeSequenceNumber < currentNo) {
             if (ShortcutService.DEBUG) {
                 Slog.d(TAG, "LocaleChange detected for user " + mUserId);
@@ -206,61 +236,64 @@
 
             mKnownLocaleChangeSequenceNumber = currentNo;
 
-            forAllPackages(p -> p.resetRateLimiting(s));
+            forAllPackages(p -> p.resetRateLimiting());
 
-            s.scheduleSaveUser(mUserId);
+            mService.scheduleSaveUser(mUserId);
         }
     }
 
-    /**
-     * Called when a package is updated.
-     */
-    public void handlePackageUpdated(ShortcutService s, @NonNull String packageName,
-            int newVersionCode) {
-        if (!mPackages.containsKey(packageName)) {
-            return;
+    public void handlePackageAddedOrUpdated(@NonNull String packageName, boolean forceRescan) {
+        final boolean isNewApp = !mPackages.containsKey(packageName);
+
+        final ShortcutPackage shortcutPackage = getPackageShortcuts(packageName);
+
+        if (!shortcutPackage.handlePackageAddedOrUpdated(isNewApp, forceRescan)) {
+            if (isNewApp) {
+                mPackages.remove(packageName);
+            }
         }
-        getPackageShortcuts(s, packageName).handlePackageUpdated(s, newVersionCode);
     }
 
     public void attemptToRestoreIfNeededAndSave(ShortcutService s, @NonNull String packageName,
             @UserIdInt int packageUserId) {
         forPackageItem(packageName, packageUserId, spi -> {
-            spi.attemptToRestoreIfNeededAndSave(s);
+            spi.attemptToRestoreIfNeededAndSave();
         });
     }
 
-    public void saveToXml(ShortcutService s, XmlSerializer out, boolean forBackup)
+    public void saveToXml(XmlSerializer out, boolean forBackup)
             throws IOException, XmlPullParserException {
         out.startTag(null, TAG_ROOT);
 
         ShortcutService.writeAttr(out, ATTR_KNOWN_LOCALE_CHANGE_SEQUENCE_NUMBER,
                 mKnownLocaleChangeSequenceNumber);
+        ShortcutService.writeAttr(out, ATTR_LAST_APP_SCAN_TIME,
+                mLastAppScanTime);
 
         ShortcutService.writeTagValue(out, TAG_LAUNCHER,
-                mLauncherComponent);
+                mDefaultLauncherComponent);
 
         // Can't use forEachPackageItem due to the checked exceptions.
         {
             final int size = mLaunchers.size();
             for (int i = 0; i < size; i++) {
-                saveShortcutPackageItem(s, out, mLaunchers.valueAt(i), forBackup);
+                saveShortcutPackageItem(out, mLaunchers.valueAt(i), forBackup);
             }
         }
         {
             final int size = mPackages.size();
             for (int i = 0; i < size; i++) {
-                saveShortcutPackageItem(s, out, mPackages.valueAt(i), forBackup);
+                saveShortcutPackageItem(out, mPackages.valueAt(i), forBackup);
             }
         }
 
         out.endTag(null, TAG_ROOT);
     }
 
-    private void saveShortcutPackageItem(ShortcutService s, XmlSerializer out,
+    private void saveShortcutPackageItem(XmlSerializer out,
             ShortcutPackageItem spi, boolean forBackup) throws IOException, XmlPullParserException {
         if (forBackup) {
-            if (!s.shouldBackupApp(spi.getPackageName(), spi.getPackageUserId())) {
+            if (!mService.shouldBackupApp(spi.getPackageName(), spi.getPackageUserId())) {
                 return; // Don't save.
             }
             if (spi.getPackageUserId() != spi.getOwnerUserId()) {
@@ -272,11 +305,18 @@
 
     public static ShortcutUser loadFromXml(ShortcutService s, XmlPullParser parser, int userId,
             boolean fromBackup) throws IOException, XmlPullParserException {
-        final ShortcutUser ret = new ShortcutUser(userId);
+        final ShortcutUser ret = new ShortcutUser(s, userId);
 
         ret.mKnownLocaleChangeSequenceNumber = ShortcutService.parseLongAttribute(parser,
                 ATTR_KNOWN_LOCALE_CHANGE_SEQUENCE_NUMBER);
 
+        // If lastAppScanTime is in the future, that means the clock went backwards.
+        // Just scan all apps again.
+        final long lastAppScanTime = ShortcutService.parseLongAttribute(parser,
+                ATTR_LAST_APP_SCAN_TIME);
+        final long currentTime = s.injectCurrentTimeMillis();
+        ret.mLastAppScanTime = lastAppScanTime < currentTime ? lastAppScanTime : 0;
+
         final int outerDepth = parser.getDepth();
         int type;
         while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
@@ -290,7 +330,7 @@
             if (depth == outerDepth + 1) {
                 switch (tag) {
                     case TAG_LAUNCHER: {
-                        ret.mLauncherComponent = ShortcutService.parseComponentNameAttribute(
+                        ret.mDefaultLauncherComponent = ShortcutService.parseComponentNameAttribute(
                                 parser, ATTR_VALUE);
                         continue;
                     }
@@ -315,16 +355,16 @@
         return ret;
     }
 
-    public ComponentName getLauncherComponent() {
-        return mLauncherComponent;
+    public ComponentName getDefaultLauncherComponent() {
+        return mDefaultLauncherComponent;
     }
 
-    public void setLauncherComponent(ShortcutService s, ComponentName launcherComponent) {
-        if (Objects.equal(mLauncherComponent, launcherComponent)) {
+    public void setDefaultLauncherComponent(ComponentName launcherComponent) {
+        if (Objects.equal(mDefaultLauncherComponent, launcherComponent)) {
             return;
         }
-        mLauncherComponent = launcherComponent;
-        s.scheduleSaveUser(mUserId);
+        mDefaultLauncherComponent = launcherComponent;
+        mService.scheduleSaveUser(mUserId);
     }
 
     public void resetThrottling() {
@@ -333,36 +373,40 @@
         }
     }
 
-    public void dump(@NonNull ShortcutService s, @NonNull PrintWriter pw, @NonNull String prefix) {
+    public void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
         pw.print(prefix);
         pw.print("User: ");
         pw.print(mUserId);
         pw.print("  Known locale seq#: ");
         pw.print(mKnownLocaleChangeSequenceNumber);
+        pw.print("  Last app scan: [");
+        pw.print(mLastAppScanTime);
+        pw.print("] ");
+        pw.print(ShortcutService.formatTime(mLastAppScanTime));
         pw.println();
 
         prefix += prefix + "  ";
 
         pw.print(prefix);
         pw.print("Default launcher: ");
-        pw.print(mLauncherComponent);
+        pw.print(mDefaultLauncherComponent);
         pw.println();
 
         for (int i = 0; i < mLaunchers.size(); i++) {
-            mLaunchers.valueAt(i).dump(s, pw, prefix);
+            mLaunchers.valueAt(i).dump(pw, prefix);
         }
 
         for (int i = 0; i < mPackages.size(); i++) {
-            mPackages.valueAt(i).dump(s, pw, prefix);
+            mPackages.valueAt(i).dump(pw, prefix);
         }
 
         pw.println();
         pw.print(prefix);
         pw.println("Bitmap directories: ");
-        dumpDirectorySize(s, pw, prefix + "  ", s.getUserBitmapFilePath(mUserId));
+        dumpDirectorySize(pw, prefix + "  ", mService.getUserBitmapFilePath(mUserId));
     }
 
-    private void dumpDirectorySize(@NonNull ShortcutService s, @NonNull PrintWriter pw,
+    private void dumpDirectorySize(@NonNull PrintWriter pw,
             @NonNull String prefix, File path) {
         int numFiles = 0;
         long size = 0;
@@ -373,7 +417,7 @@
                     numFiles++;
                     size += child.length();
                 } else if (child.isDirectory()) {
-                    dumpDirectorySize(s, pw, prefix + "  ", child);
+                    dumpDirectorySize(pw, prefix + "  ", child);
                 }
             }
         }
@@ -385,7 +429,7 @@
         pw.print(" files, size=");
         pw.print(size);
         pw.print(" (");
-        pw.print(Formatter.formatFileSize(s.mContext, size));
+        pw.print(Formatter.formatFileSize(mService.mContext, size));
         pw.println(")");
     }
 }
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index d8a1c77..d750cbf 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -27,15 +27,18 @@
 import android.app.ActivityManager;
 import android.app.ActivityManagerInternal;
 import android.app.ActivityManagerNative;
+import android.app.AppGlobals;
 import android.app.IActivityManager;
 import android.app.IStopUserCallback;
 import android.app.KeyguardManager;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.IntentSender;
+import android.content.pm.IPackageManager;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.UserInfo;
@@ -70,6 +73,7 @@
 import android.system.ErrnoException;
 import android.system.Os;
 import android.system.OsConstants;
+import android.text.TextUtils;
 import android.util.AtomicFile;
 import android.util.IntArray;
 import android.util.Log;
@@ -452,6 +456,7 @@
             // user restriction was not a default guest restriction.
             setUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, true, currentGuestUser.id);
         }
+
         mContext.registerReceiver(mDisableQuietModeCallback,
                 new IntentFilter(ACTION_DISABLE_QUIET_MODE_AFTER_UNLOCK),
                 null, mHandler);
@@ -466,6 +471,8 @@
                 UserInfo ui = mUsers.valueAt(i).info;
                 if ((ui.partial || ui.guestToRemove || ui.isEphemeral()) && i != 0) {
                     partials.add(ui);
+                    mRemovingUserIds.append(ui.id, true);
+                    ui.partial = true;
                 }
             }
         }
@@ -862,12 +869,25 @@
             }
         }
         synchronized (mUsersLock) {
-            UserInfo userInfo =  getUserInfoLU(userId);
+            UserInfo userInfo = getUserInfoLU(userId);
             return userInfo != null && userInfo.isManagedProfile();
         }
     }
 
     @Override
+    public boolean isDemoUser(int userId) {
+        int callingUserId = UserHandle.getCallingUserId();
+        if (callingUserId != userId && !hasManageUsersPermission()) {
+            throw new SecurityException("You need MANAGE_USERS permission to query if u=" + userId
+                    + " is a demo user");
+        }
+        synchronized (mUsersLock) {
+            UserInfo userInfo = getUserInfoLU(userId);
+            return userInfo != null && userInfo.isDemo();
+        }
+    }
+
+    @Override
     public boolean isRestricted() {
         synchronized (mUsersLock) {
             return getUserInfoLU(UserHandle.getCallingUserId()).isRestricted();
@@ -2162,6 +2182,7 @@
         final boolean isGuest = (flags & UserInfo.FLAG_GUEST) != 0;
         final boolean isManagedProfile = (flags & UserInfo.FLAG_MANAGED_PROFILE) != 0;
         final boolean isRestricted = (flags & UserInfo.FLAG_RESTRICTED) != 0;
+        final boolean isDemo = (flags & UserInfo.FLAG_DEMO) != 0;
         final long ident = Binder.clearCallingIdentity();
         UserInfo userInfo;
         UserData userData;
@@ -2179,8 +2200,8 @@
                     Log.e(LOG_TAG, "Cannot add more managed profiles for user " + parentId);
                     return null;
                 }
-                if (!isGuest && !isManagedProfile && isUserLimitReached()) {
-                    // If we're not adding a guest user or a managed profile and the limit has
+                if (!isGuest && !isManagedProfile && !isDemo && isUserLimitReached()) {
+                    // If we're not adding a guest/demo user or a managed profile and the limit has
                     // been reached, cannot add a user.
                     return null;
                 }
@@ -2206,7 +2227,8 @@
                         return null;
                     }
                 }
-                if (!UserManager.isSplitSystemUser() && (flags & UserInfo.FLAG_EPHEMERAL) != 0) {
+                if (!UserManager.isSplitSystemUser() && (flags & UserInfo.FLAG_EPHEMERAL) != 0
+                        && (flags & UserInfo.FLAG_DEMO) == 0) {
                     Log.e(LOG_TAG,
                             "Ephemeral users are supported on split-system-user systems only.");
                     return null;
@@ -2857,6 +2879,8 @@
                 mPm.onBeforeUserStartUninitialized(userId);
             }
         }
+
+        maybeInitializeDemoMode(userId);
     }
 
     /**
@@ -2871,6 +2895,7 @@
 
     /**
      * Make a note of the last started time of a user and do some cleanup.
+     * This is called with ActivityManagerService lock held.
      * @param userId the user that was just foregrounded
      */
     public void onUserLoggedIn(@UserIdInt int userId) {
@@ -2888,6 +2913,29 @@
         scheduleWriteUser(userData);
     }
 
+    private void maybeInitializeDemoMode(int userId) {
+        if (UserManager.isDeviceInDemoMode(mContext) && userId != UserHandle.USER_SYSTEM) {
+            String demoLauncher =
+                    mContext.getResources().getString(
+                            com.android.internal.R.string.config_demoModeLauncherComponent);
+            if (!TextUtils.isEmpty(demoLauncher)) {
+                ComponentName componentToEnable = ComponentName.unflattenFromString(demoLauncher);
+                String demoLauncherPkg = componentToEnable.getPackageName();
+                try {
+                    final IPackageManager iPm = AppGlobals.getPackageManager();
+                    iPm.setComponentEnabledSetting(componentToEnable,
+                            PackageManager.COMPONENT_ENABLED_STATE_ENABLED, /* flags= */ 0,
+                            /* userId= */ userId);
+                    iPm.setApplicationEnabledSetting(demoLauncherPkg,
+                            PackageManager.COMPONENT_ENABLED_STATE_ENABLED, /* flags= */ 0,
+                            /* userId= */ userId, null);
+                } catch (RemoteException re) {
+                    // Internal, shouldn't happen
+                }
+            }
+        }
+    }
+
     /**
      * Returns the next available user id, filling in any holes in the ids.
      * TODO: May not be a good idea to recycle ids, in case it results in confusion
@@ -2919,6 +2967,14 @@
      *             number is mismatched.
      */
     public static void enforceSerialNumber(File file, int serialNumber) throws IOException {
+        if (StorageManager.isFileEncryptedEmulatedOnly()) {
+            // When we're emulating FBE, the directory may have been chmod
+            // 000'ed, meaning we can't read the serial number to enforce it;
+            // instead of destroying the user, just log a warning.
+            Slog.w(LOG_TAG, "Device is emulating FBE; assuming current serial number is valid");
+            return;
+        }
+
         final int foundSerial = getSerialNumber(file);
         Slog.v(LOG_TAG, "Found " + file + " with serial number " + foundSerial);
 
diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
index 38a3f42..c082143 100644
--- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
+++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
@@ -33,6 +33,7 @@
 import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.service.persistentdata.PersistentDataBlockManager;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.util.Log;
@@ -424,6 +425,14 @@
                             android.provider.Settings.Global.SAFE_BOOT_DISALLOWED,
                             newValue ? 1 : 0);
                     break;
+                case UserManager.DISALLOW_FACTORY_RESET:
+                    if (newValue) {
+                        PersistentDataBlockManager manager = (PersistentDataBlockManager) context
+                                .getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
+                        if (manager != null && manager.getOemUnlockEnabled()) {
+                            manager.setOemUnlockEnabled(false);
+                        }
+                    }
             }
         } finally {
             Binder.restoreCallingIdentity(id);
diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java
index 5ef518e..6fc15f0 100644
--- a/services/core/java/com/android/server/policy/GlobalActions.java
+++ b/services/core/java/com/android/server/policy/GlobalActions.java
@@ -1145,7 +1145,7 @@
         public GlobalActionsDialog(Context context, AlertParams params) {
             super(context, getDialogTheme(context));
             mContext = getContext();
-            mAlert = new AlertController(mContext, this, getWindow());
+            mAlert = AlertController.create(mContext, this, getWindow());
             mAdapter = (MyAdapter) params.mAdapter;
             mWindowTouchSlop = ViewConfiguration.get(context).getScaledWindowTouchSlop();
             params.apply(mAlert);
diff --git a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
index a77d512..2e32fe3 100644
--- a/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
+++ b/services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
@@ -30,6 +30,7 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.UserHandle;
+import android.os.UserManager;
 import android.provider.Settings;
 import android.service.vr.IVrManager;
 import android.service.vr.IVrStateCallbacks;
@@ -142,7 +143,8 @@
             if (!disabled
                     && (DEBUG_SHOW_EVERY_TIME || !mConfirmed)
                     && userSetupComplete
-                    && !mVrModeEnabled) {
+                    && !mVrModeEnabled
+                    && !UserManager.isDeviceInDemoMode(mContext)) {
                 mHandler.sendEmptyMessageDelayed(H.SHOW, mShowDelayMs);
             }
         } else {
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index a4408fc..446c75c 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -262,6 +262,10 @@
     private static final String SYSUI_SCREENSHOT_ERROR_RECEIVER =
             "com.android.systemui.screenshot.ScreenshotServiceErrorReceiver";
 
+    private static final int NAV_BAR_BOTTOM = 0;
+    private static final int NAV_BAR_RIGHT = 1;
+    private static final int NAV_BAR_LEFT = 2;
+
     /**
      * Keyguard stuff
      */
@@ -354,9 +358,8 @@
     int mStatusBarHeight;
     WindowState mNavigationBar = null;
     boolean mHasNavigationBar = false;
-    boolean mCanHideNavigationBar = false;
     boolean mNavigationBarCanMove = false; // can the navigation bar ever move to the side?
-    boolean mNavigationBarOnBottom = true; // is the navigation bar on the bottom *right now*?
+    int mNavigationBarPosition = NAV_BAR_BOTTOM;
     int[] mNavigationBarHeightForRotationDefault = new int[4];
     int[] mNavigationBarWidthForRotationDefault = new int[4];
     int[] mNavigationBarHeightForRotationInCarMode = new int[4];
@@ -1683,13 +1686,19 @@
                     }
                     @Override
                     public void onSwipeFromBottom() {
-                        if (mNavigationBar != null && mNavigationBarOnBottom) {
+                        if (mNavigationBar != null && mNavigationBarPosition == NAV_BAR_BOTTOM) {
                             requestTransientBars(mNavigationBar);
                         }
                     }
                     @Override
                     public void onSwipeFromRight() {
-                        if (mNavigationBar != null && !mNavigationBarOnBottom) {
+                        if (mNavigationBar != null && mNavigationBarPosition == NAV_BAR_RIGHT) {
+                            requestTransientBars(mNavigationBar);
+                        }
+                    }
+                    @Override
+                    public void onSwipeFromLeft() {
+                        if (mNavigationBar != null && mNavigationBarPosition == NAV_BAR_LEFT) {
                             requestTransientBars(mNavigationBar);
                         }
                     }
@@ -2782,8 +2791,8 @@
             if (win.getAttrs().windowAnimations != 0) {
                 return 0;
             }
-            // This can be on either the bottom or the right.
-            if (mNavigationBarOnBottom) {
+            // This can be on either the bottom or the right or the left.
+            if (mNavigationBarPosition == NAV_BAR_BOTTOM) {
                 if (transit == TRANSIT_EXIT
                         || transit == TRANSIT_HIDE) {
                     return R.anim.dock_bottom_exit;
@@ -2791,7 +2800,7 @@
                         || transit == TRANSIT_SHOW) {
                     return R.anim.dock_bottom_enter;
                 }
-            } else {
+            } else if (mNavigationBarPosition == NAV_BAR_RIGHT) {
                 if (transit == TRANSIT_EXIT
                         || transit == TRANSIT_HIDE) {
                     return R.anim.dock_right_exit;
@@ -2799,6 +2808,14 @@
                         || transit == TRANSIT_SHOW) {
                     return R.anim.dock_right_enter;
                 }
+            } else if (mNavigationBarPosition == NAV_BAR_LEFT) {
+                if (transit == TRANSIT_EXIT
+                        || transit == TRANSIT_HIDE) {
+                    return R.anim.dock_left_exit;
+                } else if (transit == TRANSIT_ENTER
+                        || transit == TRANSIT_SHOW) {
+                    return R.anim.dock_left_enter;
+                }
             }
         } else if (win.getAttrs().type == TYPE_DOCK_DIVIDER) {
             return selectDockedDividerAnimationLw(win, transit);
@@ -2827,10 +2844,12 @@
         // If the divider is behind the navigation bar, don't animate.
         final Rect frame = win.getFrameLw();
         final boolean behindNavBar = mNavigationBar != null
-                && ((mNavigationBarOnBottom
+                && ((mNavigationBarPosition == NAV_BAR_BOTTOM
                         && frame.top + insets >= mNavigationBar.getFrameLw().top)
-                || (!mNavigationBarOnBottom
-                        && frame.left + insets >= mNavigationBar.getFrameLw().left));
+                || (mNavigationBarPosition == NAV_BAR_RIGHT
+                        && frame.left + insets >= mNavigationBar.getFrameLw().left)
+                || (mNavigationBarPosition == NAV_BAR_LEFT
+                        && frame.right - insets <= mNavigationBar.getFrameLw().right));
         final boolean landscape = frame.height() > frame.width();
         final boolean offscreenLandscape = landscape && (frame.right - insets <= 0
                 || frame.left + insets >= win.getDisplayFrameLw().right);
@@ -2855,8 +2874,12 @@
                 + mTopFullscreenOpaqueWindowState + " rotationAnimation="
                 + (mTopFullscreenOpaqueWindowState == null ?
                         "0" : mTopFullscreenOpaqueWindowState.getAttrs().rotationAnimation));
-        if (mTopFullscreenOpaqueWindowState != null && mTopIsFullscreen) {
-            switch (mTopFullscreenOpaqueWindowState.getAttrs().rotationAnimation) {
+        if (mTopFullscreenOpaqueWindowState != null) {
+            int animationHint = mTopFullscreenOpaqueWindowState.getRotationAnimationHint();
+            if (animationHint < 0 && mTopIsFullscreen) {
+                animationHint = mTopFullscreenOpaqueWindowState.getAttrs().rotationAnimation;
+            }
+            switch (animationHint) {
                 case ROTATION_ANIMATION_CROSSFADE:
                     anim[0] = R.anim.rotation_animation_xfade_exit;
                     anim[1] = R.anim.rotation_animation_enter;
@@ -4023,7 +4046,7 @@
             navVisible |= !canHideNavigationBar();
 
             boolean updateSysUiVisibility = layoutNavigationBar(displayWidth, displayHeight,
-                    displayRotation, uiMode, overscanRight, overscanBottom, dcf, navVisible, navTranslucent,
+                    displayRotation, uiMode, overscanLeft, overscanRight, overscanBottom, dcf, navVisible, navTranslucent,
                     navAllowedHidden, statusBarExpandedNotKeyguard);
             if (DEBUG_LAYOUT) Slog.i(TAG, String.format("mDock rect: (%d,%d - %d,%d)",
                     mDockLeft, mDockTop, mDockRight, mDockBottom));
@@ -4102,8 +4125,8 @@
     }
 
     private boolean layoutNavigationBar(int displayWidth, int displayHeight, int displayRotation,
-            int uiMode, int overscanRight, int overscanBottom, Rect dcf, boolean navVisible,
-            boolean navTranslucent, boolean navAllowedHidden,
+            int uiMode, int overscanLeft, int overscanRight, int overscanBottom, Rect dcf,
+            boolean navVisible, boolean navTranslucent, boolean navAllowedHidden,
             boolean statusBarExpandedNotKeyguard) {
         if (mNavigationBar != null) {
             boolean transientNavBarShowing = mNavigationBarController.isTransientShowing();
@@ -4111,8 +4134,9 @@
             // size.  We need to do this directly, instead of relying on
             // it to bubble up from the nav bar, because this needs to
             // change atomically with screen rotations.
-            mNavigationBarOnBottom = isNavigationBarOnBottom(displayWidth, displayHeight);
-            if (mNavigationBarOnBottom) {
+            mNavigationBarPosition = navigationBarPosition(displayWidth, displayHeight,
+                    displayRotation);
+            if (mNavigationBarPosition == NAV_BAR_BOTTOM) {
                 // It's a system nav bar or a portrait screen; nav bar goes on bottom.
                 int top = displayHeight - overscanBottom
                         - getNavigationBarHeight(displayRotation, uiMode);
@@ -4138,7 +4162,7 @@
                     // we can tell the app that it is covered by it.
                     mSystemBottom = mTmpNavigationFrame.top;
                 }
-            } else {
+            } else if (mNavigationBarPosition == NAV_BAR_RIGHT) {
                 // Landscape screen; nav bar goes to the right.
                 int left = displayWidth - overscanRight
                         - getNavigationBarWidth(displayRotation, uiMode);
@@ -4164,6 +4188,33 @@
                     // we can tell the app that it is covered by it.
                     mSystemRight = mTmpNavigationFrame.left;
                 }
+            } else if (mNavigationBarPosition == NAV_BAR_LEFT) {
+                // Seascape screen; nav bar goes to the left.
+                int right = overscanLeft + getNavigationBarWidth(displayRotation, uiMode);
+                mTmpNavigationFrame.set(overscanLeft, 0, right, displayHeight);
+                mStableLeft = mStableFullscreenLeft = mTmpNavigationFrame.right;
+                if (transientNavBarShowing) {
+                    mNavigationBarController.setBarShowingLw(true);
+                } else if (navVisible) {
+                    mNavigationBarController.setBarShowingLw(true);
+                    mDockLeft = mTmpNavigationFrame.right;
+                    // TODO: not so sure about those:
+                    mRestrictedScreenLeft = mRestrictedOverscanScreenLeft = mDockLeft;
+                    mRestrictedScreenWidth = mDockRight - mRestrictedScreenLeft;
+                    mRestrictedOverscanScreenWidth = mDockRight - mRestrictedOverscanScreenLeft;
+                } else {
+                    // We currently want to hide the navigation UI - unless we expanded the status
+                    // bar.
+                    mNavigationBarController.setBarShowingLw(statusBarExpandedNotKeyguard);
+                }
+                if (navVisible && !navTranslucent && !navAllowedHidden
+                        && !mNavigationBar.isAnimatingLw()
+                        && !mNavigationBarController.wasRecentlyTranslucent()) {
+                    // If the nav bar is currently requested to be visible,
+                    // and not in the process of animating on or off, then
+                    // we can tell the app that it is covered by it.
+                    mSystemLeft = mTmpNavigationFrame.right;
+                }
             }
             // Make sure the content and current rectangles are updated to
             // account for the restrictions from the navigation bar.
@@ -4184,8 +4235,15 @@
         return false;
     }
 
-    private boolean isNavigationBarOnBottom(int displayWidth, int displayHeight) {
-        return !mNavigationBarCanMove || displayWidth < displayHeight;
+    private int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) {
+        if (mNavigationBarCanMove && displayWidth > displayHeight) {
+            if (displayRotation == Surface.ROTATION_270) {
+                return NAV_BAR_LEFT;
+            } else {
+                return NAV_BAR_RIGHT;
+            }
+        }
+        return NAV_BAR_BOTTOM;
     }
 
     /** {@inheritDoc} */
@@ -4361,7 +4419,11 @@
             if (mStatusBar != null && mFocusedWindow == mStatusBar && canReceiveInput(mStatusBar)) {
                 // The status bar forces the navigation bar while it's visible. Make sure the IME
                 // avoids the navigation bar in that case.
-                pf.right = df.right = of.right = cf.right = vf.right = mStableRight;
+                if (mNavigationBarPosition == NAV_BAR_RIGHT) {
+                    pf.right = df.right = of.right = cf.right = vf.right = mStableRight;
+                } else if (mNavigationBarPosition == NAV_BAR_LEFT) {
+                    pf.left = df.left = of.left = cf.left = vf.left = mStableLeft;
+                }
             }
             // IM dock windows always go to the bottom of the screen.
             attrs.gravity = Gravity.BOTTOM;
@@ -4390,6 +4452,8 @@
             } else {
                 vf.set(cf);
             }
+        } else if (attrs.type == TYPE_WALLPAPER) {
+           layoutWallpaper(win, pf, df, of, cf);
         } else if (win == mStatusBar) {
             pf.left = df.left = of.left = mUnrestrictedScreenLeft;
             pf.top = df.top = of.top = mUnrestrictedScreenTop;
@@ -4613,17 +4677,6 @@
                             + mOverscanScreenWidth;
                     pf.bottom = df.bottom = of.bottom = cf.bottom = mOverscanScreenTop
                             + mOverscanScreenHeight;
-                } else if (attrs.type == TYPE_WALLPAPER) {
-                    // The wallpaper also has Real Ultimate Power, but we want to tell
-                    // it about the overscan area.
-                    pf.left = df.left = mOverscanScreenLeft;
-                    pf.top = df.top = mOverscanScreenTop;
-                    pf.right = df.right = mOverscanScreenLeft + mOverscanScreenWidth;
-                    pf.bottom = df.bottom = mOverscanScreenTop + mOverscanScreenHeight;
-                    of.left = cf.left = mUnrestrictedScreenLeft;
-                    of.top = cf.top = mUnrestrictedScreenTop;
-                    of.right = cf.right = mUnrestrictedScreenLeft + mUnrestrictedScreenWidth;
-                    of.bottom = cf.bottom = mUnrestrictedScreenTop + mUnrestrictedScreenHeight;
                 } else if ((fl & FLAG_LAYOUT_IN_OVERSCAN) != 0
                         && attrs.type >= WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW
                         && attrs.type <= WindowManager.LayoutParams.LAST_SUB_WINDOW) {
@@ -4816,6 +4869,20 @@
         }
     }
 
+    private void layoutWallpaper(WindowState win, Rect pf, Rect df, Rect of, Rect cf) {
+
+        // The wallpaper also has Real Ultimate Power, but we want to tell
+        // it about the overscan area.
+        pf.left = df.left = mOverscanScreenLeft;
+        pf.top = df.top = mOverscanScreenTop;
+        pf.right = df.right = mOverscanScreenLeft + mOverscanScreenWidth;
+        pf.bottom = df.bottom = mOverscanScreenTop + mOverscanScreenHeight;
+        of.left = cf.left = mUnrestrictedScreenLeft;
+        of.top = cf.top = mUnrestrictedScreenTop;
+        of.right = cf.right = mUnrestrictedScreenLeft + mUnrestrictedScreenWidth;
+        of.bottom = cf.bottom = mUnrestrictedScreenTop + mUnrestrictedScreenHeight;
+    }
+
     private void offsetInputMethodWindowLw(WindowState win) {
         int top = Math.max(win.getDisplayFrameLw().top, win.getContentFrameLw().top);
         top += win.getGivenContentInsetsLw().top;
@@ -4995,9 +5062,26 @@
             }
         }
 
-        // Keep track of the window if it's dimming but not necessarily fullscreen.
         final boolean reallyVisible = win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw();
-        if (mTopFullscreenOpaqueOrDimmingWindowState == null &&  reallyVisible
+
+        // Voice interaction overrides both top fullscreen and top docked.
+        if (reallyVisible && win.getAttrs().type == TYPE_VOICE_INTERACTION) {
+            if (mTopFullscreenOpaqueWindowState == null) {
+                mTopFullscreenOpaqueWindowState = win;
+                if (mTopFullscreenOpaqueOrDimmingWindowState == null) {
+                    mTopFullscreenOpaqueOrDimmingWindowState = win;
+                }
+            }
+            if (mTopDockedOpaqueWindowState == null) {
+                mTopDockedOpaqueWindowState = win;
+                if (mTopDockedOpaqueOrDimmingWindowState == null) {
+                    mTopDockedOpaqueOrDimmingWindowState = win;
+                }
+            }
+        }
+
+        // Keep track of the window if it's dimming but not necessarily fullscreen.
+        if (mTopFullscreenOpaqueOrDimmingWindowState == null && reallyVisible
                 && win.isDimming() && StackId.normallyFullscreenWindows(stackId)) {
             mTopFullscreenOpaqueOrDimmingWindowState = win;
         }
@@ -5655,6 +5739,18 @@
                 break;
             }
 
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN:
+                // fall through
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP:
+                // fall through
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_LEFT:
+                // fall through
+            case KeyEvent.KEYCODE_SYSTEM_NAVIGATION_RIGHT: {
+                result &= ~ACTION_PASS_TO_USER;
+                interceptSystemNavigationKey(event);
+                break;
+            }
+
             case KeyEvent.KEYCODE_SLEEP: {
                 result &= ~ACTION_PASS_TO_USER;
                 isWakeKey = false;
@@ -5776,6 +5872,23 @@
     }
 
     /**
+     * Handle statusbar expansion events.
+     * @param event
+     */
+    private void interceptSystemNavigationKey(KeyEvent event) {
+        if (event.getAction() == KeyEvent.ACTION_UP && areSystemNavigationKeysEnabled()) {
+            IStatusBarService sbar = getStatusBarService();
+            if (sbar != null) {
+                try {
+                    sbar.handleSystemNavigationKey(event.getKeyCode());
+                } catch (RemoteException e1) {
+                    // oops, no statusbar. Ignore event.
+                }
+            }
+        }
+    }
+
+    /**
      * Returns true if the key can have global actions attached to it.
      * We reserve all power management keys for the system since they require
      * very careful handling.
@@ -6425,10 +6538,13 @@
 
         // Only navigation bar
         if (mNavigationBar != null) {
-            if (isNavigationBarOnBottom(displayWidth, displayHeight)) {
+            int position = navigationBarPosition(displayWidth, displayHeight, displayRotation);
+            if (position == NAV_BAR_BOTTOM) {
                 outInsets.bottom = getNavigationBarHeight(displayRotation, mUiMode);
-            } else {
+            } else if (position == NAV_BAR_RIGHT) {
                 outInsets.right = getNavigationBarWidth(displayRotation, mUiMode);
+            } else if (position == NAV_BAR_LEFT) {
+                outInsets.left = getNavigationBarWidth(displayRotation, mUiMode);
             }
         }
     }
@@ -6774,9 +6890,7 @@
             @Override public void run() {
                 if (mBootMsgDialog == null) {
                     int theme;
-                    if (mHasFeatureWatch) {
-                        theme = com.android.internal.R.style.Theme_Micro_Dialog_Alert;
-                    } else if (mContext.getPackageManager().hasSystemFeature(FEATURE_TELEVISION)) {
+                    if (mContext.getPackageManager().hasSystemFeature(FEATURE_TELEVISION)) {
                         theme = com.android.internal.R.style.Theme_Leanback_Dialog_Alert;
                     } else {
                         theme = 0;
@@ -7165,6 +7279,11 @@
                 Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, 0) == 1;
     }
 
+    private boolean areSystemNavigationKeysEnabled() {
+        return Settings.Secure.getInt(mContext.getContentResolver(),
+                Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 1) == 1;
+    }
+
     @Override
     public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) {
         if (!mVibrator.hasVibrator()) {
@@ -7564,6 +7683,39 @@
     }
 
     @Override
+    public boolean shouldRotateSeamlessly(int oldRotation, int newRotation) {
+        // For the upside down rotation we don't rotate seamlessly as the navigation
+        // bar moves position.
+        // Note most apps (using orientation:sensor or user as opposed to fullSensor)
+        // will not enter the reverse portrait orientation, so actually the
+        // orientation won't change at all.
+        if (oldRotation == mUpsideDownRotation || newRotation == mUpsideDownRotation) {
+            return false;
+        }
+        int delta = newRotation - oldRotation;
+        if (delta < 0) delta += 4;
+        // Likewise we don't rotate seamlessly for 180 degree rotations
+        // in this case the surfaces never resize, and our logic to 
+        // revert the transformations on size change will fail. We could
+        // fix this in the future with the "tagged" frames idea.
+        if (delta == Surface.ROTATION_180) {
+            return false;
+        }
+
+        // We only enable seamless rotation if the top window has requested
+        // it and is in the fullscreen opaque state. Seamless rotation
+        // requires freezing various Surface states and won't work well
+        // with animations, so we disable it in the animation case for now.
+        if (mTopFullscreenOpaqueWindowState != null && mTopIsFullscreen &&
+                !mTopFullscreenOpaqueWindowState.isAnimatingLw() &&
+                mTopFullscreenOpaqueWindowState.getAttrs().rotationAnimation ==
+                ROTATION_ANIMATION_JUMPCUT) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
     public void dump(String prefix, PrintWriter pw, String[] args) {
         pw.print(prefix); pw.print("mSafeMode="); pw.print(mSafeMode);
                 pw.print(" mSystemReady="); pw.print(mSystemReady);
diff --git a/services/core/java/com/android/server/policy/SystemGesturesPointerEventListener.java b/services/core/java/com/android/server/policy/SystemGesturesPointerEventListener.java
index 80e4341..598c58e 100644
--- a/services/core/java/com/android/server/policy/SystemGesturesPointerEventListener.java
+++ b/services/core/java/com/android/server/policy/SystemGesturesPointerEventListener.java
@@ -43,6 +43,7 @@
     private static final int SWIPE_FROM_TOP = 1;
     private static final int SWIPE_FROM_BOTTOM = 2;
     private static final int SWIPE_FROM_RIGHT = 3;
+    private static final int SWIPE_FROM_LEFT = 4;
 
     private final Context mContext;
     private final int mSwipeStartThreshold;
@@ -127,6 +128,9 @@
                     } else if (swipe == SWIPE_FROM_RIGHT) {
                         if (DEBUG) Slog.d(TAG, "Firing onSwipeFromRight");
                         mCallbacks.onSwipeFromRight();
+                    } else if (swipe == SWIPE_FROM_LEFT) {
+                        if (DEBUG) Slog.d(TAG, "Firing onSwipeFromLeft");
+                        mCallbacks.onSwipeFromLeft();
                     }
                 }
                 break;
@@ -229,6 +233,11 @@
                 && elapsed < SWIPE_TIMEOUT_MS) {
             return SWIPE_FROM_RIGHT;
         }
+        if (fromX <= mSwipeStartThreshold
+                && x > fromX + mSwipeDistanceThreshold
+                && elapsed < SWIPE_TIMEOUT_MS) {
+            return SWIPE_FROM_LEFT;
+        }
         return SWIPE_NONE;
     }
 
@@ -265,6 +274,7 @@
         void onSwipeFromTop();
         void onSwipeFromBottom();
         void onSwipeFromRight();
+        void onSwipeFromLeft();
         void onFling(int durationMs);
         void onDown();
         void onUpOrCancel();
diff --git a/services/core/java/com/android/server/policy/WindowOrientationListener.java b/services/core/java/com/android/server/policy/WindowOrientationListener.java
index a32c017..8ef0acb 100644
--- a/services/core/java/com/android/server/policy/WindowOrientationListener.java
+++ b/services/core/java/com/android/server/policy/WindowOrientationListener.java
@@ -49,6 +49,7 @@
             "debug.orientation.log", false);
 
     private static final boolean USE_GRAVITY_SENSOR = false;
+    private static final int DEFAULT_BATCH_LATENCY = 100000;
 
     private Handler mHandler;
     private SensorManager mSensorManager;
@@ -118,7 +119,12 @@
                     Slog.d(TAG, "WindowOrientationListener enabled");
                 }
                 mOrientationJudge.resetLocked();
-                mSensorManager.registerListener(mOrientationJudge, mSensor, mRate, mHandler);
+                if (mSensor.getType() == Sensor.TYPE_ACCELEROMETER) {
+                    mSensorManager.registerListener(
+                            mOrientationJudge, mSensor, mRate, DEFAULT_BATCH_LATENCY, mHandler);
+                } else {
+                    mSensorManager.registerListener(mOrientationJudge, mSensor, mRate, mHandler);
+                }
                 mEnabled = true;
             }
         }
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java
index 7108f4a..9ccfd67 100644
--- a/services/core/java/com/android/server/power/Notifier.java
+++ b/services/core/java/com/android/server/power/Notifier.java
@@ -18,6 +18,7 @@
 
 import android.app.ActivityManagerInternal;
 import android.app.AppOpsManager;
+import android.app.RetailDemoModeServiceInternal;
 
 import com.android.internal.app.IAppOpsService;
 import com.android.internal.app.IBatteryStats;
@@ -91,6 +92,7 @@
     private final ActivityManagerInternal mActivityManagerInternal;
     private final InputManagerInternal mInputManagerInternal;
     private final InputMethodManagerInternal mInputMethodManagerInternal;
+    private final RetailDemoModeServiceInternal mRetailDemoModeServiceInternal;
 
     private final NotifierHandler mHandler;
     private final Intent mScreenOnIntent;
@@ -136,6 +138,7 @@
         mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class);
         mInputManagerInternal = LocalServices.getService(InputManagerInternal.class);
         mInputMethodManagerInternal = LocalServices.getService(InputMethodManagerInternal.class);
+        mRetailDemoModeServiceInternal = LocalServices.getService(RetailDemoModeServiceInternal.class);
 
         mHandler = new NotifierHandler(looper);
         mScreenOnIntent = new Intent(Intent.ACTION_SCREEN_ON);
@@ -534,7 +537,9 @@
             }
             mUserActivityPending = false;
         }
-
+        if (mRetailDemoModeServiceInternal != null) {
+            mRetailDemoModeServiceInternal.onUserActivity();
+        }
         mPolicy.userActivity();
     }
 
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
index 5b9d139..8ce2fd9 100644
--- a/services/core/java/com/android/server/power/ShutdownThread.java
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
@@ -543,7 +543,8 @@
                 }
 
                 try {
-                    bluetoothOff = bluetooth == null || !bluetooth.isEnabled();
+                    bluetoothOff = bluetooth == null ||
+                            bluetooth.getState() == BluetoothAdapter.STATE_OFF;
                     if (!bluetoothOff) {
                         Log.w(TAG, "Disabling Bluetooth...");
                         bluetooth.disable(false);  // disable but don't persist new state
@@ -577,7 +578,7 @@
 
                     if (!bluetoothOff) {
                         try {
-                            bluetoothOff = !bluetooth.isEnabled();
+                            bluetoothOff = bluetooth.getState() == BluetoothAdapter.STATE_OFF;
                         } catch (RemoteException ex) {
                             Log.e(TAG, "RemoteException during bluetooth shutdown", ex);
                             bluetoothOff = true;
diff --git a/services/core/java/com/android/server/search/SearchManagerService.java b/services/core/java/com/android/server/search/SearchManagerService.java
index 4d91814..2e5eb3a 100644
--- a/services/core/java/com/android/server/search/SearchManagerService.java
+++ b/services/core/java/com/android/server/search/SearchManagerService.java
@@ -33,6 +33,7 @@
 import android.database.ContentObserver;
 import android.os.Binder;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -42,6 +43,7 @@
 
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.content.PackageMonitor;
+import com.android.internal.os.BackgroundThread;
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.server.LocalServices;
 import com.android.server.SystemService;
@@ -57,6 +59,7 @@
  */
 public class SearchManagerService extends ISearchManager.Stub {
     private static final String TAG = "SearchManagerService";
+    final Handler mHandler;
 
     public static class Lifecycle extends SystemService {
         private SearchManagerService mService;
@@ -72,8 +75,13 @@
         }
 
         @Override
-        public void onUnlockUser(int userHandle) {
-            mService.onUnlockUser(userHandle);
+        public void onUnlockUser(final int userId) {
+            mService.mHandler.post(new Runnable() {
+                @Override
+                public void run() {
+                    mService.onUnlockUser(userId);
+                }
+            });
         }
 
         @Override
@@ -99,6 +107,7 @@
         mContext = context;
         new MyPackageMonitor().register(context, null, UserHandle.ALL, true);
         new GlobalSearchProviderObserver(context.getContentResolver());
+        mHandler = BackgroundThread.getHandler();
     }
 
     private Searchables getSearchables(int userId) {
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index baa7f1e..ca92b90 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -31,6 +31,8 @@
 import android.os.UserHandle;
 import android.util.ArrayMap;
 import android.util.Slog;
+import android.view.KeyEvent;
+
 import com.android.internal.statusbar.IStatusBar;
 import com.android.internal.statusbar.IStatusBarService;
 import com.android.internal.statusbar.NotificationVisibility;
@@ -415,6 +417,18 @@
     }
 
     @Override
+    public void handleSystemNavigationKey(int key) throws RemoteException {
+        enforceExpandStatusBar();
+
+        if (mBar != null) {
+            try {
+                mBar.handleSystemNavigationKey(key);
+            } catch (RemoteException ex) {
+            }
+        }
+    }
+
+    @Override
     public void disable(int what, IBinder token, String pkg) {
         disableForUser(what, token, pkg, mCurrentUserId);
     }
diff --git a/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java b/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
index cbbcb0e..0ae1717 100644
--- a/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
+++ b/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java
@@ -455,9 +455,7 @@
         //log the event to event log with the amount of free storage(in bytes) left on the device
         EventLog.writeEvent(EventLogTags.LOW_STORAGE, mFreeMem);
         //  Pack up the values and broadcast them to everyone
-        Intent lowMemIntent = new Intent(Environment.isExternalStorageEmulated()
-                ? Settings.ACTION_INTERNAL_STORAGE_SETTINGS
-                : Intent.ACTION_MANAGE_PACKAGE_STORAGE);
+        Intent lowMemIntent = new Intent(StorageManager.ACTION_MANAGE_STORAGE);
         lowMemIntent.putExtra("memory", mFreeMem);
         lowMemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         NotificationManager mNotificationMgr =
diff --git a/services/core/java/com/android/server/twilight/TwilightService.java b/services/core/java/com/android/server/twilight/TwilightService.java
index 6158c92..89e5e58 100644
--- a/services/core/java/com/android/server/twilight/TwilightService.java
+++ b/services/core/java/com/android/server/twilight/TwilightService.java
@@ -556,7 +556,7 @@
         public void onChange(boolean selfChange) {
             super.onChange(selfChange);
             int value = Secure.getIntForUser(getContext().getContentResolver(),
-                    Secure.TWILIGHT_MODE, Secure.TWILIGHT_MODE_LOCKED_OFF, mCurrentUser);
+                    Secure.TWILIGHT_MODE, Secure.TWILIGHT_MODE_AUTO, mCurrentUser);
             if (value == Secure.TWILIGHT_MODE_LOCKED_OFF) {
                 setLockedState(new TwilightState(false, 0));
             } else if (value == Secure.TWILIGHT_MODE_LOCKED_ON) {
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index efd2382..06e5e73 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -229,10 +229,12 @@
 
             if (moved && lockWallpaperChanged) {
                 // We just migrated sys -> lock to preserve imagery for an impending
-                // new system-only wallpaper.  Tell keyguard about it but that's it.
+                // new system-only wallpaper.  Tell keyguard about it and make sure it
+                // has the right SELinux label.
                 if (DEBUG) {
                     Slog.i(TAG, "Sys -> lock MOVED_TO");
                 }
+                SELinux.restorecon(changedFile);
                 notifyLockWallpaperChanged();
                 return;
             }
@@ -254,9 +256,11 @@
                             if (moved) {
                                 // This is a restore, so generate the crop using any just-restored new
                                 // crop guidelines, making sure to preserve our local dimension hints.
+                                // We also make sure to reapply the correct SELinux label.
                                 if (DEBUG) {
                                     Slog.v(TAG, "moved-to, therefore restore; reloading metadata");
                                 }
+                                SELinux.restorecon(changedFile);
                                 loadSettingsLocked(wallpaper.userId, true);
                             }
                             generateCrop(wallpaper);
@@ -906,10 +910,9 @@
                         public void onForegroundProfileSwitch(int newProfileId) {
                             // Ignore.
                         }
-                    });
+                    }, TAG);
         } catch (RemoteException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+            e.rethrowAsRuntimeException();
         }
     }
 
@@ -1279,8 +1282,9 @@
     }
 
     @Override
-    public WallpaperInfo getWallpaperInfo() {
-        int userId = UserHandle.getCallingUserId();
+    public WallpaperInfo getWallpaperInfo(int userId) {
+        userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
+                Binder.getCallingUid(), userId, false, true, "getWallpaperIdForUser", null);
         synchronized (mLock) {
             WallpaperData wallpaper = mWallpaperMap.get(userId);
             if (wallpaper != null && wallpaper.connection != null) {
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index 4553f8e..2b58156 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -1057,7 +1057,7 @@
         final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
         final int thumbHeightI = mTmpRect.height();
         final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
-        final int thumbStartX = mTmpRect.left - containingFrame.left;
+        final int thumbStartX = mTmpRect.left - containingFrame.left - contentInsets.left;
         final int thumbStartY = mTmpRect.top - containingFrame.top;
 
         switch (thumbTransitState) {
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index e425e7d1..66e9fd86 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -132,6 +132,7 @@
     boolean mAlwaysFocusable;
 
     boolean mAppStopped;
+    int mRotationAnimationHint;
     int mPendingRelaunchCount;
 
     private ArrayList<WindowSurfaceController.SurfaceControlWithBackground> mSurfaceViewBackgrounds =
@@ -628,6 +629,16 @@
         }
     }
 
+    void clearRelaunching() {
+        if (mPendingRelaunchCount == 0) {
+            return;
+        }
+        if (canFreezeBounds()) {
+            unfreezeBounds();
+        }
+        mPendingRelaunchCount = 0;
+    }
+
     void addWindow(WindowState w) {
         for (int i = allAppWindows.size() - 1; i >= 0; i--) {
             WindowState candidate = allAppWindows.get(i);
@@ -707,8 +718,12 @@
      * Unfreezes the previously frozen bounds. See {@link #freezeBounds}.
      */
     private void unfreezeBounds() {
-        mFrozenBounds.remove();
-        mFrozenMergedConfig.remove();
+        if (!mFrozenBounds.isEmpty()) {
+            mFrozenBounds.remove();
+        }
+        if (!mFrozenMergedConfig.isEmpty()) {
+            mFrozenMergedConfig.remove();
+        }
         for (int i = windows.size() - 1; i >= 0; i--) {
             final WindowState win = windows.get(i);
             if (!win.mHasSurface) {
diff --git a/services/core/java/com/android/server/wm/DimLayerController.java b/services/core/java/com/android/server/wm/DimLayerController.java
index 2b9879e..7f97c46 100644
--- a/services/core/java/com/android/server/wm/DimLayerController.java
+++ b/services/core/java/com/android/server/wm/DimLayerController.java
@@ -1,5 +1,6 @@
 package com.android.server.wm;
 
+import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DIM_LAYER;
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
@@ -250,6 +251,13 @@
                     duration = getDimLayerFadeDuration(duration);
                 }
                 state.dimLayer.show(dimLayer, dimAmount, duration);
+
+                // If we showed a dim layer, make sure to redo the layout because some things depend
+                // on whether a dim layer is showing or not.
+                if (targetAlpha == 0) {
+                    mDisplayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_LAYOUT;
+                    mDisplayContent.layoutNeeded = true;
+                }
             }
         } else if (state.dimLayer.getLayer() != dimLayer) {
             state.dimLayer.setLayer(dimLayer);
diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java
index 88028be..18f97a7 100644
--- a/services/core/java/com/android/server/wm/WallpaperController.java
+++ b/services/core/java/com/android/server/wm/WallpaperController.java
@@ -479,6 +479,8 @@
         boolean resetTopWallpaper = false;
         boolean inFreeformSpace = false;
         boolean replacing = false;
+        boolean keyguardGoingAwayWithWallpaper = false;
+
         for (int i = windows.size() - 1; i >= 0; i--) {
             w = windows.get(i);
             if ((w.mAttrs.type == TYPE_WALLPAPER)) {
@@ -506,13 +508,11 @@
                 inFreeformSpace = stack != null && stack.mStackId == FREEFORM_WORKSPACE_STACK_ID;
             }
 
-            replacing = replacing || w.mWillReplaceWindow;
+            replacing |= w.mWillReplaceWindow;
+            keyguardGoingAwayWithWallpaper |= (w.mAppToken != null
+                    && w.mWinAnimator.mKeyguardGoingAwayWithWallpaper);
 
-            // If the app is executing an animation because the keyguard is going away (and the
-            // keyguard was showing the wallpaper) keep the wallpaper during the animation so it
-            // doesn't flicker out.
-            final boolean hasWallpaper = (w.mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0
-                    || (w.mAppToken != null && w.mWinAnimator.mKeyguardGoingAwayWithWallpaper);
+            final boolean hasWallpaper = (w.mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0;
             if (hasWallpaper && w.isOnScreen() && (mWallpaperTarget == w || w.isDrawFinishedLw())) {
                 if (DEBUG_WALLPAPER) Slog.v(TAG, "Found wallpaper target: #" + i + "=" + w);
                 result.setWallpaperTarget(w, i);
@@ -529,18 +529,26 @@
             }
         }
 
-        if (result.wallpaperTarget == null && windowDetachedI >= 0) {
+        if (result.wallpaperTarget != null) {
+            return;
+        }
+
+        if (windowDetachedI >= 0) {
             if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG,
                     "Found animating detached wallpaper activity: #" + windowDetachedI + "=" + w);
             result.setWallpaperTarget(w, windowDetachedI);
-        }
-        if (result.wallpaperTarget == null
-                && (inFreeformSpace || (replacing && mWallpaperTarget != null))) {
+        } else if (inFreeformSpace || (replacing && mWallpaperTarget != null)) {
             // In freeform mode we set the wallpaper as its own target, so we don't need an
             // additional window to make it visible. When we are replacing a window and there was
             // wallpaper before replacement, we want to keep the window until the new windows fully
             // appear and can determine the visibility, to avoid flickering.
             result.setWallpaperTarget(result.topWallpaper, result.topWallpaperIndex);
+
+        } else if (keyguardGoingAwayWithWallpaper) {
+            // If the app is executing an animation because the keyguard is going away (and the
+            // keyguard was showing the wallpaper) keep the wallpaper during the animation so it
+            // doesn't flicker out by having it be its own target.
+            result.setWallpaperTarget(result.topWallpaper, result.topWallpaperIndex);
         }
     }
 
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 36875123..4c79149 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -41,8 +41,10 @@
 import android.database.ContentObserver;
 import android.graphics.Bitmap;
 import android.graphics.PixelFormat;
+import android.graphics.Matrix;
 import android.graphics.Point;
 import android.graphics.Rect;
+import android.graphics.RectF;
 import android.graphics.Region;
 import android.hardware.display.DisplayManager;
 import android.hardware.display.DisplayManagerInternal;
@@ -291,6 +293,9 @@
     /** Amount of time (in milliseconds) to delay before declaring a window freeze timeout. */
     static final int WINDOW_FREEZE_TIMEOUT_DURATION = 2000;
 
+    /** Amount of time (in milliseconds) to delay before declaring a seamless rotation timeout. */
+    static final int SEAMLESS_ROTATION_TIMEOUT_DURATION = 2000;
+
     /** Amount of time (in milliseconds) to delay before declaring a window replacement timeout. */
     static final int WINDOW_REPLACEMENT_TIMEOUT_DURATION = 2000;
 
@@ -516,6 +521,9 @@
     final Rect mTmpRect = new Rect();
     final Rect mTmpRect2 = new Rect();
     final Rect mTmpRect3 = new Rect();
+    final RectF mTmpRectF = new RectF();
+
+    final Matrix mTmpTransform = new Matrix();
 
     boolean mDisplayReady;
     boolean mSafeMode;
@@ -3161,6 +3169,7 @@
         // frozen, there is no reason to animate and it can cause strange
         // artifacts when we unfreeze the display if some different animation
         // is running.
+        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "WM#applyAnimationLocked");
         if (okToDisplay()) {
             DisplayInfo displayInfo = getDefaultDisplayInfoLocked();
             final int width = displayInfo.appWidth;
@@ -3212,6 +3221,7 @@
         } else {
             atoken.mAppAnimator.clearAnimation();
         }
+        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
 
         return atoken.mAppAnimator.animation != null;
     }
@@ -3420,7 +3430,7 @@
             int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int userId,
             int configChanges, boolean voiceInteraction, boolean launchTaskBehind,
             Rect taskBounds, Configuration config, int taskResizeMode, boolean alwaysFocusable,
-            boolean homeTask, int targetSdkVersion) {
+            boolean homeTask, int targetSdkVersion, int rotationAnimationHint) {
         if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
                 "addAppToken()")) {
             throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
@@ -3458,6 +3468,7 @@
             atoken.mAlwaysFocusable = alwaysFocusable;
             if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG_WM, "addAppToken: " + atoken
                     + " to stack=" + stackId + " task=" + taskId + " at " + addPos);
+            atoken.mRotationAnimationHint = rotationAnimationHint;
 
             Task task = mTaskIdToTask.get(taskId);
             if (task == null) {
@@ -3510,6 +3521,13 @@
                 // can re-appear and inflict its own orientation on us.  Keep the
                 // orientation stable until this all settles down.
                 return mLastWindowForcedOrientation;
+            } else if (mPolicy.isKeyguardLocked()
+                    && mLastKeyguardForcedOrientation != SCREEN_ORIENTATION_UNSPECIFIED) {
+                // Use the last orientation the keyguard forced while the display is frozen with the
+                // keyguard locked.
+                if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Display is frozen while keyguard locked, "
+                        + "return " + mLastKeyguardForcedOrientation);
+                return mLastKeyguardForcedOrientation;
             }
         } else {
             // TODO(multidisplay): Change to the correct display.
@@ -6567,6 +6585,7 @@
         Binder.restoreCallingIdentity(origId);
     }
 
+
     // TODO(multidisplay): Rotate any display?
     /**
      * Updates the current rotation.
@@ -6626,6 +6645,8 @@
                 + ", forceApp=" + mForcedAppOrientation);
         }
 
+        int oldRotation = mRotation;
+
         mRotation = rotation;
         mAltOrientation = altOrientation;
         mPolicy.setRotationLw(mRotation);
@@ -6642,10 +6663,32 @@
         } else {
             mPolicy.selectRotationAnimationLw(anim);
         }
-        startFreezingDisplayLocked(inTransaction, anim[0], anim[1]);
-        // startFreezingDisplayLocked can reset the ScreenRotationAnimation.
-        screenRotationAnimation =
+        boolean rotateSeamlessly = mPolicy.shouldRotateSeamlessly(oldRotation, mRotation);
+        final WindowList windows = displayContent.getWindowList();
+        // We can't rotate seamlessly while an existing seamless rotation is still
+        // waiting on windows to finish drawing.
+        if (rotateSeamlessly) {
+            for (int i = windows.size() - 1; i >= 0; i--) {
+                WindowState w = windows.get(i);
+                if (w.mSeamlesslyRotated) {
+                    rotateSeamlessly = false;
+                    break;
+                }
+            }
+        }
+
+        if (!rotateSeamlessly) {
+            startFreezingDisplayLocked(inTransaction, anim[0], anim[1]);
+            // startFreezingDisplayLocked can reset the ScreenRotationAnimation.
+            screenRotationAnimation =
                 mAnimator.getScreenRotationAnimationLocked(Display.DEFAULT_DISPLAY);
+        } else {
+            // The screen rotation animation uses a screenshot to freeze the screen
+            // while windows resize underneath.
+            // When we are rotating seamlessly, we allow the elements to transition
+            // to their rotated state independently and without a freeze required.
+            screenRotationAnimation = null;
+        }
 
         // We need to update our screen size information to match the new rotation. If the rotation
         // has actually changed then this method will return true and, according to the comment at
@@ -6674,6 +6717,13 @@
                 }
             }
 
+            if (rotateSeamlessly) {
+                for (int i = windows.size() - 1; i >= 0; i--) {
+                    WindowState w = windows.get(i);
+                    w.mWinAnimator.seamlesslyRotateWindow(oldRotation, mRotation);
+                }
+            }
+
             mDisplayManagerInternal.performTraversalInTransactionFromWindowManager();
         } finally {
             if (!inTransaction) {
@@ -6684,19 +6734,22 @@
             }
         }
 
-        final WindowList windows = displayContent.getWindowList();
         for (int i = windows.size() - 1; i >= 0; i--) {
             WindowState w = windows.get(i);
             // Discard surface after orientation change, these can't be reused.
             if (w.mAppToken != null) {
                 w.mAppToken.destroySavedSurfaces();
             }
-            if (w.mHasSurface) {
+            if (w.mHasSurface && !rotateSeamlessly) {
                 if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Set mOrientationChanging of " + w);
                 w.mOrientationChanging = true;
                 mWindowPlacerLocked.mOrientationChangeComplete = false;
+                w.mLastFreezeDuration = 0;
             }
-            w.mLastFreezeDuration = 0;
+        }
+        if (rotateSeamlessly) {
+            mH.removeMessages(H.SEAMLESS_ROTATION_TIMEOUT);
+            mH.sendEmptyMessageDelayed(H.SEAMLESS_ROTATION_TIMEOUT, SEAMLESS_ROTATION_TIMEOUT_DURATION);
         }
 
         for (int i=mRotationWatchers.size()-1; i>=0; i--) {
@@ -6706,7 +6759,7 @@
             }
         }
 
-        //TODO (multidisplay): Magnification is supported only for the default display.
+        // TODO (multidisplay): Magnification is supported only for the default display.
         // Announce rotation only if we will not animate as we already have the
         // windows in final state. Otherwise, we make this call at the rotation end.
         if (screenRotationAnimation == null && mAccessibilityController != null
@@ -7994,8 +8047,8 @@
         public static final int NOTIFY_STARTING_WINDOW_DRAWN = 50;
         public static final int UPDATE_ANIMATION_SCALE = 51;
         public static final int WINDOW_REMOVE_TIMEOUT = 52;
-
         public static final int NOTIFY_DOCKED_STACK_MINIMIZED_CHANGED = 53;
+        public static final int SEAMLESS_ROTATION_TIMEOUT = 54;
 
         /**
          * Used to denote that an integer field in a message will not be used.
@@ -8635,6 +8688,27 @@
                     mAmInternal.notifyDockedStackMinimizedChanged(msg.arg1 == 1);
                 }
                 break;
+                case SEAMLESS_ROTATION_TIMEOUT: {
+                    // Rotation only supported on primary display.
+                    // TODO(multi-display)
+                    synchronized(mWindowMap) {
+                        final DisplayContent displayContent = getDefaultDisplayContentLocked();
+                        final WindowList windows = displayContent.getWindowList();
+                        boolean layoutNeeded = false;
+                        for (int i = windows.size() - 1; i >= 0; i--) {
+                            WindowState w = windows.get(i);
+                            if (w.mSeamlesslyRotated) {
+                                layoutNeeded = true;
+                                w.setDisplayLayoutNeeded();
+                            }
+                            w.mSeamlesslyRotated = false;
+                        }
+                        if (layoutNeeded) {
+                            mWindowPlacerLocked.performSurfacePlacement();
+                        }
+                    }
+                }
+                break;
             }
             if (DEBUG_WINDOW_TRACE) {
                 Slog.v(TAG_WM, "handleMessage: exit");
@@ -10143,6 +10217,15 @@
         }
     }
 
+    public void notifyAppRelaunchesCleared(IBinder token) {
+        synchronized (mWindowMap) {
+            final AppWindowToken appWindow = findAppWindowToken(token);
+            if (appWindow != null) {
+                appWindow.clearRelaunching();
+            }
+        }
+    }
+
     @Override
     public int getDockedDividerInsetsLw() {
         return getDefaultDisplayContentLocked().getDockedDividerController().getContentInsets();
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 08bfa2d..1ac3d44 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -494,6 +494,15 @@
     /** @see #isResizedWhileNotDragResizingReported(). */
     private boolean mResizedWhileNotDragResizingReported;
 
+    /**
+     * During seamless rotation we have two phases, first the old window contents
+     * are rotated to look as if they didn't move in the new coordinate system. Then we
+     * have to freeze updates to this layer (to preserve the transformation) until
+     * the resize actually occurs. This is true from when the transformation is set
+     * and false until the transaction to resize is sent.
+     */
+    boolean mSeamlesslyRotated = false;
+
     WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
            WindowState attachedWindow, int appOp, int seq, WindowManager.LayoutParams a,
            int viewVisibility, final DisplayContent displayContent) {
@@ -2899,4 +2908,12 @@
     boolean shouldBeReplacedWithChildren() {
         return isChildWindow() || mAttrs.type == TYPE_APPLICATION;
     }
+
+    public int getRotationAnimationHint() {
+        if (mAppToken != null) {
+            return mAppToken.mRotationAnimationHint;
+        } else {
+            return -1;
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 36d9697..e374ee9 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -51,12 +51,15 @@
 import android.graphics.PixelFormat;
 import android.graphics.Point;
 import android.graphics.Rect;
+import android.graphics.RectF;
 import android.graphics.Region;
 import android.os.Debug;
 import android.os.RemoteException;
+import android.os.Trace;
 import android.util.Slog;
 import android.view.DisplayInfo;
 import android.view.MagnificationSpec;
+import android.view.Surface;
 import android.view.Surface.OutOfResourcesException;
 import android.view.SurfaceControl;
 import android.view.WindowManager;
@@ -1400,6 +1403,9 @@
         mExtraHScale = (float) 1.0;
         mExtraVScale = (float) 1.0;
 
+        boolean wasForceScaled = mForceScaleUntilResize;
+        boolean wasSeamlesslyRotated = w.mSeamlesslyRotated;
+
         // Once relayout has been called at least once, we need to make sure
         // we only resize the client surface during calls to relayout. For
         // clients which use indeterminate measure specs (MATCH_PARENT),
@@ -1407,21 +1413,17 @@
         // However, this would be unsafe, as the client may be in the middle
         // of producing a frame at the old size, having just completed layout
         // to find the surface size changed underneath it.
-        //
-        // TODO: For N we only apply this fix to the pinned workspace. As we
-        // aren't observing known issues here outside of PiP resizing. (Typically
-        // the other windows that use -1 are PopupWindows which aren't likely
-        // to be rendering while we resize).
-
-        boolean wasForceScaled = mForceScaleUntilResize;
-
-        if (!w.inPinnedWorkspace() || (!w.mRelayoutCalled || w.mInRelayout)) {
+        if (!w.mRelayoutCalled || w.mInRelayout) {
             mSurfaceResized = mSurfaceController.setSizeInTransaction(
                     mTmpSize.width(), mTmpSize.height(), recoveringMemory);
         } else {
             mSurfaceResized = false;
         }
         mForceScaleUntilResize = mForceScaleUntilResize && !mSurfaceResized;
+        // If we are undergoing seamless rotation, the surface has already
+        // been set up to persist at it's old location. We need to freeze
+        // updates until a resize occurs.
+        w.mSeamlesslyRotated = w.mSeamlesslyRotated && !mSurfaceResized;
 
         calculateSurfaceWindowCrop(mTmpClipRect, mTmpFinalClipRect);
 
@@ -1471,17 +1473,20 @@
             // will be seamless.
             mForceScaleUntilResize = true;
         } else {
-            mSurfaceController.setPositionInTransaction(mTmpSize.left, mTmpSize.top,
-                    recoveringMemory);
+            if (!w.mSeamlesslyRotated) {
+                mSurfaceController.setPositionInTransaction(mTmpSize.left, mTmpSize.top,
+                        recoveringMemory);
+            }
         }
 
         // If we are ending the scaling mode. We switch to SCALING_MODE_FREEZE
-        // to prevent further updates until buffer latch. Normally position
-        // would continue to apply immediately. But we need a different position
-        // before and after resize (since we have scaled the shadows, as discussed
-        // above).
-        if (wasForceScaled && !mForceScaleUntilResize) {
-            mSurfaceController.setPositionAppliesWithResizeInTransaction(true);
+        // to prevent further updates until buffer latch.
+        // When ending both force scaling, and seamless rotation, we need to freeze
+        // the Surface geometry until a buffer comes in at the new size (normally position and crop
+        // are unfrozen). setGeometryAppliesWithResizeInTransaction accomplishes this for us.
+        if ((wasForceScaled && !mForceScaleUntilResize) ||
+                (wasSeamlesslyRotated && !w.mSeamlesslyRotated)) {
+            mSurfaceController.setGeometryAppliesWithResizeInTransaction(true);
             mSurfaceController.forceScaleableInTransaction(false);
         }
 
@@ -1493,12 +1498,13 @@
                     -w.mAttrs.surfaceInsets.right, -w.mAttrs.surfaceInsets.bottom);
         }
 
-        updateSurfaceWindowCrop(clipRect, mTmpFinalClipRect, recoveringMemory);
-
-        mSurfaceController.setMatrixInTransaction(mDsDx * w.mHScale * mExtraHScale,
-                mDtDx * w.mVScale * mExtraVScale,
-                mDsDy * w.mHScale * mExtraHScale,
-                mDtDy * w.mVScale * mExtraVScale, recoveringMemory);
+        if (!w.mSeamlesslyRotated) {
+            updateSurfaceWindowCrop(clipRect, mTmpFinalClipRect, recoveringMemory);
+            mSurfaceController.setMatrixInTransaction(mDsDx * w.mHScale * mExtraHScale,
+                    mDtDx * w.mVScale * mExtraVScale,
+                    mDsDy * w.mHScale * mExtraHScale,
+                    mDtDy * w.mVScale * mExtraVScale, recoveringMemory);
+        }
 
         if (mSurfaceResized) {
             mReportSurfaceResized = true;
@@ -1858,6 +1864,7 @@
         // frozen, there is no reason to animate and it can cause strange
         // artifacts when we unfreeze the display if some different animation
         // is running.
+        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "WSA#applyAnimationLocked");
         if (mService.okToDisplay()) {
             int anim = mPolicy.selectAnimationLw(mWin, transit);
             int attr = -1;
@@ -1897,6 +1904,8 @@
         } else {
             clearAnimation();
         }
+        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+
         if (mWin.mAttrs.type == TYPE_INPUT_METHOD) {
             mService.adjustForImeIfNeeded(mWin.mDisplayContent);
             if (isEntrance) {
@@ -2084,4 +2093,98 @@
     void endDelayingAnimationStart() {
         mAnimationStartDelayed = false;
     }
+
+    void seamlesslyRotateWindow(int oldRotation, int newRotation) {
+        final WindowState w = mWin;
+        if (!w.isVisibleNow() || w.mIsWallpaper) {
+            return;
+        }
+
+        final Rect cropRect = mService.mTmpRect;
+        final Rect displayRect = mService.mTmpRect2;
+        final RectF frameRect = mService.mTmpRectF;
+        final Matrix transform = mService.mTmpTransform;
+
+        final float x = w.mFrame.left;
+        final float y = w.mFrame.top;
+        final float width = w.mFrame.width();
+        final float height = w.mFrame.height();
+
+        mService.getDefaultDisplayContentLocked().getLogicalDisplayRect(displayRect);
+        final float displayWidth = displayRect.width();
+        final float displayHeight = displayRect.height();
+
+        // Compute a transform matrix to undo the coordinate space transformation,
+        // and present the window at the same physical position it previously occupied.
+        final int deltaRotation = DisplayContent.deltaRotation(newRotation, oldRotation);
+        switch (deltaRotation) {
+        case Surface.ROTATION_0:
+            transform.reset();
+            break;
+        case Surface.ROTATION_270:
+            transform.setRotate(270, 0, 0);
+            transform.postTranslate(0, displayHeight);
+            transform.postTranslate(y, 0);
+            break;
+        case Surface.ROTATION_180:
+            transform.reset();
+            break;
+        case Surface.ROTATION_90:
+            transform.setRotate(90, 0, 0);
+            transform.postTranslate(displayWidth, 0);
+            transform.postTranslate(-y, x);
+            break;
+        }
+
+        // We have two cases:
+        //  1. Windows with NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY:
+        //     These windows never change buffer size when rotating. Rather the window manager
+        //     just updates the scaling factors to fit in the new coordinate system,
+        //     and SurfaceFlinger takes care of updating the buffer contents. So in this case
+        //     we just need we just need to update the scaling factors and things are seamless
+        //     already.
+        //  2. Other windows:
+        //     In this case, we need to apply a rotation matrix to the window. For example
+        //     if we have a portrait window and rotate to landscape, the window is still portrait
+        //     and now extends off the bottom of the screen (and only halfway across). Essentially we
+        //     apply a transform to display the current buffer at it's old position
+        //     (in the new coordinate space). We then freeze layer updates until the resize
+        //     occurs, at which point we undo, them.
+        if (w.isChildWindow() && mSurfaceController.getTransformToDisplayInverse()) {
+            frameRect.set(x, y, x+width, y+height);
+            transform.mapRect(frameRect);
+
+            w.mAttrs.x = (int) frameRect.left - w.mAttachedWindow.mFrame.left;
+            w.mAttrs.y = (int) frameRect.top - w.mAttachedWindow.mFrame.top;
+            w.mAttrs.width = (int) Math.ceil(frameRect.width());
+            w.mAttrs.height = (int) Math.ceil(frameRect.height());
+
+            w.setWindowScale(w.mRequestedWidth, w.mRequestedHeight);
+
+            w.applyGravityAndUpdateFrame(w.mContainingFrame, w.mDisplayFrame);
+            computeShownFrameLocked();
+            setSurfaceBoundariesLocked(false);
+
+            // The stack bounds will not yet be rotated at this point so setSurfaceBoundaries locked
+            // will crop us incorrectly. Overwrite the crop, exposing the full surface. By the next
+            // transaction this will be corrected.
+            cropRect.set(0, 0, w.mRequestedWidth, w.mRequestedWidth + w.mRequestedHeight);
+            mSurfaceController.setCropInTransaction(cropRect, false);
+        } else {
+            w.mSeamlesslyRotated = true;
+            transform.getValues(mService.mTmpFloats);
+
+            float DsDx = mService.mTmpFloats[Matrix.MSCALE_X];
+            float DtDx = mService.mTmpFloats[Matrix.MSKEW_Y];
+            float DsDy = mService.mTmpFloats[Matrix.MSKEW_X];
+            float DtDy = mService.mTmpFloats[Matrix.MSCALE_Y];
+            float nx = mService.mTmpFloats[Matrix.MTRANS_X];
+            float ny = mService.mTmpFloats[Matrix.MTRANS_Y];
+            mSurfaceController.setPositionInTransaction(nx, ny, false);
+            mSurfaceController.setMatrixInTransaction(DsDx * w.mHScale,
+                    DtDx * w.mVScale,
+                    DsDy * w.mHScale,
+                    DtDy * w.mVScale, false);
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/wm/WindowSurfaceController.java b/services/core/java/com/android/server/wm/WindowSurfaceController.java
index 570a6ec..c77e572 100644
--- a/services/core/java/com/android/server/wm/WindowSurfaceController.java
+++ b/services/core/java/com/android/server/wm/WindowSurfaceController.java
@@ -260,8 +260,8 @@
         }
     }
 
-    void setPositionAppliesWithResizeInTransaction(boolean recoveringMemory) {
-        mSurfaceControl.setPositionAppliesWithResize();
+    void setGeometryAppliesWithResizeInTransaction(boolean recoveringMemory) {
+        mSurfaceControl.setGeometryAppliesWithResize();
     }
 
     void setMatrixInTransaction(float dsdx, float dtdx, float dsdy, float dtdy,
@@ -458,6 +458,10 @@
         return mSurfaceControl.getHandle();
     }
 
+    boolean getTransformToDisplayInverse() {
+        return mSurfaceControl.getTransformToDisplayInverse();
+    }
+
     void getSurface(Surface outSurface) {
         outSurface.copyFrom(mSurfaceControl);
     }
@@ -582,10 +586,10 @@
         }
 
         @Override
-        public void setPositionAppliesWithResize() {
-            if (LOG_SURFACE_TRACE) Slog.v(SURFACE_TAG, "setPositionAppliesWithResize(): OLD: "
-                    + this + ". Called by" + Debug.getCallers(9));
-            super.setPositionAppliesWithResize();
+        public void setGeometryAppliesWithResize() {
+            if (LOG_SURFACE_TRACE) Slog.v(SURFACE_TAG, "setGeometryAppliesWithResize(): OLD: "
+                    + this + ". Called by" + Debug.getCallers(3));
+            super.setGeometryAppliesWithResize();
         }
 
         @Override
diff --git a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
index 359063c..e5f9728 100644
--- a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
+++ b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
@@ -1074,6 +1074,8 @@
         if (!transitionGoodToGo(appsCount)) {
             return 0;
         }
+        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "AppTransitionReady");
+
         if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "**** GOOD TO GO");
         int transit = mService.mAppTransition.getAppTransition();
         if (mService.mSkipAppTransitionAnimation) {
@@ -1207,6 +1209,9 @@
                 true /*updateInputWindows*/);
         mService.mFocusMayChange = false;
         mService.notifyActivityDrawnForKeyguard();
+
+        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+
         return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_CONFIG;
     }
 
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index b528016..c9123fd 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -4427,6 +4427,7 @@
         intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_URI, uri);
         intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_ALIAS, alias);
         intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_RESPONSE, response);
+        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
 
         final long id = mInjector.binderClearCallingIdentity();
         try {
@@ -8193,6 +8194,12 @@
 
     @Override
     public SystemUpdatePolicy getSystemUpdatePolicy() {
+        if (UserManager.isDeviceInDemoMode(mContext)) {
+            // Pretending to have an automatic update policy when the device is in retail demo
+            // mode. This will allow the device to download and install an ota without
+            // any user interaction.
+            return SystemUpdatePolicy.createAutomaticInstallPolicy();
+        }
         synchronized (this) {
             SystemUpdatePolicy policy =  mOwners.getSystemUpdatePolicy();
             if (policy != null && !policy.isValid()) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index f59b2ff..1002b0d 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -42,13 +42,16 @@
 import android.os.SystemProperties;
 import android.os.Trace;
 import android.os.UserHandle;
+import android.os.UserManager;
 import android.os.storage.IMountService;
+import android.provider.Settings;
 import android.util.DisplayMetrics;
 import android.util.EventLog;
 import android.util.Slog;
 import android.view.WindowManager;
 
 import com.android.internal.R;
+import com.android.internal.app.NightDisplayController;
 import com.android.internal.os.BinderInternal;
 import com.android.internal.os.SamplingProfilerIntegration;
 import com.android.internal.os.ZygoteInit;
@@ -61,6 +64,7 @@
 import com.android.server.connectivity.MetricsLoggerService;
 import com.android.server.devicepolicy.DevicePolicyManagerService;
 import com.android.server.display.DisplayManagerService;
+import com.android.server.display.NightDisplayService;
 import com.android.server.dreams.DreamManagerService;
 import com.android.server.fingerprint.FingerprintService;
 import com.android.server.hdmi.HdmiControlService;
@@ -85,6 +89,7 @@
 import com.android.server.power.PowerManagerService;
 import com.android.server.power.ShutdownThread;
 import com.android.server.restrictions.RestrictionsManagerService;
+import com.android.server.retaildemo.RetailDemoModeService;
 import com.android.server.soundtrigger.SoundTriggerService;
 import com.android.server.statusbar.StatusBarManagerService;
 import com.android.server.storage.DeviceStorageMonitorService;
@@ -154,6 +159,8 @@
             "com.google.android.clockwork.ThermalObserver";
     private static final String WEAR_BLUETOOTH_SERVICE_CLASS =
             "com.google.android.clockwork.bluetooth.WearBluetoothService";
+    private static final String WEAR_TIME_SERVICE_CLASS =
+            "com.google.android.clockwork.time.WearTimeService";
     private static final String ACCOUNT_SERVICE_CLASS =
             "com.android.server.accounts.AccountManagerService$Lifecycle";
     private static final String CONTENT_SERVICE_CLASS =
@@ -176,7 +183,7 @@
      * visual content.
      */
     private static final int DEFAULT_SYSTEM_THEME =
-            com.android.internal.R.style.Theme_DeviceDefault_Light_DarkActionBar;
+            com.android.internal.R.style.Theme_DeviceDefault_System;
 
     private final int mFactoryTestMode;
     private Timer mProfilerSnapshotTimer;
@@ -719,14 +726,6 @@
         }
         Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
 
-        try {
-            ActivityManagerNative.getDefault().showBootMessage(
-                    context.getResources().getText(
-                            com.android.internal.R.string.android_upgrading_starting_apps),
-                    false);
-        } catch (RemoteException e) {
-        }
-
         if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
             if (!disableNonCoreServices) {
                 traceBeginAndSlog("StartLockSettingsService");
@@ -998,6 +997,10 @@
 
             mSystemServiceManager.startService(TwilightService.class);
 
+            if (NightDisplayController.isAvailable(context)) {
+                mSystemServiceManager.startService(NightDisplayService.class);
+            }
+
             mSystemServiceManager.startService(JobSchedulerService.class);
 
             mSystemServiceManager.startService(SoundTriggerService.class);
@@ -1160,6 +1163,9 @@
 
         if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
             mSystemServiceManager.startService(WEAR_BLUETOOTH_SERVICE_CLASS);
+          if (!disableNonCoreServices) {
+              mSystemServiceManager.startService(WEAR_TIME_SERVICE_CLASS);
+          }
         }
 
         // Before things start rolling, be sure we have decided whether
@@ -1177,6 +1183,11 @@
         // MMS service broker
         mmsService = mSystemServiceManager.startService(MmsServiceBroker.class);
 
+        if (Settings.Global.getInt(mContentResolver, Settings.Global.DEVICE_PROVISIONED, 0) == 0 ||
+                UserManager.isDeviceInDemoMode(mSystemContext)) {
+            mSystemServiceManager.startService(RetailDemoModeService.class);
+        }
+
         // It is now time to start up the app processes...
 
         Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "MakeVibratorServiceReady");
diff --git a/services/net/java/android/net/apf/ApfFilter.java b/services/net/java/android/net/apf/ApfFilter.java
index ce37426..57f784a 100644
--- a/services/net/java/android/net/apf/ApfFilter.java
+++ b/services/net/java/android/net/apf/ApfFilter.java
@@ -18,15 +18,21 @@
 
 import static android.system.OsConstants.*;
 
+import android.os.SystemClock;
 import android.net.LinkProperties;
 import android.net.NetworkUtils;
 import android.net.apf.ApfGenerator;
 import android.net.apf.ApfGenerator.IllegalInstructionException;
 import android.net.apf.ApfGenerator.Register;
 import android.net.ip.IpManager;
+import android.net.metrics.ApfProgramEvent;
+import android.net.metrics.ApfStats;
+import android.net.metrics.IpConnectivityLog;
+import android.net.metrics.RaEvent;
 import android.system.ErrnoException;
 import android.system.Os;
 import android.system.PacketSocketAddress;
+import android.text.format.DateUtils;
 import android.util.Log;
 import android.util.Pair;
 
@@ -69,6 +75,17 @@
  * @hide
  */
 public class ApfFilter {
+
+    // Enums describing the outcome of receiving an RA packet.
+    private static enum ProcessRaResult {
+        MATCH,          // Received RA matched a known RA
+        DROPPED,        // Received RA ignored due to MAX_RAS
+        PARSE_ERROR,    // Received RA could not be parsed
+        ZERO_LIFETIME,  // Received RA had 0 lifetime
+        UPDATE_NEW_RA,  // APF program updated for new RA
+        UPDATE_EXPIRY   // APF program updated for expiry
+    }
+
     // Thread to listen for RAs.
     @VisibleForTesting
     class ReceiveThread extends Thread {
@@ -76,6 +93,16 @@
         private final FileDescriptor mSocket;
         private volatile boolean mStopped;
 
+        // Starting time of the RA receiver thread.
+        private final long mStart = SystemClock.elapsedRealtime();
+
+        private int mReceivedRas;     // Number of received RAs
+        private int mMatchingRas;     // Number of received RAs matching a known RA
+        private int mDroppedRas;      // Number of received RAs ignored due to the MAX_RAS limit
+        private int mParseErrors;     // Number of received RAs that could not be parsed
+        private int mZeroLifetimeRas; // Number of received RAs with a 0 lifetime
+        private int mProgramUpdates;  // Number of APF program updates triggered by receiving a RA
+
         public ReceiveThread(FileDescriptor socket) {
             mSocket = socket;
         }
@@ -94,13 +121,46 @@
             while (!mStopped) {
                 try {
                     int length = Os.read(mSocket, mPacket, 0, mPacket.length);
-                    processRa(mPacket, length);
+                    updateStats(processRa(mPacket, length));
                 } catch (IOException|ErrnoException e) {
                     if (!mStopped) {
                         Log.e(TAG, "Read error", e);
                     }
                 }
             }
+            logStats();
+        }
+
+        private void updateStats(ProcessRaResult result) {
+            mReceivedRas++;
+            switch(result) {
+                case MATCH:
+                    mMatchingRas++;
+                    return;
+                case DROPPED:
+                    mDroppedRas++;
+                    return;
+                case PARSE_ERROR:
+                    mParseErrors++;
+                    return;
+                case ZERO_LIFETIME:
+                    mZeroLifetimeRas++;
+                    return;
+                case UPDATE_EXPIRY:
+                    mMatchingRas++;
+                    mProgramUpdates++;
+                    return;
+                case UPDATE_NEW_RA:
+                    mProgramUpdates++;
+                    return;
+            }
+        }
+
+        private void logStats() {
+            long durationMs = SystemClock.elapsedRealtime() - mStart;
+            int maxSize = mApfCapabilities.maximumApfProgramSize;
+            mMetricsLog.log(new ApfStats(durationMs, mReceivedRas, mMatchingRas, mDroppedRas,
+                     mZeroLifetimeRas, mParseErrors, mProgramUpdates, maxSize));
         }
     }
 
@@ -140,7 +200,7 @@
     // NOTE: this must be added to the IPv4 header length in IPV4_HEADER_SIZE_MEMORY_SLOT
     private static final int DHCP_CLIENT_MAC_OFFSET = ETH_HEADER_LEN + UDP_HEADER_LEN + 28;
 
-    private static int ARP_HEADER_OFFSET = ETH_HEADER_LEN;
+    private static final int ARP_HEADER_OFFSET = ETH_HEADER_LEN;
     private static final byte[] ARP_IPV4_REQUEST_HEADER = new byte[]{
             0, 1, // Hardware type: Ethernet (1)
             8, 0, // Protocol type: IP (0x0800)
@@ -148,11 +208,12 @@
             4,    // Protocol size: 4
             0, 1  // Opcode: request (1)
     };
-    private static int ARP_TARGET_IP_ADDRESS_OFFSET = ETH_HEADER_LEN + 24;
+    private static final int ARP_TARGET_IP_ADDRESS_OFFSET = ETH_HEADER_LEN + 24;
 
     private final ApfCapabilities mApfCapabilities;
     private final IpManager.Callback mIpManagerCallback;
     private final NetworkInterface mNetworkInterface;
+    private final IpConnectivityLog mMetricsLog;
     @VisibleForTesting
     byte[] mHardwareAddress;
     @VisibleForTesting
@@ -167,11 +228,12 @@
 
     @VisibleForTesting
     ApfFilter(ApfCapabilities apfCapabilities, NetworkInterface networkInterface,
-            IpManager.Callback ipManagerCallback, boolean multicastFilter) {
+            IpManager.Callback ipManagerCallback, boolean multicastFilter, IpConnectivityLog log) {
         mApfCapabilities = apfCapabilities;
         mIpManagerCallback = ipManagerCallback;
         mNetworkInterface = networkInterface;
         mMulticastFilter = multicastFilter;
+        mMetricsLog = log;
 
         maybeStartFilter();
     }
@@ -212,8 +274,9 @@
     }
 
     // Returns seconds since Unix Epoch.
+    // TODO: use SystemClock.elapsedRealtime() instead
     private static long curTime() {
-        return System.currentTimeMillis() / 1000L;
+        return System.currentTimeMillis() / DateUtils.SECOND_IN_MILLIS;
     }
 
     // A class to hold information about an RA.
@@ -296,7 +359,7 @@
         }
 
         // Can't be static because it's in a non-static inner class.
-        // TODO: Make this final once RA is its own class.
+        // TODO: Make this static once RA is its own class.
         private int uint8(byte b) {
             return b & 0xff;
         }
@@ -305,8 +368,16 @@
             return s & 0xffff;
         }
 
-        private long uint32(int s) {
-            return s & 0xffffffff;
+        private long uint32(int i) {
+            return i & 0xffffffffL;
+        }
+
+        private long getUint16(ByteBuffer buffer, int position) {
+            return uint16(buffer.getShort(position));
+        }
+
+        private long getUint32(ByteBuffer buffer, int position) {
+            return uint32(buffer.getInt(position));
         }
 
         private void prefixOptionToString(StringBuffer sb, int offset) {
@@ -355,7 +426,7 @@
          * @param lifetimeOffset offset from mPacket.position() to the next lifetime data.
          * @param lifetimeLength length of the next lifetime data.
          * @return offset within packet of where the next binary range of data not including
-         *         a lifetime.  This can be passed into the next invocation of this function
+         *         a lifetime. This can be passed into the next invocation of this function
          *         via {@code lastNonLifetimeStart}.
          */
         private int addNonLifetime(int lastNonLifetimeStart, int lifetimeOffset,
@@ -366,14 +437,19 @@
             return lifetimeOffset + lifetimeLength;
         }
 
+        private int addNonLifetimeU32(int lastNonLifetimeStart) {
+            return addNonLifetime(lastNonLifetimeStart,
+                    ICMP6_4_BYTE_LIFETIME_OFFSET, ICMP6_4_BYTE_LIFETIME_LEN);
+        }
+
         // Note that this parses RA and may throw IllegalArgumentException (from
         // Buffer.position(int) or due to an invalid-length option) or IndexOutOfBoundsException
         // (from ByteBuffer.get(int) ) if parsing encounters something non-compliant with
         // specifications.
         Ra(byte[] packet, int length) {
-            mPacket = ByteBuffer.allocate(length).put(ByteBuffer.wrap(packet, 0, length));
-            mPacket.clear();
+            mPacket = ByteBuffer.wrap(Arrays.copyOf(packet, length));
             mLastSeen = curTime();
+            RaEvent.Builder builder = new RaEvent.Builder();
 
             // Ignore the checksum.
             int lastNonLifetimeStart = addNonLifetime(0,
@@ -384,35 +460,50 @@
             lastNonLifetimeStart = addNonLifetime(lastNonLifetimeStart,
                     ICMP6_RA_ROUTER_LIFETIME_OFFSET,
                     ICMP6_RA_ROUTER_LIFETIME_LEN);
+            builder.updateRouterLifetime(getUint16(mPacket, ICMP6_RA_ROUTER_LIFETIME_OFFSET));
 
             // Ensures that the RA is not truncated.
             mPacket.position(ICMP6_RA_OPTION_OFFSET);
             while (mPacket.hasRemaining()) {
-                int optionType = ((int)mPacket.get(mPacket.position())) & 0xff;
-                int optionLength = (((int)mPacket.get(mPacket.position() + 1)) & 0xff) * 8;
+                final int position = mPacket.position();
+                final int optionType = uint8(mPacket.get(position));
+                final int optionLength = uint8(mPacket.get(position + 1)) * 8;
+                long lifetime;
                 switch (optionType) {
                     case ICMP6_PREFIX_OPTION_TYPE:
                         // Parse valid lifetime
                         lastNonLifetimeStart = addNonLifetime(lastNonLifetimeStart,
                                 ICMP6_PREFIX_OPTION_VALID_LIFETIME_OFFSET,
                                 ICMP6_PREFIX_OPTION_VALID_LIFETIME_LEN);
+                        lifetime = getUint32(mPacket,
+                                position + ICMP6_PREFIX_OPTION_VALID_LIFETIME_OFFSET);
+                        builder.updatePrefixValidLifetime(lifetime);
                         // Parse preferred lifetime
                         lastNonLifetimeStart = addNonLifetime(lastNonLifetimeStart,
                                 ICMP6_PREFIX_OPTION_PREFERRED_LIFETIME_OFFSET,
                                 ICMP6_PREFIX_OPTION_PREFERRED_LIFETIME_LEN);
-                        mPrefixOptionOffsets.add(mPacket.position());
+                        lifetime = getUint32(mPacket,
+                                position + ICMP6_PREFIX_OPTION_PREFERRED_LIFETIME_OFFSET);
+                        builder.updatePrefixPreferredLifetime(lifetime);
+                        mPrefixOptionOffsets.add(position);
                         break;
-                    // These three options have the same lifetime offset and size, so process
-                    // together:
+                    // These three options have the same lifetime offset and size, and
+                    // are processed with the same specialized addNonLifetimeU32:
                     case ICMP6_RDNSS_OPTION_TYPE:
-                        mRdnssOptionOffsets.add(mPacket.position());
-                        // Fall through.
+                        mRdnssOptionOffsets.add(position);
+                        lastNonLifetimeStart = addNonLifetimeU32(lastNonLifetimeStart);
+                        lifetime = getUint32(mPacket, position + ICMP6_4_BYTE_LIFETIME_OFFSET);
+                        builder.updateRdnssLifetime(lifetime);
+                        break;
                     case ICMP6_ROUTE_INFO_OPTION_TYPE:
+                        lastNonLifetimeStart = addNonLifetimeU32(lastNonLifetimeStart);
+                        lifetime = getUint32(mPacket, position + ICMP6_4_BYTE_LIFETIME_OFFSET);
+                        builder.updateRouteInfoLifetime(lifetime);
+                        break;
                     case ICMP6_DNSSL_OPTION_TYPE:
-                        // Parse lifetime
-                        lastNonLifetimeStart = addNonLifetime(lastNonLifetimeStart,
-                                ICMP6_4_BYTE_LIFETIME_OFFSET,
-                                ICMP6_4_BYTE_LIFETIME_LEN);
+                        lastNonLifetimeStart = addNonLifetimeU32(lastNonLifetimeStart);
+                        lifetime = getUint32(mPacket, position + ICMP6_4_BYTE_LIFETIME_OFFSET);
+                        builder.updateDnsslLifetime(lifetime);
                         break;
                     default:
                         // RFC4861 section 4.2 dictates we ignore unknown options for fowards
@@ -423,11 +514,12 @@
                     throw new IllegalArgumentException(String.format(
                         "Invalid option length opt=%d len=%d", optionType, optionLength));
                 }
-                mPacket.position(mPacket.position() + optionLength);
+                mPacket.position(position + optionLength);
             }
             // Mark non-lifetime bytes since last lifetime.
             addNonLifetime(lastNonLifetimeStart, 0, 0);
             mMinLifetime = minLifetime(packet, length);
+            mMetricsLog.log(builder.build());
         }
 
         // Ignoring lifetimes (which may change) does {@code packet} match this RA?
@@ -456,16 +548,19 @@
                      continue;
                 }
 
-                int lifetimeLength = mNonLifetimes.get(i+1).first - offset;
-                long val;
+                final int lifetimeLength = mNonLifetimes.get(i+1).first - offset;
+                final long optionLifetime;
                 switch (lifetimeLength) {
-                    case 2: val = byteBuffer.getShort(offset); break;
-                    case 4: val = byteBuffer.getInt(offset); break;
-                    default: throw new IllegalStateException("bogus lifetime size " + length);
+                    case 2:
+                        optionLifetime = uint16(byteBuffer.getShort(offset));
+                        break;
+                    case 4:
+                        optionLifetime = uint32(byteBuffer.getInt(offset));
+                        break;
+                    default:
+                        throw new IllegalStateException("bogus lifetime size " + lifetimeLength);
                 }
-                // Mask to size, converting signed to unsigned
-                val &= (1L << (lifetimeLength * 8)) - 1;
-                minLifetime = Math.min(minLifetime, val);
+                minLifetime = Math.min(minLifetime, optionLifetime);
             }
             return minLifetime;
         }
@@ -760,16 +855,19 @@
         return gen;
     }
 
+    /**
+     * Generate and install a new filter program.
+     */
     @GuardedBy("this")
     @VisibleForTesting
     void installNewProgramLocked() {
         purgeExpiredRasLocked();
+        ArrayList<Ra> rasToFilter = new ArrayList<>();
         final byte[] program;
         long programMinLifetime = Long.MAX_VALUE;
         try {
             // Step 1: Determine how many RA filters we can fit in the program.
             ApfGenerator gen = beginProgramLocked();
-            ArrayList<Ra> rasToFilter = new ArrayList<Ra>();
             for (Ra ra : mRas) {
                 ra.generateFilterLocked(gen);
                 // Stop if we get too big.
@@ -797,17 +895,17 @@
             hexDump("Installing filter: ", program, program.length);
         }
         mIpManagerCallback.installPacketFilter(program);
+        int flags = ApfProgramEvent.flagsFor(mIPv4Address != null, mMulticastFilter);
+        mMetricsLog.log(new ApfProgramEvent(
+                programMinLifetime, rasToFilter.size(), mRas.size(), program.length, flags));
     }
 
-    // Install a new filter program if the last installed one will die soon.
-    @GuardedBy("this")
-    private void maybeInstallNewProgramLocked() {
-        if (mRas.size() == 0) return;
-        // If the current program doesn't expire for a while, don't bother updating.
+    /**
+     * Returns {@code true} if a new program should be installed because the current one dies soon.
+     */
+    private boolean shouldInstallnewProgram() {
         long expiry = mLastTimeInstalledProgram + mLastInstalledProgramMinLifetime;
-        if (expiry < curTime() + MAX_PROGRAM_LIFETIME_WORTH_REFRESHING) {
-            installNewProgramLocked();
-        }
+        return expiry < curTime() + MAX_PROGRAM_LIFETIME_WORTH_REFRESHING;
     }
 
     private void hexDump(String msg, byte[] packet, int length) {
@@ -826,7 +924,12 @@
         }
     }
 
-    private synchronized void processRa(byte[] packet, int length) {
+    /**
+     * Process an RA packet, updating the list of known RAs and installing a new APF program
+     * if the current APF program should be updated.
+     * @return a ProcessRaResult enum describing what action was performed.
+     */
+    private synchronized ProcessRaResult processRa(byte[] packet, int length) {
         if (VDBG) hexDump("Read packet = ", packet, length);
 
         // Have we seen this RA before?
@@ -848,25 +951,34 @@
                 // Swap to front of array.
                 mRas.add(0, mRas.remove(i));
 
-                maybeInstallNewProgramLocked();
-                return;
+                // If the current program doesn't expire for a while, don't update.
+                if (shouldInstallnewProgram()) {
+                    installNewProgramLocked();
+                    return ProcessRaResult.UPDATE_EXPIRY;
+                }
+                return ProcessRaResult.MATCH;
             }
         }
         purgeExpiredRasLocked();
         // TODO: figure out how to proceed when we've received more then MAX_RAS RAs.
-        if (mRas.size() >= MAX_RAS) return;
+        if (mRas.size() >= MAX_RAS) {
+            return ProcessRaResult.DROPPED;
+        }
         final Ra ra;
         try {
             ra = new Ra(packet, length);
         } catch (Exception e) {
             Log.e(TAG, "Error parsing RA: " + e);
-            return;
+            return ProcessRaResult.PARSE_ERROR;
         }
         // Ignore 0 lifetime RAs.
-        if (ra.isExpired()) return;
+        if (ra.isExpired()) {
+            return ProcessRaResult.ZERO_LIFETIME;
+        }
         log("Adding " + ra);
         mRas.add(ra);
         installNewProgramLocked();
+        return ProcessRaResult.UPDATE_NEW_RA;
     }
 
     /**
@@ -891,7 +1003,8 @@
             Log.e(TAG, "Unsupported APF version: " + apfCapabilities.apfVersionSupported);
             return null;
         }
-        return new ApfFilter(apfCapabilities, networkInterface, ipManagerCallback, multicastFilter);
+        return new ApfFilter(apfCapabilities, networkInterface, ipManagerCallback,
+                multicastFilter, new IpConnectivityLog());
     }
 
     public synchronized void shutdown() {
diff --git a/services/net/java/android/net/dhcp/DhcpClient.java b/services/net/java/android/net/dhcp/DhcpClient.java
index 96c852b..ffbea9f 100644
--- a/services/net/java/android/net/dhcp/DhcpClient.java
+++ b/services/net/java/android/net/dhcp/DhcpClient.java
@@ -30,6 +30,7 @@
 import android.net.InterfaceConfiguration;
 import android.net.LinkAddress;
 import android.net.NetworkUtils;
+import android.net.metrics.IpConnectivityLog;
 import android.net.metrics.DhcpClientEvent;
 import android.net.metrics.DhcpErrorEvent;
 import android.os.Message;
@@ -163,6 +164,7 @@
     // System services / libraries we use.
     private final Context mContext;
     private final Random mRandom;
+    private final IpConnectivityLog mMetricsLog = new IpConnectivityLog();
 
     // Sockets.
     // - We use a packet socket to receive, because servers send us packets bound for IP addresses
@@ -192,6 +194,10 @@
     private long mDhcpLeaseExpiry;
     private DhcpResults mOffer;
 
+    // Milliseconds SystemClock timestamps used to record transition times to DhcpBoundState.
+    private long mLastInitEnterTime;
+    private long mLastBoundExitTime;
+
     // States.
     private State mStoppedState = new StoppedState();
     private State mDhcpState = new DhcpState();
@@ -356,14 +362,14 @@
                 } catch (IOException|ErrnoException e) {
                     if (!mStopped) {
                         Log.e(TAG, "Read error", e);
-                        DhcpErrorEvent.logReceiveError(mIfaceName);
+                        logError(DhcpErrorEvent.RECEIVE_ERROR);
                     }
                 } catch (DhcpPacket.ParseException e) {
                     Log.e(TAG, "Can't parse packet: " + e.getMessage());
                     if (PACKET_DBG) {
                         Log.d(TAG, HexDump.dumpHexString(mPacket, 0, length));
                     }
-                    DhcpErrorEvent.logParseError(mIfaceName, e.errorCode);
+                    logError(e.errorCode);
                 }
             }
             if (DBG) Log.d(TAG, "Receive thread stopped");
@@ -490,10 +496,18 @@
     }
 
     abstract class LoggingState extends State {
+        private long mEnterTimeMs;
+
         @Override
         public void enter() {
             if (STATE_DBG) Log.d(TAG, "Entering state " + getName());
-            DhcpClientEvent.logStateEvent(mIfaceName, getName());
+            mEnterTimeMs = SystemClock.elapsedRealtime();
+        }
+
+        @Override
+        public void exit() {
+            long durationMs = SystemClock.elapsedRealtime() - mEnterTimeMs;
+            logState(getName(), (int) durationMs);
         }
 
         private String messageName(int what) {
@@ -518,6 +532,13 @@
             }
             return NOT_HANDLED;
         }
+
+        @Override
+        public String getName() {
+            // All DhcpClient's states are inner classes with a well defined name.
+            // Use getSimpleName() and avoid super's getName() creating new String instances.
+            return getClass().getSimpleName();
+        }
     }
 
     // Sends CMD_PRE_DHCP_ACTION to the controller, waits for the controller to respond with
@@ -544,10 +565,9 @@
         }
     }
 
-    class StoppedState extends LoggingState {
+    class StoppedState extends State {
         @Override
         public boolean processMessage(Message message) {
-            super.processMessage(message);
             switch (message.what) {
                 case CMD_START_DHCP:
                     if (mRegisteredForPreDhcpNotification) {
@@ -576,10 +596,9 @@
         }
     }
 
-    class DhcpState extends LoggingState {
+    class DhcpState extends State {
         @Override
         public void enter() {
-            super.enter();
             clearDhcpState();
             if (initInterface() && initSockets()) {
                 mReceiveThread = new ReceiveThread();
@@ -677,7 +696,9 @@
             }
         }
 
+        @Override
         public void exit() {
+            super.exit();
             mKickAlarm.cancel();
             mTimeoutAlarm.cancel();
         }
@@ -724,6 +745,7 @@
         public void enter() {
             super.enter();
             startNewTransaction();
+            mLastInitEnterTime = SystemClock.elapsedRealtime();
         }
 
         protected boolean sendPacket() {
@@ -782,15 +804,9 @@
         }
     }
 
-    class DhcpHaveLeaseState extends LoggingState {
-        @Override
-        public void enter() {
-            super.enter();
-        }
-
+    class DhcpHaveLeaseState extends State {
         @Override
         public boolean processMessage(Message message) {
-            super.processMessage(message);
             switch (message.what) {
                 case CMD_EXPIRE_DHCP:
                     Log.d(TAG, "Lease expired!");
@@ -854,6 +870,13 @@
             }
 
             scheduleLeaseTimers();
+            logTimeToBoundState();
+        }
+
+        @Override
+        public void exit() {
+            super.exit();
+            mLastBoundExitTime = SystemClock.elapsedRealtime();
         }
 
         @Override
@@ -871,6 +894,15 @@
                     return NOT_HANDLED;
             }
         }
+
+        private void logTimeToBoundState() {
+            long now = SystemClock.elapsedRealtime();
+            if (mLastBoundExitTime > mLastInitEnterTime) {
+                logState(DhcpClientEvent.RENEWING_BOUND, (int)(now - mLastBoundExitTime));
+            } else {
+                logState(DhcpClientEvent.INITIAL_BOUND, (int)(now - mLastInitEnterTime));
+            }
+        }
     }
 
     abstract class DhcpReacquiringState extends PacketRetransmittingState {
@@ -977,4 +1009,12 @@
 
     class DhcpRebootingState extends LoggingState {
     }
+
+    private void logError(int errorCode) {
+        mMetricsLog.log(new DhcpErrorEvent(mIfaceName, errorCode));
+    }
+
+    private void logState(String name, int durationMs) {
+        mMetricsLog.log(new DhcpClientEvent(mIfaceName, name, durationMs));
+    }
 }
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index cece6c8..654ef18 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -31,6 +31,7 @@
 import android.net.RouteInfo;
 import android.net.StaticIpConfiguration;
 import android.net.dhcp.DhcpClient;
+import android.net.metrics.IpConnectivityLog;
 import android.net.metrics.IpManagerEvent;
 import android.os.INetworkManagementService;
 import android.os.Message;
@@ -393,6 +394,7 @@
     private final WakeupMessage mProvisioningTimeoutAlarm;
     private final WakeupMessage mDhcpActionTimeoutAlarm;
     private final LocalLog mLocalLog;
+    private final IpConnectivityLog mMetricsLog = new IpConnectivityLog();
 
     private NetworkInterface mNetworkInterface;
 
@@ -634,8 +636,8 @@
 
     private void recordMetric(final int type) {
         if (mStartTimeMillis <= 0) { Log.wtf(mTag, "Start time undefined!"); }
-        IpManagerEvent.logEvent(type, mInterfaceName,
-                SystemClock.elapsedRealtime() - mStartTimeMillis);
+        final long duration = SystemClock.elapsedRealtime() - mStartTimeMillis;
+        mMetricsLog.log(new IpManagerEvent(mInterfaceName, type, duration));
     }
 
     // For now: use WifiStateMachine's historical notion of provisioned.
@@ -916,12 +918,6 @@
             mDhcpClient = DhcpClient.makeDhcpClient(mContext, IpManager.this, mInterfaceName);
             mDhcpClient.registerForPreDhcpNotification();
             mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP);
-
-            if (mConfiguration.mProvisioningTimeoutMs > 0) {
-                final long alarmTime = SystemClock.elapsedRealtime() +
-                        mConfiguration.mProvisioningTimeoutMs;
-                mProvisioningTimeoutAlarm.schedule(alarmTime);
-            }
         }
 
         return true;
@@ -1041,11 +1037,24 @@
                 mCallback.setFallbackMulticastFilter(mMulticastFiltering);
             }
 
+            if (mConfiguration.mProvisioningTimeoutMs > 0) {
+                final long alarmTime = SystemClock.elapsedRealtime() +
+                        mConfiguration.mProvisioningTimeoutMs;
+                mProvisioningTimeoutAlarm.schedule(alarmTime);
+            }
+
             if (mConfiguration.mEnableIPv6) {
                 // TODO: Consider transitionTo(mStoppingState) if this fails.
                 startIPv6();
             }
 
+            if (mConfiguration.mEnableIPv4) {
+                if (!startIPv4()) {
+                    transitionTo(mStoppingState);
+                    return;
+                }
+            }
+
             if (mConfiguration.mUsingIpReachabilityMonitor) {
                 mIpReachabilityMonitor = new IpReachabilityMonitor(
                         mContext,
@@ -1057,12 +1066,6 @@
                             }
                         });
             }
-
-            if (mConfiguration.mEnableIPv4) {
-                if (!startIPv4()) {
-                    transitionTo(mStoppingState);
-                }
-            }
         }
 
         @Override
diff --git a/services/net/java/android/net/ip/IpReachabilityMonitor.java b/services/net/java/android/net/ip/IpReachabilityMonitor.java
index 27600a7..c6da3c3 100644
--- a/services/net/java/android/net/ip/IpReachabilityMonitor.java
+++ b/services/net/java/android/net/ip/IpReachabilityMonitor.java
@@ -24,6 +24,7 @@
 import android.net.LinkProperties.ProvisioningChange;
 import android.net.ProxyInfo;
 import android.net.RouteInfo;
+import android.net.metrics.IpConnectivityLog;
 import android.net.metrics.IpReachabilityEvent;
 import android.net.netlink.NetlinkConstants;
 import android.net.netlink.NetlinkErrorMessage;
@@ -128,7 +129,6 @@
  *          state it may be best for the link to disconnect completely and
  *          reconnect afresh.
  *
- *
  * @hide
  */
 public class IpReachabilityMonitor {
@@ -151,6 +151,7 @@
     private final Callback mCallback;
     private final NetlinkSocketObserver mNetlinkSocketObserver;
     private final Thread mObserverThread;
+    private final IpConnectivityLog mMetricsLog = new IpConnectivityLog();
     @GuardedBy("mLock")
     private LinkProperties mLinkProperties = new LinkProperties();
     // TODO: consider a map to a private NeighborState class holding more
@@ -161,6 +162,8 @@
     private int mIpWatchListVersion;
     @GuardedBy("mLock")
     private boolean mRunning;
+    // Time in milliseconds of the last forced probe request.
+    private volatile long mLastProbeTimeMs;
 
     /**
      * Make the kernel perform neighbor reachability detection (IPv4 ARP or IPv6 ND)
@@ -337,7 +340,7 @@
 
     private void handleNeighborLost(String msg) {
         InetAddress ip = null;
-        ProvisioningChange delta;
+        final ProvisioningChange delta;
         synchronized (mLock) {
             LinkProperties whatIfLp = new LinkProperties(mLinkProperties);
 
@@ -359,7 +362,6 @@
         }
 
         if (delta == ProvisioningChange.LOST_PROVISIONING) {
-            IpReachabilityEvent.logProvisioningLost(mInterfaceName);
             final String logMsg = "FAILURE: LOST_PROVISIONING, " + msg;
             Log.w(TAG, logMsg);
             if (mCallback != null) {
@@ -367,9 +369,8 @@
                 // an InetAddress argument.
                 mCallback.notifyLost(ip, logMsg);
             }
-        } else {
-            IpReachabilityEvent.logNudFailed(mInterfaceName);
         }
+        logNudFailed(delta);
     }
 
     public void probeAll() {
@@ -393,11 +394,12 @@
                 break;
             }
             final int returnValue = probeNeighbor(mInterfaceIndex, target);
-            IpReachabilityEvent.logProbeEvent(mInterfaceName, returnValue);
+            logEvent(IpReachabilityEvent.PROBE, returnValue);
         }
+        mLastProbeTimeMs = SystemClock.elapsedRealtime();
     }
 
-    private long getProbeWakeLockDuration() {
+    private static long getProbeWakeLockDuration() {
         // Ideally, this would be computed by examining the values of:
         //
         //     /proc/sys/net/ipv[46]/neigh/<ifname>/ucast_solicit
@@ -413,6 +415,19 @@
         return (numUnicastProbes * retransTimeMs) + gracePeriodMs;
     }
 
+    private void logEvent(int probeType, int errorCode) {
+        int eventType = probeType | (errorCode & 0xff);
+        mMetricsLog.log(new IpReachabilityEvent(mInterfaceName, eventType));
+    }
+
+    private void logNudFailed(ProvisioningChange delta) {
+        long duration = SystemClock.elapsedRealtime() - mLastProbeTimeMs;
+        boolean isFromProbe = (duration < getProbeWakeLockDuration());
+        boolean isProvisioningLost = (delta == ProvisioningChange.LOST_PROVISIONING);
+        int eventType = IpReachabilityEvent.nudFailureEventType(isFromProbe, isProvisioningLost);
+        mMetricsLog.log(new IpReachabilityEvent(mInterfaceName, eventType));
+    }
+
     // TODO: simplify the number of objects by making this extend Thread.
     private final class NetlinkSocketObserver implements Runnable {
         private NetlinkSocket mSocket;
diff --git a/services/net/java/android/net/ip/RouterAdvertisementDaemon.java b/services/net/java/android/net/ip/RouterAdvertisementDaemon.java
new file mode 100644
index 0000000..53c2fd7
--- /dev/null
+++ b/services/net/java/android/net/ip/RouterAdvertisementDaemon.java
@@ -0,0 +1,581 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.ip;
+
+import static android.system.OsConstants.*;
+
+import android.net.IpPrefix;
+import android.net.LinkAddress;
+import android.net.LinkProperties;
+import android.net.NetworkUtils;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.StructGroupReq;
+import android.system.StructTimeval;
+import android.util.Log;
+
+import com.android.internal.annotations.GuardedBy;
+
+import libcore.io.IoUtils;
+import libcore.util.HexEncoding;
+
+import java.io.FileDescriptor;
+import java.io.InterruptedIOException;
+import java.io.IOException;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Random;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+
+/**
+ * Basic IPv6 Router Advertisement Daemon.
+ *
+ * TODO:
+ *
+ *     - Rewrite using Handler (and friends) so that AlarmManager can deliver
+ *       "kick" messages when it's time to send a multicast RA.
+ *
+ *     - Support transmitting MAX_URGENT_RTR_ADVERTISEMENTS number of empty
+ *       RAs with zero default router lifetime when transitioning from an
+ *       advertising state to a non-advertising state.
+ *
+ * @hide
+ */
+public class RouterAdvertisementDaemon {
+    private static final String TAG = RouterAdvertisementDaemon.class.getSimpleName();
+    private static final byte ICMPV6_ND_ROUTER_SOLICIT = asByte(133);
+    private static final byte ICMPV6_ND_ROUTER_ADVERT  = asByte(134);
+    private static final int IPV6_MIN_MTU = 1280;
+    private static final int MIN_RA_HEADER_SIZE = 16;
+
+    // Summary of various timers and lifetimes.
+    private static final int MIN_RTR_ADV_INTERVAL_SEC = 300;
+    private static final int MAX_RTR_ADV_INTERVAL_SEC = 600;
+    // In general, router, prefix, and DNS lifetimes are all advised to be
+    // greater than or equal to 3 * MAX_RTR_ADV_INTERVAL.  Here, we double
+    // that to allow for multicast packet loss.
+    //
+    // This MAX_RTR_ADV_INTERVAL_SEC and DEFAULT_LIFETIME are also consistent
+    // with the https://tools.ietf.org/html/rfc7772#section-4 discussion of
+    // "approximately 7 RAs per hour".
+    private static final int DEFAULT_LIFETIME = 6 * MAX_RTR_ADV_INTERVAL_SEC;
+    // From https://tools.ietf.org/html/rfc4861#section-10 .
+    private static final int MIN_DELAY_BETWEEN_RAS_SEC = 3;
+    // Both initial and final RAs, but also for changes in RA contents.
+    // From https://tools.ietf.org/html/rfc4861#section-10 .
+    private static final int  MAX_URGENT_RTR_ADVERTISEMENTS = 5;
+
+    private static final int DAY_IN_SECONDS = 86_400;
+
+    private static final byte[] ALL_NODES = new byte[] {
+            (byte) 0xff, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
+    };
+
+    private final String mIfName;
+    private final int mIfIndex;
+    private final byte[] mHwAddr;
+    private final InetSocketAddress mAllNodes;
+
+    // This lock is to protect the RA from being updated while being
+    // transmitted on another thread  (multicast or unicast).
+    //
+    // TODO: This should be handled with a more RCU-like approach.
+    private final Object mLock = new Object();
+    @GuardedBy("mLock")
+    private final byte[] mRA = new byte[IPV6_MIN_MTU];
+    @GuardedBy("mLock")
+    private int mRaLength;
+
+    private volatile FileDescriptor mSocket;
+    private volatile MulticastTransmitter mMulticastTransmitter;
+    private volatile UnicastResponder mUnicastResponder;
+
+    public static class RaParams {
+        public boolean hasDefaultRoute;
+        public int mtu;
+        public HashSet<IpPrefix> prefixes;
+        public HashSet<Inet6Address> dnses;
+
+        public RaParams() {
+            hasDefaultRoute = false;
+            mtu = IPV6_MIN_MTU;
+            prefixes = new HashSet<IpPrefix>();
+            dnses = new HashSet<Inet6Address>();
+        }
+
+        public RaParams(RaParams other) {
+            hasDefaultRoute = other.hasDefaultRoute;
+            mtu = other.mtu;
+            prefixes = (HashSet) other.prefixes.clone();
+            dnses = (HashSet) other.dnses.clone();
+        }
+    }
+
+
+    public RouterAdvertisementDaemon(String ifname, int ifindex, byte[] hwaddr) {
+        mIfName = ifname;
+        mIfIndex = ifindex;
+        mHwAddr = hwaddr;
+        mAllNodes = new InetSocketAddress(getAllNodesForScopeId(mIfIndex), 0);
+    }
+
+    public void buildNewRa(RaParams params) {
+        if (params == null || params.prefixes.isEmpty()) {
+            // No RA to be served at this time.
+            clearRa();
+            return;
+        }
+
+        if (params.mtu < IPV6_MIN_MTU) {
+            params.mtu = IPV6_MIN_MTU;
+        }
+
+        final ByteBuffer ra = ByteBuffer.wrap(mRA);
+        ra.order(ByteOrder.BIG_ENDIAN);
+
+        synchronized (mLock) {
+            try {
+                putHeader(ra, params.hasDefaultRoute);
+                putSlla(ra, mHwAddr);
+                // https://tools.ietf.org/html/rfc5175#section-4 says:
+                //
+                //     "MUST NOT be added to a Router Advertisement message
+                //      if no flags in the option are set."
+                //
+                // putExpandedFlagsOption(ra);
+                putMtu(ra, params.mtu);
+                for (IpPrefix ipp : params.prefixes) {
+                    putPio(ra, ipp);
+                }
+                if (params.dnses.size() > 0) {
+                    putRdnss(ra, params.dnses);
+                }
+                mRaLength = ra.position();
+            } catch (BufferOverflowException e) {
+                Log.e(TAG, "Could not construct new RA: " + e);
+                mRaLength = 0;
+                return;
+            }
+        }
+
+        maybeNotifyMulticastTransmitter();
+    }
+
+    public boolean start() {
+        if (!createSocket()) {
+            return false;
+        }
+
+        mMulticastTransmitter = new MulticastTransmitter();
+        mMulticastTransmitter.start();
+
+        mUnicastResponder = new UnicastResponder();
+        mUnicastResponder.start();
+
+        return true;
+    }
+
+    public void stop() {
+        closeSocket();
+        mMulticastTransmitter = null;
+        mUnicastResponder = null;
+    }
+
+    private void clearRa() {
+        boolean notifySocket;
+        synchronized (mLock) {
+            notifySocket = (mRaLength != 0);
+            mRaLength = 0;
+        }
+        if (notifySocket) {
+            maybeNotifyMulticastTransmitter();
+        }
+    }
+
+    private void maybeNotifyMulticastTransmitter() {
+        final MulticastTransmitter m = mMulticastTransmitter;
+        if (m != null) {
+            m.hup();
+        }
+    }
+
+    private static Inet6Address getAllNodesForScopeId(int scopeId) {
+        try {
+            return Inet6Address.getByAddress("ff02::1", ALL_NODES, scopeId);
+        } catch (UnknownHostException uhe) {
+            Log.wtf(TAG, "Failed to construct ff02::1 InetAddress: " + uhe);
+            return null;
+        }
+    }
+
+    private static byte asByte(int value) { return (byte) value; }
+    private static short asShort(int value) { return (short) value; }
+
+    private static void putHeader(ByteBuffer ra, boolean hasDefaultRoute) {
+        /**
+            Router Advertisement Message Format
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |     Code      |          Checksum             |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            | Cur Hop Limit |M|O|H|Prf|P|R|R|       Router Lifetime         |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                         Reachable Time                        |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                          Retrans Timer                        |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |   Options ...
+            +-+-+-+-+-+-+-+-+-+-+-+-
+        */
+        final byte DEFAULT_HOPLIMIT = 64;
+        ra.put(ICMPV6_ND_ROUTER_ADVERT)
+          .put(asByte(0))
+          .putShort(asShort(0))
+          .put(DEFAULT_HOPLIMIT)
+          // RFC 4191 "high" preference, iff. advertising a default route.
+          .put(hasDefaultRoute ? asByte(0x08) : asByte(0))
+          .putShort(hasDefaultRoute ? asShort(DEFAULT_LIFETIME) : asShort(0))
+          .putInt(0)
+          .putInt(0);
+    }
+
+    private static void putSlla(ByteBuffer ra, byte[] slla) {
+        /**
+            Source/Target Link-layer Address
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |    Length     |    Link-Layer Address ...
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+        */
+        if (slla == null || slla.length != 6) {
+            // Only IEEE 802.3 6-byte addresses are supported.
+            return;
+        }
+        final byte ND_OPTION_SLLA = 1;
+        final byte SLLA_NUM_8OCTETS = 1;
+        ra.put(ND_OPTION_SLLA)
+          .put(SLLA_NUM_8OCTETS)
+          .put(slla);
+    }
+
+    private static void putExpandedFlagsOption(ByteBuffer ra) {
+        /**
+            Router Advertisement Expanded Flags Option
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |    Length     |         Bit fields available ..
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            ... for assignment                                              |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         */
+
+        final byte ND_OPTION_EFO = 26;
+        final byte EFO_NUM_8OCTETS = 1;
+
+        ra.put(ND_OPTION_EFO)
+          .put(EFO_NUM_8OCTETS)
+          .putShort(asShort(0))
+          .putInt(0);
+    }
+
+    private static void putMtu(ByteBuffer ra, int mtu) {
+        /**
+            MTU
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |    Length     |           Reserved            |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                              MTU                              |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+        */
+        final byte ND_OPTION_MTU = 5;
+        final byte MTU_NUM_8OCTETS = 1;
+        ra.put(ND_OPTION_MTU)
+          .put(MTU_NUM_8OCTETS)
+          .putShort(asShort(0))
+          .putInt(mtu);
+    }
+
+    private static void putPio(ByteBuffer ra, IpPrefix ipp) {
+        /**
+            Prefix Information
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |    Length     | Prefix Length |L|A| Reserved1 |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                         Valid Lifetime                        |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                       Preferred Lifetime                      |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                           Reserved2                           |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                                                               |
+            +                                                               +
+            |                                                               |
+            +                            Prefix                             +
+            |                                                               |
+            +                                                               +
+            |                                                               |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+        */
+        final int prefixLength = ipp.getPrefixLength();
+        if (prefixLength != 64) {
+            return;
+        }
+        final byte ND_OPTION_PIO = 3;
+        final byte PIO_NUM_8OCTETS = 4;
+
+        final byte[] addr = ipp.getAddress().getAddress();
+        ra.put(ND_OPTION_PIO)
+          .put(PIO_NUM_8OCTETS)
+          .put(asByte(prefixLength))
+          .put(asByte(0xc0))  // L&A set
+          .putInt(DEFAULT_LIFETIME)
+          .putInt(DEFAULT_LIFETIME)
+          .putInt(0)
+          .put(addr);
+    }
+
+    private static void putRio(ByteBuffer ra, IpPrefix ipp) {
+        /**
+            Route Information Option
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |    Length     | Prefix Length |Resvd|Prf|Resvd|
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                        Route Lifetime                         |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                   Prefix (Variable Length)                    |
+            .                                                               .
+            .                                                               .
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         */
+        final int prefixLength = ipp.getPrefixLength();
+        if (prefixLength > 64) {
+            return;
+        }
+        final byte ND_OPTION_RIO = 24;
+        final byte RIO_NUM_8OCTETS = asByte(
+                (prefixLength == 0) ? 1 : (prefixLength <= 8) ? 2 : 3);
+
+        final byte[] addr = ipp.getAddress().getAddress();
+        ra.put(ND_OPTION_RIO)
+          .put(RIO_NUM_8OCTETS)
+          .put(asByte(prefixLength))
+          .put(asByte(0x18))
+          .putInt(DEFAULT_LIFETIME);
+
+        // Rely upon an IpPrefix's address being properly zeroed.
+        if (prefixLength > 0) {
+            ra.put(addr, 0, (prefixLength <= 64) ? 8 : 16);
+        }
+    }
+
+    private static void putRdnss(ByteBuffer ra, Set<Inet6Address> dnses) {
+        /**
+            Recursive DNS Server (RDNSS) Option
+
+             0                   1                   2                   3
+             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |     Type      |     Length    |           Reserved            |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                           Lifetime                            |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+            |                                                               |
+            :            Addresses of IPv6 Recursive DNS Servers            :
+            |                                                               |
+            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+         */
+
+        final byte ND_OPTION_RDNSS = 25;
+        final byte RDNSS_NUM_8OCTETS = asByte(dnses.size() * 2 + 1);
+        ra.put(ND_OPTION_RDNSS)
+          .put(RDNSS_NUM_8OCTETS)
+          .putShort(asShort(0))
+          .putInt(DEFAULT_LIFETIME);
+
+        for (Inet6Address dns : dnses) {
+            ra.put(dns.getAddress());
+        }
+    }
+
+    private boolean createSocket() {
+        final int SEND_TIMEOUT_MS = 300;
+
+        try {
+            mSocket = Os.socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
+            // Setting SNDTIMEO is purely for defensive purposes.
+            Os.setsockoptTimeval(
+                    mSocket, SOL_SOCKET, SO_SNDTIMEO, StructTimeval.fromMillis(SEND_TIMEOUT_MS));
+            Os.setsockoptIfreq(mSocket, SOL_SOCKET, SO_BINDTODEVICE, mIfName);
+            NetworkUtils.protectFromVpn(mSocket);
+            NetworkUtils.setupRaSocket(mSocket, mIfIndex);
+        } catch (ErrnoException | IOException e) {
+            Log.e(TAG, "Failed to create RA daemon socket: " + e);
+            return false;
+        }
+
+        return true;
+    }
+
+    private void closeSocket() {
+        if (mSocket != null) {
+            IoUtils.closeQuietly(mSocket);
+        }
+        mSocket = null;
+    }
+
+    private boolean isSocketValid() {
+        final FileDescriptor s = mSocket;
+        return (s != null) && s.valid();
+    }
+
+    private boolean isSuitableDestination(InetSocketAddress dest) {
+        if (mAllNodes.equals(dest)) {
+            return true;
+        }
+
+        final InetAddress destip = dest.getAddress();
+        return (destip instanceof Inet6Address) &&
+                destip.isLinkLocalAddress() &&
+               (((Inet6Address) destip).getScopeId() == mIfIndex);
+    }
+
+    private void maybeSendRA(InetSocketAddress dest) {
+        if (dest == null || !isSuitableDestination(dest)) {
+            dest = mAllNodes;
+        }
+
+        try {
+            synchronized (mLock) {
+                if (mRaLength < MIN_RA_HEADER_SIZE) {
+                    // No actual RA to send.
+                    return;
+                }
+                Os.sendto(mSocket, mRA, 0, mRaLength, 0, dest);
+            }
+            Log.d(TAG, "RA sendto " + dest.getAddress().getHostAddress());
+        } catch (ErrnoException | SocketException e) {
+            if (isSocketValid()) {
+                Log.e(TAG, "sendto error: " + e);
+            }
+        }
+    }
+
+    private final class UnicastResponder extends Thread {
+        private final InetSocketAddress solicitor = new InetSocketAddress();
+        // The recycled buffer for receiving Router Solicitations from clients.
+        // If the RS is larger than IPV6_MIN_MTU the packets are truncated.
+        // This is fine since currently only byte 0 is examined anyway.
+        private final byte mSolication[] = new byte[IPV6_MIN_MTU];
+
+        @Override
+        public void run() {
+            while (isSocketValid()) {
+                try {
+                    // Blocking receive.
+                    final int rval = Os.recvfrom(
+                            mSocket, mSolication, 0, mSolication.length, 0, solicitor);
+                    // Do the least possible amount of validation.
+                    if (rval < 1 || mSolication[0] != ICMPV6_ND_ROUTER_SOLICIT) {
+                        continue;
+                    }
+                } catch (ErrnoException | SocketException e) {
+                    if (isSocketValid()) {
+                        Log.e(TAG, "recvfrom error: " + e);
+                    }
+                    continue;
+                }
+
+                maybeSendRA(solicitor);
+            }
+        }
+    }
+
+    // TODO: Consider moving this to run on a provided Looper as a Handler,
+    // with WakeupMessage-style messages providing the timer driven input.
+    private final class MulticastTransmitter extends Thread {
+        private final Random mRandom = new Random();
+        private final AtomicInteger mUrgentAnnouncements = new AtomicInteger(0);
+
+        @Override
+        public void run() {
+            while (isSocketValid()) {
+                try {
+                    Thread.sleep(getNextMulticastTransmitDelayMs());
+                } catch (InterruptedException ignored) {
+                    // Stop sleeping, immediately send an RA, and continue.
+                }
+
+                maybeSendRA(mAllNodes);
+            }
+        }
+
+        public void hup() {
+            // Set to one fewer that the desired number, because as soon as
+            // the thread interrupt is processed we immediately send an RA
+            // and mUrgentAnnouncements is not examined until the subsequent
+            // sleep interval computation (i.e. this way we send 3 and not 4).
+            mUrgentAnnouncements.set(MAX_URGENT_RTR_ADVERTISEMENTS - 1);
+            interrupt();
+        }
+
+        private int getNextMulticastTransmitDelaySec() {
+            synchronized (mLock) {
+                if (mRaLength < MIN_RA_HEADER_SIZE) {
+                    // No actual RA to send; just sleep for 1 day.
+                    return DAY_IN_SECONDS;
+                }
+            }
+
+            final int urgentPending = mUrgentAnnouncements.getAndDecrement();
+            if (urgentPending > 0) {
+                return MIN_DELAY_BETWEEN_RAS_SEC;
+            }
+
+            return MIN_RTR_ADV_INTERVAL_SEC + mRandom.nextInt(
+                    MAX_RTR_ADV_INTERVAL_SEC - MIN_RTR_ADV_INTERVAL_SEC);
+        }
+
+        private long getNextMulticastTransmitDelayMs() {
+            return 1000 * (long) getNextMulticastTransmitDelaySec();
+        }
+    }
+}
diff --git a/services/print/java/com/android/server/print/UserState.java b/services/print/java/com/android/server/print/UserState.java
index 7a3ebf4..05301c1 100644
--- a/services/print/java/com/android/server/print/UserState.java
+++ b/services/print/java/com/android/server/print/UserState.java
@@ -764,9 +764,8 @@
 
     public void updateIfNeededLocked() {
         throwIfDestroyedLocked();
-        if (readConfigurationLocked()) {
-            onConfigurationChangedLocked();
-        }
+        readConfigurationLocked();
+        onConfigurationChangedLocked();
     }
 
     public void destroyLocked() {
@@ -841,14 +840,12 @@
         pw.println();
     }
 
-    private boolean readConfigurationLocked() {
-        boolean somethingChanged = false;
-        somethingChanged |= readInstalledPrintServicesLocked();
-        somethingChanged |= readDisabledPrintServicesLocked();
-        return somethingChanged;
+    private void readConfigurationLocked() {
+        readInstalledPrintServicesLocked();
+        readDisabledPrintServicesLocked();
     }
 
-    private boolean readInstalledPrintServicesLocked() {
+    private void readInstalledPrintServicesLocked() {
         Set<PrintServiceInfo> tempPrintServices = new HashSet<PrintServiceInfo>();
 
         List<ResolveInfo> installedServices = mContext.getPackageManager()
@@ -872,39 +869,8 @@
             tempPrintServices.add(PrintServiceInfo.create(installedService, mContext));
         }
 
-        boolean someServiceChanged = false;
-
-        if (tempPrintServices.size() != mInstalledServices.size()) {
-            someServiceChanged = true;
-        } else {
-            for (PrintServiceInfo newService: tempPrintServices) {
-                final int oldServiceIndex = mInstalledServices.indexOf(newService);
-                if (oldServiceIndex < 0) {
-                    someServiceChanged = true;
-                    break;
-                }
-                // PrintServiceInfo#equals compares only the id not all members,
-                // so we are also comparing the members coming from meta-data.
-                PrintServiceInfo oldService = mInstalledServices.get(oldServiceIndex);
-                if (!TextUtils.equals(oldService.getAddPrintersActivityName(),
-                            newService.getAddPrintersActivityName())
-                        || !TextUtils.equals(oldService.getAdvancedOptionsActivityName(),
-                                newService.getAdvancedOptionsActivityName())
-                        || !TextUtils.equals(oldService.getSettingsActivityName(),
-                                newService.getSettingsActivityName())) {
-                    someServiceChanged = true;
-                    break;
-                }
-            }
-        }
-
-        if (someServiceChanged) {
-            mInstalledServices.clear();
-            mInstalledServices.addAll(tempPrintServices);
-            return true;
-        }
-
-        return false;
+        mInstalledServices.clear();
+        mInstalledServices.addAll(tempPrintServices);
     }
 
     /**
@@ -944,16 +910,14 @@
      *
      * @return true if the state changed.
      */
-    private boolean readDisabledPrintServicesLocked() {
+    private void readDisabledPrintServicesLocked() {
         Set<ComponentName> tempDisabledServiceNameSet = new HashSet<ComponentName>();
         readPrintServicesFromSettingLocked(Settings.Secure.DISABLED_PRINT_SERVICES,
                 tempDisabledServiceNameSet);
         if (!tempDisabledServiceNameSet.equals(mDisabledServices)) {
             mDisabledServices.clear();
             mDisabledServices.addAll(tempDisabledServiceNameSet);
-            return true;
         }
-        return false;
     }
 
     private void readPrintServicesFromSettingLocked(String setting,
diff --git a/services/retaildemo/Android.mk b/services/retaildemo/Android.mk
new file mode 100644
index 0000000..670c6bf
--- /dev/null
+++ b/services/retaildemo/Android.mk
@@ -0,0 +1,12 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := services.retaildemo
+
+LOCAL_SRC_FILES += \
+      $(call all-java-files-under,java)
+
+LOCAL_JAVA_LIBRARIES := services.core
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/services/retaildemo/java/com/android/server/retaildemo/PreloadAppsInstaller.java b/services/retaildemo/java/com/android/server/retaildemo/PreloadAppsInstaller.java
new file mode 100644
index 0000000..8480170
--- /dev/null
+++ b/services/retaildemo/java/com/android/server/retaildemo/PreloadAppsInstaller.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.server.retaildemo;
+
+import android.app.AppGlobals;
+import android.app.PackageInstallObserver;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.util.ArrayMap;
+import android.util.Log;
+import android.util.Slog;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.ArrayUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * Helper class for installing preloaded APKs
+ */
+class PreloadAppsInstaller {
+    private static final String SYSTEM_SERVER_PACKAGE_NAME = "android";
+    private static String TAG = PreloadAppsInstaller.class.getSimpleName();
+    private static final String PRELOAD_APK_EXT = ".apk.preload";
+    private static boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+
+    private final IPackageManager mPackageManager;
+    private final File preloadsAppsDirectory;
+
+    private final Map<String, String> mApkToPackageMap;
+
+    PreloadAppsInstaller() {
+        this(AppGlobals.getPackageManager(), Environment.getDataPreloadsAppsDirectory());
+    }
+
+    @VisibleForTesting
+    PreloadAppsInstaller(IPackageManager packageManager, File preloadsAppsDirectory) {
+        mPackageManager = packageManager;
+        mApkToPackageMap = Collections.synchronizedMap(new ArrayMap<>());
+        this.preloadsAppsDirectory = preloadsAppsDirectory;
+    }
+
+    void installApps(int userId) {
+        File[] files = preloadsAppsDirectory.listFiles();
+        if (ArrayUtils.isEmpty(files)) {
+            return;
+        }
+        for (File file : files) {
+            String apkName = file.getName();
+            if (apkName.endsWith(PRELOAD_APK_EXT) && file.isFile()) {
+                String packageName = mApkToPackageMap.get(apkName);
+                if (packageName != null) {
+                    try {
+                        installExistingPackage(packageName, userId);
+                    } catch (Exception e) {
+                        Slog.e(TAG, "Failed to install existing package " + packageName, e);
+                    }
+                } else {
+                    try {
+                        installPackage(file, userId);
+                    } catch (Exception e) {
+                        Slog.e(TAG, "Failed to install package from " + file, e);
+                    }
+                }
+            }
+        }
+    }
+
+    private void installExistingPackage(String packageName, int userId) {
+        if (DEBUG) {
+            Log.d(TAG, "installExistingPackage " + packageName + " u" + userId);
+        }
+        try {
+            mPackageManager.installExistingPackageAsUser(packageName, userId);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    private void installPackage(File file, final int userId) throws IOException, RemoteException {
+        final String apkName = file.getName();
+        if (DEBUG) {
+            Log.d(TAG, "installPackage " + apkName + " u" + userId);
+        }
+        mPackageManager.installPackageAsUser(file.getPath(), new PackageInstallObserver() {
+            @Override
+            public void onPackageInstalled(String basePackageName, int returnCode, String msg,
+                    Bundle extras) {
+                if (DEBUG) {
+                    Log.d(TAG, "Package " + basePackageName + " installed u" + userId
+                            + " returnCode: " + returnCode + " msg: " + msg);
+                }
+                if (returnCode == PackageManager.INSTALL_SUCCEEDED) {
+                    mApkToPackageMap.put(apkName, basePackageName);
+                    // Install on user 0 so that the package is cached when demo user is re-created
+                    installExistingPackage(basePackageName, UserHandle.USER_SYSTEM);
+                } else if (returnCode == PackageManager.INSTALL_FAILED_ALREADY_EXISTS) {
+                    installExistingPackage(basePackageName, userId);
+                }
+            }
+        }.getBinder(), 0, SYSTEM_SERVER_PACKAGE_NAME, userId);
+    }
+
+}
\ No newline at end of file
diff --git a/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java b/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java
new file mode 100644
index 0000000..a92498b
--- /dev/null
+++ b/services/retaildemo/java/com/android/server/retaildemo/RetailDemoModeService.java
@@ -0,0 +1,538 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.server.retaildemo;
+
+import android.Manifest;
+import android.app.ActivityManagerInternal;
+import android.app.ActivityManagerNative;
+import android.app.AppGlobals;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.RetailDemoModeServiceInternal;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.UserInfo;
+import android.content.res.Configuration;
+import android.database.ContentObserver;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.CameraCharacteristics;
+import android.hardware.camera2.CameraManager;
+import android.media.AudioManager;
+import android.media.AudioSystem;
+import android.net.Uri;
+import android.os.Environment;
+import android.os.FileUtils;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.provider.MediaStore;
+import android.provider.Settings;
+import android.util.KeyValueListParser;
+import android.util.Slog;
+import com.android.internal.os.BackgroundThread;
+import com.android.internal.R;
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.server.LocalServices;
+import com.android.server.ServiceThread;
+import com.android.server.SystemService;
+import com.android.server.am.ActivityManagerService;
+import com.android.server.retaildemo.UserInactivityCountdownDialog.OnCountDownExpiredListener;
+
+import java.io.File;
+import java.util.ArrayList;
+
+public class RetailDemoModeService extends SystemService {
+    private static final boolean DEBUG = false;
+
+    private static final String TAG = RetailDemoModeService.class.getSimpleName();
+    private static final String DEMO_USER_NAME = "Demo";
+    private static final String ACTION_RESET_DEMO =
+            "com.android.server.retaildemo.ACTION_RESET_DEMO";
+
+    private static final int MSG_TURN_SCREEN_ON = 0;
+    private static final int MSG_INACTIVITY_TIME_OUT = 1;
+    private static final int MSG_START_NEW_SESSION = 2;
+
+    private static final long SCREEN_WAKEUP_DELAY = 2500;
+    private static final long USER_INACTIVITY_TIMEOUT_MIN = 10000;
+    private static final long USER_INACTIVITY_TIMEOUT_DEFAULT = 30000;
+    private static final long WARNING_DIALOG_TIMEOUT_DEFAULT = 6000;
+    private static final long MILLIS_PER_SECOND = 1000;
+
+    private static final int[] VOLUME_STREAMS_TO_MUTE = {
+            AudioSystem.STREAM_RING,
+            AudioSystem.STREAM_MUSIC
+    };
+
+    // Tron Vars
+    private static final String DEMO_SESSION_COUNT = "retail_demo_session_count";
+    private static final String DEMO_SESSION_DURATION = "retail_demo_session_duration";
+
+    boolean mDeviceInDemoMode = false;
+    int mCurrentUserId = UserHandle.USER_SYSTEM;
+    long mUserInactivityTimeout;
+    long mWarningDialogTimeout;
+    private ActivityManagerService mAms;
+    private ActivityManagerInternal mAmi;
+    private AudioManager mAudioManager;
+    private NotificationManager mNm;
+    private UserManager mUm;
+    private PowerManager mPm;
+    private PowerManager.WakeLock mWakeLock;
+    Handler mHandler;
+    private ServiceThread mHandlerThread;
+    private PendingIntent mResetDemoPendingIntent;
+    private CameraManager mCameraManager;
+    private String[] mCameraIdsWithFlash;
+    private Configuration mSystemUserConfiguration;
+    private PreloadAppsInstaller mPreloadAppsInstaller;
+
+    final Object mActivityLock = new Object();
+    // Whether the newly created demo user has interacted with the screen yet
+    @GuardedBy("mActivityLock")
+    boolean mUserUntouched;
+    @GuardedBy("mActivityLock")
+    long mFirstUserActivityTime;
+    @GuardedBy("mActivityLock")
+    long mLastUserActivityTime;
+
+    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (!mDeviceInDemoMode) {
+                return;
+            }
+            switch (intent.getAction()) {
+                case Intent.ACTION_SCREEN_OFF:
+                    mHandler.removeMessages(MSG_TURN_SCREEN_ON);
+                    mHandler.sendEmptyMessageDelayed(MSG_TURN_SCREEN_ON, SCREEN_WAKEUP_DELAY);
+                    break;
+                case ACTION_RESET_DEMO:
+                    mHandler.sendEmptyMessage(MSG_START_NEW_SESSION);
+                    break;
+            }
+        }
+    };
+
+    final class MainHandler extends Handler {
+
+        MainHandler(Looper looper) {
+            super(looper, null, true);
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_TURN_SCREEN_ON:
+                    if (mWakeLock.isHeld()) {
+                        mWakeLock.release();
+                    }
+                    mWakeLock.acquire();
+                    break;
+                case MSG_INACTIVITY_TIME_OUT:
+                    if (isDemoLauncherDisabled()) {
+                        Slog.i(TAG, "User inactivity timeout reached");
+                        showInactivityCountdownDialog();
+                    }
+                    break;
+                case MSG_START_NEW_SESSION:
+                    if (DEBUG) {
+                        Slog.d(TAG, "Switching to a new demo user");
+                    }
+                    removeMessages(MSG_START_NEW_SESSION);
+                    removeMessages(MSG_INACTIVITY_TIME_OUT);
+                    if (mCurrentUserId != UserHandle.USER_SYSTEM) {
+                        logSessionDuration();
+                    }
+                    final UserInfo demoUser = getUserManager().createUser(DEMO_USER_NAME,
+                            UserInfo.FLAG_DEMO | UserInfo.FLAG_EPHEMERAL);
+                    if (demoUser != null) {
+                        setupDemoUser(demoUser);
+                        getActivityManager().switchUser(demoUser.id);
+                    }
+                    break;
+            }
+        }
+    }
+
+    private class SettingsObserver extends ContentObserver {
+
+        private final static String KEY_USER_INACTIVITY_TIMEOUT = "user_inactivity_timeout_ms";
+        private final static String KEY_WARNING_DIALOG_TIMEOUT = "warning_dialog_timeout_ms";
+
+        private final Uri mDeviceDemoModeUri = Settings.Global
+                .getUriFor(Settings.Global.DEVICE_DEMO_MODE);
+        private final Uri mDeviceProvisionedUri = Settings.Global
+                .getUriFor(Settings.Global.DEVICE_PROVISIONED);
+        private final Uri mRetailDemoConstantsUri = Settings.Global
+                .getUriFor(Settings.Global.RETAIL_DEMO_MODE_CONSTANTS);
+
+        private final KeyValueListParser mParser = new KeyValueListParser(',');
+
+        public SettingsObserver(Handler handler) {
+            super(handler);
+        }
+
+        public void register() {
+            ContentResolver cr = getContext().getContentResolver();
+            cr.registerContentObserver(mDeviceDemoModeUri, false, this, UserHandle.USER_SYSTEM);
+            cr.registerContentObserver(mDeviceProvisionedUri, false, this, UserHandle.USER_SYSTEM);
+            cr.registerContentObserver(mRetailDemoConstantsUri, false, this,
+                    UserHandle.USER_SYSTEM);
+        }
+
+        @Override
+        public void onChange(boolean selfChange, Uri uri) {
+            if (mRetailDemoConstantsUri.equals(uri)) {
+                refreshTimeoutConstants();
+                return;
+            }
+            if (mDeviceDemoModeUri.equals(uri)) {
+                mDeviceInDemoMode = UserManager.isDeviceInDemoMode(getContext());
+                if (mDeviceInDemoMode) {
+                    mHandler.sendEmptyMessage(MSG_START_NEW_SESSION);
+                } else if (mWakeLock.isHeld()) {
+                    mWakeLock.release();
+                }
+            }
+            // If device is provisioned and left demo mode - run the cleanup in demo folder
+            if (!mDeviceInDemoMode && isDeviceProvisioned()) {
+                // Run on the bg thread to not block the fg thread
+                BackgroundThread.getHandler().post(new Runnable() {
+                    @Override
+                    public void run() {
+                        if (!deleteDemoFolderContents()) {
+                            Slog.w(TAG, "Failed to delete demo folder contents");
+                        }
+                    }
+                });
+            }
+        }
+
+        private void refreshTimeoutConstants() {
+            try {
+                mParser.setString(Settings.Global.getString(getContext().getContentResolver(),
+                    Settings.Global.RETAIL_DEMO_MODE_CONSTANTS));
+            } catch (IllegalArgumentException exc) {
+                Slog.e(TAG, "Invalid string passed to KeyValueListParser");
+                // Consuming the exception to fall back to default values.
+            }
+            mWarningDialogTimeout = mParser.getLong(KEY_WARNING_DIALOG_TIMEOUT,
+                    WARNING_DIALOG_TIMEOUT_DEFAULT);
+            mUserInactivityTimeout = mParser.getLong(KEY_USER_INACTIVITY_TIMEOUT,
+                    USER_INACTIVITY_TIMEOUT_DEFAULT);
+            mUserInactivityTimeout = Math.max(mUserInactivityTimeout, USER_INACTIVITY_TIMEOUT_MIN);
+        }
+    }
+
+    private void showInactivityCountdownDialog() {
+        UserInactivityCountdownDialog dialog = new UserInactivityCountdownDialog(getContext(),
+                mWarningDialogTimeout, MILLIS_PER_SECOND);
+        dialog.setNegativeButtonClickListener(null);
+        dialog.setPositiveButtonClickListener(new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                mHandler.sendEmptyMessage(MSG_START_NEW_SESSION);
+            }
+        });
+        dialog.setOnCountDownExpiredListener(new OnCountDownExpiredListener() {
+            @Override
+            public void onCountDownExpired() {
+                mHandler.sendEmptyMessage(MSG_START_NEW_SESSION);
+            }
+        });
+        dialog.show();
+    }
+
+    public RetailDemoModeService(Context context) {
+        super(context);
+        synchronized (mActivityLock) {
+            mFirstUserActivityTime = mLastUserActivityTime = SystemClock.uptimeMillis();
+        }
+        mPreloadAppsInstaller = new PreloadAppsInstaller();
+    }
+
+    private Notification createResetNotification() {
+        return new Notification.Builder(getContext())
+                .setContentTitle(getContext().getString(R.string.reset_retail_demo_mode_title))
+                .setContentText(getContext().getString(R.string.reset_retail_demo_mode_text))
+                .setOngoing(true)
+                .setSmallIcon(R.drawable.platlogo)
+                .setShowWhen(false)
+                .setVisibility(Notification.VISIBILITY_PUBLIC)
+                .setContentIntent(getResetDemoPendingIntent())
+                .setColor(getContext().getColor(R.color.system_notification_accent_color))
+                .build();
+    }
+
+    private PendingIntent getResetDemoPendingIntent() {
+        if (mResetDemoPendingIntent == null) {
+            Intent intent = new Intent(ACTION_RESET_DEMO);
+            mResetDemoPendingIntent = PendingIntent.getBroadcast(getContext(), 0, intent, 0);
+        }
+        return mResetDemoPendingIntent;
+    }
+
+    boolean isDemoLauncherDisabled() {
+        IPackageManager pm = AppGlobals.getPackageManager();
+        int enabledState = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
+        String demoLauncherComponent = getContext().getResources()
+                .getString(R.string.config_demoModeLauncherComponent);
+        try {
+            enabledState = pm.getComponentEnabledSetting(
+                    ComponentName.unflattenFromString(demoLauncherComponent),
+                    mCurrentUserId);
+        } catch (RemoteException exc) {
+            Slog.e(TAG, "Unable to talk to Package Manager", exc);
+        }
+        return enabledState == PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
+    }
+
+    private void setupDemoUser(UserInfo userInfo) {
+        UserManager um = getUserManager();
+        UserHandle user = UserHandle.of(userInfo.id);
+        LockPatternUtils lockPatternUtils = new LockPatternUtils(getContext());
+        lockPatternUtils.setLockScreenDisabled(true, userInfo.id);
+        um.setUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, true, user);
+        um.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, true, user);
+        um.setUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS, true, user);
+        um.setUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER, true, user);
+        um.setUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, true, user);
+        Settings.Secure.putIntForUser(getContext().getContentResolver(),
+                Settings.Secure.SKIP_FIRST_USE_HINTS, 1, userInfo.id);
+        Settings.Secure.putIntForUser(getContext().getContentResolver(),
+                Settings.Global.PACKAGE_VERIFIER_ENABLE, 0, userInfo.id);
+
+        grantRuntimePermissionToCamera(userInfo.getUserHandle());
+    }
+
+    private void grantRuntimePermissionToCamera(UserHandle user) {
+        final Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
+        final PackageManager pm = getContext().getPackageManager();
+        final ResolveInfo handler = pm.resolveActivityAsUser(cameraIntent,
+                PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
+                user.getIdentifier());
+        if (handler == null || handler.activityInfo == null) {
+            return;
+        }
+        try {
+            pm.grantRuntimePermission(handler.activityInfo.packageName,
+                    Manifest.permission.ACCESS_FINE_LOCATION, user);
+        } catch (Exception e) {
+            // Ignore
+        }
+
+    }
+
+    void logSessionDuration() {
+        final int sessionDuration;
+        synchronized (mActivityLock) {
+            sessionDuration = (int) ((mLastUserActivityTime - mFirstUserActivityTime) / 1000);
+        }
+        MetricsLogger.histogram(getContext(), DEMO_SESSION_DURATION, sessionDuration);
+    }
+
+    private ActivityManagerService getActivityManager() {
+        if (mAms == null) {
+            mAms = (ActivityManagerService) ActivityManagerNative.getDefault();
+        }
+        return mAms;
+    }
+
+    private UserManager getUserManager() {
+        if (mUm == null) {
+            mUm = getContext().getSystemService(UserManager.class);
+        }
+        return mUm;
+    }
+
+    private AudioManager getAudioManager() {
+        if (mAudioManager == null) {
+            mAudioManager = getContext().getSystemService(AudioManager.class);
+        }
+        return mAudioManager;
+    }
+
+    private boolean isDeviceProvisioned() {
+        return Settings.Global.getInt(
+                getContext().getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0;
+    }
+
+    private boolean deleteDemoFolderContents() {
+        final File dir = Environment.getDataPreloadsDemoDirectory();
+        Slog.i(TAG, "Deleting contents of " + dir);
+        return FileUtils.deleteContents(dir);
+    }
+
+    private void registerBroadcastReceiver() {
+        final IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_SCREEN_OFF);
+        filter.addAction(ACTION_RESET_DEMO);
+        getContext().registerReceiver(mBroadcastReceiver, filter);
+    }
+
+    private String[] getCameraIdsWithFlash() {
+        ArrayList<String> cameraIdsList = new ArrayList<String>();
+        try {
+            for (String cameraId : mCameraManager.getCameraIdList()) {
+                CameraCharacteristics c = mCameraManager.getCameraCharacteristics(cameraId);
+                if (Boolean.TRUE.equals(c.get(CameraCharacteristics.FLASH_INFO_AVAILABLE))) {
+                    cameraIdsList.add(cameraId);
+                }
+            }
+        } catch (CameraAccessException e) {
+            Slog.e(TAG, "Unable to access camera while getting camera id list", e);
+        }
+        return cameraIdsList.toArray(new String[cameraIdsList.size()]);
+    }
+
+    private void turnOffAllFlashLights() {
+        for (String cameraId : mCameraIdsWithFlash) {
+            try {
+                mCameraManager.setTorchMode(cameraId, false);
+            } catch (CameraAccessException e) {
+                Slog.e(TAG, "Unable to access camera " + cameraId + " while turning off flash", e);
+            }
+        }
+    }
+
+    private void muteVolumeStreams() {
+        for (int stream : VOLUME_STREAMS_TO_MUTE) {
+            getAudioManager().setStreamVolume(stream, getAudioManager().getStreamMinVolume(stream),
+                    0);
+        }
+    }
+
+    private Configuration getSystemUsersConfiguration() {
+        if (mSystemUserConfiguration == null) {
+            Settings.System.getConfiguration(getContext().getContentResolver(),
+                    mSystemUserConfiguration = new Configuration());
+        }
+        return mSystemUserConfiguration;
+    }
+
+    @Override
+    public void onStart() {
+        if (DEBUG) {
+            Slog.d(TAG, "Service starting up");
+        }
+        mHandlerThread = new ServiceThread(TAG, android.os.Process.THREAD_PRIORITY_FOREGROUND,
+                false);
+        mHandlerThread.start();
+        mHandler = new MainHandler(mHandlerThread.getLooper());
+        publishLocalService(RetailDemoModeServiceInternal.class, mLocalService);
+    }
+
+    @Override
+    public void onBootPhase(int bootPhase) {
+        if (bootPhase != PHASE_THIRD_PARTY_APPS_CAN_START) {
+            return;
+        }
+        mPm = (PowerManager) getContext().getSystemService(Context.POWER_SERVICE);
+        mAmi = LocalServices.getService(ActivityManagerInternal.class);
+        mWakeLock = mPm
+                .newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG);
+        mNm = NotificationManager.from(getContext());
+        mCameraManager = (CameraManager) getContext().getSystemService(Context.CAMERA_SERVICE);
+        mCameraIdsWithFlash = getCameraIdsWithFlash();
+
+        if (UserManager.isDeviceInDemoMode(getContext())) {
+            mDeviceInDemoMode = true;
+            mHandler.sendEmptyMessage(MSG_START_NEW_SESSION);
+        }
+        SettingsObserver settingsObserver = new SettingsObserver(mHandler);
+        settingsObserver.register();
+        settingsObserver.refreshTimeoutConstants();
+        registerBroadcastReceiver();
+    }
+
+    @Override
+    public void onSwitchUser(int userId) {
+        if (!mDeviceInDemoMode) {
+            return;
+        }
+        if (DEBUG) {
+            Slog.d(TAG, "onSwitchUser: " + userId);
+        }
+        final UserInfo ui = getUserManager().getUserInfo(userId);
+        if (!ui.isDemo()) {
+            Slog.wtf(TAG, "Should not allow switch to non-demo user in demo mode");
+            return;
+        }
+        if (!mWakeLock.isHeld()) {
+            mWakeLock.acquire();
+        }
+        mCurrentUserId = userId;
+        mAmi.updatePersistentConfigurationForUser(getSystemUsersConfiguration(), userId);
+        turnOffAllFlashLights();
+        muteVolumeStreams();
+        mNm.notifyAsUser(TAG, 1, createResetNotification(), UserHandle.of(userId));
+
+        synchronized (mActivityLock) {
+            mUserUntouched = true;
+        }
+        MetricsLogger.count(getContext(), DEMO_SESSION_COUNT, 1);
+        mHandler.removeMessages(MSG_INACTIVITY_TIME_OUT);
+        mHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                mPreloadAppsInstaller.installApps(userId);
+            }
+        });
+    }
+
+    private RetailDemoModeServiceInternal mLocalService = new RetailDemoModeServiceInternal() {
+        private static final long USER_ACTIVITY_DEBOUNCE_TIME = 2000;
+
+        @Override
+        public void onUserActivity() {
+            if (!mDeviceInDemoMode) {
+                return;
+            }
+            long timeOfActivity = SystemClock.uptimeMillis();
+            synchronized (mActivityLock) {
+                if (timeOfActivity < mLastUserActivityTime + USER_ACTIVITY_DEBOUNCE_TIME) {
+                    return;
+                }
+                mLastUserActivityTime = timeOfActivity;
+                if (mUserUntouched && isDemoLauncherDisabled()) {
+                    Slog.d(TAG, "retail_demo first touch");
+                    mUserUntouched = false;
+                    mFirstUserActivityTime = timeOfActivity;
+                }
+            }
+            mHandler.removeMessages(MSG_INACTIVITY_TIME_OUT);
+            mHandler.sendEmptyMessageDelayed(MSG_INACTIVITY_TIME_OUT, mUserInactivityTimeout);
+        }
+    };
+}
diff --git a/services/retaildemo/java/com/android/server/retaildemo/UserInactivityCountdownDialog.java b/services/retaildemo/java/com/android/server/retaildemo/UserInactivityCountdownDialog.java
new file mode 100644
index 0000000..d14f4eb
--- /dev/null
+++ b/services/retaildemo/java/com/android/server/retaildemo/UserInactivityCountdownDialog.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.server.retaildemo;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.os.CountDownTimer;
+import android.view.WindowManager;
+import android.widget.TextView;
+
+import com.android.internal.R;
+
+public class UserInactivityCountdownDialog extends AlertDialog {
+
+    private OnCountDownExpiredListener mOnCountDownExpiredListener;
+    private CountDownTimer mCountDownTimer;
+    private long mCountDownDuration;
+    private long mRefreshInterval;
+
+    UserInactivityCountdownDialog(Context context, long duration, long refreshInterval) {
+        super(context);
+        mCountDownDuration = duration;
+        mRefreshInterval = refreshInterval;
+
+        getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
+        WindowManager.LayoutParams attrs = getWindow().getAttributes();
+        attrs.privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
+        getWindow().setAttributes(attrs);
+
+        setTitle(R.string.demo_user_inactivity_timeout_title);
+        setMessage(getContext().getString(R.string.demo_user_inactivity_timeout_countdown,
+                duration));
+    }
+
+    public void setOnCountDownExpiredListener(
+            OnCountDownExpiredListener onCountDownExpiredListener) {
+        mOnCountDownExpiredListener = onCountDownExpiredListener;
+    }
+
+    public void setPositiveButtonClickListener(OnClickListener onClickListener) {
+        setButton(Dialog.BUTTON_POSITIVE,
+                getContext().getString(R.string.demo_user_inactivity_timeout_right_button),
+                onClickListener);
+    }
+
+    public void setNegativeButtonClickListener(OnClickListener onClickListener) {
+        setButton(Dialog.BUTTON_NEGATIVE,
+                getContext().getString(R.string.demo_user_inactivity_timeout_left_button),
+                onClickListener);
+    }
+
+    @Override
+    public void show() {
+        super.show();
+        final TextView messageView = (TextView) findViewById(R.id.message);
+        messageView.post(new Runnable() {
+            @Override
+            public void run() {
+                mCountDownTimer = new CountDownTimer(mCountDownDuration, mRefreshInterval) {
+
+                    @Override
+                    public void onTick(long millisUntilFinished) {
+                        String msg = getContext().getString(
+                                R.string.demo_user_inactivity_timeout_countdown,
+                                millisUntilFinished / 1000);
+                        messageView.setText(msg);
+                    }
+
+                    @Override
+                    public void onFinish() {
+                        dismiss();
+                        if (mOnCountDownExpiredListener != null)
+                            mOnCountDownExpiredListener.onCountDownExpired();
+                    }
+                }.start();
+            }
+        });
+    }
+
+    @Override
+    public void onStop() {
+        if (mCountDownTimer != null) {
+            mCountDownTimer.cancel();
+        }
+    }
+
+    interface OnCountDownExpiredListener {
+        void onCountDownExpired();
+    }
+}
diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk
index 0437e1d..50e0662 100644
--- a/services/tests/servicestests/Android.mk
+++ b/services/tests/servicestests/Android.mk
@@ -12,6 +12,7 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
+    frameworks-base-testutils \
     services.core \
     services.devicepolicy \
     services.net \
@@ -19,7 +20,8 @@
     easymocklib \
     guava \
     android-support-test \
-    mockito-target
+    mockito-target \
+    ShortcutManagerTestUtils
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/services/tests/servicestests/AndroidManifest.xml b/services/tests/servicestests/AndroidManifest.xml
index 7017d81..b8ace28 100644
--- a/services/tests/servicestests/AndroidManifest.xml
+++ b/services/tests/servicestests/AndroidManifest.xml
@@ -108,9 +108,53 @@
         <service android:name="com.android.server.job.MockPriorityJobService"
                  android:permission="android.permission.BIND_JOB_SERVICE" />
 
-        <activity android:name="com.android.server.pm.ShortcutManagerTest$ShortcutActivity" />
-        <activity android:name="com.android.server.pm.ShortcutManagerTest$ShortcutActivity2" />
-        <activity android:name="com.android.server.pm.ShortcutManagerTest$ShortcutActivity3" />
+        <activity android:name="com.android.server.pm.BaseShortcutManagerTest$ShortcutActivity" />
+        <activity android:name="com.android.server.pm.BaseShortcutManagerTest$ShortcutActivity2" />
+        <activity android:name="com.android.server.pm.BaseShortcutManagerTest$ShortcutActivity3" />
+
+        <activity android:name="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="true" android:exported="true" />
+
+        <activity-alias android:name="a.ShortcutEnabled"
+            android:targetActivity="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="true" android:exported="true">
+        </activity-alias>
+        <activity-alias android:name="a.ShortcutDisabled"
+            android:targetActivity="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="false" android:exported="true">
+            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcut_5"/>
+        </activity-alias>
+        <activity-alias android:name="a.ShortcutUnexported"
+            android:targetActivity="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="true" android:exported="false">
+            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcut_5"/>
+        </activity-alias>
+        <activity-alias android:name="a.Shortcut1"
+            android:targetActivity="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="true" android:exported="true">
+            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcut_1"/>
+        </activity-alias>
+
+        <activity-alias android:name="a.DisabledMain"
+            android:targetActivity="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="false" android:exported="true">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity-alias>
+
+        <activity-alias android:name="a.UnexportedMain"
+            android:targetActivity="com.android.server.pm.ShortcutTestActivity"
+            android:enabled="true" android:exported="false">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity-alias>
+
     </application>
 
     <instrumentation
diff --git a/services/tests/servicestests/res/drawable/icon3.png b/services/tests/servicestests/res/drawable/icon3.png
new file mode 100644
index 0000000..64eb294
--- /dev/null
+++ b/services/tests/servicestests/res/drawable/icon3.png
Binary files differ
diff --git a/packages/SystemUI/res/layout/night_mode_settings.xml b/services/tests/servicestests/res/values/strings.xml
similarity index 64%
copy from packages/SystemUI/res/layout/night_mode_settings.xml
copy to services/tests/servicestests/res/values/strings.xml
index 3725e78..2f9d06c 100644
--- a/packages/SystemUI/res/layout/night_mode_settings.xml
+++ b/services/tests/servicestests/res/values/strings.xml
@@ -14,11 +14,11 @@
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <include layout="@layout/switch_bar" />
-
-</LinearLayout>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="shortcut_title1"></string>
+    <string name="shortcut_text1"></string>
+    <string name="shortcut_disabled_message1"></string>
+    <string name="shortcut_title2"></string>
+    <string name="shortcut_text2"></string>
+    <string name="shortcut_disabled_message2"></string>
+</resources>
diff --git a/services/tests/servicestests/res/xml/shortcut_0.xml b/services/tests/servicestests/res/xml/shortcut_0.xml
new file mode 100644
index 0000000..fda001e
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_0.xml
@@ -0,0 +1,2 @@
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_1.xml b/services/tests/servicestests/res/xml/shortcut_1.xml
new file mode 100644
index 0000000..e3f9172
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_1.xml
@@ -0,0 +1,18 @@
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="data1"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_1_alt.xml b/services/tests/servicestests/res/xml/shortcut_1_alt.xml
new file mode 100644
index 0000000..2d5e8e7
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_1_alt.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1-alt"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="data1"
+        >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+</shortcuts>
diff --git a/packages/SystemUI/res/layout/night_mode_settings.xml b/services/tests/servicestests/res/xml/shortcut_1_disable.xml
similarity index 61%
copy from packages/SystemUI/res/layout/night_mode_settings.xml
copy to services/tests/servicestests/res/xml/shortcut_1_disable.xml
index 3725e78..e3ee3a0 100644
--- a/packages/SystemUI/res/layout/night_mode_settings.xml
+++ b/services/tests/servicestests/res/xml/shortcut_1_disable.xml
@@ -13,12 +13,13 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <include layout="@layout/switch_bar" />
-
-</LinearLayout>
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1"
+        android:enabled="false"
+        android:icon="@drawable/icon2"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        android:shortcutLongLabel="@string/shortcut_text2"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message2"
+    />
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_2.xml b/services/tests/servicestests/res/xml/shortcut_2.xml
new file mode 100644
index 0000000..f7ea803
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_2.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="http://a.b.c/"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms2"
+        android:enabled="true"
+        android:icon="@drawable/icon2"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        android:shortcutLongLabel="@string/shortcut_text2"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message2"
+        >
+        <intent
+            android:action="action2"
+            android:data="http://a.b.c/2"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_2_duplicate.xml b/services/tests/servicestests/res/xml/shortcut_2_duplicate.xml
new file mode 100644
index 0000000..b00ec60
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_2_duplicate.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="action1"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms1"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        >
+        <intent
+            android:action="action2"
+            >
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_3.xml b/services/tests/servicestests/res/xml/shortcut_3.xml
new file mode 100644
index 0000000..432ca49
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_3.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="http://a.b.c/"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms2"
+        android:enabled="true"
+        android:icon="@drawable/icon2"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        android:shortcutLongLabel="@string/shortcut_text2"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message2"
+        >
+        <intent
+            android:action="action2"
+            android:data="http://a.b.c/2"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms3"
+        android:enabled="true"
+        android:icon="@drawable/icon3"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        >
+        <intent android:action="action3" />
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_5.xml b/services/tests/servicestests/res/xml/shortcut_5.xml
new file mode 100644
index 0000000..9551100
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_5.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="http://a.b.c/1"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms2"
+        android:enabled="true"
+        android:icon="@drawable/icon2"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        android:shortcutLongLabel="@string/shortcut_text2"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message2"
+        >
+        <intent
+            android:action="action2"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms3"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms4"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        >
+        <intent
+            android:action="android.intent.action.VIEW2"
+            >
+        </intent>
+        <categories />
+        <categories android:name="" />
+        <categories android:name="cat" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms5"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="action"
+            android:data="http://www/"
+            android:targetPackage="abc"
+            android:targetClass=".xyz"
+            android:mimeType="foo/bar"
+            >
+            <categories android:name="cat1" />
+            <categories android:name="cat2" />
+            <extra android:name="key1" android:value="value1" />
+            <extra android:name="key2" android:value="value2" />
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_5_alt.xml b/services/tests/servicestests/res/xml/shortcut_5_alt.xml
new file mode 100644
index 0000000..f79cd6f
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_5_alt.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms1_alt"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="http://a.b.c/1"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms2_alt"
+        android:enabled="true"
+        android:icon="@drawable/icon2"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        android:shortcutLongLabel="@string/shortcut_text2"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message2"
+        >
+        <intent
+            android:action="action2"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms3_alt"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms4_alt"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms5_alt"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_5_reverse.xml b/services/tests/servicestests/res/xml/shortcut_5_reverse.xml
new file mode 100644
index 0000000..d5b7c8f
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_5_reverse.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="ms5"
+        android:enabled="true"
+        android:icon="@drawable/icon1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        android:shortcutLongLabel="@string/shortcut_text1"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message1"
+        >
+        <intent
+            android:action="action1"
+            android:data="http://a.b.c/1"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+        <categories android:name="android.shortcut.media" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms4"
+        android:enabled="true"
+        android:icon="@drawable/icon2"
+        android:shortcutShortLabel="@string/shortcut_title2"
+        android:shortcutLongLabel="@string/shortcut_text2"
+        android:shortcutDisabledMessage="@string/shortcut_disabled_message2"
+        >
+        <intent
+            android:action="action2"
+            >
+        </intent>
+        <categories android:name="android.shortcut.conversation" />
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms3"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms2"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="ms1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="action"
+            >
+            <categories android:name="cat1" />
+            <categories android:name="cat2" />
+            <extra android:name="key1" android:value="value1" />
+            <extra android:name="key2" android:value="value2" />
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_error_1.xml b/services/tests/servicestests/res/xml/shortcut_error_1.xml
new file mode 100644
index 0000000..3990d02
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_error_1.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="x1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_error_2.xml b/services/tests/servicestests/res/xml/shortcut_error_2.xml
new file mode 100644
index 0000000..a6f7150
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_error_2.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="manifest-shortcut-3"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+    <shortcut
+        android:shortcutId="x2"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_error_3.xml b/services/tests/servicestests/res/xml/shortcut_error_3.xml
new file mode 100644
index 0000000..a7b9b84
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_error_3.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <shortcut
+        android:shortcutId="manifest-shortcut-3"
+        android:shortcutShortLabel="@string/shortcut_title1"
+    />
+    <shortcut
+        android:shortcutId="x3"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent
+            android:action="android.intent.action.VIEW"
+            >
+        </intent>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/res/xml/shortcut_error_4.xml b/services/tests/servicestests/res/xml/shortcut_error_4.xml
new file mode 100644
index 0000000..3697bb4
--- /dev/null
+++ b/services/tests/servicestests/res/xml/shortcut_error_4.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" >
+    <!-- This is valid -->
+    <shortcut
+        android:shortcutId="ms1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent android:action="action1" />
+    </shortcut>
+
+    <!-- Invalid: no intent -->
+    <shortcut
+        android:shortcutId="ms_ignored1"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        />
+
+    <!-- Valid: more than one intent; first one will be picked. -->
+    <shortcut
+        android:shortcutId="ms2"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent android:action="action2_1" />
+        <intent android:action="action2_2" />
+    </shortcut>
+
+    <!-- Valid: disabled shortcut doesn't need an intent -->
+    <shortcut
+        android:shortcutId="ms3"
+        android:enabled="false"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        />
+
+    <!-- Valid, but disabled shortcut's intent will be ignored. -->
+    <shortcut
+        android:shortcutId="ms4"
+        android:enabled="false"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent android:action="action4" />
+    </shortcut>
+
+    <!-- Invalid, no intent action -->
+    <shortcut
+        android:shortcutId="ms_ignored2"
+        android:shortcutShortLabel="@string/shortcut_title1"
+        >
+        <intent android:data="x"/>
+    </shortcut>
+</shortcuts>
diff --git a/services/tests/servicestests/src/android/net/apf/ApfTest.java b/services/tests/servicestests/src/android/net/apf/ApfTest.java
index 8ac238a..815133a 100644
--- a/services/tests/servicestests/src/android/net/apf/ApfTest.java
+++ b/services/tests/servicestests/src/android/net/apf/ApfTest.java
@@ -26,14 +26,23 @@
 import android.net.apf.ApfGenerator.IllegalInstructionException;
 import android.net.apf.ApfGenerator.Register;
 import android.net.ip.IpManager;
+import android.net.metrics.IpConnectivityLog;
+import android.net.metrics.RaEvent;
 import android.net.LinkAddress;
 import android.net.LinkProperties;
 import android.os.ConditionVariable;
+import android.os.Parcelable;
 import android.system.ErrnoException;
 import android.system.Os;
 import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.LargeTest;
 
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.verify;
+
 import java.io.File;
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
@@ -43,6 +52,7 @@
 import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.nio.ByteBuffer;
+import java.util.List;
 
 import libcore.io.IoUtils;
 import libcore.io.Streams;
@@ -56,9 +66,12 @@
 public class ApfTest extends AndroidTestCase {
     private static final int TIMEOUT_MS = 500;
 
+    @Mock IpConnectivityLog mLog;
+
     @Override
     public void setUp() throws Exception {
         super.setUp();
+        MockitoAnnotations.initMocks(this);
         // Load up native shared library containing APF interpreter exposed via JNI.
         System.loadLibrary("servicestestsjni");
     }
@@ -70,6 +83,9 @@
     // least the minimum packet size.
     private final static int MIN_PKT_SIZE = 15;
 
+    private final static boolean DROP_MULTICAST = true;
+    private final static boolean ALLOW_MULTICAST = false;
+
     private void assertVerdict(int expected, byte[] program, byte[] packet, int filterAge) {
         assertEquals(expected, apfSimulate(program, packet, filterAge));
     }
@@ -562,10 +578,10 @@
         public final static byte[] MOCK_MAC_ADDR = new byte[]{1,2,3,4,5,6};
         private FileDescriptor mWriteSocket;
 
-        public TestApfFilter(IpManager.Callback ipManagerCallback, boolean multicastFilter) throws
-                Exception {
+        public TestApfFilter(IpManager.Callback ipManagerCallback, boolean multicastFilter,
+                IpConnectivityLog log) throws Exception {
             super(new ApfCapabilities(2, 1000, ARPHRD_ETHER), NetworkInterface.getByName("lo"),
-                    ipManagerCallback, multicastFilter);
+                    ipManagerCallback, multicastFilter, log);
         }
 
         // Pretend an RA packet has been received and show it to ApfFilter.
@@ -652,7 +668,7 @@
     private static final int DHCP_CLIENT_PORT = 68;
     private static final int DHCP_CLIENT_MAC_OFFSET = ETH_HEADER_LEN + UDP_HEADER_LEN + 48;
 
-    private static int ARP_HEADER_OFFSET = ETH_HEADER_LEN;
+    private static final int ARP_HEADER_OFFSET = ETH_HEADER_LEN;
     private static final byte[] ARP_IPV4_REQUEST_HEADER = new byte[]{
             0, 1, // Hardware type: Ethernet (1)
             8, 0, // Protocol type: IP (0x0800)
@@ -660,14 +676,14 @@
             4,    // Protocol size: 4
             0, 1  // Opcode: request (1)
     };
-    private static int ARP_TARGET_IP_ADDRESS_OFFSET = ETH_HEADER_LEN + 24;
+    private static final int ARP_TARGET_IP_ADDRESS_OFFSET = ETH_HEADER_LEN + 24;
 
-    private static byte[] MOCK_IPV4_ADDR = new byte[]{10, 0, 0, 1};
+    private static final byte[] MOCK_IPV4_ADDR = new byte[]{10, 0, 0, 1};
 
     @LargeTest
     public void testApfFilterIPv4() throws Exception {
         MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
-        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, true /* multicastFilter */);
+        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, DROP_MULTICAST, mLog);
         byte[] program = ipManagerCallback.getApfProgram();
 
         // Verify empty packet of 100 zero bytes is passed
@@ -699,7 +715,7 @@
     @LargeTest
     public void testApfFilterIPv6() throws Exception {
         MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
-        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, false /* multicastFilter */);
+        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, ALLOW_MULTICAST, mLog);
         byte[] program = ipManagerCallback.getApfProgram();
 
         // Verify empty IPv6 packet is passed
@@ -726,7 +742,7 @@
     @LargeTest
     public void testApfFilterMulticast() throws Exception {
         MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
-        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, false /* multicastFilter */);
+        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, ALLOW_MULTICAST, mLog);
         byte[] program = ipManagerCallback.getApfProgram();
 
         // Construct IPv4 and IPv6 multicast packets.
@@ -772,7 +788,7 @@
         // Verify it can be initialized to on
         ipManagerCallback.resetApfProgramWait();
         apfFilter.shutdown();
-        apfFilter = new TestApfFilter(ipManagerCallback, true /* multicastFilter */);
+        apfFilter = new TestApfFilter(ipManagerCallback, DROP_MULTICAST, mLog);
         program = ipManagerCallback.getApfProgram();
         assertDrop(program, bcastv4packet.array(), 0);
         assertDrop(program, mcastv4packet.array(), 0);
@@ -804,7 +820,7 @@
     @LargeTest
     public void testApfFilterArp() throws Exception {
         MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
-        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, false /* multicastFilter */);
+        ApfFilter apfFilter = new TestApfFilter(ipManagerCallback, ALLOW_MULTICAST, mLog);
         byte[] program = ipManagerCallback.getApfProgram();
 
         // Verify initially ARP filter is off
@@ -867,6 +883,35 @@
         verifyRaLifetime(ipManagerCallback, packet, lifetime);
     }
 
+    private void verifyRaEvent(RaEvent expected) {
+        ArgumentCaptor<Parcelable> captor = ArgumentCaptor.forClass(Parcelable.class);
+        verify(mLog, atLeastOnce()).log(captor.capture());
+        RaEvent got = lastRaEvent(captor.getAllValues());
+        if (!raEventEquals(expected, got)) {
+            assertEquals(expected, got);  // fail for printing an assertion error message.
+        }
+    }
+
+    private RaEvent lastRaEvent(List<Parcelable> events) {
+        RaEvent got = null;
+        for (Parcelable ev : events) {
+            if (ev instanceof RaEvent) {
+                got = (RaEvent) ev;
+            }
+        }
+        return got;
+    }
+
+    private boolean raEventEquals(RaEvent ev1, RaEvent ev2) {
+        return (ev1 != null) && (ev2 != null)
+                && (ev1.routerLifetime == ev2.routerLifetime)
+                && (ev1.prefixValidLifetime == ev2.prefixValidLifetime)
+                && (ev1.prefixPreferredLifetime == ev2.prefixPreferredLifetime)
+                && (ev1.routeInfoLifetime == ev2.routeInfoLifetime)
+                && (ev1.rdnssLifetime == ev2.rdnssLifetime)
+                && (ev1.dnsslLifetime == ev2.dnsslLifetime);
+    }
+
     private void assertInvalidRa(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback,
             ByteBuffer packet) throws IOException, ErrnoException {
         ipManagerCallback.resetApfProgramWait();
@@ -877,7 +922,7 @@
     @LargeTest
     public void testApfFilterRa() throws Exception {
         MockIpManagerCallback ipManagerCallback = new MockIpManagerCallback();
-        TestApfFilter apfFilter = new TestApfFilter(ipManagerCallback, true /* multicastFilter */);
+        TestApfFilter apfFilter = new TestApfFilter(ipManagerCallback, DROP_MULTICAST, mLog);
         byte[] program = ipManagerCallback.getApfProgram();
 
         // Verify RA is passed the first time
@@ -891,6 +936,7 @@
         assertPass(program, basePacket.array(), 0);
 
         testRaLifetime(apfFilter, ipManagerCallback, basePacket, 1000);
+        verifyRaEvent(new RaEvent(1000, -1, -1, -1, -1, -1));
 
         // Ensure zero-length options cause the packet to be silently skipped.
         // Do this before we test other packets. http://b/29586253
@@ -916,6 +962,7 @@
         prefixOptionPacket.putInt(
                 ICMP6_RA_OPTION_OFFSET + ICMP6_PREFIX_OPTION_VALID_LIFETIME_OFFSET, 200);
         testRaLifetime(apfFilter, ipManagerCallback, prefixOptionPacket, 100);
+        verifyRaEvent(new RaEvent(1000, 200, 100, -1, -1, -1));
 
         ByteBuffer rdnssOptionPacket = ByteBuffer.wrap(
                 new byte[ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_OPTION_LEN]);
@@ -926,6 +973,7 @@
         rdnssOptionPacket.putInt(
                 ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_LIFETIME_OFFSET, 300);
         testRaLifetime(apfFilter, ipManagerCallback, rdnssOptionPacket, 300);
+        verifyRaEvent(new RaEvent(1000, -1, -1, -1, 300, -1));
 
         ByteBuffer routeInfoOptionPacket = ByteBuffer.wrap(
                 new byte[ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_OPTION_LEN]);
@@ -936,6 +984,7 @@
         routeInfoOptionPacket.putInt(
                 ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_LIFETIME_OFFSET, 400);
         testRaLifetime(apfFilter, ipManagerCallback, routeInfoOptionPacket, 400);
+        verifyRaEvent(new RaEvent(1000, -1, -1, 400, -1, -1));
 
         ByteBuffer dnsslOptionPacket = ByteBuffer.wrap(
                 new byte[ICMP6_RA_OPTION_OFFSET + ICMP6_4_BYTE_OPTION_LEN]);
@@ -948,6 +997,7 @@
         // Note that lifetime of 2000 will be ignored in favor of shorter
         // route lifetime of 1000.
         testRaLifetime(apfFilter, ipManagerCallback, dnsslOptionPacket, 1000);
+        verifyRaEvent(new RaEvent(1000, -1, -1, -1, -1, 2000));
 
         // Verify that current program filters all five RAs:
         verifyRaLifetime(ipManagerCallback, basePacket, 1000);
diff --git a/services/tests/servicestests/src/android/net/metrics/IpConnectivityLogTest.java b/services/tests/servicestests/src/android/net/metrics/IpConnectivityLogTest.java
new file mode 100644
index 0000000..1433f95
--- /dev/null
+++ b/services/tests/servicestests/src/android/net/metrics/IpConnectivityLogTest.java
@@ -0,0 +1,162 @@
+/*
+ * Copyright (C) 2016, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.metrics;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.net.ConnectivityMetricsEvent;
+import android.net.IConnectivityMetricsLogger;
+
+import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.timeout;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.List;
+
+public class IpConnectivityLogTest extends TestCase {
+
+    // use same Parcel object everywhere for pointer equality
+    static final Bundle FAKE_EV = new Bundle();
+
+    @Mock IConnectivityMetricsLogger mService;
+    ArgumentCaptor<ConnectivityMetricsEvent> evCaptor;
+
+    IpConnectivityLog mLog;
+
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        evCaptor = ArgumentCaptor.forClass(ConnectivityMetricsEvent.class);
+        mLog = new IpConnectivityLog(mService);
+    }
+
+    public void testLogEvents() throws Exception {
+        assertTrue(mLog.log(1, FAKE_EV));
+        assertTrue(mLog.log(2, FAKE_EV));
+        assertTrue(mLog.log(3, FAKE_EV));
+
+        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(3);
+        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
+        assertEventsEqual(expectedEvent(2), gotEvents.get(1));
+        assertEventsEqual(expectedEvent(3), gotEvents.get(2));
+    }
+
+    public void testLogEventTriggerThrottling() throws Exception {
+        when(mService.logEvent(any())).thenReturn(1234L);
+
+        assertFalse(mLog.log(1, FAKE_EV));
+    }
+
+    public void testLogEventFails() throws Exception {
+        when(mService.logEvent(any())).thenReturn(-1L); // Error.
+
+        assertFalse(mLog.log(1, FAKE_EV));
+    }
+
+    public void testLogEventWhenThrottling() throws Exception {
+        when(mService.logEvent(any())).thenReturn(Long.MAX_VALUE); // Throttled
+
+        // No events are logged. The service is only called once
+        // After that, throttling state is maintained locally.
+        assertFalse(mLog.log(1, FAKE_EV));
+        assertFalse(mLog.log(2, FAKE_EV));
+
+        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(1);
+        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
+    }
+
+    public void testLogEventRecoverFromThrottling() throws Exception {
+        final long throttleTimeout = System.currentTimeMillis() + 50;
+        when(mService.logEvent(any())).thenReturn(throttleTimeout, 0L);
+
+        assertFalse(mLog.log(1, FAKE_EV));
+        new Thread() {
+            public void run() {
+                busySpinLog();
+            }
+        }.start();
+
+        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(2, 200);
+        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
+        assertEventsEqual(expectedEvent(2), gotEvents.get(1));
+    }
+
+    public void testLogEventRecoverFromThrottlingWithMultipleCallers() throws Exception {
+        final long throttleTimeout = System.currentTimeMillis() + 50;
+        when(mService.logEvent(any())).thenReturn(throttleTimeout, 0L);
+
+        assertFalse(mLog.log(1, FAKE_EV));
+        final int nCallers = 10;
+        for (int i = 0; i < nCallers; i++) {
+            new Thread() {
+                public void run() {
+                    busySpinLog();
+                }
+            }.start();
+        }
+
+        List<ConnectivityMetricsEvent> gotEvents = verifyEvents(1 + nCallers, 200);
+        assertEventsEqual(expectedEvent(1), gotEvents.get(0));
+        for (int i = 0; i < nCallers; i++) {
+            assertEventsEqual(expectedEvent(2), gotEvents.get(1 + i));
+        }
+    }
+
+    void busySpinLog() {
+        final long timeout = 200;
+        final long stop = System.currentTimeMillis() + timeout;
+        try {
+            while (System.currentTimeMillis() < stop) {
+                if (mLog.log(2, FAKE_EV)) {
+                    return;
+                }
+                Thread.sleep(10);
+            }
+        } catch (InterruptedException e) { }
+    }
+
+    List<ConnectivityMetricsEvent> verifyEvents(int n) throws Exception {
+        verify(mService, times(n)).logEvent(evCaptor.capture());
+        return evCaptor.getAllValues();
+    }
+
+    List<ConnectivityMetricsEvent> verifyEvents(int n, int timeoutMs) throws Exception {
+        verify(mService, timeout(timeoutMs).times(n)).logEvent(evCaptor.capture());
+        return evCaptor.getAllValues();
+    }
+
+    static ConnectivityMetricsEvent expectedEvent(int timestamp) {
+        return new ConnectivityMetricsEvent((long)timestamp, 0, 0, FAKE_EV);
+    }
+
+    /** Outer equality for ConnectivityMetricsEvent to avoid overriding equals() and hashCode(). */
+    static void assertEventsEqual(ConnectivityMetricsEvent expected, ConnectivityMetricsEvent got) {
+        assertEquals(expected.timestamp, got.timestamp);
+        assertEquals(expected.componentTag, got.componentTag);
+        assertEquals(expected.eventTag, got.eventTag);
+        assertEquals(expected.data, got.data);
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/internal/util/FakeSettingsProvider.java b/services/tests/servicestests/src/com/android/internal/util/FakeSettingsProvider.java
new file mode 100644
index 0000000..808f4dd
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/internal/util/FakeSettingsProvider.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.util;
+
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.Settings;
+import android.test.mock.MockContentProvider;
+import android.util.Log;
+
+import java.util.HashMap;
+
+/**
+ * Fake for system settings.
+ *
+ * To use, ensure that the Context used by the test code returns a ContentResolver that uses this
+ * provider for the Settings authority:
+ *
+ *   class MyTestContext extends MockContext {
+ *       ...
+ *       private final MockContentResolver mContentResolver;
+ *       public MyTestContext(...) {
+ *           ...
+ *           mContentResolver = new MockContentResolver();
+ *           mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
+ *       }
+ *       ...
+ *       @Override
+ *       public ContentResolver getContentResolver() {
+ *           return mContentResolver;
+ *       }
+ *
+ * As long as the code under test is using the test Context, the actual code under test does not
+ * need to be modified, and can access Settings using the normal static methods:
+ *
+ *   Settings.Global.getInt(cr, "my_setting", 0);  // Returns 0.
+ *   Settings.Global.putInt(cr, "my_setting", 5);
+ *   Settings.Global.getInt(cr, "my_setting", 0);  // Returns 5.
+ *
+ * Note that this class cannot be used in the same process as real settings. This is because it
+ * works by passing an alternate ContentResolver to Settings operations. Unfortunately, the Settings
+ * class only fetches the content provider from the passed-in ContentResolver the first time it's
+ * used, and after that stores it in a per-process static.
+ *
+ * TODO: evaluate implementing settings change notifications. This would require:
+ *
+ * 1. Making ContentResolver#registerContentObserver non-final and overriding it in
+ *    MockContentResolver.
+ * 2. Making FakeSettingsProvider take a ContentResolver argument.
+ * 3. Calling ContentResolver#notifyChange(getUriFor(table, arg), ...) on every settings change.
+ */
+public class FakeSettingsProvider extends MockContentProvider {
+
+    private static final String TAG = FakeSettingsProvider.class.getSimpleName();
+    private static final boolean DBG = false;
+    private static final String[] TABLES = { "system", "secure", "global" };
+
+    private final HashMap<String, HashMap<String, String>> mTables = new HashMap<>();
+
+    public FakeSettingsProvider() {
+        for (int i = 0; i < TABLES.length; i++) {
+            mTables.put(TABLES[i], new HashMap<String, String>());
+        }
+    }
+
+    private Uri getUriFor(String table, String key) {
+        switch (table) {
+            case "system":
+                return Settings.System.getUriFor(key);
+            case "secure":
+                return Settings.Secure.getUriFor(key);
+            case "global":
+                return Settings.Global.getUriFor(key);
+            default:
+                throw new UnsupportedOperationException("Unknown settings table " + table);
+        }
+    }
+
+    public Bundle call(String method, String arg, Bundle extras) {
+        // Methods are "GET_system", "GET_global", "PUT_secure", etc.
+        String[] commands = method.split("_", 2);
+        String op = commands[0];
+        String table = commands[1];
+
+        Bundle out = new Bundle();
+        String value;
+        switch (op) {
+            case "GET":
+                value = mTables.get(table).get(arg);
+                if (value != null) {
+                    if (DBG) {
+                        Log.d(TAG, String.format("Returning fake setting %s.%s = %s",
+                                table, arg, value));
+                    }
+                    out.putString(Settings.NameValueTable.VALUE, value);
+                }
+                break;
+            case "PUT":
+                value = extras.getString(Settings.NameValueTable.VALUE, null);
+                if (DBG) {
+                    Log.d(TAG, String.format("Inserting fake setting %s.%s = %s",
+                            table, arg, value));
+                }
+                if (value != null) {
+                    mTables.get(table).put(arg, value);
+                } else {
+                    mTables.get(table).remove(arg);
+                }
+                break;
+            default:
+                throw new UnsupportedOperationException("Unknown command " + method);
+        }
+
+        return out;
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/internal/util/FakeSettingsProviderTest.java b/services/tests/servicestests/src/com/android/internal/util/FakeSettingsProviderTest.java
new file mode 100644
index 0000000..05de0a5
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/internal/util/FakeSettingsProviderTest.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.util;
+
+import android.content.ContentResolver;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.provider.Settings;
+import android.test.AndroidTestCase;
+import android.test.mock.MockContentResolver;
+import android.test.mock.MockContext;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.test.suitebuilder.annotation.Suppress;
+import android.util.Log;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Unit tests for FakeSettingsProvider.
+ */
+public class FakeSettingsProviderTest extends AndroidTestCase {
+
+    private MockContentResolver mCr;
+
+    @Override
+    public void setUp() throws Exception {
+        mCr = new MockContentResolver();
+        mCr.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
+    }
+
+    @SmallTest
+    public void testBasicOperation() throws Exception {
+        String settingName = Settings.System.SCREEN_BRIGHTNESS;
+
+        try {
+            Settings.System.getInt(mCr, settingName);
+            fail("FakeSettingsProvider should start off empty.");
+        } catch (Settings.SettingNotFoundException expected) {}
+
+        // Check that fake settings can be written and read back.
+        Settings.System.putInt(mCr, settingName, 123);
+        assertEquals(123, Settings.System.getInt(mCr, settingName));
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
index 4fae4a7..f2a9315 100644
--- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
@@ -17,6 +17,7 @@
 package com.android.server;
 
 import static android.net.ConnectivityManager.CONNECTIVITY_ACTION;
+import static android.net.ConnectivityManager.TYPE_ETHERNET;
 import static android.net.ConnectivityManager.TYPE_MOBILE;
 import static android.net.ConnectivityManager.TYPE_WIFI;
 import static android.net.ConnectivityManager.getNetworkTypeName;
@@ -26,6 +27,7 @@
 
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
 import android.content.Context;
 import android.content.ContextWrapper;
 import android.content.Intent;
@@ -61,12 +63,15 @@
 import android.os.MessageQueue.IdleHandler;
 import android.os.Process;
 import android.os.SystemClock;
+import android.provider.Settings;
 import android.test.AndroidTestCase;
+import android.test.mock.MockContentResolver;
 import android.test.suitebuilder.annotation.LargeTest;
 import android.test.suitebuilder.annotation.SmallTest;
 import android.util.Log;
 import android.util.LogPrinter;
 
+import com.android.internal.util.FakeSettingsProvider;
 import com.android.internal.util.WakeupMessage;
 import com.android.server.connectivity.NetworkAgentInfo;
 import com.android.server.connectivity.NetworkMonitor;
@@ -75,6 +80,7 @@
 
 import java.net.InetAddress;
 import java.util.ArrayList;
+import java.util.Objects;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
@@ -90,12 +96,14 @@
     private static final String TAG = "ConnectivityServiceTest";
 
     private static final int TIMEOUT_MS = 500;
+    private static final int TEST_LINGER_DELAY_MS = 120;
 
     private BroadcastInterceptingContext mServiceContext;
     private WrappedConnectivityService mService;
     private WrappedConnectivityManager mCm;
     private MockNetworkAgent mWiFiNetworkAgent;
     private MockNetworkAgent mCellNetworkAgent;
+    private MockNetworkAgent mEthernetNetworkAgent;
 
     // This class exists to test bindProcessToNetwork and getBoundNetworkForProcess. These methods
     // do not go through ConnectivityService but talk to netd directly, so they don't automatically
@@ -118,27 +126,24 @@
     }
 
     private class MockContext extends BroadcastInterceptingContext {
+        private final MockContentResolver mContentResolver;
+
         MockContext(Context base) {
             super(base);
+            mContentResolver = new MockContentResolver();
+            mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
         }
 
         @Override
-        public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
-            // PendingIntents sent by the AlarmManager are not intercepted by
-            // BroadcastInterceptingContext so we must really register the receiver.
-            // This shouldn't effect the real NetworkMonitors as the action contains a random token.
-            if (filter.getAction(0).startsWith("android.net.netmon.lingerExpired")) {
-                return getBaseContext().registerReceiver(receiver, filter);
-            } else {
-                return super.registerReceiver(receiver, filter);
-            }
-        }
-
-        @Override
-        public Object getSystemService (String name) {
+        public Object getSystemService(String name) {
             if (name == Context.CONNECTIVITY_SERVICE) return mCm;
             return super.getSystemService(name);
         }
+
+        @Override
+        public ContentResolver getContentResolver() {
+            return mContentResolver;
+        }
     }
 
     /**
@@ -242,6 +247,9 @@
             mNetworkCapabilities = new NetworkCapabilities();
             mNetworkCapabilities.addTransportType(transport);
             switch (transport) {
+                case TRANSPORT_ETHERNET:
+                    mScore = 70;
+                    break;
                 case TRANSPORT_WIFI:
                     mScore = 60;
                     break;
@@ -303,6 +311,11 @@
             mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
         }
 
+        public void removeCapability(int capability) {
+            mNetworkCapabilities.removeCapability(capability);
+            mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
+        }
+
         public void setSignalStrength(int signalStrength) {
             mNetworkCapabilities.setSignalStrength(signalStrength);
             mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
@@ -318,7 +331,8 @@
          * @param validated Indicate if network should pretend to be validated.
          */
         public void connect(boolean validated) {
-            assertEquals(mNetworkInfo.getDetailedState(), DetailedState.IDLE);
+            assertEquals("MockNetworkAgents can only be connected once",
+                    mNetworkInfo.getDetailedState(), DetailedState.IDLE);
             assertFalse(mNetworkCapabilities.hasCapability(NET_CAPABILITY_INTERNET));
 
             NetworkCallback callback = null;
@@ -536,6 +550,11 @@
             super(context, handler, cmdName, cmd);
         }
 
+        public FakeWakeupMessage(Context context, Handler handler, String cmdName, int cmd,
+                int arg1, int arg2, Object obj) {
+            super(context, handler, cmdName, cmd, arg1, arg2, obj);
+        }
+
         @Override
         public void schedule(long when) {
             long delayMs = when - SystemClock.elapsedRealtime();
@@ -544,12 +563,13 @@
                 fail("Attempting to send msg more than " + UNREASONABLY_LONG_WAIT +
                         "ms into the future: " + delayMs);
             }
-            mHandler.sendEmptyMessageDelayed(mCmd, delayMs);
+            Message msg = mHandler.obtainMessage(mCmd, mArg1, mArg2, mObj);
+            mHandler.sendMessageDelayed(msg, delayMs);
         }
 
         @Override
         public void cancel() {
-            mHandler.removeMessages(mCmd);
+            mHandler.removeMessages(mCmd, mObj);
         }
 
         @Override
@@ -573,12 +593,6 @@
         protected CaptivePortalProbeResult isCaptivePortal() {
             return new CaptivePortalProbeResult(gen204ProbeResult, gen204ProbeRedirectUrl);
         }
-
-        @Override
-        protected WakeupMessage makeWakeupMessage(
-                Context context, Handler handler, String cmdName, int cmd) {
-            return new FakeWakeupMessage(context, handler, cmdName, cmd);
-        }
     }
 
     private class WrappedConnectivityService extends ConnectivityService {
@@ -587,6 +601,7 @@
         public WrappedConnectivityService(Context context, INetworkManagementService netManager,
                 INetworkStatsService statsService, INetworkPolicyManager policyManager) {
             super(context, netManager, statsService, policyManager);
+            mLingerDelayMs = TEST_LINGER_DELAY_MS;
         }
 
         @Override
@@ -630,6 +645,12 @@
             return monitor;
         }
 
+        @Override
+        public WakeupMessage makeWakeupMessage(
+                Context context, Handler handler, String cmdName, int cmd, Object obj) {
+            return new FakeWakeupMessage(context, handler, cmdName, cmd, 0, 0, obj);
+        }
+
         public WrappedNetworkMonitor getLastCreatedWrappedNetworkMonitor() {
             return mLastCreatedNetworkMonitor;
         }
@@ -641,7 +662,6 @@
         public void waitForIdle() {
             waitForIdle(TIMEOUT_MS);
         }
-
     }
 
     private interface Criteria {
@@ -675,8 +695,6 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        NetworkMonitor.SetDefaultLingerTime(120);
-
         // InstrumentationTestRunner prepares a looper, but AndroidJUnitRunner does not.
         // http://b/25897652 .
         if (Looper.myLooper() == null) {
@@ -694,14 +712,23 @@
         mCm.bindProcessToNetwork(null);
     }
 
+    public void tearDown() throws Exception {
+        if (mCellNetworkAgent != null) { mCellNetworkAgent.disconnect(); }
+        if (mWiFiNetworkAgent != null) { mWiFiNetworkAgent.disconnect(); }
+        mCellNetworkAgent = mWiFiNetworkAgent = null;
+        super.tearDown();
+    }
+
     private int transportToLegacyType(int transport) {
         switch (transport) {
+            case TRANSPORT_ETHERNET:
+                return TYPE_ETHERNET;
             case TRANSPORT_WIFI:
                 return TYPE_WIFI;
             case TRANSPORT_CELLULAR:
                 return TYPE_MOBILE;
             default:
-                throw new IllegalStateException("Unknown transport" + transport);
+                throw new IllegalStateException("Unknown transport " + transport);
         }
     }
 
@@ -911,8 +938,6 @@
         mWiFiNetworkAgent.adjustScore(11);
         waitFor(cv);
         verifyActiveNetwork(TRANSPORT_WIFI);
-        mCellNetworkAgent.disconnect();
-        mWiFiNetworkAgent.disconnect();
     }
 
     @LargeTest
@@ -984,8 +1009,6 @@
         assertFalse(mCm.getNetworkCapabilities(mWiFiNetworkAgent.getNetwork()).hasCapability(
                 NET_CAPABILITY_VALIDATED));
         verifyActiveNetwork(TRANSPORT_WIFI);
-        mCellNetworkAgent.disconnect();
-        mWiFiNetworkAgent.disconnect();
     }
 
     @LargeTest
@@ -1012,13 +1035,13 @@
         assertFalse(mCm.getNetworkCapabilities(mCellNetworkAgent.getNetwork()).hasCapability(
                 NET_CAPABILITY_VALIDATED));
         verifyActiveNetwork(TRANSPORT_WIFI);
-        mCellNetworkAgent.disconnect();
-        mWiFiNetworkAgent.disconnect();
     }
 
     enum CallbackState {
         NONE,
         AVAILABLE,
+        NETWORK_CAPABILITIES,
+        LINK_PROPERTIES,
         LOSING,
         LOST
     }
@@ -1029,59 +1052,98 @@
      * received. assertNoCallback may be called at any time.
      */
     private class TestNetworkCallback extends NetworkCallback {
-        private final ConditionVariable mConditionVariable = new ConditionVariable();
-        private CallbackState mLastCallback = CallbackState.NONE;
-        private Network mLastNetwork;
+        // Chosen to be much less than the linger timeout. This ensures that we can distinguish
+        // between a LOST callback that arrives immediately and a LOST callback that arrives after
+        // the linger timeout.
+        private final static int TIMEOUT_MS = 50;
 
+        private class CallbackInfo {
+            public final CallbackState state;
+            public final Network network;
+            public Object arg;
+            public CallbackInfo(CallbackState s, Network n, Object o) {
+                state = s; network = n; arg = o;
+            }
+            public String toString() { return String.format("%s (%s)", state, network); }
+            public boolean equals(Object o) {
+                if (!(o instanceof CallbackInfo)) return false;
+                // Ignore timeMs, since it's unpredictable.
+                CallbackInfo other = (CallbackInfo) o;
+                return state == other.state && Objects.equals(network, other.network);
+            }
+        }
+        private final LinkedBlockingQueue<CallbackInfo> mCallbacks = new LinkedBlockingQueue<>();
+
+        protected void setLastCallback(CallbackState state, Network network, Object o) {
+            mCallbacks.offer(new CallbackInfo(state, network, o));
+        }
+
+        @Override
         public void onAvailable(Network network) {
-            assertEquals(CallbackState.NONE, mLastCallback);
-            mLastCallback = CallbackState.AVAILABLE;
-            mLastNetwork = network;
-            mConditionVariable.open();
+            setLastCallback(CallbackState.AVAILABLE, network, null);
         }
 
+        @Override
         public void onLosing(Network network, int maxMsToLive) {
-            assertEquals(CallbackState.NONE, mLastCallback);
-            mLastCallback = CallbackState.LOSING;
-            mLastNetwork = network;
-            mConditionVariable.open();
+            setLastCallback(CallbackState.LOSING, network, maxMsToLive /* autoboxed int */);
         }
 
+        @Override
         public void onLost(Network network) {
-            assertEquals(CallbackState.NONE, mLastCallback);
-            mLastCallback = CallbackState.LOST;
-            mLastNetwork = network;
-            mConditionVariable.open();
+            setLastCallback(CallbackState.LOST, network, null);
         }
 
-        void expectCallback(CallbackState state) {
-            expectCallback(state, null);
+        void expectCallback(CallbackState state, MockNetworkAgent mockAgent, int timeoutMs) {
+            CallbackInfo expected = new CallbackInfo(
+                    state, (mockAgent != null) ? mockAgent.getNetwork() : null, 0);
+            CallbackInfo actual;
+            try {
+                actual = mCallbacks.poll(timeoutMs, TimeUnit.MILLISECONDS);
+                assertEquals("Unexpected callback:", expected, actual);
+            } catch (InterruptedException e) {
+                fail("Did not receive expected " + expected + " after " + TIMEOUT_MS + "ms");
+                actual = null;  // Or the compiler can't tell it's never used uninitialized.
+            }
+            if (state == CallbackState.LOSING) {
+                String msg = String.format(
+                        "Invalid linger time value %d, must be between %d and %d",
+                        actual.arg, 0, TEST_LINGER_DELAY_MS);
+                int maxMsToLive = (Integer) actual.arg;
+                assertTrue(msg, 0 <= maxMsToLive && maxMsToLive <= TEST_LINGER_DELAY_MS);
+            }
         }
 
         void expectCallback(CallbackState state, MockNetworkAgent mockAgent) {
-            waitFor(mConditionVariable);
-            assertEquals(state, mLastCallback);
-            if (mockAgent != null) {
-                assertEquals(mockAgent.getNetwork(), mLastNetwork);
-            }
-            mLastCallback = CallbackState.NONE;
-            mLastNetwork = null;
-            mConditionVariable.close();
+            expectCallback(state, mockAgent, TIMEOUT_MS);
         }
 
         void assertNoCallback() {
-            assertEquals(CallbackState.NONE, mLastCallback);
+            mService.waitForIdle();
+            CallbackInfo c = mCallbacks.peek();
+            assertNull("Unexpected callback: " + c, c);
+        }
+    }
+
+    // Can't be part of TestNetworkCallback because "cannot be declared static; static methods can
+    // only be declared in a static or top level type".
+    static void assertNoCallbacks(TestNetworkCallback ... callbacks) {
+        for (TestNetworkCallback c : callbacks) {
+            c.assertNoCallback();
         }
     }
 
     @LargeTest
     public void testStateChangeNetworkCallbacks() throws Exception {
+        final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
         final TestNetworkCallback wifiNetworkCallback = new TestNetworkCallback();
         final TestNetworkCallback cellNetworkCallback = new TestNetworkCallback();
+        final NetworkRequest genericRequest = new NetworkRequest.Builder()
+                .clearCapabilities().build();
         final NetworkRequest wifiRequest = new NetworkRequest.Builder()
                 .addTransportType(TRANSPORT_WIFI).build();
         final NetworkRequest cellRequest = new NetworkRequest.Builder()
                 .addTransportType(TRANSPORT_CELLULAR).build();
+        mCm.registerNetworkCallback(genericRequest, genericNetworkCallback);
         mCm.registerNetworkCallback(wifiRequest, wifiNetworkCallback);
         mCm.registerNetworkCallback(cellRequest, cellNetworkCallback);
 
@@ -1089,65 +1151,275 @@
         ConditionVariable cv = waitForConnectivityBroadcasts(1);
         mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
         mCellNetworkAgent.connect(false);
-        cellNetworkCallback.expectCallback(CallbackState.AVAILABLE);
-        wifiNetworkCallback.assertNoCallback();
+        genericNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        cellNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
         assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
         waitFor(cv);
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
 
         // This should not trigger spurious onAvailable() callbacks, b/21762680.
         mCellNetworkAgent.adjustScore(-1);
         mService.waitForIdle();
-        wifiNetworkCallback.assertNoCallback();
-        cellNetworkCallback.assertNoCallback();
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
         assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
 
         cv = waitForConnectivityBroadcasts(2);
         mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
         mWiFiNetworkAgent.connect(false);
-        wifiNetworkCallback.expectCallback(CallbackState.AVAILABLE);
-        cellNetworkCallback.assertNoCallback();
+        genericNetworkCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        wifiNetworkCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
         assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
         waitFor(cv);
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
 
         cv = waitForConnectivityBroadcasts(2);
         mWiFiNetworkAgent.disconnect();
-        wifiNetworkCallback.expectCallback(CallbackState.LOST);
+        genericNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        wifiNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
         cellNetworkCallback.assertNoCallback();
         waitFor(cv);
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
 
         cv = waitForConnectivityBroadcasts(1);
         mCellNetworkAgent.disconnect();
-        cellNetworkCallback.expectCallback(CallbackState.LOST);
-        wifiNetworkCallback.assertNoCallback();
+        genericNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+        cellNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
         waitFor(cv);
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
 
         // Test validated networks
         mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
         mCellNetworkAgent.connect(true);
-        cellNetworkCallback.expectCallback(CallbackState.AVAILABLE);
-        wifiNetworkCallback.assertNoCallback();
+        genericNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        cellNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
         assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
 
         // This should not trigger spurious onAvailable() callbacks, b/21762680.
         mCellNetworkAgent.adjustScore(-1);
         mService.waitForIdle();
-        wifiNetworkCallback.assertNoCallback();
-        cellNetworkCallback.assertNoCallback();
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
         assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
 
         mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
         mWiFiNetworkAgent.connect(true);
-        wifiNetworkCallback.expectCallback(CallbackState.AVAILABLE);
-        cellNetworkCallback.expectCallback(CallbackState.LOSING);
+        genericNetworkCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        genericNetworkCallback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+        wifiNetworkCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        cellNetworkCallback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
+
+        mWiFiNetworkAgent.disconnect();
+        genericNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        wifiNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
+
+        mCellNetworkAgent.disconnect();
+        genericNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+        cellNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+        assertNoCallbacks(genericNetworkCallback, wifiNetworkCallback, cellNetworkCallback);
+    }
+
+    @SmallTest
+    public void testMultipleLingering() {
+        NetworkRequest request = new NetworkRequest.Builder()
+                .clearCapabilities().addCapability(NET_CAPABILITY_NOT_METERED)
+                .build();
+        TestNetworkCallback callback = new TestNetworkCallback();
+        mCm.registerNetworkCallback(request, callback);
+
+        TestNetworkCallback defaultCallback = new TestNetworkCallback();
+        mCm.registerDefaultNetworkCallback(defaultCallback);
+
+        mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        mEthernetNetworkAgent = new MockNetworkAgent(TRANSPORT_ETHERNET);
+
+        mCellNetworkAgent.addCapability(NET_CAPABILITY_NOT_METERED);
+        mWiFiNetworkAgent.addCapability(NET_CAPABILITY_NOT_METERED);
+        mEthernetNetworkAgent.addCapability(NET_CAPABILITY_NOT_METERED);
+
+        mCellNetworkAgent.connect(true);
+        callback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        mWiFiNetworkAgent.connect(true);
+        // We get AVAILABLE on wifi when wifi connects and satisfies our unmetered request.
+        // We then get LOSING when wifi validates and cell is outscored.
+        callback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        mEthernetNetworkAgent.connect(true);
+        callback.expectCallback(CallbackState.AVAILABLE, mEthernetNetworkAgent);
+        callback.expectCallback(CallbackState.LOSING, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mEthernetNetworkAgent);
+        assertEquals(mEthernetNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        mEthernetNetworkAgent.disconnect();
+        callback.expectCallback(CallbackState.LOST, mEthernetNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mEthernetNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+
+        for (int i = 0; i < 4; i++) {
+            MockNetworkAgent oldNetwork, newNetwork;
+            if (i % 2 == 0) {
+                mWiFiNetworkAgent.adjustScore(-15);
+                oldNetwork = mWiFiNetworkAgent;
+                newNetwork = mCellNetworkAgent;
+            } else {
+                mWiFiNetworkAgent.adjustScore(15);
+                oldNetwork = mCellNetworkAgent;
+                newNetwork = mWiFiNetworkAgent;
+
+            }
+            callback.expectCallback(CallbackState.LOSING, oldNetwork);
+            // TODO: should we send an AVAILABLE callback to newNetwork, to indicate that it is no
+            // longer lingering?
+            defaultCallback.expectCallback(CallbackState.AVAILABLE, newNetwork);
+            assertEquals(newNetwork.getNetwork(), mCm.getActiveNetwork());
+        }
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        // Verify that if a network no longer satisfies a request, we send LOST and not LOSING, even
+        // if the network is still up.
+        mWiFiNetworkAgent.removeCapability(NET_CAPABILITY_NOT_METERED);
+        callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+
+        // Wifi no longer satisfies our listen, which is for an unmetered network.
+        // But because its score is 55, it's still up (and the default network).
+        defaultCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        // Disconnect our test networks.
+        mWiFiNetworkAgent.disconnect();
+        defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        mCellNetworkAgent.disconnect();
+        defaultCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+
+        mCm.unregisterNetworkCallback(callback);
+        mService.waitForIdle();
+
+        // Check that a network is only lingered or torn down if it would not satisfy a request even
+        // if it validated.
+        request = new NetworkRequest.Builder().clearCapabilities().build();
+        callback = new TestNetworkCallback();
+
+        mCm.registerNetworkCallback(request, callback);
+
+        mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+        mCellNetworkAgent.connect(false);   // Score: 10
+        callback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        // Bring up wifi with a score of 20.
+        // Cell stays up because it would satisfy the default request if it validated.
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.connect(false);   // Score: 20
+        callback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
         assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
 
         mWiFiNetworkAgent.disconnect();
-        wifiNetworkCallback.expectCallback(CallbackState.LOST);
-        cellNetworkCallback.assertNoCallback();
+        callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
 
+        // Bring up wifi with a score of 70.
+        // Cell is lingered because it would not satisfy any request, even if it validated.
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.adjustScore(50);
+        mWiFiNetworkAgent.connect(false);   // Score: 70
+        callback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        // Tear down wifi.
+        mWiFiNetworkAgent.disconnect();
+        callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        assertEquals(mCellNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        // Bring up wifi, then validate it. Previous versions would immediately tear down cell, but
+        // it's arguably correct to linger it, since it was the default network before it validated.
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.connect(true);
+        callback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+
+        mWiFiNetworkAgent.disconnect();
+        callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
         mCellNetworkAgent.disconnect();
-        cellNetworkCallback.expectCallback(CallbackState.LOST);
-        wifiNetworkCallback.assertNoCallback();
+        callback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+
+        // If a network is lingering, and we add and remove a request from it, resume lingering.
+        mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+        mCellNetworkAgent.connect(true);
+        callback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.connect(true);
+        callback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+
+        NetworkRequest cellRequest = new NetworkRequest.Builder()
+                .addTransportType(TRANSPORT_CELLULAR).build();
+        NetworkCallback noopCallback = new NetworkCallback();
+        mCm.requestNetwork(cellRequest, noopCallback);
+        // TODO: should this cause an AVAILABLE callback, to indicate that the network is no longer
+        // lingering?
+        mCm.unregisterNetworkCallback(noopCallback);
+        callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+
+        // Similar to the above: lingering can start even after the lingered request is removed.
+        // Disconnect wifi and switch to cell.
+        mWiFiNetworkAgent.disconnect();
+        callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+
+        // Cell is now the default network. Pin it with a cell-specific request.
+        noopCallback = new NetworkCallback();  // Can't reuse NetworkCallbacks. http://b/20701525
+        mCm.requestNetwork(cellRequest, noopCallback);
+
+        // Now connect wifi, and expect it to become the default network.
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.connect(true);
+        callback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
+        // The default request is lingering on cell, but nothing happens to cell, and we send no
+        // callbacks for it, because it's kept up by cellRequest.
+        callback.assertNoCallback();
+        // Now unregister cellRequest and expect cell to start lingering.
+        mCm.unregisterNetworkCallback(noopCallback);
+        callback.expectCallback(CallbackState.LOSING, mCellNetworkAgent);
+
+        // Let linger run its course.
+        callback.assertNoCallback();
+        callback.expectCallback(CallbackState.LOST, mCellNetworkAgent,
+                TEST_LINGER_DELAY_MS /* timeoutMs */);
+
+        // Clean up.
+        mWiFiNetworkAgent.disconnect();
+        callback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+        defaultCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+
+        mCm.unregisterNetworkCallback(callback);
+        mCm.unregisterNetworkCallback(defaultCallback);
     }
 
     private void tryNetworkFactoryRequests(int capability) throws Exception {
@@ -1314,7 +1586,7 @@
         mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
         mCellNetworkAgent.addCapability(NET_CAPABILITY_MMS);
         mCellNetworkAgent.connectWithoutInternet();
-        networkCallback.expectCallback(CallbackState.AVAILABLE);
+        networkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
         verifyActiveNetwork(TRANSPORT_WIFI);
         // Test releasing NetworkRequest disconnects cellular with MMS
         cv = mCellNetworkAgent.getDisconnectedCV();
@@ -1340,7 +1612,7 @@
         MockNetworkAgent mmsNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
         mmsNetworkAgent.addCapability(NET_CAPABILITY_MMS);
         mmsNetworkAgent.connectWithoutInternet();
-        networkCallback.expectCallback(CallbackState.AVAILABLE);
+        networkCallback.expectCallback(CallbackState.AVAILABLE, mmsNetworkAgent);
         verifyActiveNetwork(TRANSPORT_CELLULAR);
         // Test releasing MMS NetworkRequest does not disconnect main cellular NetworkAgent
         cv = mmsNetworkAgent.getDisconnectedCV();
@@ -1366,36 +1638,36 @@
         mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
         String firstRedirectUrl = "http://example.com/firstPath";
         mWiFiNetworkAgent.connectWithCaptivePortal(firstRedirectUrl);
-        captivePortalCallback.expectCallback(CallbackState.AVAILABLE);
+        captivePortalCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
         assertEquals(mWiFiNetworkAgent.waitForRedirectUrl(), firstRedirectUrl);
 
         // Take down network.
         // Expect onLost callback.
         mWiFiNetworkAgent.disconnect();
-        captivePortalCallback.expectCallback(CallbackState.LOST);
+        captivePortalCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
 
         // Bring up a network with a captive portal.
         // Expect onAvailable callback of listen for NET_CAPABILITY_CAPTIVE_PORTAL.
         mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
         String secondRedirectUrl = "http://example.com/secondPath";
         mWiFiNetworkAgent.connectWithCaptivePortal(secondRedirectUrl);
-        captivePortalCallback.expectCallback(CallbackState.AVAILABLE);
+        captivePortalCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
         assertEquals(mWiFiNetworkAgent.waitForRedirectUrl(), secondRedirectUrl);
 
         // Make captive portal disappear then revalidate.
         // Expect onLost callback because network no longer provides NET_CAPABILITY_CAPTIVE_PORTAL.
         mWiFiNetworkAgent.getWrappedNetworkMonitor().gen204ProbeResult = 204;
         mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), true);
-        captivePortalCallback.expectCallback(CallbackState.LOST);
+        captivePortalCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
 
         // Expect NET_CAPABILITY_VALIDATED onAvailable callback.
-        validatedCallback.expectCallback(CallbackState.AVAILABLE);
+        validatedCallback.expectCallback(CallbackState.AVAILABLE, mWiFiNetworkAgent);
 
         // Break network connectivity.
         // Expect NET_CAPABILITY_VALIDATED onLost callback.
         mWiFiNetworkAgent.getWrappedNetworkMonitor().gen204ProbeResult = 500;
         mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), false);
-        validatedCallback.expectCallback(CallbackState.LOST);
+        validatedCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
     }
 
     @SmallTest
@@ -1410,7 +1682,7 @@
             // do nothing - should get here
         }
 
-        assertTrue("NetworkReqeuest builder with MATCH_ALL_REQUESTS_NETWORK_SPECIFIER",
+        assertTrue("NetworkRequest builder with MATCH_ALL_REQUESTS_NETWORK_SPECIFIER",
                 execptionCalled);
 
         try {
@@ -1477,6 +1749,206 @@
         defaultNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
     }
 
+    private class TestRequestUpdateCallback extends TestNetworkCallback {
+        @Override
+        public void onCapabilitiesChanged(Network network, NetworkCapabilities netCap) {
+            setLastCallback(CallbackState.NETWORK_CAPABILITIES, network, netCap);
+        }
+
+        @Override
+        public void onLinkPropertiesChanged(Network network, LinkProperties linkProp) {
+            setLastCallback(CallbackState.LINK_PROPERTIES, network, linkProp);
+        }
+    }
+
+    @LargeTest
+    public void testRequestCallbackUpdates() throws Exception {
+        // File a network request for mobile.
+        final TestNetworkCallback cellNetworkCallback = new TestRequestUpdateCallback();
+        final NetworkRequest cellRequest = new NetworkRequest.Builder()
+                .addTransportType(TRANSPORT_CELLULAR).build();
+        mCm.requestNetwork(cellRequest, cellNetworkCallback);
+
+        // Bring up the mobile network.
+        mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+        mCellNetworkAgent.connect(true);
+
+        // We should get onAvailable().
+        cellNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        // We should get onCapabilitiesChanged(), when the mobile network successfully validates.
+        cellNetworkCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, mCellNetworkAgent);
+        cellNetworkCallback.assertNoCallback();
+
+        // Update LinkProperties.
+        final LinkProperties lp = new LinkProperties();
+        lp.setInterfaceName("foonet_data0");
+        mCellNetworkAgent.sendLinkProperties(lp);
+        // We should get onLinkPropertiesChanged().
+        cellNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES, mCellNetworkAgent);
+        cellNetworkCallback.assertNoCallback();
+
+        // Register a garden variety default network request.
+        final TestNetworkCallback dfltNetworkCallback = new TestRequestUpdateCallback();
+        mCm.registerDefaultNetworkCallback(dfltNetworkCallback);
+        // Only onAvailable() is called; no other information is delivered.
+        dfltNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        dfltNetworkCallback.assertNoCallback();
+
+        // Request a NetworkCapabilities update; only the requesting callback is notified.
+        mCm.requestNetworkCapabilities(dfltNetworkCallback);
+        dfltNetworkCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, mCellNetworkAgent);
+        cellNetworkCallback.assertNoCallback();
+        dfltNetworkCallback.assertNoCallback();
+
+        // Request a LinkProperties update; only the requesting callback is notified.
+        mCm.requestLinkProperties(dfltNetworkCallback);
+        dfltNetworkCallback.expectCallback(CallbackState.LINK_PROPERTIES, mCellNetworkAgent);
+        cellNetworkCallback.assertNoCallback();
+        dfltNetworkCallback.assertNoCallback();
+
+        mCm.unregisterNetworkCallback(dfltNetworkCallback);
+        mCm.unregisterNetworkCallback(cellNetworkCallback);
+    }
+
+    @SmallTest
+    public void testRequestBenchmark() throws Exception {
+        // Benchmarks connecting and switching performance in the presence of a large number of
+        // NetworkRequests.
+        // 1. File NUM_REQUESTS requests.
+        // 2. Have a network connect. Wait for NUM_REQUESTS onAvailable callbacks to fire.
+        // 3. Have a new network connect and outscore the previous. Wait for NUM_REQUESTS onLosing
+        //    and NUM_REQUESTS onAvailable callbacks to fire.
+        // See how long it took.
+        final int NUM_REQUESTS = 90;
+        final NetworkRequest request = new NetworkRequest.Builder().clearCapabilities().build();
+        final NetworkCallback[] callbacks = new NetworkCallback[NUM_REQUESTS];
+        final CountDownLatch availableLatch = new CountDownLatch(NUM_REQUESTS);
+        final CountDownLatch losingLatch = new CountDownLatch(NUM_REQUESTS);
+
+        final int REGISTER_TIME_LIMIT_MS = 100;
+        long startTime = System.currentTimeMillis();
+        for (int i = 0; i < NUM_REQUESTS; i++) {
+            callbacks[i] = new NetworkCallback() {
+                @Override public void onAvailable(Network n) { availableLatch.countDown(); }
+                @Override public void onLosing(Network n, int t) { losingLatch.countDown(); }
+            };
+            mCm.registerNetworkCallback(request, callbacks[i]);
+        }
+        long timeTaken = System.currentTimeMillis() - startTime;
+        String msg = String.format("Register %d callbacks: %dms, acceptable %dms",
+                NUM_REQUESTS, timeTaken, REGISTER_TIME_LIMIT_MS);
+        Log.d(TAG, msg);
+        assertTrue(msg, timeTaken < REGISTER_TIME_LIMIT_MS);
+
+        final int CONNECT_TIME_LIMIT_MS = 30;
+        mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+        // Don't request that the network validate, because otherwise connect() will block until
+        // the network gets NET_CAPABILITY_VALIDATED, after all the callbacks below have fired,
+        // and we won't actually measure anything.
+        mCellNetworkAgent.connect(false);
+        startTime = System.currentTimeMillis();
+        if (!availableLatch.await(CONNECT_TIME_LIMIT_MS, TimeUnit.MILLISECONDS)) {
+            fail(String.format("Only dispatched %d/%d onAvailable callbacks in %dms",
+                    NUM_REQUESTS - availableLatch.getCount(), NUM_REQUESTS,
+                    CONNECT_TIME_LIMIT_MS));
+        }
+        timeTaken = System.currentTimeMillis() - startTime;
+        Log.d(TAG, String.format("Connect, %d callbacks: %dms, acceptable %dms",
+                NUM_REQUESTS, timeTaken, CONNECT_TIME_LIMIT_MS));
+
+        final int SWITCH_TIME_LIMIT_MS = 30;
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        // Give wifi a high enough score that we'll linger cell when wifi comes up.
+        mWiFiNetworkAgent.adjustScore(40);
+        mWiFiNetworkAgent.connect(false);
+        startTime = System.currentTimeMillis();
+        if (!losingLatch.await(SWITCH_TIME_LIMIT_MS, TimeUnit.MILLISECONDS)) {
+            fail(String.format("Only dispatched %d/%d onLosing callbacks in %dms",
+                    NUM_REQUESTS - losingLatch.getCount(), NUM_REQUESTS, SWITCH_TIME_LIMIT_MS));
+        }
+        timeTaken = System.currentTimeMillis() - startTime;
+        Log.d(TAG, String.format("Linger, %d callbacks: %dms, acceptable %dms",
+                NUM_REQUESTS, timeTaken, SWITCH_TIME_LIMIT_MS));
+
+        final int UNREGISTER_TIME_LIMIT_MS = 10;
+        startTime = System.currentTimeMillis();
+        for (int i = 0; i < NUM_REQUESTS; i++) {
+            mCm.unregisterNetworkCallback(callbacks[i]);
+        }
+        timeTaken = System.currentTimeMillis() - startTime;
+        msg = String.format("Unregister %d callbacks: %dms, acceptable %dms",
+                NUM_REQUESTS, timeTaken, UNREGISTER_TIME_LIMIT_MS);
+        Log.d(TAG, msg);
+        assertTrue(msg, timeTaken < UNREGISTER_TIME_LIMIT_MS);
+    }
+
+    @SmallTest
+    public void testMobileDataAlwaysOn() throws Exception {
+        final TestNetworkCallback cellNetworkCallback = new TestNetworkCallback();
+        final NetworkRequest cellRequest = new NetworkRequest.Builder()
+                .addTransportType(TRANSPORT_CELLULAR).build();
+        mCm.registerNetworkCallback(cellRequest, cellNetworkCallback);
+
+        final HandlerThread handlerThread = new HandlerThread("MobileDataAlwaysOnFactory");
+        handlerThread.start();
+        NetworkCapabilities filter = new NetworkCapabilities()
+                .addTransportType(TRANSPORT_CELLULAR)
+                .addCapability(NET_CAPABILITY_INTERNET);
+        final MockNetworkFactory testFactory = new MockNetworkFactory(handlerThread.getLooper(),
+                mServiceContext, "testFactory", filter);
+        testFactory.setScoreFilter(40);
+
+        // Register the factory and expect it to start looking for a network.
+        testFactory.expectAddRequests(1);
+        testFactory.register();
+        testFactory.waitForNetworkRequests(1);
+        assertTrue(testFactory.getMyStartRequested());
+
+        // Bring up wifi. The factory stops looking for a network.
+        mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+        testFactory.expectAddRequests(2);  // Because the default request changes score twice.
+        mWiFiNetworkAgent.connect(true);
+        testFactory.waitForNetworkRequests(1);
+        assertFalse(testFactory.getMyStartRequested());
+
+        ContentResolver cr = mServiceContext.getContentResolver();
+
+        // Turn on mobile data always on. The factory starts looking again.
+        testFactory.expectAddRequests(1);
+        Settings.Global.putInt(cr, Settings.Global.MOBILE_DATA_ALWAYS_ON, 1);
+        mService.updateMobileDataAlwaysOn();
+        testFactory.waitForNetworkRequests(2);
+        assertTrue(testFactory.getMyStartRequested());
+
+        // Bring up cell data and check that the factory stops looking.
+        assertEquals(1, mCm.getAllNetworks().length);
+        mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
+        testFactory.expectAddRequests(2);  // Because the cell request changes score twice.
+        mCellNetworkAgent.connect(true);
+        cellNetworkCallback.expectCallback(CallbackState.AVAILABLE, mCellNetworkAgent);
+        testFactory.waitForNetworkRequests(2);
+        assertFalse(testFactory.getMyStartRequested());  // Because the cell network outscores us.
+
+        // Check that cell data stays up.
+        mService.waitForIdle();
+        verifyActiveNetwork(TRANSPORT_WIFI);
+        assertEquals(2, mCm.getAllNetworks().length);
+
+        // Turn off mobile data always on and expect the request to disappear...
+        testFactory.expectRemoveRequests(1);
+        Settings.Global.putInt(cr, Settings.Global.MOBILE_DATA_ALWAYS_ON, 0);
+        mService.updateMobileDataAlwaysOn();
+        testFactory.waitForNetworkRequests(1);
+
+        // ...  and cell data to be torn down.
+        cellNetworkCallback.expectCallback(CallbackState.LOST, mCellNetworkAgent);
+        assertEquals(1, mCm.getAllNetworks().length);
+
+        testFactory.unregister();
+        mCm.unregisterNetworkCallback(cellNetworkCallback);
+        handlerThread.quit();
+    }
+
     private static class TestKeepaliveCallback extends PacketKeepaliveCallback {
 
         public static enum CallbackType { ON_STARTED, ON_STOPPED, ON_ERROR };
diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
index 622e46e..979f160 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
@@ -20,6 +20,7 @@
 import static android.content.Intent.EXTRA_UID;
 import static android.net.ConnectivityManager.CONNECTIVITY_ACTION;
 import static android.net.ConnectivityManager.TYPE_WIFI;
+import static android.net.NetworkPolicy.CYCLE_NONE;
 import static android.net.NetworkPolicy.LIMIT_DISABLED;
 import static android.net.NetworkPolicy.WARNING_DISABLED;
 import static android.net.NetworkPolicyManager.POLICY_NONE;
@@ -86,7 +87,9 @@
 import org.easymock.IAnswer;
 
 import java.io.File;
+import java.util.Calendar;
 import java.util.LinkedHashSet;
+import java.util.TimeZone;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
@@ -141,8 +144,7 @@
     private static final int PID_2 = 401;
     private static final int PID_3 = 402;
 
-    @Override
-    public void setUp() throws Exception {
+    public void _setUp() throws Exception {
         super.setUp();
 
         setCurrentTimeMillis(TEST_START);
@@ -229,8 +231,7 @@
 
     }
 
-    @Override
-    public void tearDown() throws Exception {
+    public void _tearDown() throws Exception {
         for (File file : mPolicyDir.listFiles()) {
             file.delete();
         }
@@ -263,6 +264,7 @@
         backgroundChanged.get();
     }
 
+    @Suppress
     public void testPidForegroundCombined() throws Exception {
         IdleFuture idle;
 
@@ -310,6 +312,7 @@
         assertFalse(mService.isUidForeground(UID_A));
     }
 
+    @Suppress
     public void testScreenChangesRules() throws Exception {
         Future<Void> future;
 
@@ -351,6 +354,7 @@
         verifyAndReset();
     }
 
+    @Suppress
     public void testPolicyNone() throws Exception {
         Future<Void> future;
 
@@ -381,6 +385,7 @@
         verifyAndReset();
     }
 
+    @Suppress
     public void testPolicyReject() throws Exception {
         Future<Void> future;
 
@@ -412,6 +417,7 @@
         verifyAndReset();
     }
 
+    @Suppress
     public void testPolicyRejectAddRemove() throws Exception {
         Future<Void> future;
 
@@ -576,6 +582,17 @@
                 computeLastCycleBoundary(parseTime("2013-01-14T15:11:00.000-08:00"), policy));
     }
 
+    public void testLastCycleBoundaryDST() throws Exception {
+        final long currentTime = parseTime("1989-01-02T07:30:00.000");
+        final long expectedCycle = parseTime("1988-12-03T02:00:00.000Z");
+
+        final NetworkPolicy policy = new NetworkPolicy(
+                sTemplateWifi, 3, "America/Argentina/Buenos_Aires", 1024L, 1024L, false);
+        final long actualCycle = computeLastCycleBoundary(currentTime, policy);
+        assertTimeEquals(expectedCycle, actualCycle);
+    }
+
+    @Suppress
     public void testNetworkPolicyAppliedCycleLastMonth() throws Exception {
         NetworkState[] state = null;
         NetworkStats stats = null;
@@ -628,6 +645,7 @@
         verifyAndReset();
     }
 
+    @Suppress
     public void testUidRemovedPolicyCleared() throws Exception {
         Future<Void> future;
 
@@ -652,6 +670,7 @@
         verifyAndReset();
     }
 
+    @Suppress
     public void testOverWarningLimitNotification() throws Exception {
         NetworkState[] state = null;
         NetworkStats stats = null;
@@ -783,6 +802,7 @@
         }
     }
 
+    @Suppress
     public void testMeteredNetworkWithoutLimit() throws Exception {
         NetworkState[] state = null;
         NetworkStats stats = null;
diff --git a/services/tests/servicestests/src/com/android/server/connectivity/DnsEventListenerServiceTest.java b/services/tests/servicestests/src/com/android/server/connectivity/DnsEventListenerServiceTest.java
new file mode 100644
index 0000000..033b2c9
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/connectivity/DnsEventListenerServiceTest.java
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2016, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity;
+
+import android.net.ConnectivityManager.NetworkCallback;
+import android.net.ConnectivityManager;
+import android.net.Network;
+import android.net.metrics.DnsEvent;
+import android.net.metrics.IDnsEventListener;
+import android.net.metrics.IpConnectivityLog;
+
+import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.timeout;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import java.io.FileOutputStream;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.List;
+import java.util.OptionalInt;
+import java.util.stream.IntStream;
+
+public class DnsEventListenerServiceTest extends TestCase {
+
+    // TODO: read from DnsEventListenerService after this constant is read from system property
+    static final int BATCH_SIZE = 100;
+    static final int EVENT_TYPE = IDnsEventListener.EVENT_GETADDRINFO;
+    // TODO: read from IDnsEventListener
+    static final int RETURN_CODE = 1;
+
+    static final byte[] EVENT_TYPES  = new byte[BATCH_SIZE];
+    static final byte[] RETURN_CODES = new byte[BATCH_SIZE];
+    static final int[] LATENCIES     = new int[BATCH_SIZE];
+    static {
+        for (int i = 0; i < BATCH_SIZE; i++) {
+            EVENT_TYPES[i] = EVENT_TYPE;
+            RETURN_CODES[i] = RETURN_CODE;
+            LATENCIES[i] = i;
+        }
+    }
+
+    DnsEventListenerService mDnsService;
+
+    @Mock ConnectivityManager mCm;
+    @Mock IpConnectivityLog mLog;
+    ArgumentCaptor<NetworkCallback> mCallbackCaptor;
+    ArgumentCaptor<DnsEvent> mEvCaptor;
+
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mCallbackCaptor = ArgumentCaptor.forClass(NetworkCallback.class);
+        mEvCaptor = ArgumentCaptor.forClass(DnsEvent.class);
+        mDnsService = new DnsEventListenerService(mCm, mLog);
+
+        verify(mCm, times(1)).registerNetworkCallback(any(), mCallbackCaptor.capture());
+    }
+
+    public void testOneBatch() throws Exception {
+        log(105, LATENCIES);
+        log(106, Arrays.copyOf(LATENCIES, BATCH_SIZE - 1)); // one lookup short of a batch event
+
+        verifyLoggedEvents(new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES));
+
+        log(106, Arrays.copyOfRange(LATENCIES, BATCH_SIZE - 1, BATCH_SIZE));
+
+        mEvCaptor = ArgumentCaptor.forClass(DnsEvent.class); // reset argument captor
+        verifyLoggedEvents(
+            new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(106, EVENT_TYPES, RETURN_CODES, LATENCIES));
+    }
+
+    public void testSeveralBatches() throws Exception {
+        log(105, LATENCIES);
+        log(106, LATENCIES);
+        log(105, LATENCIES);
+        log(107, LATENCIES);
+
+        verifyLoggedEvents(
+            new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(106, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(107, EVENT_TYPES, RETURN_CODES, LATENCIES));
+    }
+
+    public void testBatchAndNetworkLost() throws Exception {
+        byte[] eventTypes = Arrays.copyOf(EVENT_TYPES, 20);
+        byte[] returnCodes = Arrays.copyOf(RETURN_CODES, 20);
+        int[] latencies = Arrays.copyOf(LATENCIES, 20);
+
+        log(105, LATENCIES);
+        log(105, latencies);
+        mCallbackCaptor.getValue().onLost(new Network(105));
+        log(105, LATENCIES);
+
+        verifyLoggedEvents(
+            new DnsEvent(105, eventTypes, returnCodes, latencies),
+            new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES));
+    }
+
+    public void testConcurrentBatchesAndDumps() throws Exception {
+        final long stop = System.currentTimeMillis() + 100;
+        final PrintWriter pw = new PrintWriter(new FileOutputStream("/dev/null"));
+        new Thread() {
+            public void run() {
+                while (System.currentTimeMillis() < stop) {
+                    mDnsService.dump(pw);
+                }
+            }
+        }.start();
+
+        logAsync(105, LATENCIES);
+        logAsync(106, LATENCIES);
+        logAsync(107, LATENCIES);
+
+        verifyLoggedEvents(500,
+            new DnsEvent(105, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(106, EVENT_TYPES, RETURN_CODES, LATENCIES),
+            new DnsEvent(107, EVENT_TYPES, RETURN_CODES, LATENCIES));
+    }
+
+    public void testConcurrentBatchesAndNetworkLoss() throws Exception {
+        logAsync(105, LATENCIES);
+        Thread.sleep(10L);
+        // call onLost() asynchronously to logAsync's onDnsEvent() calls.
+        mCallbackCaptor.getValue().onLost(new Network(105));
+
+        // do not verify unpredictable batch
+        verify(mLog, timeout(500).times(1)).log(any());
+    }
+
+    void log(int netId, int[] latencies) {
+        for (int l : latencies) {
+            mDnsService.onDnsEvent(netId, EVENT_TYPE, RETURN_CODE, l);
+        }
+    }
+
+    void logAsync(int netId, int[] latencies) {
+        new Thread() {
+            public void run() {
+                log(netId, latencies);
+            }
+        }.start();
+    }
+
+    void verifyLoggedEvents(DnsEvent... expected) {
+        verifyLoggedEvents(0, expected);
+    }
+
+    void verifyLoggedEvents(int wait, DnsEvent... expectedEvents) {
+        verify(mLog, timeout(wait).times(expectedEvents.length)).log(mEvCaptor.capture());
+        for (DnsEvent got : mEvCaptor.getAllValues()) {
+            OptionalInt index = IntStream.range(0, expectedEvents.length)
+                    .filter(i -> eventsEqual(expectedEvents[i], got))
+                    .findFirst();
+            // Don't match same expected event more than once.
+            index.ifPresent(i -> expectedEvents[i] = null);
+            assertTrue(index.isPresent());
+        }
+    }
+
+    /** equality function for DnsEvent to avoid overriding equals() and hashCode(). */
+    static boolean eventsEqual(DnsEvent expected, DnsEvent got) {
+        return (expected == got) || ((expected != null) && (got != null)
+                && (expected.netId == got.netId)
+                && Arrays.equals(expected.eventTypes, got.eventTypes)
+                && Arrays.equals(expected.returnCodes, got.returnCodes)
+                && Arrays.equals(expected.latenciesMs, got.latenciesMs));
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/connectivity/MetricsLoggerServiceTest.java b/services/tests/servicestests/src/com/android/server/connectivity/MetricsLoggerServiceTest.java
new file mode 100644
index 0000000..5f84ea1
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/connectivity/MetricsLoggerServiceTest.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2016, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity;
+
+import android.content.Context;
+import android.net.ConnectivityMetricsEvent;
+import android.os.Bundle;
+import android.os.RemoteException;
+import static android.net.ConnectivityMetricsEvent.Reference;
+
+import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertArrayEquals;
+
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.io.FileDescriptor;
+import java.io.FileOutputStream;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/*
+ * TODO:
+ *  - allow overriding MetricsLoggerService constants in tests.
+ *  - test intents are correctly sent after the notification threshold.
+ *  - test oldest events are correctly pushed out when internal deque is full.
+ *  - test throttling triggers correctly.
+ */
+public class MetricsLoggerServiceTest extends TestCase {
+
+    static final int COMPONENT_TAG = 1;
+    static final long N_EVENTS = 10L;
+    static final ConnectivityMetricsEvent EVENTS[] = new ConnectivityMetricsEvent[(int)N_EVENTS];
+    static {
+        for (int i = 0; i < N_EVENTS; i++) {
+            EVENTS[i] = new ConnectivityMetricsEvent(i, COMPONENT_TAG, i, new Bundle());
+        }
+    }
+
+    static final ConnectivityMetricsEvent NO_EVENTS[] = new ConnectivityMetricsEvent[0];
+
+    @Mock Context mContext;
+    MetricsLoggerService mService;
+
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mService = new MetricsLoggerService(mContext);
+        mService.onStart();
+    }
+
+    public void testGetNoEvents() throws Exception {
+        Reference r = new Reference(0);
+        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
+        assertEquals(0, r.getValue());
+    }
+
+    public void testLogAndGetEvents() throws Exception {
+        mService.mBinder.logEvents(EVENTS);
+
+        Reference r = new Reference(0);
+
+        assertArrayEquals(EVENTS, mService.mBinder.getEvents(r));
+        assertEquals(N_EVENTS, r.getValue());
+
+        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
+        assertEquals(N_EVENTS, r.getValue());
+    }
+
+    public void testLogOneByOne() throws Exception {
+        for (ConnectivityMetricsEvent ev : EVENTS) {
+            mService.mBinder.logEvent(ev);
+        }
+
+        Reference r = new Reference(0);
+
+        assertArrayEquals(EVENTS, mService.mBinder.getEvents(r));
+        assertEquals(N_EVENTS, r.getValue());
+
+        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
+        assertEquals(N_EVENTS, r.getValue());
+    }
+
+    public void testInterleavedLogAndGet() throws Exception {
+        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 0, 3));
+
+        Reference r = new Reference(0);
+
+        assertArrayEquals(Arrays.copyOfRange(EVENTS, 0, 3), mService.mBinder.getEvents(r));
+        assertEquals(3, r.getValue());
+
+        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 3, 8));
+        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 8, 10));
+
+        assertArrayEquals(Arrays.copyOfRange(EVENTS, 3, 10), mService.mBinder.getEvents(r));
+        assertEquals(N_EVENTS, r.getValue());
+
+        assertArrayEquals(NO_EVENTS, mService.mBinder.getEvents(r));
+        assertEquals(N_EVENTS, r.getValue());
+    }
+
+    public void testMultipleGetAll() throws Exception {
+        mService.mBinder.logEvents(Arrays.copyOf(EVENTS, 3));
+
+        Reference r1 = new Reference(0);
+        assertArrayEquals(Arrays.copyOf(EVENTS, 3), mService.mBinder.getEvents(r1));
+        assertEquals(3, r1.getValue());
+
+        mService.mBinder.logEvents(Arrays.copyOfRange(EVENTS, 3, 10));
+
+        Reference r2 = new Reference(0);
+        assertArrayEquals(EVENTS, mService.mBinder.getEvents(r2));
+        assertEquals(N_EVENTS, r2.getValue());
+    }
+
+    public void testLogAndDumpConcurrently() throws Exception {
+        for (int i = 0; i < 50; i++) {
+            mContext = null;
+            mService = null;
+            setUp();
+            logAndDumpConcurrently();
+        }
+    }
+
+    public void logAndDumpConcurrently() throws Exception {
+        final CountDownLatch latch = new CountDownLatch((int)N_EVENTS);
+        final FileDescriptor fd = new FileOutputStream("/dev/null").getFD();
+
+        for (ConnectivityMetricsEvent ev : EVENTS) {
+            new Thread() {
+                public void run() {
+                    mService.mBinder.logEvent(ev);
+                    latch.countDown();
+                }
+            }.start();
+        }
+
+        new Thread() {
+            public void run() {
+                while (latch.getCount() > 0) {
+                    mService.mBinder.dump(fd, new String[]{"--all"});
+                }
+            }
+        }.start();
+
+        latch.await(100, TimeUnit.MILLISECONDS);
+
+        Reference r = new Reference(0);
+        ConnectivityMetricsEvent[] got = mService.mBinder.getEvents(r);
+        Arrays.sort(got, new EventComparator());
+        assertArrayEquals(EVENTS, got);
+        assertEquals(N_EVENTS, r.getValue());
+    }
+
+    static class EventComparator implements Comparator<ConnectivityMetricsEvent> {
+        public int compare(ConnectivityMetricsEvent ev1, ConnectivityMetricsEvent ev2) {
+            return Long.compare(ev1.timestamp, ev2.timestamp);
+        }
+        public boolean equal(Object o) {
+            return o instanceof EventComparator;
+        }
+    };
+}
diff --git a/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java b/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
new file mode 100644
index 0000000..a30b362
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/connectivity/tethering/TetherInterfaceStateMachineTest.java
@@ -0,0 +1,277 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity.tethering;
+
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.when;
+
+import static android.net.ConnectivityManager.TETHER_ERROR_ENABLE_NAT_ERROR;
+import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR;
+import static android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR;
+import static android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR;
+import static com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE;
+import static com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED;
+import static com.android.server.connectivity.tethering.IControlsTethering.STATE_UNAVAILABLE;
+
+import android.net.ConnectivityManager;
+import android.net.INetworkStatsService;
+import android.net.InterfaceConfiguration;
+import android.os.INetworkManagementService;
+import android.os.RemoteException;
+import android.os.test.TestLooper;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InOrder;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class TetherInterfaceStateMachineTest {
+    private static final String IFACE_NAME = "testnet1";
+    private static final String UPSTREAM_IFACE = "upstream0";
+    private static final String UPSTREAM_IFACE2 = "upstream1";
+
+    @Mock private INetworkManagementService mNMService;
+    @Mock private INetworkStatsService mStatsService;
+    @Mock private IControlsTethering mTetherHelper;
+    @Mock private InterfaceConfiguration mInterfaceConfiguration;
+
+    private final TestLooper mLooper = new TestLooper();
+    private TetherInterfaceStateMachine mTestedSm;
+
+    private void initStateMachine(int interfaceType) throws Exception {
+        mTestedSm = new TetherInterfaceStateMachine(IFACE_NAME, mLooper.getLooper(), interfaceType,
+                mNMService, mStatsService, mTetherHelper);
+        mTestedSm.start();
+        // Starting the state machine always puts us in a consistent state and notifies
+        // the test of the world that we've changed from an unknown to available state.
+        mLooper.dispatchAll();
+        reset(mNMService, mStatsService, mTetherHelper);
+        when(mNMService.getInterfaceConfig(IFACE_NAME)).thenReturn(mInterfaceConfiguration);
+    }
+
+    private void initTetheredStateMachine(int interfaceType, String upstreamIface) throws Exception {
+        initStateMachine(interfaceType);
+        dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
+        if (upstreamIface != null) {
+            dispatchTetherConnectionChanged(upstreamIface);
+        }
+        reset(mNMService, mStatsService, mTetherHelper);
+        when(mNMService.getInterfaceConfig(IFACE_NAME)).thenReturn(mInterfaceConfiguration);
+    }
+
+    @Before public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    public void startsOutAvailable() {
+        mTestedSm = new TetherInterfaceStateMachine(IFACE_NAME, mLooper.getLooper(),
+                ConnectivityManager.TETHERING_BLUETOOTH, mNMService, mStatsService, mTetherHelper);
+        mTestedSm.start();
+        mLooper.dispatchAll();
+        verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_NO_ERROR);
+        verifyNoMoreInteractions(mTetherHelper, mNMService, mStatsService);
+    }
+
+    @Test
+    public void shouldDoNothingUntilRequested() throws Exception {
+        initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH);
+        final int [] NOOP_COMMANDS = {
+            TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED,
+            TetherInterfaceStateMachine.CMD_IP_FORWARDING_ENABLE_ERROR,
+            TetherInterfaceStateMachine.CMD_IP_FORWARDING_DISABLE_ERROR,
+            TetherInterfaceStateMachine.CMD_START_TETHERING_ERROR,
+            TetherInterfaceStateMachine.CMD_STOP_TETHERING_ERROR,
+            TetherInterfaceStateMachine.CMD_SET_DNS_FORWARDERS_ERROR,
+            TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED
+        };
+        for (int command : NOOP_COMMANDS) {
+            // None of these commands should trigger us to request action from
+            // the rest of the system.
+            dispatchCommand(command);
+            verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+        }
+    }
+
+    @Test
+    public void handlesImmediateInterfaceDown() throws Exception {
+        initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH);
+
+        dispatchCommand(TetherInterfaceStateMachine.CMD_INTERFACE_DOWN);
+        verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_UNAVAILABLE, TETHER_ERROR_NO_ERROR);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void canBeTethered() throws Exception {
+        initStateMachine(ConnectivityManager.TETHERING_BLUETOOTH);
+
+        dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
+        InOrder inOrder = inOrder(mTetherHelper, mNMService);
+        inOrder.verify(mNMService).tetherInterface(IFACE_NAME);
+        inOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_TETHERED, TETHER_ERROR_NO_ERROR);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void canUnrequestTethering() throws Exception {
+        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, null);
+
+        dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
+        InOrder inOrder = inOrder(mNMService, mStatsService, mTetherHelper);
+        inOrder.verify(mNMService).untetherInterface(IFACE_NAME);
+        inOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_NO_ERROR);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void canBeTetheredAsUsb() throws Exception {
+        initStateMachine(ConnectivityManager.TETHERING_USB);
+
+        dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
+        InOrder inOrder = inOrder(mTetherHelper, mNMService);
+        inOrder.verify(mNMService).getInterfaceConfig(IFACE_NAME);
+        inOrder.verify(mNMService).setInterfaceConfig(IFACE_NAME, mInterfaceConfiguration);
+        inOrder.verify(mNMService).tetherInterface(IFACE_NAME);
+        inOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_TETHERED, TETHER_ERROR_NO_ERROR);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void handlesFirstUpstreamChange() throws Exception {
+        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, null);
+
+        // Telling the state machine about its upstream interface triggers a little more configuration.
+        dispatchTetherConnectionChanged(UPSTREAM_IFACE);
+        InOrder inOrder = inOrder(mNMService);
+        inOrder.verify(mNMService).enableNat(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).startInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void handlesChangingUpstream() throws Exception {
+        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, UPSTREAM_IFACE);
+
+        dispatchTetherConnectionChanged(UPSTREAM_IFACE2);
+        InOrder inOrder = inOrder(mNMService, mStatsService);
+        inOrder.verify(mStatsService).forceUpdate();
+        inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).enableNat(IFACE_NAME, UPSTREAM_IFACE2);
+        inOrder.verify(mNMService).startInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE2);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void canUnrequestTetheringWithUpstream() throws Exception {
+        initTetheredStateMachine(ConnectivityManager.TETHERING_BLUETOOTH, UPSTREAM_IFACE);
+
+        dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED);
+        InOrder inOrder = inOrder(mNMService, mStatsService, mTetherHelper);
+        inOrder.verify(mStatsService).forceUpdate();
+        inOrder.verify(mNMService).stopInterfaceForwarding(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).disableNat(IFACE_NAME, UPSTREAM_IFACE);
+        inOrder.verify(mNMService).untetherInterface(IFACE_NAME);
+        inOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_NO_ERROR);
+        verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
+    }
+
+    @Test
+    public void interfaceDownLeadsToUnavailable() throws Exception {
+        for (boolean shouldThrow : new boolean[]{true, false}) {
+            initTetheredStateMachine(ConnectivityManager.TETHERING_USB, null);
+
+            if (shouldThrow) {
+                doThrow(RemoteException.class).when(mNMService).untetherInterface(IFACE_NAME);
+            }
+            dispatchCommand(TetherInterfaceStateMachine.CMD_INTERFACE_DOWN);
+            InOrder usbTeardownOrder = inOrder(mNMService, mInterfaceConfiguration, mTetherHelper);
+            usbTeardownOrder.verify(mInterfaceConfiguration).setInterfaceDown();
+            usbTeardownOrder.verify(mNMService).setInterfaceConfig(
+                    IFACE_NAME, mInterfaceConfiguration);
+            usbTeardownOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                    IFACE_NAME, mTestedSm, STATE_UNAVAILABLE, TETHER_ERROR_NO_ERROR);
+        }
+    }
+
+    @Test
+    public void usbShouldBeTornDownOnTetherError() throws Exception {
+        initStateMachine(ConnectivityManager.TETHERING_USB);
+
+        doThrow(RemoteException.class).when(mNMService).tetherInterface(IFACE_NAME);
+        dispatchCommand(TetherInterfaceStateMachine.CMD_TETHER_REQUESTED);
+        InOrder usbTeardownOrder = inOrder(mNMService, mInterfaceConfiguration, mTetherHelper);
+        usbTeardownOrder.verify(mInterfaceConfiguration).setInterfaceDown();
+        usbTeardownOrder.verify(mNMService).setInterfaceConfig(
+                IFACE_NAME, mInterfaceConfiguration);
+        usbTeardownOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_TETHER_IFACE_ERROR);
+    }
+
+    @Test
+    public void shouldTearDownUsbOnUpstreamError() throws Exception {
+        initTetheredStateMachine(ConnectivityManager.TETHERING_USB, null);
+
+        doThrow(RemoteException.class).when(mNMService).enableNat(anyString(), anyString());
+        dispatchTetherConnectionChanged(UPSTREAM_IFACE);
+        InOrder usbTeardownOrder = inOrder(mNMService, mInterfaceConfiguration, mTetherHelper);
+        usbTeardownOrder.verify(mInterfaceConfiguration).setInterfaceDown();
+        usbTeardownOrder.verify(mNMService).setInterfaceConfig(IFACE_NAME, mInterfaceConfiguration);
+        usbTeardownOrder.verify(mTetherHelper).notifyInterfaceStateChange(
+                IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_ENABLE_NAT_ERROR);
+    }
+
+    /**
+     * Send a command to the state machine under test, and run the event loop to idle.
+     *
+     * @param command One of the TetherInterfaceStateMachine.CMD_* constants.
+     */
+    private void dispatchCommand(int command) {
+        mTestedSm.sendMessage(command);
+        mLooper.dispatchAll();
+    }
+
+    /**
+     * Special override to tell the state machine that the upstream interface has changed.
+     *
+     * @see #dispatchCommand(int)
+     * @param upstreamIface String name of upstream interface (or null)
+     */
+    private void dispatchTetherConnectionChanged(String upstreamIface) {
+        mTestedSm.sendMessage(TetherInterfaceStateMachine.CMD_TETHER_CONNECTION_CHANGED,
+                upstreamIface);
+        mLooper.dispatchAll();
+    }
+}
\ No newline at end of file
diff --git a/services/tests/servicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java b/services/tests/servicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
index 83a59fd..d51f2d8 100644
--- a/services/tests/servicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
+++ b/services/tests/servicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
@@ -76,6 +76,7 @@
         mService.setVibrator(mVibrator);
         mService.setSystemReady(true);
         mService.setHandler(mHandler);
+        mService.setSystemNotificationSound("beep!");
     }
 
     //
diff --git a/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
new file mode 100644
index 0000000..3f6ab36
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/BaseShortcutManagerTest.java
@@ -0,0 +1,1750 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.cloneShortcutList;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.hashSet;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makeBundle;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
+import android.annotation.UserIdInt;
+import android.app.Activity;
+import android.app.ActivityManagerInternal;
+import android.app.IUidObserver;
+import android.app.usage.UsageStatsManagerInternal;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.ILauncherApps;
+import android.content.pm.LauncherApps;
+import android.content.pm.LauncherApps.ShortcutQuery;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManagerInternal;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ShortcutInfo;
+import android.content.pm.ShortcutManager;
+import android.content.pm.ShortcutServiceInternal;
+import android.content.pm.Signature;
+import android.content.pm.UserInfo;
+import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
+import android.graphics.drawable.Icon;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.FileUtils;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.PersistableBundle;
+import android.os.Process;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.test.InstrumentationTestCase;
+import android.test.mock.MockContext;
+import android.util.Log;
+import android.util.Pair;
+
+import com.android.internal.util.Preconditions;
+import com.android.server.LocalServices;
+import com.android.server.SystemService;
+import com.android.server.pm.LauncherAppsService.LauncherAppsImpl;
+import com.android.server.pm.ShortcutUser.PackageWithUser;
+
+import org.junit.Assert;
+import org.mockito.ArgumentCaptor;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileReader;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.BiFunction;
+import java.util.function.BiPredicate;
+import java.util.function.Consumer;
+
+public abstract class BaseShortcutManagerTest extends InstrumentationTestCase {
+    protected static final String TAG = "ShortcutManagerTest";
+
+    /**
+     * Whether to enable dump or not.  Should be only true when debugging to avoid bugs where
+     * dump affecting the behavior.
+     */
+    protected static final boolean ENABLE_DUMP = false; // DO NOT SUBMIT WITH true
+
+    protected static final boolean DUMP_IN_TEARDOWN = false; // DO NOT SUBMIT WITH true
+
+    protected static final String[] EMPTY_STRINGS = new String[0]; // Just for readability.
+
+    protected static final String MAIN_ACTIVITY_CLASS = "MainActivity";
+
+    // public for mockito
+    public class BaseContext extends MockContext {
+        @Override
+        public Object getSystemService(String name) {
+            switch (name) {
+                case Context.USER_SERVICE:
+                    return mMockUserManager;
+            }
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public String getSystemServiceName(Class<?> serviceClass) {
+            return getTestContext().getSystemServiceName(serviceClass);
+        }
+
+        @Override
+        public PackageManager getPackageManager() {
+            return mMockPackageManager;
+        }
+
+        @Override
+        public Resources getResources() {
+            return getTestContext().getResources();
+        }
+
+        @Override
+        public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user,
+                IntentFilter filter, String broadcastPermission, Handler scheduler) {
+            // ignore.
+            return null;
+        }
+    }
+
+    /** Context used in the client side */
+    public class ClientContext extends BaseContext {
+        @Override
+        public String getPackageName() {
+            return mInjectedClientPackage;
+        }
+
+        @Override
+        public int getUserId() {
+            return getCallingUserId();
+        }
+    }
+
+    /** Context used in the service side */
+    public class ServiceContext extends BaseContext {
+        long injectClearCallingIdentity() {
+            final int prevCallingUid = mInjectedCallingUid;
+            mInjectedCallingUid = Process.SYSTEM_UID;
+            return prevCallingUid;
+        }
+
+        void injectRestoreCallingIdentity(long token) {
+            mInjectedCallingUid = (int) token;
+        }
+
+        @Override
+        public void startActivityAsUser(@RequiresPermission Intent intent, @Nullable Bundle options,
+                UserHandle userId) {
+        }
+
+        @Override
+        public int getUserId() {
+            return UserHandle.USER_SYSTEM;
+        }
+
+        public PackageInfo injectGetActivitiesWithMetadata(
+                String packageName, @UserIdInt int userId) {
+            return BaseShortcutManagerTest.this.injectGetActivitiesWithMetadata(packageName, userId);
+        }
+
+        public XmlResourceParser injectXmlMetaData(ActivityInfo activityInfo, String key) {
+            return BaseShortcutManagerTest.this.injectXmlMetaData(activityInfo, key);
+        }
+    }
+
+    /** ShortcutService with injection override methods. */
+    protected final class ShortcutServiceTestable extends ShortcutService {
+        final ServiceContext mContext;
+        IUidObserver mUidObserver;
+
+        public ShortcutServiceTestable(ServiceContext context, Looper looper) {
+            super(context, looper, /* onyForPackageManagerApis */ false);
+            mContext = context;
+        }
+
+        @Override
+        boolean injectShouldPerformVerification() {
+            return true; // Always verify during unit tests.
+        }
+
+        @Override
+        String injectShortcutManagerConstants() {
+            return ConfigConstants.KEY_RESET_INTERVAL_SEC + "=" + (INTERVAL / 1000) + ","
+                    + ConfigConstants.KEY_MAX_SHORTCUTS + "=" + MAX_SHORTCUTS + ","
+                    + ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "="
+                    + MAX_UPDATES_PER_INTERVAL + ","
+                    + ConfigConstants.KEY_MAX_ICON_DIMENSION_DP + "=" + MAX_ICON_DIMENSION + ","
+                    + ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM + "="
+                    + MAX_ICON_DIMENSION_LOWRAM + ","
+                    + ConfigConstants.KEY_ICON_FORMAT + "=PNG,"
+                    + ConfigConstants.KEY_ICON_QUALITY + "=100";
+        }
+
+        @Override
+        long injectClearCallingIdentity() {
+            return mContext.injectClearCallingIdentity();
+        }
+
+        @Override
+        void injectRestoreCallingIdentity(long token) {
+            mContext.injectRestoreCallingIdentity(token);
+        }
+
+        @Override
+        int injectDipToPixel(int dip) {
+            return dip;
+        }
+
+        @Override
+        long injectCurrentTimeMillis() {
+            return mInjectedCurrentTimeMillis;
+        }
+
+        @Override
+        long injectElapsedRealtime() {
+            // TODO This should be kept separately from mInjectedCurrentTimeMillis, since
+            // this should increase even if we rewind mInjectedCurrentTimeMillis in some tests.
+            return mInjectedCurrentTimeMillis - START_TIME;
+        }
+
+        @Override
+        int injectBinderCallingUid() {
+            return mInjectedCallingUid;
+        }
+
+        @Override
+        int injectGetPackageUid(String packageName, int userId) {
+            return getInjectedPackageInfo(packageName, userId, false).applicationInfo.uid;
+        }
+
+        @Override
+        File injectSystemDataPath() {
+            return new File(mInjectedFilePathRoot, "system");
+        }
+
+        @Override
+        File injectUserDataPath(@UserIdInt int userId) {
+            return new File(mInjectedFilePathRoot, "user-" + userId);
+        }
+
+        @Override
+        void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) {
+            // Can't check
+        }
+
+        @Override
+        boolean injectIsLowRamDevice() {
+            return mInjectedIsLowRamDevice;
+        }
+
+        @Override
+        void injectRegisterUidObserver(IUidObserver observer, int which) {
+            mUidObserver = observer;
+        }
+
+        @Override
+        PackageManagerInternal injectPackageManagerInternal() {
+            return mMockPackageManagerInternal;
+        }
+
+        @Override
+        boolean hasShortcutHostPermission(@NonNull String callingPackage, int userId) {
+            return mDefaultLauncherChecker.test(callingPackage, userId);
+        }
+
+        @Override
+        PackageInfo injectPackageInfoWithUninstalled(String packageName, @UserIdInt int userId,
+                boolean getSignatures) {
+            return getInjectedPackageInfo(packageName, userId, getSignatures);
+        }
+
+        @Override
+        ApplicationInfo injectApplicationInfoWithUninstalled(
+                String packageName, @UserIdInt int userId) {
+            PackageInfo pi = injectPackageInfoWithUninstalled(
+                    packageName, userId, /* getSignatures= */ false);
+            return pi != null ? pi.applicationInfo : null;
+        }
+
+        @Override
+        List<PackageInfo> injectGetPackagesWithUninstalled(@UserIdInt int userId) {
+            return BaseShortcutManagerTest.this.getInstalledPackagesWithUninstalled(userId);
+        }
+
+        @Override
+        ActivityInfo injectGetActivityInfoWithMetadataWithUninstalled(ComponentName activity,
+                @UserIdInt int userId) {
+            final PackageInfo pi = mContext.injectGetActivitiesWithMetadata(
+                    activity.getPackageName(), userId);
+            if (pi == null || pi.activities == null) {
+                return null;
+            }
+            for (ActivityInfo ai : pi.activities) {
+                if (!mEnabledActivityChecker.test(ai.getComponentName(), userId)) {
+                    continue;
+                }
+                if (activity.equals(ai.getComponentName())) {
+                    return ai;
+                }
+            }
+            return null;
+        }
+
+        @Override
+        boolean injectIsMainActivity(@NonNull ComponentName activity, int userId) {
+            if (!mEnabledActivityChecker.test(activity, userId)) {
+                return false;
+            }
+            return mMainActivityChecker.test(activity, userId);
+        }
+
+        @Override
+        List<ResolveInfo> injectGetMainActivities(@NonNull String packageName, int userId) {
+            final PackageInfo pi = mContext.injectGetActivitiesWithMetadata(
+                    packageName, userId);
+            if (pi == null || pi.activities == null) {
+                return null;
+            }
+            final ArrayList<ResolveInfo> ret = new ArrayList<>(pi.activities.length);
+            for (int i = 0; i < pi.activities.length; i++) {
+                if (!mEnabledActivityChecker.test(pi.activities[i].getComponentName(), userId)) {
+                    continue;
+                }
+                final ResolveInfo ri = new ResolveInfo();
+                ri.activityInfo = pi.activities[i];
+                ret.add(ri);
+            }
+
+            return ret;
+        }
+
+        @Override
+        ComponentName injectGetDefaultMainActivity(@NonNull String packageName, int userId) {
+            return mMainActivityFetcher.apply(packageName, userId);
+        }
+
+        @Override
+        boolean injectIsActivityEnabledAndExported(ComponentName activity, @UserIdInt int userId) {
+            return mEnabledActivityChecker.test(activity, userId);
+        }
+
+        @Override
+        XmlResourceParser injectXmlMetaData(ActivityInfo activityInfo, String key) {
+            return mContext.injectXmlMetaData(activityInfo, key);
+        }
+
+        @Override
+        void injectPostToHandler(Runnable r) {
+            final long token = mContext.injectClearCallingIdentity();
+            r.run();
+            mContext.injectRestoreCallingIdentity(token);
+        }
+
+        @Override
+        void injectEnforceCallingPermission(String permission, String message) {
+            if (!mCallerPermissions.contains(permission)) {
+                throw new SecurityException("Missing permission: " + permission);
+            }
+        }
+
+        @Override
+        boolean injectIsSafeModeEnabled() {
+            return mSafeMode;
+        }
+
+        @Override
+        void wtf(String message, Exception e) {
+            // During tests, WTF is fatal.
+            fail(message + "  exception: " + e);
+        }
+    }
+
+    /** ShortcutManager with injection override methods. */
+    protected class ShortcutManagerTestable extends ShortcutManager {
+        public ShortcutManagerTestable(Context context, ShortcutServiceTestable service) {
+            super(context, service);
+        }
+
+        @Override
+        protected int injectMyUserId() {
+            return UserHandle.getUserId(mInjectedCallingUid);
+        }
+
+        @Override
+        public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) {
+            // Note to simulate the binder RPC, we need to clone the incoming arguments.
+            // Otherwise bad things will happen because they're mutable.
+            return super.setDynamicShortcuts(cloneShortcutList(shortcutInfoList));
+        }
+
+        @Override
+        public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) {
+            // Note to simulate the binder RPC, we need to clone the incoming arguments.
+            return super.addDynamicShortcuts(cloneShortcutList(shortcutInfoList));
+        }
+
+        @Override
+        public boolean updateShortcuts(List<ShortcutInfo> shortcutInfoList) {
+            // Note to simulate the binder RPC, we need to clone the incoming arguments.
+            return super.updateShortcuts(cloneShortcutList(shortcutInfoList));
+        }
+    }
+
+    protected class LauncherAppImplTestable extends LauncherAppsImpl {
+        final ServiceContext mContext;
+
+        public LauncherAppImplTestable(ServiceContext context) {
+            super(context);
+            mContext = context;
+        }
+
+        @Override
+        public void verifyCallingPackage(String callingPackage) {
+            // SKIP
+        }
+
+        @Override
+        void postToPackageMonitorHandler(Runnable r) {
+            final long token = mContext.injectClearCallingIdentity();
+            r.run();
+            mContext.injectRestoreCallingIdentity(token);
+        }
+
+        @Override
+        int injectBinderCallingUid() {
+            return mInjectedCallingUid;
+        }
+
+        @Override
+        long injectClearCallingIdentity() {
+            final int prevCallingUid = mInjectedCallingUid;
+            mInjectedCallingUid = Process.SYSTEM_UID;
+            return prevCallingUid;
+        }
+
+        @Override
+        void injectRestoreCallingIdentity(long token) {
+            mInjectedCallingUid = (int) token;
+        }
+
+        @Override
+        protected void startShortcutIntentAsPublisher(@NonNull Intent intent,
+                @NonNull String publisherPackage, Bundle startActivityOptions, int userId) {
+            // Just forward to startActivityAsUser() during unit tests.
+            mContext.startActivityAsUser(intent, startActivityOptions, UserHandle.of(userId));
+        }
+    }
+
+    protected class LauncherAppsTestable extends LauncherApps {
+        public LauncherAppsTestable(Context context, ILauncherApps service) {
+            super(context, service);
+        }
+    }
+
+    public static class ShortcutActivity extends Activity {
+    }
+
+    public static class ShortcutActivity2 extends Activity {
+    }
+
+    public static class ShortcutActivity3 extends Activity {
+    }
+
+    protected ServiceContext mServiceContext;
+    protected ClientContext mClientContext;
+
+    protected ShortcutServiceTestable mService;
+    protected ShortcutManagerTestable mManager;
+    protected ShortcutServiceInternal mInternal;
+
+    protected LauncherAppImplTestable mLauncherAppImpl;
+
+    // LauncherApps has per-instace state, so we need a differnt instance for each launcher.
+    protected final Map<Pair<Integer, String>, LauncherAppsTestable>
+            mLauncherAppsMap = new HashMap<>();
+    protected LauncherAppsTestable mLauncherApps; // Current one
+
+    protected File mInjectedFilePathRoot;
+
+    protected boolean mSafeMode;
+
+    protected long mInjectedCurrentTimeMillis;
+
+    protected boolean mInjectedIsLowRamDevice;
+
+    protected Locale mInjectedLocale = Locale.ENGLISH;
+
+    protected int mInjectedCallingUid;
+    protected String mInjectedClientPackage;
+
+    protected Map<String, PackageInfo> mInjectedPackages;
+
+    protected Set<PackageWithUser> mUninstalledPackages;
+
+    protected PackageManager mMockPackageManager;
+    protected PackageManagerInternal mMockPackageManagerInternal;
+    protected UserManager mMockUserManager;
+    protected UsageStatsManagerInternal mMockUsageStatsManagerInternal;
+    protected ActivityManagerInternal mMockActivityManagerInternal;
+
+    protected static final String CALLING_PACKAGE_1 = "com.android.test.1";
+    protected static final int CALLING_UID_1 = 10001;
+
+    protected static final String CALLING_PACKAGE_2 = "com.android.test.2";
+    protected static final int CALLING_UID_2 = 10002;
+
+    protected static final String CALLING_PACKAGE_3 = "com.android.test.3";
+    protected static final int CALLING_UID_3 = 10003;
+
+    protected static final String CALLING_PACKAGE_4 = "com.android.test.4";
+    protected static final int CALLING_UID_4 = 10004;
+
+    protected static final String LAUNCHER_1 = "com.android.launcher.1";
+    protected static final int LAUNCHER_UID_1 = 10011;
+
+    protected static final String LAUNCHER_2 = "com.android.launcher.2";
+    protected static final int LAUNCHER_UID_2 = 10012;
+
+    protected static final String LAUNCHER_3 = "com.android.launcher.3";
+    protected static final int LAUNCHER_UID_3 = 10013;
+
+    protected static final String LAUNCHER_4 = "com.android.launcher.4";
+    protected static final int LAUNCHER_UID_4 = 10014;
+
+    protected static final int USER_0 = UserHandle.USER_SYSTEM;
+    protected static final int USER_10 = 10;
+    protected static final int USER_11 = 11;
+    protected static final int USER_P0 = 20; // profile of user 0
+
+    protected static final UserHandle HANDLE_USER_0 = UserHandle.of(USER_0);
+    protected static final UserHandle HANDLE_USER_10 = UserHandle.of(USER_10);
+    protected static final UserHandle HANDLE_USER_11 = UserHandle.of(USER_11);
+    protected static final UserHandle HANDLE_USER_P0 = UserHandle.of(USER_P0);
+
+    protected static final UserInfo USER_INFO_0 = withProfileGroupId(
+            new UserInfo(USER_0, "user0",
+                    UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY | UserInfo.FLAG_INITIALIZED), 10);
+
+    protected static final UserInfo USER_INFO_10 =
+            new UserInfo(USER_10, "user10", UserInfo.FLAG_INITIALIZED);
+
+    protected static final UserInfo USER_INFO_11 =
+            new UserInfo(USER_11, "user11", UserInfo.FLAG_INITIALIZED);
+
+    protected static final UserInfo USER_INFO_P0 = withProfileGroupId(
+            new UserInfo(USER_P0, "userP0",
+                    UserInfo.FLAG_MANAGED_PROFILE), 10);
+
+    protected BiPredicate<String, Integer> mDefaultLauncherChecker =
+            (callingPackage, userId) ->
+            LAUNCHER_1.equals(callingPackage) || LAUNCHER_2.equals(callingPackage)
+            || LAUNCHER_3.equals(callingPackage) || LAUNCHER_4.equals(callingPackage);
+
+    protected BiPredicate<ComponentName, Integer> mMainActivityChecker =
+            (activity, userId) -> true;
+
+    protected BiFunction<String, Integer, ComponentName> mMainActivityFetcher =
+            (packageName, userId) -> new ComponentName(packageName, MAIN_ACTIVITY_CLASS);
+
+    protected BiPredicate<ComponentName, Integer> mEnabledActivityChecker
+            = (activity, userId) -> true; // all activities are enabled.
+
+    protected static final long START_TIME = 1440000000101L;
+
+    protected static final long INTERVAL = 10000;
+
+    protected static final int MAX_SHORTCUTS = 10;
+
+    protected static final int MAX_UPDATES_PER_INTERVAL = 3;
+
+    protected static final int MAX_ICON_DIMENSION = 128;
+
+    protected static final int MAX_ICON_DIMENSION_LOWRAM = 32;
+
+    protected static final ShortcutQuery QUERY_ALL = new ShortcutQuery();
+
+    protected final ArrayList<String> mCallerPermissions = new ArrayList<>();
+
+    protected final HashMap<String, LinkedHashMap<ComponentName, Integer>> mActivityMetadataResId
+            = new HashMap<>();
+
+    static {
+        QUERY_ALL.setQueryFlags(
+                ShortcutQuery.FLAG_GET_ALL_KINDS);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        mServiceContext = spy(new ServiceContext());
+        mClientContext = new ClientContext();
+
+        mMockPackageManager = mock(PackageManager.class);
+        mMockPackageManagerInternal = mock(PackageManagerInternal.class);
+        mMockUserManager = mock(UserManager.class);
+        mMockUsageStatsManagerInternal = mock(UsageStatsManagerInternal.class);
+        mMockActivityManagerInternal = mock(ActivityManagerInternal.class);
+
+        LocalServices.removeServiceForTest(PackageManagerInternal.class);
+        LocalServices.addService(PackageManagerInternal.class, mMockPackageManagerInternal);
+        LocalServices.removeServiceForTest(UsageStatsManagerInternal.class);
+        LocalServices.addService(UsageStatsManagerInternal.class, mMockUsageStatsManagerInternal);
+        LocalServices.removeServiceForTest(ActivityManagerInternal.class);
+        LocalServices.addService(ActivityManagerInternal.class, mMockActivityManagerInternal);
+
+        // Prepare injection values.
+
+        mInjectedCurrentTimeMillis = START_TIME;
+
+        mInjectedPackages = new HashMap<>();
+        addPackage(CALLING_PACKAGE_1, CALLING_UID_1, 1);
+        addPackage(CALLING_PACKAGE_2, CALLING_UID_2, 2);
+        addPackage(CALLING_PACKAGE_3, CALLING_UID_3, 3);
+        addPackage(CALLING_PACKAGE_4, CALLING_UID_4, 10);
+        addPackage(LAUNCHER_1, LAUNCHER_UID_1, 4);
+        addPackage(LAUNCHER_2, LAUNCHER_UID_2, 5);
+        addPackage(LAUNCHER_3, LAUNCHER_UID_3, 6);
+        addPackage(LAUNCHER_4, LAUNCHER_UID_4, 10);
+
+        // CALLING_PACKAGE_3 / LAUNCHER_3 are not backup target.
+        updatePackageInfo(CALLING_PACKAGE_3,
+                pi -> pi.applicationInfo.flags &= ~ApplicationInfo.FLAG_ALLOW_BACKUP);
+        updatePackageInfo(LAUNCHER_3,
+                pi -> pi.applicationInfo.flags &= ~ApplicationInfo.FLAG_ALLOW_BACKUP);
+
+        mUninstalledPackages = new HashSet<>();
+
+        mInjectedFilePathRoot = new File(getTestContext().getCacheDir(), "test-files");
+
+        deleteAllSavedFiles();
+
+        // Set up users.
+        doAnswer(inv -> {
+                assertSystem();
+                return USER_INFO_0;
+        }).when(mMockUserManager).getUserInfo(eq(USER_0));
+
+        doAnswer(inv -> {
+                assertSystem();
+                return USER_INFO_10;
+        }).when(mMockUserManager).getUserInfo(eq(USER_10));
+
+        doAnswer(inv -> {
+                assertSystem();
+                return USER_INFO_11;
+        }).when(mMockUserManager).getUserInfo(eq(USER_11));
+
+        doAnswer(inv -> {
+                assertSystem();
+                return USER_INFO_P0;
+        }).when(mMockUserManager).getUserInfo(eq(USER_P0));
+
+        // User 0 is always running.
+        when(mMockUserManager.isUserRunning(eq(USER_0))).thenAnswer(new AnswerIsUserRunning(true));
+
+        setUpAppResources();
+
+        // Start the service.
+        initService();
+        setCaller(CALLING_PACKAGE_1);
+
+        // In order to complicate the situation, we set mLocaleChangeSequenceNumber to 1 by
+        // calling this.  Running test with mLocaleChangeSequenceNumber == 0 might make us miss
+        // some edge cases.
+        mInternal.onSystemLocaleChangedNoLock();
+    }
+
+    /**
+     * Returns a boolean but also checks if the current UID is SYSTEM_UID.
+     */
+    protected class AnswerIsUserRunning implements Answer<Boolean> {
+        protected final boolean mAnswer;
+
+        protected AnswerIsUserRunning(boolean answer) {
+            mAnswer = answer;
+        }
+
+        @Override
+        public Boolean answer(InvocationOnMock invocation) throws Throwable {
+            assertEquals("isUserRunning() must be called on SYSTEM UID.",
+                    Process.SYSTEM_UID, mInjectedCallingUid);
+            return mAnswer;
+        }
+    }
+
+    protected void setUpAppResources() throws Exception {
+        setUpAppResources(/* offset = */ 0);
+    }
+
+    protected void setUpAppResources(int ressIdOffset) throws Exception {
+        // ressIdOffset is used to adjust resource IDs to emulate the case where an updated app
+        // has resource IDs changed.
+
+        doAnswer(pmInvocation -> {
+            assertEquals(Process.SYSTEM_UID, mInjectedCallingUid);
+
+            final String packageName = (String) pmInvocation.getArguments()[0];
+            final int userId = (Integer) pmInvocation.getArguments()[1];
+
+            final Resources res = mock(Resources.class);
+
+            doAnswer(resInvocation -> {
+                final int argResId = (Integer) resInvocation.getArguments()[0];
+
+                return "string-" + packageName + "-user:" + userId + "-res:" + argResId
+                        + "/" + mInjectedLocale;
+            }).when(res).getString(anyInt());
+
+            doAnswer(resInvocation -> {
+                final int resId = (Integer) resInvocation.getArguments()[0];
+
+                // Always use the "string" resource type.  The type doesn't matter during the test.
+                return packageName + ":string/r" + resId;
+            }).when(res).getResourceName(anyInt());
+
+            doAnswer(resInvocation -> {
+                final String argResName = (String) resInvocation.getArguments()[0];
+                final String argType = (String) resInvocation.getArguments()[1];
+                final String argPackageName = (String) resInvocation.getArguments()[2];
+
+                // See the above code.  getResourceName() will just use "r" + res ID as the entry
+                // name.
+                String entryName = argResName;
+                if (entryName.contains("/")) {
+                    entryName = ShortcutInfo.getResourceEntryName(entryName);
+                }
+                return Integer.parseInt(entryName.substring(1)) + ressIdOffset;
+            }).when(res).getIdentifier(anyString(), anyString(), anyString());
+            return res;
+        }).when(mMockPackageManager).getResourcesForApplicationAsUser(anyString(), anyInt());
+    }
+
+    protected static UserInfo withProfileGroupId(UserInfo in, int groupId) {
+        in.profileGroupId = groupId;
+        return in;
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        if (DUMP_IN_TEARDOWN) dumpsysOnLogcat("Teardown");
+
+        shutdownServices();
+
+        super.tearDown();
+    }
+
+    protected Context getTestContext() {
+        return getInstrumentation().getContext();
+    }
+
+    protected ShortcutManager getManager() {
+        return mManager;
+    }
+
+    protected void deleteAllSavedFiles() {
+        // Empty the data directory.
+        if (mInjectedFilePathRoot.exists()) {
+            Assert.assertTrue("failed to delete dir",
+                    FileUtils.deleteContents(mInjectedFilePathRoot));
+        }
+        mInjectedFilePathRoot.mkdirs();
+    }
+
+    /** (Re-) init the manager and the service. */
+    protected void initService() {
+        shutdownServices();
+
+        LocalServices.removeServiceForTest(ShortcutServiceInternal.class);
+
+        // Instantiate targets.
+        mService = new ShortcutServiceTestable(mServiceContext, Looper.getMainLooper());
+        mManager = new ShortcutManagerTestable(mClientContext, mService);
+
+        mInternal = LocalServices.getService(ShortcutServiceInternal.class);
+
+        mLauncherAppImpl = new LauncherAppImplTestable(mServiceContext);
+        mLauncherApps = null;
+        mLauncherAppsMap.clear();
+
+        // Send boot sequence events.
+        mService.onBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);
+
+        // Make sure a call to onSystemLocaleChangedNoLock() before PHASE_BOOT_COMPLETED will be
+        // ignored.
+        final long origSequenceNumber = mService.getLocaleChangeSequenceNumber();
+        mInternal.onSystemLocaleChangedNoLock();
+        assertEquals(origSequenceNumber, mService.getLocaleChangeSequenceNumber());
+
+        mService.onBootPhase(SystemService.PHASE_BOOT_COMPLETED);
+    }
+
+    protected void shutdownServices() {
+        if (mService != null) {
+            // Flush all the unsaved data from the previous instance.
+            mService.saveDirtyInfo();
+
+            // Make sure everything is consistent.
+            mService.verifyStates();
+        }
+        LocalServices.removeServiceForTest(ShortcutServiceInternal.class);
+
+        mService = null;
+        mManager = null;
+        mInternal = null;
+        mLauncherAppImpl = null;
+        mLauncherApps = null;
+        mLauncherAppsMap.clear();
+    }
+
+    protected void addPackage(String packageName, int uid, int version) {
+        addPackage(packageName, uid, version, packageName);
+    }
+
+    protected Signature[] genSignatures(String... signatures) {
+        final Signature[] sigs = new Signature[signatures.length];
+        for (int i = 0; i < signatures.length; i++){
+            sigs[i] = new Signature(signatures[i].getBytes());
+        }
+        return sigs;
+    }
+
+    protected PackageInfo genPackage(String packageName, int uid, int version, String... signatures) {
+        final PackageInfo pi = new PackageInfo();
+        pi.packageName = packageName;
+        pi.applicationInfo = new ApplicationInfo();
+        pi.applicationInfo.uid = uid;
+        pi.applicationInfo.flags = ApplicationInfo.FLAG_INSTALLED
+                | ApplicationInfo.FLAG_ALLOW_BACKUP;
+        pi.versionCode = version;
+        pi.applicationInfo.versionCode = version;
+        pi.signatures = genSignatures(signatures);
+
+        return pi;
+    }
+
+    protected void addPackage(String packageName, int uid, int version, String... signatures) {
+        mInjectedPackages.put(packageName, genPackage(packageName, uid, version, signatures));
+    }
+
+    protected void updatePackageInfo(String packageName, Consumer<PackageInfo> c) {
+        c.accept(mInjectedPackages.get(packageName));
+    }
+
+    protected void updatePackageVersion(String packageName, int increment) {
+        updatePackageInfo(packageName, pi -> {
+            pi.versionCode += increment;
+            pi.applicationInfo.versionCode += increment;
+        });
+    }
+
+    protected void updatePackageLastUpdateTime(String packageName, long increment) {
+        updatePackageInfo(packageName, pi -> {
+            pi.lastUpdateTime += increment;
+        });
+    }
+
+    protected void uninstallPackage(int userId, String packageName) {
+        if (ENABLE_DUMP) {
+            Log.v(TAG, "Unnstall package " + packageName + " / " + userId);
+        }
+        mUninstalledPackages.add(PackageWithUser.of(userId, packageName));
+    }
+
+    protected void installPackage(int userId, String packageName) {
+        if (ENABLE_DUMP) {
+            Log.v(TAG, "Install package " + packageName + " / " + userId);
+        }
+        mUninstalledPackages.remove(PackageWithUser.of(userId, packageName));
+    }
+
+    PackageInfo getInjectedPackageInfo(String packageName, @UserIdInt int userId,
+            boolean getSignatures) {
+        final PackageInfo pi = mInjectedPackages.get(packageName);
+        if (pi == null) return null;
+
+        final PackageInfo ret = new PackageInfo();
+        ret.packageName = pi.packageName;
+        ret.versionCode = pi.versionCode;
+        ret.lastUpdateTime = pi.lastUpdateTime;
+
+        ret.applicationInfo = new ApplicationInfo(pi.applicationInfo);
+        ret.applicationInfo.uid = UserHandle.getUid(userId, pi.applicationInfo.uid);
+        ret.applicationInfo.packageName = pi.packageName;
+
+        if (mUninstalledPackages.contains(PackageWithUser.of(userId, packageName))) {
+            ret.applicationInfo.flags &= ~ApplicationInfo.FLAG_INSTALLED;
+        }
+
+        if (getSignatures) {
+            ret.signatures = pi.signatures;
+        }
+
+        return ret;
+    }
+
+    protected void addApplicationInfo(PackageInfo pi, List<ApplicationInfo> list) {
+        if (pi != null && pi.applicationInfo != null) {
+            list.add(pi.applicationInfo);
+        }
+    }
+
+    protected List<ApplicationInfo> getInstalledApplications(int userId) {
+        final ArrayList<ApplicationInfo> ret = new ArrayList<>();
+
+        addApplicationInfo(getInjectedPackageInfo(CALLING_PACKAGE_1, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(CALLING_PACKAGE_2, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(CALLING_PACKAGE_3, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(CALLING_PACKAGE_4, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(LAUNCHER_1, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(LAUNCHER_2, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(LAUNCHER_3, userId, false), ret);
+        addApplicationInfo(getInjectedPackageInfo(LAUNCHER_4, userId, false), ret);
+
+        return ret;
+    }
+
+    private void addPackageInfo(PackageInfo pi, List<PackageInfo> list) {
+        if (pi != null) {
+            list.add(pi);
+        }
+    }
+
+    private List<PackageInfo> getInstalledPackagesWithUninstalled(int userId) {
+        final ArrayList<PackageInfo> ret = new ArrayList<>();
+
+        addPackageInfo(getInjectedPackageInfo(CALLING_PACKAGE_1, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(CALLING_PACKAGE_2, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(CALLING_PACKAGE_3, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(CALLING_PACKAGE_4, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(LAUNCHER_1, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(LAUNCHER_2, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(LAUNCHER_3, userId, false), ret);
+        addPackageInfo(getInjectedPackageInfo(LAUNCHER_4, userId, false), ret);
+
+        return ret;
+    }
+
+    protected void addManifestShortcutResource(ComponentName activity, int resId) {
+        final String packageName = activity.getPackageName();
+        LinkedHashMap<ComponentName, Integer> map = mActivityMetadataResId.get(packageName);
+        if (map == null) {
+            map = new LinkedHashMap<>();
+            mActivityMetadataResId.put(packageName, map);
+        }
+        map.put(activity, resId);
+    }
+
+    protected PackageInfo injectGetActivitiesWithMetadata(String packageName, @UserIdInt int userId) {
+        final PackageInfo ret = getInjectedPackageInfo(packageName, userId,
+                /* getSignatures=*/ false);
+
+        final HashMap<ComponentName, Integer> activities = mActivityMetadataResId.get(packageName);
+        if (activities != null) {
+            final ArrayList<ActivityInfo> list = new ArrayList<>();
+
+            for (ComponentName cn : activities.keySet()) {
+                ActivityInfo ai = new ActivityInfo();
+                ai.packageName = cn.getPackageName();
+                ai.name = cn.getClassName();
+                ai.metaData = new Bundle();
+                ai.metaData.putInt(ShortcutParser.METADATA_KEY, activities.get(cn));
+                ai.applicationInfo = ret.applicationInfo;
+                list.add(ai);
+            }
+            ret.activities = list.toArray(new ActivityInfo[list.size()]);
+        }
+        return ret;
+    }
+
+    protected XmlResourceParser injectXmlMetaData(ActivityInfo activityInfo, String key) {
+        if (!ShortcutParser.METADATA_KEY.equals(key) || activityInfo.metaData == null) {
+            return null;
+        }
+        final int resId = activityInfo.metaData.getInt(key);
+        return getTestContext().getResources().getXml(resId);
+    }
+
+    /** Replace the current calling package */
+    protected void setCaller(String packageName, int userId) {
+        mInjectedClientPackage = packageName;
+        mInjectedCallingUid =
+                Preconditions.checkNotNull(getInjectedPackageInfo(packageName, userId, false),
+                        "Unknown package").applicationInfo.uid;
+
+        // Set up LauncherApps for this caller.
+        final Pair<Integer, String> key = Pair.create(userId, packageName);
+        if (!mLauncherAppsMap.containsKey(key)) {
+            mLauncherAppsMap.put(key, new LauncherAppsTestable(mClientContext, mLauncherAppImpl));
+        }
+        mLauncherApps = mLauncherAppsMap.get(key);
+    }
+
+    protected void setCaller(String packageName) {
+        setCaller(packageName, UserHandle.USER_SYSTEM);
+    }
+
+    protected String getCallingPackage() {
+        return mInjectedClientPackage;
+    }
+
+    protected void setDefaultLauncherChecker(BiPredicate<String, Integer> p) {
+        mDefaultLauncherChecker = p;
+    }
+
+    protected void runWithCaller(String packageName, int userId, Runnable r) {
+        final String previousPackage = mInjectedClientPackage;
+        final int previousUserId = UserHandle.getUserId(mInjectedCallingUid);
+
+        setCaller(packageName, userId);
+
+        r.run();
+
+        setCaller(previousPackage, previousUserId);
+    }
+
+    protected void runWithSystemUid(Runnable r) {
+        final int origUid = mInjectedCallingUid;
+        mInjectedCallingUid = Process.SYSTEM_UID;
+        r.run();
+        mInjectedCallingUid = origUid;
+    }
+
+    protected void lookupAndFillInResourceNames(ShortcutInfo si) {
+        runWithSystemUid(() -> si.lookupAndFillInResourceNames(
+                mService.injectGetResourcesForApplicationAsUser(si.getPackage(), si.getUserId())));
+    }
+
+    protected int getCallingUserId() {
+        return UserHandle.getUserId(mInjectedCallingUid);
+    }
+
+    protected UserHandle getCallingUser() {
+        return UserHandle.of(getCallingUserId());
+    }
+
+    /** For debugging */
+    protected void dumpsysOnLogcat() {
+        dumpsysOnLogcat("");
+    }
+
+    protected void dumpsysOnLogcat(String message) {
+        dumpsysOnLogcat(message, false);
+    }
+
+    protected void dumpsysOnLogcat(String message, boolean force) {
+        if (force || !ENABLE_DUMP) return;
+
+        final ByteArrayOutputStream out = new ByteArrayOutputStream();
+        final PrintWriter pw = new PrintWriter(out);
+        mService.dumpInner(pw, null);
+        pw.close();
+
+        Log.v(TAG, "Dumping ShortcutService: " + message);
+        for (String line : out.toString().split("\n")) {
+            Log.v(TAG, line);
+        }
+    }
+
+    /**
+     * For debugging, dump arbitrary file on logcat.
+     */
+    protected void dumpFileOnLogcat(String path) {
+        dumpFileOnLogcat(path, "");
+    }
+
+    protected void dumpFileOnLogcat(String path, String message) {
+        if (!ENABLE_DUMP) return;
+
+        Log.v(TAG, "Dumping file: " + path + " " + message);
+        final StringBuilder sb = new StringBuilder();
+        try (BufferedReader br = new BufferedReader(new FileReader(path))) {
+            String line;
+            while ((line = br.readLine()) != null) {
+                Log.v(TAG, line);
+            }
+        } catch (Exception e) {
+            Log.e(TAG, "Couldn't read file", e);
+            fail("Exception " + e);
+        }
+    }
+
+    /**
+     * For debugging, dump the main state file on logcat.
+     */
+    protected void dumpBaseStateFile() {
+        mService.saveDirtyInfo();
+        dumpFileOnLogcat(mInjectedFilePathRoot.getAbsolutePath()
+                + "/system/" + ShortcutService.FILENAME_BASE_STATE);
+    }
+
+    /**
+     * For debugging, dump per-user state file on logcat.
+     */
+    protected void dumpUserFile(int userId) {
+        dumpUserFile(userId, "");
+    }
+
+    protected void dumpUserFile(int userId, String message) {
+        mService.saveDirtyInfo();
+        dumpFileOnLogcat(mInjectedFilePathRoot.getAbsolutePath()
+                + "/user-" + userId
+                + "/" + ShortcutService.FILENAME_USER_PACKAGES, message);
+    }
+
+    /**
+     * Make a shortcut with an ID.
+     */
+    protected ShortcutInfo makeShortcut(String id) {
+        return makeShortcut(
+                id, "Title-" + id, /* activity =*/ null, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+    }
+
+    protected ShortcutInfo makeShortcutWithTitle(String id, String title) {
+        return makeShortcut(
+                id, title, /* activity =*/ null, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+    }
+
+    /**
+     * Make a shortcut with an ID and timestamp.
+     */
+    protected ShortcutInfo makeShortcutWithTimestamp(String id, long timestamp) {
+        final ShortcutInfo s = makeShortcut(
+                id, "Title-" + id, /* activity =*/ null, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+        s.setTimestamp(timestamp);
+        return s;
+    }
+
+    /**
+     * Make a shortcut with an ID, a timestamp and an activity component
+     */
+    protected ShortcutInfo makeShortcutWithTimestampWithActivity(String id, long timestamp,
+            ComponentName activity) {
+        final ShortcutInfo s = makeShortcut(
+                id, "Title-" + id, activity, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+        s.setTimestamp(timestamp);
+        return s;
+    }
+
+    /**
+     * Make a shortcut with an ID and icon.
+     */
+    protected ShortcutInfo makeShortcutWithIcon(String id, Icon icon) {
+        return makeShortcut(
+                id, "Title-" + id, /* activity =*/ null, icon,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+    }
+
+    protected ShortcutInfo makePackageShortcut(String packageName, String id) {
+        String origCaller = getCallingPackage();
+
+        setCaller(packageName);
+        ShortcutInfo s = makeShortcut(
+                id, "Title-" + id, /* activity =*/ null, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+        setCaller(origCaller); // restore the caller
+
+        return s;
+    }
+
+    /**
+     * Make multiple shortcuts with IDs.
+     */
+    protected List<ShortcutInfo> makeShortcuts(String... ids) {
+        final ArrayList<ShortcutInfo> ret = new ArrayList();
+        for (String id : ids) {
+            ret.add(makeShortcut(id));
+        }
+        return ret;
+    }
+
+    protected ShortcutInfo.Builder makeShortcutBuilder() {
+        return new ShortcutInfo.Builder(mClientContext);
+    }
+
+    protected ShortcutInfo makeShortcutWithActivity(String id, ComponentName activity) {
+        return makeShortcut(
+                id, "Title-" + id, activity, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+    }
+
+    protected ShortcutInfo makeShortcutWithIntent(String id, Intent intent) {
+        return makeShortcut(
+                id, "Title-" + id, /* activity =*/ null, /* icon =*/ null,
+                intent, /* rank =*/ 0);
+    }
+
+    protected ShortcutInfo makeShortcutWithActivityAndTitle(String id, ComponentName activity,
+            String title) {
+        return makeShortcut(
+                id, title, activity, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), /* rank =*/ 0);
+    }
+
+    protected ShortcutInfo makeShortcutWithActivityAndRank(String id, ComponentName activity,
+            int rank) {
+        return makeShortcut(
+                id, "Title-" + id, activity, /* icon =*/ null,
+                makeIntent(Intent.ACTION_VIEW, ShortcutActivity.class), rank);
+    }
+
+    /**
+     * Make a shortcut with details.
+     */
+    protected ShortcutInfo makeShortcut(String id, String title, ComponentName activity,
+            Icon icon, Intent intent, int rank) {
+        final ShortcutInfo.Builder  b = new ShortcutInfo.Builder(mClientContext, id)
+                .setActivity(new ComponentName(mClientContext.getPackageName(), "dummy"))
+                .setShortLabel(title)
+                .setRank(rank)
+                .setIntent(intent);
+        if (icon != null) {
+            b.setIcon(icon);
+        }
+        if (activity != null) {
+            b.setActivity(activity);
+        }
+        final ShortcutInfo s = b.build();
+
+        s.setTimestamp(mInjectedCurrentTimeMillis); // HACK
+
+        return s;
+    }
+
+    /**
+     * Make a shortcut with details.
+     */
+    protected ShortcutInfo makeShortcutWithExtras(String id, Intent intent,
+            PersistableBundle extras) {
+        final ShortcutInfo.Builder  b = new ShortcutInfo.Builder(mClientContext, id)
+                .setActivity(new ComponentName(mClientContext.getPackageName(), "dummy"))
+                .setShortLabel("title-" + id)
+                .setExtras(extras)
+                .setIntent(intent);
+        final ShortcutInfo s = b.build();
+
+        s.setTimestamp(mInjectedCurrentTimeMillis); // HACK
+
+        return s;
+    }
+
+    /**
+     * Make an intent.
+     */
+    protected Intent makeIntent(String action, Class<?> clazz, Object... bundleKeysAndValues) {
+        final Intent intent = new Intent(action);
+        intent.setComponent(makeComponent(clazz));
+        intent.replaceExtras(makeBundle(bundleKeysAndValues));
+        return intent;
+    }
+
+    /**
+     * Make an component name, with the client context.
+     */
+    @NonNull
+    protected ComponentName makeComponent(Class<?> clazz) {
+        return new ComponentName(mClientContext, clazz);
+    }
+
+    @NonNull
+    protected ShortcutInfo findById(List<ShortcutInfo> list, String id) {
+        for (ShortcutInfo s : list) {
+            if (s.getId().equals(id)) {
+                return s;
+            }
+        }
+        fail("Shortcut with id " + id + " not found");
+        return null;
+    }
+
+    protected void assertSystem() {
+        assertEquals("Caller must be system", Process.SYSTEM_UID, mInjectedCallingUid);
+    }
+
+    protected void assertResetTimes(long expectedLastResetTime, long expectedNextResetTime) {
+        assertEquals(expectedLastResetTime, mService.getLastResetTimeLocked());
+        assertEquals(expectedNextResetTime, mService.getNextResetTimeLocked());
+    }
+
+    public static List<ShortcutInfo> assertAllNotHaveIcon(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertNull("ID " + s.getId(), s.getIcon());
+        }
+        return actualShortcuts;
+    }
+
+    @NonNull
+    protected List<ShortcutInfo> assertAllHaveFlags(@NonNull List<ShortcutInfo> actualShortcuts,
+            int shortcutFlags) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId() + " doesn't have flags " + shortcutFlags,
+                    s.hasFlags(shortcutFlags));
+        }
+        return actualShortcuts;
+    }
+
+    protected ShortcutInfo getPackageShortcut(String packageName, String shortcutId, int userId) {
+        return mService.getPackageShortcutForTest(packageName, shortcutId, userId);
+    }
+
+    protected void assertShortcutExists(String packageName, String shortcutId, int userId) {
+        assertTrue(getPackageShortcut(packageName, shortcutId, userId) != null);
+    }
+
+    protected void assertShortcutNotExists(String packageName, String shortcutId, int userId) {
+        assertTrue(getPackageShortcut(packageName, shortcutId, userId) == null);
+    }
+
+    protected Intent launchShortcutAndGetIntent(
+            @NonNull String packageName, @NonNull String shortcutId, int userId) {
+        reset(mServiceContext);
+        mLauncherApps.startShortcut(packageName, shortcutId, null, null,
+                UserHandle.of(userId));
+
+        final ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
+        verify(mServiceContext).startActivityAsUser(
+                intentCaptor.capture(),
+                any(Bundle.class),
+                eq(UserHandle.of(userId)));
+        return intentCaptor.getValue();
+    }
+
+    protected Intent launchShortcutAndGetIntent_withShortcutInfo(
+            @NonNull String packageName, @NonNull String shortcutId, int userId) {
+        reset(mServiceContext);
+
+        mLauncherApps.startShortcut(
+                getShortcutInfoAsLauncher(packageName, shortcutId, userId), null, null);
+
+        final ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
+        verify(mServiceContext).startActivityAsUser(
+                intentCaptor.capture(),
+                any(Bundle.class),
+                eq(UserHandle.of(userId)));
+        return intentCaptor.getValue();
+    }
+
+    protected void assertShortcutLaunchable(@NonNull String packageName, @NonNull String shortcutId,
+            int userId) {
+        assertNotNull(launchShortcutAndGetIntent(packageName, shortcutId, userId));
+        assertNotNull(launchShortcutAndGetIntent_withShortcutInfo(packageName, shortcutId, userId));
+    }
+
+    protected void assertShortcutNotLaunchable(@NonNull String packageName,
+            @NonNull String shortcutId, int userId) {
+        reset(mServiceContext);
+        try {
+            mLauncherApps.startShortcut(packageName, shortcutId, null, null,
+                    UserHandle.of(userId));
+        } catch (SecurityException expected) {
+            // security exception is okay.
+            return;
+        }
+        // This shouldn't have been called.
+        verify(mServiceContext, times(0)).startActivityAsUser(
+                any(Intent.class),
+                any(Bundle.class),
+                any(UserHandle.class));
+    }
+
+    protected void assertBitmapDirectories(int userId, String... expectedDirectories) {
+        final Set<String> expected = hashSet(set(expectedDirectories));
+
+        final Set<String> actual = new HashSet<>();
+
+        final File[] files = mService.getUserBitmapFilePath(userId).listFiles();
+        if (files != null) {
+            for (File child : files) {
+                if (child.isDirectory()) {
+                    actual.add(child.getName());
+                }
+            }
+        }
+
+        assertEquals(expected, actual);
+    }
+
+    protected void assertBitmapFiles(int userId, String packageName, String... expectedFiles) {
+        final Set<String> expected = hashSet(set(expectedFiles));
+
+        final Set<String> actual = new HashSet<>();
+
+        final File[] files = new File(mService.getUserBitmapFilePath(userId), packageName)
+                .listFiles();
+        if (files != null) {
+            for (File child : files) {
+                if (child.isFile()) {
+                    actual.add(child.getName());
+                }
+            }
+        }
+
+        assertEquals(expected, actual);
+    }
+
+    protected String getBitmapFilename(int userId, String packageName, String shortcutId) {
+        final ShortcutInfo si = mService.getPackageShortcutForTest(packageName, shortcutId, userId);
+        if (si == null) {
+            return null;
+        }
+        return new File(si.getBitmapPath()).getName();
+    }
+
+    protected List<ShortcutInfo> getCallerShortcuts() {
+        final ShortcutPackage p = mService.getPackageShortcutForTest(
+                getCallingPackage(), getCallingUserId());
+        return p == null ? null : p.getAllShortcutsForTest();
+    }
+
+    protected ShortcutInfo getCallerShortcut(String shortcutId) {
+        return getPackageShortcut(getCallingPackage(), shortcutId, getCallingUserId());
+    }
+
+    protected List<ShortcutInfo> getLauncherShortcuts(String launcher, int userId, int queryFlags) {
+        final List<ShortcutInfo>[] ret = new List[1];
+        runWithCaller(launcher, userId, () -> {
+            final ShortcutQuery q = new ShortcutQuery();
+            q.setQueryFlags(queryFlags);
+            ret[0] = mLauncherApps.getShortcuts(q, UserHandle.of(userId));
+        });
+        return ret[0];
+    }
+
+    protected List<ShortcutInfo> getLauncherPinnedShortcuts(String launcher, int userId) {
+        return getLauncherShortcuts(launcher, userId, ShortcutQuery.FLAG_GET_PINNED);
+    }
+
+    protected ShortcutInfo getShortcutInfoAsLauncher(String packageName, String shortcutId,
+            int userId) {
+        final List<ShortcutInfo> infoList =
+                mLauncherApps.getShortcutInfo(packageName, list(shortcutId),
+                        UserHandle.of(userId));
+        assertEquals("No shortcutInfo found (or too many of them)", 1, infoList.size());
+        return infoList.get(0);
+    }
+
+    protected Intent genPackageAddIntent(String packageName, int userId) {
+        installPackage(userId, packageName);
+
+        Intent i = new Intent(Intent.ACTION_PACKAGE_ADDED);
+        i.setData(Uri.parse("package:" + packageName));
+        i.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+        return i;
+    }
+
+    protected Intent genPackageDeleteIntent(String pakcageName, int userId) {
+        uninstallPackage(userId, pakcageName);
+
+        Intent i = new Intent(Intent.ACTION_PACKAGE_REMOVED);
+        i.setData(Uri.parse("package:" + pakcageName));
+        i.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+        return i;
+    }
+
+    protected Intent genPackageUpdateIntent(String pakcageName, int userId) {
+        installPackage(userId, pakcageName);
+
+        Intent i = new Intent(Intent.ACTION_PACKAGE_ADDED);
+        i.setData(Uri.parse("package:" + pakcageName));
+        i.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+        i.putExtra(Intent.EXTRA_REPLACING, true);
+        return i;
+    }
+
+    protected Intent genPackageChangedIntent(String pakcageName, int userId) {
+        Intent i = new Intent(Intent.ACTION_PACKAGE_CHANGED);
+        i.setData(Uri.parse("package:" + pakcageName));
+        i.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+        return i;
+    }
+
+    protected Intent genPackageDataClear(String packageName, int userId) {
+        Intent i = new Intent(Intent.ACTION_PACKAGE_DATA_CLEARED);
+        i.setData(Uri.parse("package:" + packageName));
+        i.putExtra(Intent.EXTRA_USER_HANDLE, userId);
+        return i;
+    }
+
+    protected void assertExistsAndShadow(ShortcutPackageItem spi) {
+        assertNotNull(spi);
+        assertTrue(spi.getPackageInfo().isShadow());
+    }
+
+    protected File makeFile(File baseDirectory, String... paths) {
+        File ret = baseDirectory;
+
+        for (String path : paths) {
+            ret = new File(ret, path);
+        }
+
+        return ret;
+    }
+
+    protected boolean bitmapDirectoryExists(String packageName, int userId) {
+        final File path = new File(mService.getUserBitmapFilePath(userId), packageName);
+        return path.isDirectory();
+    }
+    protected static ShortcutQuery buildQuery(long changedSince,
+            String packageName, ComponentName componentName,
+            /* @ShortcutQuery.QueryFlags */ int flags) {
+        return buildQuery(changedSince, packageName, null, componentName, flags);
+    }
+
+    protected static ShortcutQuery buildQuery(long changedSince,
+            String packageName, List<String> shortcutIds, ComponentName componentName,
+            /* @ShortcutQuery.QueryFlags */ int flags) {
+        final ShortcutQuery q = new ShortcutQuery();
+        q.setChangedSince(changedSince);
+        q.setPackage(packageName);
+        q.setShortcutIds(shortcutIds);
+        q.setActivity(componentName);
+        q.setQueryFlags(flags);
+        return q;
+    }
+
+    protected static ShortcutQuery buildAllQuery(String packageName) {
+        final ShortcutQuery q = new ShortcutQuery();
+        q.setPackage(packageName);
+        q.setQueryFlags(ShortcutQuery.FLAG_GET_ALL_KINDS);
+        return q;
+    }
+
+    protected static ShortcutQuery buildPinnedQuery(String packageName) {
+        final ShortcutQuery q = new ShortcutQuery();
+        q.setPackage(packageName);
+        q.setQueryFlags(ShortcutQuery.FLAG_GET_PINNED);
+        return q;
+    }
+
+    protected static ShortcutQuery buildQueryWithFlags(int queryFlags) {
+        final ShortcutQuery q = new ShortcutQuery();
+        q.setQueryFlags(queryFlags);
+        return q;
+    }
+
+    protected void backupAndRestore() {
+        int prevUid = mInjectedCallingUid;
+
+        mInjectedCallingUid = Process.SYSTEM_UID; // Only system can call it.
+
+        dumpsysOnLogcat("Before backup");
+
+        final byte[] payload =  mService.getBackupPayload(USER_0);
+        if (ENABLE_DUMP) {
+            final String xml = new String(payload);
+            Log.v(TAG, "Backup payload:");
+            for (String line : xml.split("\n")) {
+                Log.v(TAG, line);
+            }
+        }
+
+        // Before doing anything else, uninstall all packages.
+        for (int userId : list(USER_0, USER_P0)) {
+            for (String pkg : list(CALLING_PACKAGE_1, CALLING_PACKAGE_2, CALLING_PACKAGE_3,
+                    LAUNCHER_1, LAUNCHER_2, LAUNCHER_3)) {
+                uninstallPackage(userId, pkg);
+            }
+        }
+
+        shutdownServices();
+
+        deleteAllSavedFiles();
+
+        initService();
+        mService.applyRestore(payload, USER_0);
+
+        // handleUnlockUser will perform the gone package check, but it shouldn't remove
+        // shadow information.
+        mService.handleUnlockUser(USER_0);
+
+        dumpsysOnLogcat("After restore");
+
+        mInjectedCallingUid = prevUid;
+    }
+
+    protected void prepareCrossProfileDataSet() {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"),
+                    makeShortcut("s4"), makeShortcut("s5"), makeShortcut("s6"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"),
+                    makeShortcut("s4"), makeShortcut("s5"), makeShortcut("s6"))));
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"),
+                    makeShortcut("s4"), makeShortcut("s5"), makeShortcut("s6"))));
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list()));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"),
+                    makeShortcut("s4"), makeShortcut("s5"), makeShortcut("s6"))));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("x1"), makeShortcut("x2"), makeShortcut("x3"),
+                    makeShortcut("x4"), makeShortcut("x5"), makeShortcut("x6"))));
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s1"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s1", "s2"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list("s1", "s2", "s3"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s1", "s4"), HANDLE_USER_P0);
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s2"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s2", "s3"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list("s2", "s3", "s4"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s2", "s5"), HANDLE_USER_P0);
+        });
+        runWithCaller(LAUNCHER_3, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s3"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s3", "s4"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list("s3", "s4", "s5"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s3", "s6"), HANDLE_USER_P0);
+        });
+        runWithCaller(LAUNCHER_4, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list(), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list(), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list(), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_4, list(), HANDLE_USER_0);
+        });
+
+        // Launcher on a managed profile is referring ot user 0!
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s3", "s4"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s3", "s4", "s5"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list("s3", "s4", "s5", "s6"),
+                    HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s4", "s1"), HANDLE_USER_P0);
+        });
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("x4", "x5"), HANDLE_USER_10);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("x4", "x5", "x6"), HANDLE_USER_10);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list("x4", "x5", "x6", "x1"),
+                    HANDLE_USER_10);
+        });
+
+        // Then remove some dynamic shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list()));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("x1"), makeShortcut("x2"), makeShortcut("x3"))));
+        });
+    }
+
+    public static List<ShortcutInfo> assertAllHaveIconResId(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId() + " not have icon res ID", s.hasIconResource());
+            assertFalse("ID " + s.getId() + " shouldn't have icon FD", s.hasIconFile());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllHaveIconFile(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertFalse("ID " + s.getId() + " shouldn't have icon res ID", s.hasIconResource());
+            assertTrue("ID " + s.getId() + " not have icon FD", s.hasIconFile());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllHaveIcon(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId() + " has no icon ", s.hasIconFile() || s.hasIconResource());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllStringsResolved(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.hasStringResourcesResolved());
+        }
+        return actualShortcuts;
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
new file mode 100644
index 0000000..c7be3d9
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
@@ -0,0 +1,6677 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllDisabled;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllDynamic;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllDynamicOrPinned;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllEnabled;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllHaveIntents;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllHaveTitle;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllImmutable;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllKeyFieldsOnly;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllManifest;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotHaveIntents;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotHaveTitle;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotKeyFieldsOnly;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotManifest;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllPinned;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllUnique;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertBitmapSize;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertBundleEmpty;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCallbackNotReceived;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCallbackReceived;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCannotUpdateImmutable;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertDynamicAndPinned;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertDynamicOnly;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertDynamicShortcutCountExceeded;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertEmpty;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertExpectException;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertForLauncherCallback;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertShortcutIds;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.filterByActivity;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.findShortcut;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.hashSet;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makeBundle;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.pfdToBitmap;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.resetAll;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.waitOnMainThread;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.Manifest.permission;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.LauncherApps;
+import android.content.pm.LauncherApps.ShortcutQuery;
+import android.content.pm.ShortcutInfo;
+import android.graphics.Bitmap;
+import android.graphics.Bitmap.CompressFormat;
+import android.graphics.BitmapFactory;
+import android.graphics.drawable.Icon;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.UserHandle;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.frameworks.servicestests.R;
+import com.android.server.pm.ShortcutService.ConfigConstants;
+import com.android.server.pm.ShortcutService.FileOutputStreamWithPath;
+import com.android.server.pm.ShortcutUser.PackageWithUser;
+
+import org.mockito.ArgumentCaptor;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Tests for ShortcutService and ShortcutManager.
+ *
+ m FrameworksServicesTests &&
+ adb install \
+ -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
+ adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 \
+ -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+
+
+ * TODO More tests for pinning + manifest shortcuts
+ * TODO Manifest shortcuts + app upgrade -> launcher callback.
+ *      Also locale change should trigger launcehr callbacks too, when they use strign resoucres.
+ *      (not implemented yet.)
+ * TODO: Add checks with assertAllNotHaveIcon()
+ * TODO: Detailed test for hasShortcutPermissionInner().
+ * TODO: Add tests for the command line functions too.
+ */
+@SmallTest
+public class ShortcutManagerTest1 extends BaseShortcutManagerTest {
+
+    /**
+     * Test for the first launch path, no settings file available.
+     */
+    public void testFirstInitialize() {
+        assertResetTimes(START_TIME, START_TIME + INTERVAL);
+    }
+
+    /**
+     * Test for {@link ShortcutService#getLastResetTimeLocked()} and
+     * {@link ShortcutService#getNextResetTimeLocked()}.
+     */
+    public void testUpdateAndGetNextResetTimeLocked() {
+        assertResetTimes(START_TIME, START_TIME + INTERVAL);
+
+        // Advance clock.
+        mInjectedCurrentTimeMillis += 100;
+
+        // Shouldn't have changed.
+        assertResetTimes(START_TIME, START_TIME + INTERVAL);
+
+        // Advance clock, almost the reset time.
+        mInjectedCurrentTimeMillis = START_TIME + INTERVAL - 1;
+
+        // Shouldn't have changed.
+        assertResetTimes(START_TIME, START_TIME + INTERVAL);
+
+        // Advance clock.
+        mInjectedCurrentTimeMillis += 1;
+
+        assertResetTimes(START_TIME + INTERVAL, START_TIME + 2 * INTERVAL);
+
+        // Advance further; 4 hours since start.
+        mInjectedCurrentTimeMillis = START_TIME + 4 * INTERVAL + 50;
+
+        assertResetTimes(START_TIME + 4 * INTERVAL, START_TIME + 5 * INTERVAL);
+    }
+
+    /**
+     * Test for the restoration from saved file.
+     */
+    public void testInitializeFromSavedFile() {
+
+        mInjectedCurrentTimeMillis = START_TIME + 4 * INTERVAL + 50;
+        assertResetTimes(START_TIME + 4 * INTERVAL, START_TIME + 5 * INTERVAL);
+
+        mService.saveBaseStateLocked();
+
+        dumpBaseStateFile();
+
+        mService.saveDirtyInfo();
+
+        // Restore.
+        initService();
+
+        assertResetTimes(START_TIME + 4 * INTERVAL, START_TIME + 5 * INTERVAL);
+    }
+
+    /**
+     * Test for the restoration from restored file.
+     */
+    public void testLoadFromBrokenFile() {
+        // TODO Add various broken cases.
+    }
+
+    public void testLoadConfig() {
+        mService.updateConfigurationLocked(
+                ConfigConstants.KEY_RESET_INTERVAL_SEC + "=123,"
+                        + ConfigConstants.KEY_MAX_SHORTCUTS + "=4,"
+                        + ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "=5,"
+                        + ConfigConstants.KEY_MAX_ICON_DIMENSION_DP + "=100,"
+                        + ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM + "=50,"
+                        + ConfigConstants.KEY_ICON_FORMAT + "=WEBP,"
+                        + ConfigConstants.KEY_ICON_QUALITY + "=75");
+        assertEquals(123000, mService.getResetIntervalForTest());
+        assertEquals(4, mService.getMaxShortcutsForTest());
+        assertEquals(5, mService.getMaxUpdatesPerIntervalForTest());
+        assertEquals(100, mService.getMaxIconDimensionForTest());
+        assertEquals(CompressFormat.WEBP, mService.getIconPersistFormatForTest());
+        assertEquals(75, mService.getIconPersistQualityForTest());
+
+        mInjectedIsLowRamDevice = true;
+        mService.updateConfigurationLocked(
+                ConfigConstants.KEY_MAX_ICON_DIMENSION_DP + "=100,"
+                        + ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM + "=50,"
+                        + ConfigConstants.KEY_ICON_FORMAT + "=JPEG");
+        assertEquals(ShortcutService.DEFAULT_RESET_INTERVAL_SEC * 1000,
+                mService.getResetIntervalForTest());
+
+        assertEquals(ShortcutService.DEFAULT_MAX_SHORTCUTS_PER_APP,
+                mService.getMaxShortcutsForTest());
+
+        assertEquals(ShortcutService.DEFAULT_MAX_UPDATES_PER_INTERVAL,
+                mService.getMaxUpdatesPerIntervalForTest());
+
+        assertEquals(50, mService.getMaxIconDimensionForTest());
+
+        assertEquals(CompressFormat.JPEG, mService.getIconPersistFormatForTest());
+
+        assertEquals(ShortcutService.DEFAULT_ICON_PERSIST_QUALITY,
+                mService.getIconPersistQualityForTest());
+    }
+
+    // === Test for app side APIs ===
+
+    /** Test for {@link android.content.pm.ShortcutManager#getMaxShortcutCountForActivity()} */
+    public void testGetMaxDynamicShortcutCount() {
+        assertEquals(MAX_SHORTCUTS, mManager.getMaxShortcutCountForActivity());
+    }
+
+    /** Test for {@link android.content.pm.ShortcutManager#getRemainingCallCount()} */
+    public void testGetRemainingCallCount() {
+        assertEquals(MAX_UPDATES_PER_INTERVAL, mManager.getRemainingCallCount());
+    }
+
+    public void testGetIconMaxDimensions() {
+        assertEquals(MAX_ICON_DIMENSION, mManager.getIconMaxWidth());
+        assertEquals(MAX_ICON_DIMENSION, mManager.getIconMaxHeight());
+    }
+
+    /** Test for {@link android.content.pm.ShortcutManager#getRateLimitResetTime()} */
+    public void testGetRateLimitResetTime() {
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis = START_TIME + 4 * INTERVAL + 50;
+
+        assertEquals(START_TIME + 5 * INTERVAL, mManager.getRateLimitResetTime());
+    }
+
+    public void testSetDynamicShortcuts() {
+        setCaller(CALLING_PACKAGE_1, USER_0);
+
+        final Icon icon1 = Icon.createWithResource(getTestContext(), R.drawable.icon1);
+        final Icon icon2 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.icon2));
+
+        final ShortcutInfo si1 = makeShortcut(
+                "shortcut1",
+                "Title 1",
+                makeComponent(ShortcutActivity.class),
+                icon1,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity2.class,
+                        "key1", "val1", "nest", makeBundle("key", 123)),
+                /* weight */ 10);
+
+        final ShortcutInfo si2 = makeShortcut(
+                "shortcut2",
+                "Title 2",
+                /* activity */ null,
+                icon2,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                /* weight */ 12);
+        final ShortcutInfo si3 = makeShortcut("shortcut3");
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1, si2)));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1", "shortcut2");
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        // TODO: Check fields
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1");
+        assertEquals(1, mManager.getRemainingCallCount());
+
+        assertTrue(mManager.setDynamicShortcuts(list()));
+        assertEquals(0, mManager.getDynamicShortcuts().size());
+        assertEquals(0, mManager.getRemainingCallCount());
+
+        dumpsysOnLogcat();
+
+        mInjectedCurrentTimeMillis++; // Need to advance the clock for reset to work.
+        mService.resetThrottlingInner(UserHandle.USER_SYSTEM);
+
+        dumpsysOnLogcat();
+
+        assertTrue(mManager.setDynamicShortcuts(list(si2, si3)));
+        assertEquals(2, mManager.getDynamicShortcuts().size());
+
+        // TODO Check max number
+
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(makeShortcut("s1"))));
+        });
+    }
+
+    public void testAddDynamicShortcuts() {
+        setCaller(CALLING_PACKAGE_1, USER_0);
+
+        final ShortcutInfo si1 = makeShortcut("shortcut1");
+        final ShortcutInfo si2 = makeShortcut("shortcut2");
+        final ShortcutInfo si3 = makeShortcut("shortcut3");
+
+        assertEquals(3, mManager.getRemainingCallCount());
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1");
+
+        assertTrue(mManager.addDynamicShortcuts(list(si2, si3)));
+        assertEquals(1, mManager.getRemainingCallCount());
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1", "shortcut2", "shortcut3");
+
+        // This should not crash.  It'll still consume the quota.
+        assertTrue(mManager.addDynamicShortcuts(list()));
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1", "shortcut2", "shortcut3");
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset
+
+        // Add with the same ID
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("shortcut1"))));
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1", "shortcut2", "shortcut3");
+
+        // TODO Check max number
+
+        // TODO Check fields.
+
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
+        });
+    }
+
+    public void testPublishWithNoActivity() {
+        // If activity is not explicitly set, use the default one.
+
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            // s1 and s3 has no activities.
+            final ShortcutInfo si1 = new ShortcutInfo.Builder(mClientContext, "si1")
+                    .setShortLabel("label1")
+                    .setIntent(new Intent("action1"))
+                    .build();
+            final ShortcutInfo si2 = new ShortcutInfo.Builder(mClientContext, "si2")
+                    .setShortLabel("label2")
+                    .setActivity(new ComponentName(getCallingPackage(), "abc"))
+                    .setIntent(new Intent("action2"))
+                    .build();
+            final ShortcutInfo si3 = new ShortcutInfo.Builder(mClientContext, "si3")
+                    .setShortLabel("label3")
+                    .setIntent(new Intent("action3"))
+                    .build();
+
+            // Set test 1
+            assertTrue(mManager.setDynamicShortcuts(list(si1)));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("si1")
+                    .forShortcutWithId("si1", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    });
+
+            // Set test 2
+            assertTrue(mManager.setDynamicShortcuts(list(si2, si1)));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("si1", "si2")
+                    .forShortcutWithId("si1", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    })
+                    .forShortcutWithId("si2", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                "abc"), si.getActivity());
+                    });
+
+
+            // Set test 3
+            assertTrue(mManager.setDynamicShortcuts(list(si3, si1)));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("si1", "si3")
+                    .forShortcutWithId("si1", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    })
+                    .forShortcutWithId("si3", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    });
+
+            mInjectedCurrentTimeMillis += INTERVAL; // reset throttling
+
+            // Add test 1
+            mManager.removeAllDynamicShortcuts();
+            assertTrue(mManager.addDynamicShortcuts(list(si1)));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("si1")
+                    .forShortcutWithId("si1", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    });
+
+            // Add test 2
+            mManager.removeAllDynamicShortcuts();
+            assertTrue(mManager.addDynamicShortcuts(list(si2, si1)));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("si1", "si2")
+                    .forShortcutWithId("si1", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    })
+                    .forShortcutWithId("si2", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                "abc"), si.getActivity());
+                    });
+
+
+            // Add test 3
+            mManager.removeAllDynamicShortcuts();
+            assertTrue(mManager.addDynamicShortcuts(list(si3, si1)));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("si1", "si3")
+                    .forShortcutWithId("si1", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    })
+                    .forShortcutWithId("si3", si -> {
+                        assertEquals(new ComponentName(getCallingPackage(),
+                                MAIN_ACTIVITY_CLASS), si.getActivity());
+                    });
+        });
+    }
+
+    public void testPublishWithNoActivity_noMainActivityInPackage() {
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            final ShortcutInfo si1 = new ShortcutInfo.Builder(mClientContext, "si1")
+                    .setShortLabel("label1")
+                    .setIntent(new Intent("action1"))
+                    .build();
+
+            // Returning null means there's no main activity in this package.
+            mMainActivityFetcher = (packageName, userId) -> null;
+
+            assertExpectException(
+                    RuntimeException.class, "Launcher activity not found for", () -> {
+                        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+                    });
+        });
+    }
+
+    public void testDeleteDynamicShortcuts() {
+        final ShortcutInfo si1 = makeShortcut("shortcut1");
+        final ShortcutInfo si2 = makeShortcut("shortcut2");
+        final ShortcutInfo si3 = makeShortcut("shortcut3");
+        final ShortcutInfo si4 = makeShortcut("shortcut4");
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3, si4)));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1", "shortcut2", "shortcut3", "shortcut4");
+
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        mManager.removeDynamicShortcuts(list("shortcut1"));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut2", "shortcut3", "shortcut4");
+
+        mManager.removeDynamicShortcuts(list("shortcut1"));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut2", "shortcut3", "shortcut4");
+
+        mManager.removeDynamicShortcuts(list("shortcutXXX"));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut2", "shortcut3", "shortcut4");
+
+        mManager.removeDynamicShortcuts(list("shortcut2", "shortcut4"));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut3");
+
+        mManager.removeDynamicShortcuts(list("shortcut3"));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()));
+
+        // Still 2 calls left.
+        assertEquals(2, mManager.getRemainingCallCount());
+    }
+
+    public void testDeleteAllDynamicShortcuts() {
+        final ShortcutInfo si1 = makeShortcut("shortcut1");
+        final ShortcutInfo si2 = makeShortcut("shortcut2");
+        final ShortcutInfo si3 = makeShortcut("shortcut3");
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3)));
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mManager.getDynamicShortcuts()),
+                "shortcut1", "shortcut2", "shortcut3");
+
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        mManager.removeAllDynamicShortcuts();
+        assertEquals(0, mManager.getDynamicShortcuts().size());
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        // Note delete shouldn't affect throttling, so...
+        assertEquals(0, mManager.getDynamicShortcuts().size());
+        assertEquals(0, mManager.getDynamicShortcuts().size());
+        assertEquals(0, mManager.getDynamicShortcuts().size());
+
+        // This should still work.
+        assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3)));
+        assertEquals(3, mManager.getDynamicShortcuts().size());
+
+        // Still 1 call left
+        assertEquals(1, mManager.getRemainingCallCount());
+    }
+
+    public void testIcons() throws IOException {
+        final Icon res32x32 = Icon.createWithResource(getTestContext(), R.drawable.black_32x32);
+        final Icon res64x64 = Icon.createWithResource(getTestContext(), R.drawable.black_64x64);
+        final Icon res512x512 = Icon.createWithResource(getTestContext(), R.drawable.black_512x512);
+
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+        final Icon bmp64x64 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_64x64));
+        final Icon bmp512x512 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_512x512));
+
+        // Set from package 1
+        setCaller(CALLING_PACKAGE_1);
+        assertTrue(mManager.setDynamicShortcuts(list(
+                makeShortcutWithIcon("res32x32", res32x32),
+                makeShortcutWithIcon("res64x64", res64x64),
+                makeShortcutWithIcon("bmp32x32", bmp32x32),
+                makeShortcutWithIcon("bmp64x64", bmp64x64),
+                makeShortcutWithIcon("bmp512x512", bmp512x512),
+                makeShortcut("none")
+        )));
+
+        // getDynamicShortcuts() shouldn't return icons, thus assertAllNotHaveIcon().
+        assertShortcutIds(assertAllNotHaveIcon(mManager.getDynamicShortcuts()),
+                "res32x32",
+                "res64x64",
+                "bmp32x32",
+                "bmp64x64",
+                "bmp512x512",
+                "none");
+
+        // Call from another caller with the same ID, just to make sure storage is per-package.
+        setCaller(CALLING_PACKAGE_2);
+        assertTrue(mManager.setDynamicShortcuts(list(
+                makeShortcutWithIcon("res32x32", res512x512),
+                makeShortcutWithIcon("res64x64", res512x512),
+                makeShortcutWithIcon("none", res512x512)
+        )));
+        assertShortcutIds(assertAllNotHaveIcon(mManager.getDynamicShortcuts()),
+                "res32x32",
+                "res64x64",
+                "none");
+
+        // Different profile.  Note the names and the contents don't match.
+        setCaller(CALLING_PACKAGE_1, USER_P0);
+        assertTrue(mManager.setDynamicShortcuts(list(
+                makeShortcutWithIcon("res32x32", res512x512),
+                makeShortcutWithIcon("bmp32x32", bmp512x512)
+        )));
+        assertShortcutIds(assertAllNotHaveIcon(mManager.getDynamicShortcuts()),
+                "res32x32",
+                "bmp32x32");
+
+        // Re-initialize and load from the files.
+        mService.saveDirtyInfo();
+        initService();
+
+        // Load from launcher.
+        Bitmap bmp;
+
+        setCaller(LAUNCHER_1);
+        // Check hasIconResource()/hasIconFile().
+        assertShortcutIds(assertAllHaveIconResId(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "res32x32", USER_0))),
+                "res32x32");
+
+        assertShortcutIds(assertAllHaveIconResId(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "res64x64", USER_0))),
+                "res64x64");
+
+        assertShortcutIds(assertAllHaveIconFile(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp32x32", USER_0))),
+                "bmp32x32");
+
+        assertShortcutIds(assertAllHaveIconFile(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp64x64", USER_0))),
+                "bmp64x64");
+
+        assertShortcutIds(assertAllHaveIconFile(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp512x512", USER_0))),
+                "bmp512x512");
+
+        assertShortcutIds(assertAllHaveIconResId(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "res32x32", USER_P0))),
+                "res32x32");
+        assertShortcutIds(assertAllHaveIconFile(
+                list(getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp32x32", USER_P0))),
+                "bmp32x32");
+
+        // Check
+        assertEquals(
+                R.drawable.black_32x32,
+                mLauncherApps.getShortcutIconResId(
+                        getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "res32x32", USER_0)));
+
+        assertEquals(
+                R.drawable.black_64x64,
+                mLauncherApps.getShortcutIconResId(
+                        getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "res64x64", USER_0)));
+
+        assertEquals(
+                0, // because it's not a resource
+                mLauncherApps.getShortcutIconResId(
+                        getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp32x32", USER_0)));
+        assertEquals(
+                0, // because it's not a resource
+                mLauncherApps.getShortcutIconResId(
+                        getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp64x64", USER_0)));
+        assertEquals(
+                0, // because it's not a resource
+                mLauncherApps.getShortcutIconResId(
+                        getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp512x512", USER_0)));
+
+        bmp = pfdToBitmap(mLauncherApps.getShortcutIconFd(
+                getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp32x32", USER_0)));
+        assertBitmapSize(32, 32, bmp);
+
+        bmp = pfdToBitmap(mLauncherApps.getShortcutIconFd(
+                getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp64x64", USER_0)));
+        assertBitmapSize(64, 64, bmp);
+
+        bmp = pfdToBitmap(mLauncherApps.getShortcutIconFd(
+                getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp512x512", USER_0)));
+        assertBitmapSize(128, 128, bmp);
+
+        assertEquals(
+                R.drawable.black_512x512,
+                mLauncherApps.getShortcutIconResId(
+                        getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "res32x32", USER_P0)));
+        // Should be 512x512, so shrunk.
+        bmp = pfdToBitmap(mLauncherApps.getShortcutIconFd(
+                getShortcutInfoAsLauncher(CALLING_PACKAGE_1, "bmp32x32", USER_P0)));
+        assertBitmapSize(128, 128, bmp);
+
+        // Also check the overload APIs too.
+        assertEquals(
+                R.drawable.black_32x32,
+                mLauncherApps.getShortcutIconResId(CALLING_PACKAGE_1, "res32x32", HANDLE_USER_0));
+        assertEquals(
+                R.drawable.black_64x64,
+                mLauncherApps.getShortcutIconResId(CALLING_PACKAGE_1, "res64x64", HANDLE_USER_0));
+        assertEquals(
+                R.drawable.black_512x512,
+                mLauncherApps.getShortcutIconResId(CALLING_PACKAGE_1, "res32x32", HANDLE_USER_P0));
+        bmp = pfdToBitmap(
+                mLauncherApps.getShortcutIconFd(CALLING_PACKAGE_1, "bmp32x32", HANDLE_USER_P0));
+        assertBitmapSize(128, 128, bmp);
+    }
+
+    public void testCleanupDanglingBitmaps() throws Exception {
+        assertBitmapDirectories(USER_0, EMPTY_STRINGS);
+        assertBitmapDirectories(USER_10, EMPTY_STRINGS);
+
+        // Make some shortcuts with bitmap icons.
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("s1", bmp32x32),
+                    makeShortcutWithIcon("s2", bmp32x32),
+                    makeShortcutWithIcon("s3", bmp32x32)
+            ));
+        });
+
+        // Increment the time (which actually we don't have to), which is used for filenames.
+        mInjectedCurrentTimeMillis++;
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("s4", bmp32x32),
+                    makeShortcutWithIcon("s5", bmp32x32),
+                    makeShortcutWithIcon("s6", bmp32x32)
+            ));
+        });
+
+        // Increment the time, which is used for filenames.
+        mInjectedCurrentTimeMillis++;
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            mManager.setDynamicShortcuts(list(
+            ));
+        });
+
+        // For USER-10, let's try without updating the times.
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("10s1", bmp32x32),
+                    makeShortcutWithIcon("10s2", bmp32x32),
+                    makeShortcutWithIcon("10s3", bmp32x32)
+            ));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("10s4", bmp32x32),
+                    makeShortcutWithIcon("10s5", bmp32x32),
+                    makeShortcutWithIcon("10s6", bmp32x32)
+            ));
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_10, () -> {
+            mManager.setDynamicShortcuts(list(
+            ));
+        });
+
+        dumpsysOnLogcat();
+
+        // Check files and directories.
+        // Package 3 has no bitmaps, so we don't create a directory.
+        assertBitmapDirectories(USER_0, CALLING_PACKAGE_1, CALLING_PACKAGE_2);
+        assertBitmapDirectories(USER_10, CALLING_PACKAGE_1, CALLING_PACKAGE_2);
+
+        assertBitmapFiles(USER_0, CALLING_PACKAGE_1,
+                getBitmapFilename(USER_0, CALLING_PACKAGE_1, "s1"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_1, "s2"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_1, "s3")
+        );
+        assertBitmapFiles(USER_0, CALLING_PACKAGE_2,
+                getBitmapFilename(USER_0, CALLING_PACKAGE_2, "s4"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_2, "s5"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_2, "s6")
+        );
+        assertBitmapFiles(USER_0, CALLING_PACKAGE_3,
+                EMPTY_STRINGS
+        );
+        assertBitmapFiles(USER_10, CALLING_PACKAGE_1,
+                getBitmapFilename(USER_10, CALLING_PACKAGE_1, "10s1"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_1, "10s2"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_1, "10s3")
+        );
+        assertBitmapFiles(USER_10, CALLING_PACKAGE_2,
+                getBitmapFilename(USER_10, CALLING_PACKAGE_2, "10s4"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_2, "10s5"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_2, "10s6")
+        );
+        assertBitmapFiles(USER_10, CALLING_PACKAGE_3,
+                EMPTY_STRINGS
+        );
+
+        // Then create random directories and files.
+        makeFile(mService.getUserBitmapFilePath(USER_0), "a.b.c").mkdir();
+        makeFile(mService.getUserBitmapFilePath(USER_0), "d.e.f").mkdir();
+        makeFile(mService.getUserBitmapFilePath(USER_0), "d.e.f", "123").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_0), "d.e.f", "456").createNewFile();
+
+        makeFile(mService.getUserBitmapFilePath(USER_0), CALLING_PACKAGE_3).mkdir();
+
+        makeFile(mService.getUserBitmapFilePath(USER_0), CALLING_PACKAGE_1, "1").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_0), CALLING_PACKAGE_1, "2").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_0), CALLING_PACKAGE_1, "3").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_0), CALLING_PACKAGE_1, "4").createNewFile();
+
+        makeFile(mService.getUserBitmapFilePath(USER_10), "10a.b.c").mkdir();
+        makeFile(mService.getUserBitmapFilePath(USER_10), "10d.e.f").mkdir();
+        makeFile(mService.getUserBitmapFilePath(USER_10), "10d.e.f", "123").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_10), "10d.e.f", "456").createNewFile();
+
+        makeFile(mService.getUserBitmapFilePath(USER_10), CALLING_PACKAGE_2, "1").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_10), CALLING_PACKAGE_2, "2").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_10), CALLING_PACKAGE_2, "3").createNewFile();
+        makeFile(mService.getUserBitmapFilePath(USER_10), CALLING_PACKAGE_2, "4").createNewFile();
+
+        assertBitmapDirectories(USER_0, CALLING_PACKAGE_1, CALLING_PACKAGE_2, CALLING_PACKAGE_3,
+                "a.b.c", "d.e.f");
+
+        // Save and load.  When a user is loaded, we do the cleanup.
+        mService.saveDirtyInfo();
+        initService();
+
+        mService.handleUnlockUser(USER_0);
+        mService.handleUnlockUser(USER_10);
+        mService.handleUnlockUser(20); // Make sure the logic will still work for nonexistent user.
+
+        // The below check is the same as above, except this time USER_0 use the CALLING_PACKAGE_3
+        // directory.
+
+        assertBitmapDirectories(USER_0, CALLING_PACKAGE_1, CALLING_PACKAGE_2, CALLING_PACKAGE_3);
+        assertBitmapDirectories(USER_10, CALLING_PACKAGE_1, CALLING_PACKAGE_2);
+
+        assertBitmapFiles(USER_0, CALLING_PACKAGE_1,
+                getBitmapFilename(USER_0, CALLING_PACKAGE_1, "s1"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_1, "s2"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_1, "s3")
+        );
+        assertBitmapFiles(USER_0, CALLING_PACKAGE_2,
+                getBitmapFilename(USER_0, CALLING_PACKAGE_2, "s4"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_2, "s5"),
+                getBitmapFilename(USER_0, CALLING_PACKAGE_2, "s6")
+        );
+        assertBitmapFiles(USER_0, CALLING_PACKAGE_3,
+                EMPTY_STRINGS
+        );
+        assertBitmapFiles(USER_10, CALLING_PACKAGE_1,
+                getBitmapFilename(USER_10, CALLING_PACKAGE_1, "10s1"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_1, "10s2"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_1, "10s3")
+        );
+        assertBitmapFiles(USER_10, CALLING_PACKAGE_2,
+                getBitmapFilename(USER_10, CALLING_PACKAGE_2, "10s4"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_2, "10s5"),
+                getBitmapFilename(USER_10, CALLING_PACKAGE_2, "10s6")
+        );
+        assertBitmapFiles(USER_10, CALLING_PACKAGE_3,
+                EMPTY_STRINGS
+        );
+    }
+
+    protected void checkShrinkBitmap(int expectedWidth, int expectedHeight, int resId, int maxSize) {
+        assertBitmapSize(expectedWidth, expectedHeight,
+                ShortcutService.shrinkBitmap(BitmapFactory.decodeResource(
+                        getTestContext().getResources(), resId),
+                        maxSize));
+    }
+
+    public void testShrinkBitmap() {
+        checkShrinkBitmap(32, 32, R.drawable.black_512x512, 32);
+        checkShrinkBitmap(511, 511, R.drawable.black_512x512, 511);
+        checkShrinkBitmap(512, 512, R.drawable.black_512x512, 512);
+
+        checkShrinkBitmap(1024, 4096, R.drawable.black_1024x4096, 4096);
+        checkShrinkBitmap(1024, 4096, R.drawable.black_1024x4096, 4100);
+        checkShrinkBitmap(512, 2048, R.drawable.black_1024x4096, 2048);
+
+        checkShrinkBitmap(4096, 1024, R.drawable.black_4096x1024, 4096);
+        checkShrinkBitmap(4096, 1024, R.drawable.black_4096x1024, 4100);
+        checkShrinkBitmap(2048, 512, R.drawable.black_4096x1024, 2048);
+    }
+
+    protected File openIconFileForWriteAndGetPath(int userId, String packageName)
+            throws IOException {
+        // Shortcut IDs aren't used in the path, so just pass the same ID.
+        final FileOutputStreamWithPath out =
+                mService.openIconFileForWrite(userId, makePackageShortcut(packageName, "id"));
+        out.close();
+        return out.getFile();
+    }
+
+    public void testOpenIconFileForWrite() throws IOException {
+        mInjectedCurrentTimeMillis = 1000;
+
+        final File p10_1_1 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_1);
+        final File p10_1_2 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_1);
+
+        final File p10_2_1 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_2);
+        final File p10_2_2 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_2);
+
+        final File p11_1_1 = openIconFileForWriteAndGetPath(11, CALLING_PACKAGE_1);
+        final File p11_1_2 = openIconFileForWriteAndGetPath(11, CALLING_PACKAGE_1);
+
+        mInjectedCurrentTimeMillis++;
+
+        final File p10_1_3 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_1);
+        final File p10_1_4 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_1);
+        final File p10_1_5 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_1);
+
+        final File p10_2_3 = openIconFileForWriteAndGetPath(10, CALLING_PACKAGE_2);
+        final File p11_1_3 = openIconFileForWriteAndGetPath(11, CALLING_PACKAGE_1);
+
+        // Make sure their paths are all unique
+        assertAllUnique(list(
+                p10_1_1,
+                p10_1_2,
+                p10_1_3,
+                p10_1_4,
+                p10_1_5,
+
+                p10_2_1,
+                p10_2_2,
+                p10_2_3,
+
+                p11_1_1,
+                p11_1_2,
+                p11_1_3
+        ));
+
+        // Check each set has the same parent.
+        assertEquals(p10_1_1.getParent(), p10_1_2.getParent());
+        assertEquals(p10_1_1.getParent(), p10_1_3.getParent());
+        assertEquals(p10_1_1.getParent(), p10_1_4.getParent());
+        assertEquals(p10_1_1.getParent(), p10_1_5.getParent());
+
+        assertEquals(p10_2_1.getParent(), p10_2_2.getParent());
+        assertEquals(p10_2_1.getParent(), p10_2_3.getParent());
+
+        assertEquals(p11_1_1.getParent(), p11_1_2.getParent());
+        assertEquals(p11_1_1.getParent(), p11_1_3.getParent());
+
+        // Check the parents are still unique.
+        assertAllUnique(list(
+                p10_1_1.getParent(),
+                p10_2_1.getParent(),
+                p11_1_1.getParent()
+        ));
+
+        // All files created at the same time for the same package/user, expcet for the first ones,
+        // will have "_" in the path.
+        assertFalse(p10_1_1.getName().contains("_"));
+        assertTrue(p10_1_2.getName().contains("_"));
+        assertFalse(p10_1_3.getName().contains("_"));
+        assertTrue(p10_1_4.getName().contains("_"));
+        assertTrue(p10_1_5.getName().contains("_"));
+
+        assertFalse(p10_2_1.getName().contains("_"));
+        assertTrue(p10_2_2.getName().contains("_"));
+        assertFalse(p10_2_3.getName().contains("_"));
+
+        assertFalse(p11_1_1.getName().contains("_"));
+        assertTrue(p11_1_2.getName().contains("_"));
+        assertFalse(p11_1_3.getName().contains("_"));
+    }
+
+    public void testUpdateShortcuts() {
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"),
+                    makeShortcut("s2"),
+                    makeShortcut("s3"),
+                    makeShortcut("s4"),
+                    makeShortcut("s5")
+            )));
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"),
+                    makeShortcut("s2"),
+                    makeShortcut("s3"),
+                    makeShortcut("s4"),
+                    makeShortcut("s5")
+            )));
+        });
+        runWithCaller(LAUNCHER_1, UserHandle.USER_SYSTEM, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s2", "s3"),
+                    getCallingUser());
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s4", "s5"),
+                    getCallingUser());
+        });
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            mManager.removeDynamicShortcuts(list("s1"));
+            mManager.removeDynamicShortcuts(list("s2"));
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            mManager.removeDynamicShortcuts(list("s1"));
+            mManager.removeDynamicShortcuts(list("s3"));
+            mManager.removeDynamicShortcuts(list("s5"));
+        });
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertShortcutIds(assertAllDynamic(
+                    mManager.getDynamicShortcuts()),
+                    "s3", "s4", "s5");
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s2", "s3");
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            assertShortcutIds(assertAllDynamic(
+                    mManager.getDynamicShortcuts()),
+                    "s2", "s4");
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s4", "s5");
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            ShortcutInfo s2 = makeShortcutBuilder()
+                    .setId("s2")
+                    .setIcon(Icon.createWithResource(getTestContext(), R.drawable.black_32x32))
+                    .build();
+
+            ShortcutInfo s4 = makeShortcutBuilder()
+                    .setId("s4")
+                    .setTitle("new title")
+                    .build();
+
+            mManager.updateShortcuts(list(s2, s4));
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            ShortcutInfo s2 = makeShortcutBuilder()
+                    .setId("s2")
+                    .setIntent(makeIntent(Intent.ACTION_ANSWER, ShortcutActivity.class,
+                            "key1", "val1"))
+                    .build();
+
+            ShortcutInfo s4 = makeShortcutBuilder()
+                    .setId("s4")
+                    .setIntent(new Intent(Intent.ACTION_ALL_APPS))
+                    .build();
+
+            mManager.updateShortcuts(list(s2, s4));
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertShortcutIds(assertAllDynamic(
+                    mManager.getDynamicShortcuts()),
+                    "s3", "s4", "s5");
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s2", "s3");
+
+            ShortcutInfo s = getCallerShortcut("s2");
+            assertTrue(s.hasIconResource());
+            assertEquals(R.drawable.black_32x32, s.getIconResourceId());
+            assertEquals("string/r" + R.drawable.black_32x32, s.getIconResName());
+            assertEquals("Title-s2", s.getTitle());
+
+            s = getCallerShortcut("s4");
+            assertFalse(s.hasIconResource());
+            assertEquals(0, s.getIconResourceId());
+            assertEquals("new title", s.getTitle());
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            assertShortcutIds(assertAllDynamic(
+                    mManager.getDynamicShortcuts()),
+                    "s2", "s4");
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s4", "s5");
+
+            ShortcutInfo s = getCallerShortcut("s2");
+            assertFalse(s.hasIconResource());
+            assertEquals(0, s.getIconResourceId());
+            assertEquals("Title-s2", s.getTitle());
+            assertEquals(Intent.ACTION_ANSWER, s.getIntent().getAction());
+            assertEquals(1, s.getIntent().getExtras().size());
+
+            s = getCallerShortcut("s4");
+            assertFalse(s.hasIconResource());
+            assertEquals(0, s.getIconResourceId());
+            assertEquals("Title-s4", s.getTitle());
+            assertEquals(Intent.ACTION_ALL_APPS, s.getIntent().getAction());
+            assertBundleEmpty(s.getIntent().getExtras());
+        });
+        // TODO Check with other fields too.
+
+        // TODO Check bitmap removal too.
+
+        runWithCaller(CALLING_PACKAGE_2, USER_11, () -> {
+            mManager.updateShortcuts(list());
+        });
+    }
+
+    public void testUpdateShortcuts_icons() {
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1")
+            )));
+
+            // Set resource icon
+            assertTrue(mManager.updateShortcuts(list(
+                    new ShortcutInfo.Builder(mClientContext, "s1")
+                    .setIcon(Icon.createWithResource(getTestContext(), R.drawable.black_32x32))
+                    .build()
+            )));
+
+            assertWith(getCallerShortcuts())
+                    .forShortcutWithId("s1", si -> {
+                        assertTrue(si.hasIconResource());
+                        assertEquals(R.drawable.black_32x32, si.getIconResourceId());
+                    });
+
+            // Set bitmap icon
+            assertTrue(mManager.updateShortcuts(list(
+                    new ShortcutInfo.Builder(mClientContext, "s1")
+                    .setIcon(Icon.createWithBitmap(BitmapFactory.decodeResource(
+                            getTestContext().getResources(), R.drawable.black_64x64)))
+                    .build()
+            )));
+
+            assertWith(getCallerShortcuts())
+                    .forShortcutWithId("s1", si -> {
+                        assertTrue(si.hasIconFile());
+                    });
+
+            mInjectedCurrentTimeMillis += INTERVAL; // reset throttling
+
+            // Do it again, with the reverse order (bitmap -> icon)
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1")
+            )));
+
+            // Set bitmap icon
+            assertTrue(mManager.updateShortcuts(list(
+                    new ShortcutInfo.Builder(mClientContext, "s1")
+                            .setIcon(Icon.createWithBitmap(BitmapFactory.decodeResource(
+                                    getTestContext().getResources(), R.drawable.black_64x64)))
+                            .build()
+            )));
+
+            assertWith(getCallerShortcuts())
+                    .forShortcutWithId("s1", si -> {
+                        assertTrue(si.hasIconFile());
+                    });
+
+            // Set resource icon
+            assertTrue(mManager.updateShortcuts(list(
+                    new ShortcutInfo.Builder(mClientContext, "s1")
+                            .setIcon(Icon.createWithResource(getTestContext(), R.drawable.black_32x32))
+                            .build()
+            )));
+
+            assertWith(getCallerShortcuts())
+                    .forShortcutWithId("s1", si -> {
+                        assertTrue(si.hasIconResource());
+                        assertEquals(R.drawable.black_32x32, si.getIconResourceId());
+                    });
+        });
+    }
+
+    // === Test for launcher side APIs ===
+
+    public void testGetShortcuts() {
+
+        // Set up shortcuts.
+
+        setCaller(CALLING_PACKAGE_1);
+        final ShortcutInfo s1_1 = makeShortcut("s1");
+        final ShortcutInfo s1_2 = makeShortcut("s2");
+
+        assertTrue(mManager.setDynamicShortcuts(list(s1_1, s1_2)));
+
+        // Because setDynamicShortcuts will update the timestamps when ranks are changing,
+        // we explicitly set timestamps here.
+        getCallerShortcut("s1").setTimestamp(5000);
+        getCallerShortcut("s2").setTimestamp(1000);
+
+        setCaller(CALLING_PACKAGE_2);
+        final ShortcutInfo s2_2 = makeShortcut("s2");
+        final ShortcutInfo s2_3 = makeShortcutWithActivity("s3",
+                makeComponent(ShortcutActivity2.class));
+        final ShortcutInfo s2_4 = makeShortcutWithActivity("s4",
+                makeComponent(ShortcutActivity.class));
+        assertTrue(mManager.setDynamicShortcuts(list(s2_2, s2_3, s2_4)));
+
+        getCallerShortcut("s2").setTimestamp(1500);
+        getCallerShortcut("s3").setTimestamp(3000);
+        getCallerShortcut("s4").setTimestamp(500);
+
+        setCaller(CALLING_PACKAGE_3);
+        final ShortcutInfo s3_2 = makeShortcut("s3");
+        assertTrue(mManager.setDynamicShortcuts(list(s3_2)));
+
+        getCallerShortcut("s3").setTimestamp(START_TIME + 5000);
+
+        setCaller(LAUNCHER_1);
+
+        // Get dynamic
+        assertAllDynamic(assertAllHaveTitle(assertAllNotHaveIntents(assertAllStringsResolved(
+                assertShortcutIds(
+                        assertAllNotKeyFieldsOnly(
+                                mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                        /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                        "s1", "s2")))));
+
+        // Get pinned
+        assertShortcutIds(
+                mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_PINNED), getCallingUser())
+                /* none */);
+
+        // Get both, with timestamp
+        assertAllDynamic(assertAllHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2,
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_PINNED | ShortcutQuery.FLAG_GET_DYNAMIC),
+                        getCallingUser())),
+                "s2", "s3"))));
+
+        // FLAG_GET_KEY_FIELDS_ONLY
+        assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2,
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY),
+                        getCallingUser())),
+                "s2", "s3"))));
+
+        // Filter by activity
+        assertAllDynamic(assertAllHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 0, CALLING_PACKAGE_2,
+                        new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                        ShortcutQuery.FLAG_GET_PINNED | ShortcutQuery.FLAG_GET_DYNAMIC),
+                        getCallingUser())),
+                "s4"))));
+
+        // With ID.
+        assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2, list("s3"),
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY),
+                        getCallingUser())),
+                "s3"))));
+        assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2, list("s3", "s2", "ss"),
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY),
+                        getCallingUser())),
+                "s2", "s3"))));
+        assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2, list("s3x", "s2x"),
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY),
+                        getCallingUser()))
+                /* empty */))));
+        assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2, list(),
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY),
+                        getCallingUser()))
+                /* empty */))));
+
+        // Pin some shortcuts.
+        mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                list("s3", "s4"), getCallingUser());
+
+        // Pinned ones only
+        assertAllPinned(assertAllHaveTitle(assertAllNotHaveIntents(assertShortcutIds(
+                assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 1000, CALLING_PACKAGE_2,
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_PINNED),
+                        getCallingUser())),
+                "s3"))));
+
+        // All packages.
+        assertShortcutIds(assertAllNotKeyFieldsOnly(
+                mLauncherApps.getShortcuts(buildQuery(
+                        /* time =*/ 5000, /* package= */ null,
+                        /* activity =*/ null,
+                        ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_PINNED),
+                        getCallingUser())),
+                "s1", "s3");
+
+        assertExpectException(
+                IllegalArgumentException.class, "package name must also be set", () -> {
+                    mLauncherApps.getShortcuts(buildQuery(
+                    /* time =*/ 0, /* package= */ null, list("id"),
+                    /* activity =*/ null, /* flags */ 0), getCallingUser());
+                });
+
+        // TODO More tests: pinned but dynamic.
+    }
+
+    public void testGetShortcuts_shortcutKinds() throws Exception {
+        // Create 3 manifest and 3 dynamic shortcuts
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_3);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+
+        // Pin 2 and 3
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms2", "ms3", "s2", "s3"),
+                    HANDLE_USER_0);
+        });
+
+        // Remove ms3 and s3
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"))));
+        });
+
+        // Check their status.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "ms3", "s1", "s2", "s3")
+
+                    .selectByIds("ms1", "ms2")
+                    .areAllManifest()
+                    .areAllImmutable()
+                    .areAllNotDynamic()
+
+                    .revertToOriginalList()
+                    .selectByIds("ms3")
+                    .areAllNotManifest()
+                    .areAllImmutable()
+                    .areAllDisabled()
+                    .areAllNotDynamic()
+
+                    .revertToOriginalList()
+                    .selectByIds("s1", "s2")
+                    .areAllNotManifest()
+                    .areAllMutable()
+                    .areAllDynamic()
+
+                    .revertToOriginalList()
+                    .selectByIds("s3")
+                    .areAllNotManifest()
+                    .areAllMutable()
+                    .areAllEnabled()
+                    .areAllNotDynamic()
+
+                    .revertToOriginalList()
+                    .selectByIds("s1", "ms1")
+                    .areAllNotPinned()
+
+                    .revertToOriginalList()
+                    .selectByIds("s2", "s3", "ms2", "ms3")
+                    .areAllPinned()
+            ;
+        });
+
+        // Finally, actual tests.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0))
+                    .haveIds("s1", "s2");
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(ShortcutQuery.FLAG_GET_MANIFEST), HANDLE_USER_0))
+                    .haveIds("ms1", "ms2");
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0))
+                    .haveIds("s2", "s3", "ms2", "ms3");
+
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(
+                            ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_PINNED
+                    ), HANDLE_USER_0))
+                    .haveIds("s1", "s2", "s3", "ms2", "ms3");
+
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(
+                            ShortcutQuery.FLAG_GET_MANIFEST | ShortcutQuery.FLAG_GET_PINNED
+                    ), HANDLE_USER_0))
+                    .haveIds("ms1", "s2", "s3", "ms2", "ms3");
+
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(
+                            ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_MANIFEST
+                    ), HANDLE_USER_0))
+                    .haveIds("ms1", "ms2", "s1", "s2");
+
+            assertWith(mLauncherApps.getShortcuts(
+                    buildQueryWithFlags(
+                            ShortcutQuery.FLAG_GET_ALL_KINDS
+                    ), HANDLE_USER_0))
+                    .haveIds("ms1", "ms2", "ms3", "s1", "s2", "s3");
+        });
+    }
+
+    public void testGetShortcuts_resolveStrings() throws Exception {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(mClientContext)
+                    .setId("id")
+                    .setActivity(new ComponentName(mClientContext, "dummy"))
+                    .setTitleResId(10)
+                    .setTextResId(11)
+                    .setDisabledMessageResId(12)
+                    .setIntent(makeIntent("action", ShortcutActivity.class))
+                    .build();
+            mManager.setDynamicShortcuts(list(si));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(mClientContext)
+                    .setId("id")
+                    .setActivity(new ComponentName(mClientContext, "dummy"))
+                    .setTitleResId(10)
+                    .setTextResId(11)
+                    .setDisabledMessageResId(12)
+                    .setIntent(makeIntent("action", ShortcutActivity.class))
+                    .build();
+            mManager.setDynamicShortcuts(list(si));
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            final ShortcutQuery q = new ShortcutQuery();
+            q.setQueryFlags(ShortcutQuery.FLAG_GET_DYNAMIC);
+
+            // USER 0
+            List<ShortcutInfo> ret = assertShortcutIds(
+                    assertAllStringsResolved(mLauncherApps.getShortcuts(q, HANDLE_USER_0)),
+                    "id");
+            assertEquals("string-com.android.test.1-user:0-res:10/en", ret.get(0).getTitle());
+            assertEquals("string-com.android.test.1-user:0-res:11/en", ret.get(0).getText());
+            assertEquals("string-com.android.test.1-user:0-res:12/en",
+                    ret.get(0).getDisabledMessage());
+
+            // USER P0
+            ret = assertShortcutIds(
+                    assertAllStringsResolved(mLauncherApps.getShortcuts(q, HANDLE_USER_P0)),
+                    "id");
+            assertEquals("string-com.android.test.1-user:20-res:10/en", ret.get(0).getTitle());
+            assertEquals("string-com.android.test.1-user:20-res:11/en", ret.get(0).getText());
+            assertEquals("string-com.android.test.1-user:20-res:12/en",
+                    ret.get(0).getDisabledMessage());
+        });
+    }
+
+    // TODO resource
+    public void testGetShortcutInfo() {
+        // Create shortcuts.
+        setCaller(CALLING_PACKAGE_1);
+        final ShortcutInfo s1_1 = makeShortcut(
+                "s1",
+                "Title 1",
+                makeComponent(ShortcutActivity.class),
+                /* icon =*/ null,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity2.class,
+                        "key1", "val1", "nest", makeBundle("key", 123)),
+                /* weight */ 10);
+
+        final ShortcutInfo s1_2 = makeShortcut(
+                "s2",
+                "Title 2",
+                /* activity */ null,
+                /* icon =*/ null,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                /* weight */ 12);
+
+        assertTrue(mManager.setDynamicShortcuts(list(s1_1, s1_2)));
+        dumpsysOnLogcat();
+
+        setCaller(CALLING_PACKAGE_2);
+        final ShortcutInfo s2_1 = makeShortcut(
+                "s1",
+                "ABC",
+                makeComponent(ShortcutActivity2.class),
+                /* icon =*/ null,
+                makeIntent(Intent.ACTION_ANSWER, ShortcutActivity2.class,
+                        "key1", "val1", "nest", makeBundle("key", 123)),
+                /* weight */ 10);
+        assertTrue(mManager.setDynamicShortcuts(list(s2_1)));
+        dumpsysOnLogcat();
+
+        // Pin some.
+        setCaller(LAUNCHER_1);
+
+        mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                list("s2"), getCallingUser());
+
+        dumpsysOnLogcat();
+
+        // Delete some.
+        setCaller(CALLING_PACKAGE_1);
+        assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+        mManager.removeDynamicShortcuts(list("s2"));
+        assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+
+        dumpsysOnLogcat();
+
+        setCaller(LAUNCHER_1);
+        List<ShortcutInfo> list;
+
+        // Note we don't guarantee the orders.
+        list = assertShortcutIds(assertAllHaveTitle(assertAllNotHaveIntents(
+                assertAllNotKeyFieldsOnly(
+                        mLauncherApps.getShortcutInfo(CALLING_PACKAGE_1,
+                                list("s2", "s1", "s3", null), getCallingUser())))),
+                "s1", "s2");
+        assertEquals("Title 1", findById(list, "s1").getTitle());
+        assertEquals("Title 2", findById(list, "s2").getTitle());
+
+        assertShortcutIds(assertAllHaveTitle(assertAllNotHaveIntents(
+                mLauncherApps.getShortcutInfo(CALLING_PACKAGE_1,
+                        list("s3"), getCallingUser())))
+                /* none */);
+
+        list = assertShortcutIds(assertAllHaveTitle(assertAllNotHaveIntents(
+                mLauncherApps.getShortcutInfo(CALLING_PACKAGE_2,
+                        list("s1", "s2", "s3"), getCallingUser()))),
+                "s1");
+        assertEquals("ABC", findById(list, "s1").getTitle());
+    }
+
+    public void testPinShortcutAndGetPinnedShortcuts() {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ShortcutInfo s1_1 = makeShortcutWithTimestamp("s1", 1000);
+            final ShortcutInfo s1_2 = makeShortcutWithTimestamp("s2", 2000);
+
+            assertTrue(mManager.setDynamicShortcuts(list(s1_1, s1_2)));
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            final ShortcutInfo s2_2 = makeShortcutWithTimestamp("s2", 1500);
+            final ShortcutInfo s2_3 = makeShortcutWithTimestamp("s3", 3000);
+            final ShortcutInfo s2_4 = makeShortcutWithTimestamp("s4", 500);
+            assertTrue(mManager.setDynamicShortcuts(list(s2_2, s2_3, s2_4)));
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            final ShortcutInfo s3_2 = makeShortcutWithTimestamp("s2", 1000);
+            assertTrue(mManager.setDynamicShortcuts(list(s3_2)));
+        });
+
+        // Pin some.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s2", "s3"), getCallingUser());
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s3", "s4", "s5"), getCallingUser());
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3,
+                    list("s3"), getCallingUser());  // Note ID doesn't exist
+        });
+
+        // Delete some.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+            mManager.removeDynamicShortcuts(list("s2"));
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+
+            assertShortcutIds(mManager.getDynamicShortcuts(), "s1");
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s3", "s4");
+            mManager.removeDynamicShortcuts(list("s3"));
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s3", "s4");
+
+            assertShortcutIds(mManager.getDynamicShortcuts(), "s2", "s4");
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts() /* none */);
+            mManager.removeDynamicShortcuts(list("s2"));
+            assertShortcutIds(mManager.getPinnedShortcuts() /* none */);
+
+            assertEmpty(mManager.getDynamicShortcuts());
+        });
+
+        // Get pinned shortcuts from launcher
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            // CALLING_PACKAGE_1 deleted s2, but it's pinned, so it still exists.
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(assertAllEnabled(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())))),
+                    "s2");
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(assertAllEnabled(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())))),
+                    "s3", "s4");
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(assertAllEnabled(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_3,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))))
+                    /* none */);
+        });
+    }
+
+    /**
+     * This is similar to the above test, except it used "disable" instead of "remove".  It also
+     * does "enable".
+     */
+    public void testDisableAndEnableShortcuts() {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ShortcutInfo s1_1 = makeShortcutWithTimestamp("s1", 1000);
+            final ShortcutInfo s1_2 = makeShortcutWithTimestamp("s2", 2000);
+
+            assertTrue(mManager.setDynamicShortcuts(list(s1_1, s1_2)));
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            final ShortcutInfo s2_2 = makeShortcutWithTimestamp("s2", 1500);
+            final ShortcutInfo s2_3 = makeShortcutWithTimestamp("s3", 3000);
+            final ShortcutInfo s2_4 = makeShortcutWithTimestamp("s4", 500);
+            assertTrue(mManager.setDynamicShortcuts(list(s2_2, s2_3, s2_4)));
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            final ShortcutInfo s3_2 = makeShortcutWithTimestamp("s2", 1000);
+            assertTrue(mManager.setDynamicShortcuts(list(s3_2)));
+        });
+
+        // Pin some.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s2", "s3"), getCallingUser());
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s3", "s4", "s5"), getCallingUser());
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3,
+                    list("s3"), getCallingUser());  // Note ID doesn't exist
+        });
+
+        // Disable some.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+
+            mManager.disableShortcuts(list("s2"));
+
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+            assertShortcutIds(mManager.getDynamicShortcuts(), "s1");
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s3", "s4");
+
+            // disable should work even if a shortcut is not dynamic, so try calling "remove" first
+            // here.
+            mManager.removeDynamicShortcuts(list("s3"));
+            mManager.disableShortcuts(list("s3"));
+
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s3", "s4");
+            assertShortcutIds(mManager.getDynamicShortcuts(), "s2", "s4");
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts() /* none */);
+
+            mManager.disableShortcuts(list("s2"));
+
+            assertShortcutIds(mManager.getPinnedShortcuts() /* none */);
+
+            assertEmpty(mManager.getDynamicShortcuts());
+            assertEmpty(getCallerShortcuts());
+        });
+
+        // Get pinned shortcuts from launcher
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            // CALLING_PACKAGE_1 deleted s2, but it's pinned, so it still exists.
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(assertAllDisabled(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())))),
+                    "s2");
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s3", "s4");
+            assertShortcutNotLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s4", USER_0);
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(assertAllEnabled(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_3,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))))
+                    /* none */);
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.enableShortcuts(list("s2"));
+
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s2");
+            assertShortcutIds(mManager.getDynamicShortcuts(), "s1");
+        });
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            // CALLING_PACKAGE_1 deleted s2, but it's pinned, so it still exists.
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(assertAllEnabled(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())))),
+                    "s2");
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+        });
+    }
+
+    public void testDisableShortcuts_thenRepublish() {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+
+            runWithCaller(LAUNCHER_1, USER_0, () -> {
+                mLauncherApps.pinShortcuts(
+                        CALLING_PACKAGE_1, list("s1", "s2", "s3"), HANDLE_USER_0);
+            });
+
+            mManager.disableShortcuts(list("s1", "s2", "s3"));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1", "s2", "s3")
+                    .areAllNotDynamic()
+                    .areAllPinned()
+                    .areAllDisabled();
+
+            // Make sure updateShortcuts() will not re-enable them.
+            assertTrue(mManager.updateShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1", "s2", "s3")
+                    .areAllNotDynamic()
+                    .areAllPinned()
+                    .areAllDisabled();
+
+            // Re-publish s1 with setDynamicShortcuts.
+            mInjectedCurrentTimeMillis += INTERVAL; // reset throttling
+
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"))));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1", "s2", "s3")
+
+                    .selectByIds("s1")
+                    .areAllDynamic()
+                    .areAllPinned()
+                    .areAllEnabled()
+
+                    .revertToOriginalList()
+                    .selectByIds("s2", "s3")
+                    .areAllNotDynamic()
+                    .areAllPinned()
+                    .areAllDisabled();
+
+            // Re-publish s2 with addDynamicShortcuts.
+            mInjectedCurrentTimeMillis += INTERVAL; // reset throttling
+
+            assertTrue(mManager.addDynamicShortcuts(list(
+                    makeShortcut("s2"))));
+
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1", "s2", "s3")
+
+                    .selectByIds("s1", "s2")
+                    .areAllDynamic()
+                    .areAllPinned()
+                    .areAllEnabled()
+
+                    .revertToOriginalList()
+                    .selectByIds("s3")
+                    .areAllNotDynamic()
+                    .areAllPinned()
+                    .areAllDisabled();
+        });
+    }
+
+    public void testPinShortcutAndGetPinnedShortcuts_multi() {
+        // Create some shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+
+        dumpsysOnLogcat();
+
+        // Pin some.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s3", "s4"), getCallingUser());
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s1", "s2", "s4"), getCallingUser());
+        });
+
+        dumpsysOnLogcat();
+
+        // Delete some.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s3");
+            mManager.removeDynamicShortcuts(list("s3"));
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s3");
+        });
+
+        dumpsysOnLogcat();
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s1", "s2");
+            mManager.removeDynamicShortcuts(list("s1"));
+            mManager.removeDynamicShortcuts(list("s3"));
+            assertShortcutIds(mManager.getPinnedShortcuts(), "s1", "s2");
+        });
+
+        dumpsysOnLogcat();
+
+        // Get pinned shortcuts from launcher
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s3");
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s1", "s2");
+
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s1", "s2", "s3");
+
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s1", "s2");
+        });
+
+        dumpsysOnLogcat();
+
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            // Launcher2 still has no pinned ones.
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())))
+                    /* none */);
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())))
+                    /* none */);
+
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s1", "s2");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s2");
+
+            // Now pin some.
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s1", "s2"), getCallingUser());
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s1", "s2"), getCallingUser());
+
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s1", "s2");
+
+            // S1 was not visible to it, so shouldn't be pinned.
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s2");
+        });
+
+        // Re-initialize and load from the files.
+        mService.saveDirtyInfo();
+        initService();
+
+        // Load from file.
+        mService.handleUnlockUser(USER_0);
+
+        // Make sure package info is restored too.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s3");
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s1", "s2");
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s1", "s2");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED
+                                    | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())),
+                    "s2");
+        });
+
+        // Delete all dynamic.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.removeAllDynamicShortcuts();
+
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s1", "s2", "s3");
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            mManager.removeAllDynamicShortcuts();
+
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s2", "s1");
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s3");
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s1", "s2");
+
+            // from all packages.
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, null,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s1", "s2", "s3");
+
+            // Update pined.  Note s2 and s3 are actually available, but not visible to this
+            // launcher, so still can't be pinned.
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s1", "s2", "s3", "s4"),
+                    getCallingUser());
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s3");
+        });
+        // Re-publish s1.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s1"))));
+
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()), "s1");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s1", "s2", "s3");
+        });
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s3");
+
+            // Now "s1" is visible, so can be pinned.
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s1", "s2", "s3", "s4"),
+                    getCallingUser());
+
+            assertShortcutIds(assertAllPinned(assertAllNotKeyFieldsOnly(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()))),
+                    "s1", "s3");
+        });
+
+        // Now clear pinned shortcuts.  First, from launcher 1.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list(), getCallingUser());
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list(), getCallingUser());
+
+            assertEquals(0,
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()).size());
+            assertEquals(0,
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()).size());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()), "s1");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s1", "s2");
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()), "s2");
+        });
+
+        // Clear all pins from launcher 2.
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list(), getCallingUser());
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list(), getCallingUser());
+
+            assertEquals(0,
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()).size());
+            assertEquals(0,
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()).size());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()), "s1");
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+    }
+
+    public void testPinShortcutAndGetPinnedShortcuts_crossProfile_plusLaunch() {
+        // Create some shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"),
+                    makeShortcut("s4"), makeShortcut("s5"), makeShortcut("s6"))));
+        });
+
+        // Pin some shortcuts and see the result.
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s1"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s1", "s2", "s3"), HANDLE_USER_0);
+        });
+
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s2"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s2", "s3"), HANDLE_USER_0);
+        });
+
+        runWithCaller(LAUNCHER_2, USER_P0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s3"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s3"), HANDLE_USER_0);
+        });
+
+        runWithCaller(LAUNCHER_2, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s1", "s2", "s3"), HANDLE_USER_10);
+        });
+
+        // Cross profile pinning.
+        final int PIN_AND_DYNAMIC = ShortcutQuery.FLAG_GET_PINNED | ShortcutQuery.FLAG_GET_DYNAMIC;
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s2");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_2, USER_P0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_2, USER_10, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_10)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_10)),
+                    "s1", "s2", "s3", "s4", "s5", "s6");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_10)),
+                    "s1", "s2", "s3", "s4", "s5", "s6");
+        });
+
+        // Remove some dynamic shortcuts.
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"))));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"))));
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s2");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_2, USER_P0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s3");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_2, USER_10, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_10)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_10)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_10)),
+                    "s1", "s2", "s3");
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+
+        // Save & load and make sure we still have the same information.
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_0);
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s2");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s2", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+        runWithCaller(LAUNCHER_2, USER_P0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_1,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s3");
+
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_PINNED), HANDLE_USER_0)),
+                    "s3");
+            assertShortcutIds(assertAllDynamic(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, ShortcutQuery.FLAG_GET_DYNAMIC), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllDynamicOrPinned(
+                    mLauncherApps.getShortcuts(buildQuery(/* time =*/ 0, CALLING_PACKAGE_2,
+                    /* activity =*/ null, PIN_AND_DYNAMIC), HANDLE_USER_0)),
+                    "s1", "s3");
+
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_1, "s3", USER_0);
+
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s1", USER_0);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_2, "s2", USER_0);
+            assertShortcutLaunchable(CALLING_PACKAGE_2, "s3", USER_0);
+
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s1", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s2", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s3", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s4", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s5", USER_10);
+            assertShortcutNotLaunchable(CALLING_PACKAGE_1, "s6", USER_10);
+        });
+    }
+
+    public void testStartShortcut() {
+        // Create some shortcuts.
+        setCaller(CALLING_PACKAGE_1);
+        final ShortcutInfo s1_1 = makeShortcut(
+                "s1",
+                "Title 1",
+                makeComponent(ShortcutActivity.class),
+                /* icon =*/ null,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity2.class,
+                        "key1", "val1", "nest", makeBundle("key", 123)),
+                /* weight */ 10);
+
+        final ShortcutInfo s1_2 = makeShortcut(
+                "s2",
+                "Title 2",
+                /* activity */ null,
+                /* icon =*/ null,
+                makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                /* weight */ 12);
+
+        assertTrue(mManager.setDynamicShortcuts(list(s1_1, s1_2)));
+
+        setCaller(CALLING_PACKAGE_2);
+        final ShortcutInfo s2_1 = makeShortcut(
+                "s1",
+                "ABC",
+                makeComponent(ShortcutActivity.class),
+                /* icon =*/ null,
+                makeIntent(Intent.ACTION_ANSWER, ShortcutActivity.class,
+                        "key1", "val1", "nest", makeBundle("key", 123)),
+                /* weight */ 10);
+        assertTrue(mManager.setDynamicShortcuts(list(s2_1)));
+
+        // Pin all.
+        setCaller(LAUNCHER_1);
+        mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                list("s1", "s2"), getCallingUser());
+
+        mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                list("s1"), getCallingUser());
+
+        // Just to make it complicated, delete some.
+        setCaller(CALLING_PACKAGE_1);
+        mManager.removeDynamicShortcuts(list("s2"));
+
+        // intent and check.
+        setCaller(LAUNCHER_1);
+
+        Intent intent;
+        intent = launchShortcutAndGetIntent(CALLING_PACKAGE_1, "s1", USER_0);
+        assertEquals(ShortcutActivity2.class.getName(), intent.getComponent().getClassName());
+
+
+        intent = launchShortcutAndGetIntent(CALLING_PACKAGE_1, "s2", USER_0);
+        assertEquals(ShortcutActivity3.class.getName(), intent.getComponent().getClassName());
+
+        intent = launchShortcutAndGetIntent(CALLING_PACKAGE_2, "s1", USER_0);
+        assertEquals(ShortcutActivity.class.getName(), intent.getComponent().getClassName());
+
+        // TODO Check extra, etc
+    }
+
+    public void testLauncherCallback() throws Throwable {
+        // Disable throttling for this test.
+        mService.updateConfigurationLocked(
+                ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "=99999999,"
+                        + ConfigConstants.KEY_MAX_SHORTCUTS + "=99999999"
+        );
+
+        setCaller(LAUNCHER_1, USER_0);
+
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+                assertTrue(mManager.setDynamicShortcuts(list(
+                        makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                .haveIds("s1", "s2", "s3")
+                .areAllWithKeyFieldsOnly()
+                .areAllDynamic();
+
+        // From different package.
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+                assertTrue(mManager.setDynamicShortcuts(list(
+                        makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_2, HANDLE_USER_0)
+                .haveIds("s1", "s2", "s3")
+                .areAllWithKeyFieldsOnly()
+                .areAllDynamic();
+
+        // Different user, callback shouldn't be called.
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+                assertTrue(mManager.setDynamicShortcuts(list(
+                        makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+            });
+        }).assertNoCallbackCalled();
+
+
+        // Test for addDynamicShortcuts.
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+                assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("s4"))));
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                .haveIds("s1", "s2", "s3", "s4")
+                .areAllWithKeyFieldsOnly()
+                .areAllDynamic();
+
+        // Test for remove
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+                mManager.removeDynamicShortcuts(list("s1"));
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                .haveIds("s2", "s3", "s4")
+                .areAllWithKeyFieldsOnly()
+                .areAllDynamic();
+
+        // Test for update
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+                assertTrue(mManager.updateShortcuts(list(
+                        makeShortcut("s1"), makeShortcut("s2"))));
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                // All remaining shortcuts will be passed regardless of what's been updated.
+                .haveIds("s2", "s3", "s4")
+                .areAllWithKeyFieldsOnly()
+                .areAllDynamic();
+
+        // Test for deleteAll
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+                mManager.removeAllDynamicShortcuts();
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                .isEmpty();
+
+        // Update package1 with manifest shortcuts
+        assertForLauncherCallback(mLauncherApps, () -> {
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_2);
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                .areAllManifest()
+                .areAllWithKeyFieldsOnly()
+                .haveIds("ms1", "ms2");
+
+        // Make sure pinned shortcuts are passed too.
+        // 1. Add dynamic shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"))));
+        });
+
+        // 2. Pin some.
+        runWithCaller(LAUNCHER_1, UserHandle.USER_SYSTEM, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms2", "s2"), HANDLE_USER_0);
+        });
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "s1", "s2")
+                    .areAllEnabled()
+
+                    .selectByIds("ms1", "ms2")
+                    .areAllManifest()
+
+                    .revertToOriginalList()
+                    .selectByIds("s1", "s2")
+                    .areAllDynamic()
+                    ;
+        });
+
+        // 3 Update the app with no manifest shortcuts.  (Pinned one will survive.)
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_0);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        assertForLauncherCallback(mLauncherApps, () -> {
+            runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+                mManager.removeDynamicShortcuts(list("s2"));
+
+                assertWith(getCallerShortcuts())
+                        .haveIds("ms2", "s1", "s2")
+
+                        .selectByIds("ms2")
+                        .areAllNotManifest()
+                        .areAllPinned()
+                        .areAllImmutable()
+                        .areAllDisabled()
+
+                        .revertToOriginalList()
+                        .selectByIds("s1")
+                        .areAllDynamic()
+                        .areAllNotPinned()
+                        .areAllEnabled()
+
+                        .revertToOriginalList()
+                        .selectByIds("s2")
+                        .areAllNotDynamic()
+                        .areAllPinned()
+                        .areAllEnabled()
+                ;
+            });
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                .haveIds("ms2", "s1", "s2")
+                .areAllWithKeyFieldsOnly();
+
+        // Remove CALLING_PACKAGE_2
+        assertForLauncherCallback(mLauncherApps, () -> {
+            uninstallPackage(USER_0, CALLING_PACKAGE_2);
+            mService.cleanUpPackageLocked(CALLING_PACKAGE_2, USER_0, USER_0,
+                    /* appStillExists = */ false);
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_2, HANDLE_USER_0)
+                .isEmpty();
+    }
+
+    public void testLauncherCallback_crossProfile() throws Throwable {
+        prepareCrossProfileDataSet();
+
+        final Handler h = new Handler(Looper.getMainLooper());
+
+        final LauncherApps.Callback c0_1 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback c0_2 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback c0_3 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback c0_4 = mock(LauncherApps.Callback.class);
+
+        final LauncherApps.Callback cP0_1 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback c10_1 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback c10_2 = mock(LauncherApps.Callback.class);
+        final LauncherApps.Callback c11_1 = mock(LauncherApps.Callback.class);
+
+        final List<LauncherApps.Callback> all =
+                list(c0_1, c0_2, c0_3, c0_4, cP0_1, c10_1, c11_1);
+
+        setDefaultLauncherChecker((pkg, userId) -> {
+            switch (userId) {
+                case USER_0:
+                    return LAUNCHER_2.equals(pkg);
+                case USER_P0:
+                    return LAUNCHER_1.equals(pkg);
+                case USER_10:
+                    return LAUNCHER_1.equals(pkg);
+                case USER_11:
+                    return LAUNCHER_1.equals(pkg);
+                default:
+                    return false;
+            }
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> mLauncherApps.registerCallback(c0_1, h));
+        runWithCaller(LAUNCHER_2, USER_0, () -> mLauncherApps.registerCallback(c0_2, h));
+        runWithCaller(LAUNCHER_3, USER_0, () -> mLauncherApps.registerCallback(c0_3, h));
+        runWithCaller(LAUNCHER_4, USER_0, () -> mLauncherApps.registerCallback(c0_4, h));
+        runWithCaller(LAUNCHER_1, USER_P0, () -> mLauncherApps.registerCallback(cP0_1, h));
+        runWithCaller(LAUNCHER_1, USER_10, () -> mLauncherApps.registerCallback(c10_1, h));
+        runWithCaller(LAUNCHER_2, USER_10, () -> mLauncherApps.registerCallback(c10_2, h));
+        runWithCaller(LAUNCHER_1, USER_11, () -> mLauncherApps.registerCallback(c11_1, h));
+
+        // User 0.
+
+        resetAll(all);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.removeDynamicShortcuts(list());
+        });
+        waitOnMainThread();
+
+        assertCallbackNotReceived(c0_1);
+        assertCallbackNotReceived(c0_3);
+        assertCallbackNotReceived(c0_4);
+        assertCallbackNotReceived(c10_1);
+        assertCallbackNotReceived(c10_2);
+        assertCallbackNotReceived(c11_1);
+        assertCallbackReceived(c0_2, HANDLE_USER_0, CALLING_PACKAGE_1, "s1", "s2", "s3");
+        assertCallbackReceived(cP0_1, HANDLE_USER_0, CALLING_PACKAGE_1, "s1", "s2", "s3", "s4");
+
+        // User 0, different package.
+
+        resetAll(all);
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            mManager.removeDynamicShortcuts(list());
+        });
+        waitOnMainThread();
+
+        assertCallbackNotReceived(c0_1);
+        assertCallbackNotReceived(c0_3);
+        assertCallbackNotReceived(c0_4);
+        assertCallbackNotReceived(c10_1);
+        assertCallbackNotReceived(c10_2);
+        assertCallbackNotReceived(c11_1);
+        assertCallbackReceived(c0_2, HANDLE_USER_0, CALLING_PACKAGE_3, "s1", "s2", "s3", "s4");
+        assertCallbackReceived(cP0_1, HANDLE_USER_0, CALLING_PACKAGE_3,
+                "s1", "s2", "s3", "s4", "s5", "s6");
+
+        // Work profile, but not running, so don't send notifications.
+
+        resetAll(all);
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            mManager.removeDynamicShortcuts(list());
+        });
+        waitOnMainThread();
+
+        assertCallbackNotReceived(c0_1);
+        assertCallbackNotReceived(c0_2);
+        assertCallbackNotReceived(c0_3);
+        assertCallbackNotReceived(c0_4);
+        assertCallbackNotReceived(cP0_1);
+        assertCallbackNotReceived(c10_1);
+        assertCallbackNotReceived(c10_2);
+        assertCallbackNotReceived(c11_1);
+
+        // Work profile, now running.
+        doAnswer(new AnswerIsUserRunning(false)).when(mMockUserManager).isUserRunning(anyInt());
+        doAnswer(new AnswerIsUserRunning(true)).when(mMockUserManager).isUserRunning(eq(USER_P0));
+
+        resetAll(all);
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            mManager.removeDynamicShortcuts(list());
+        });
+        waitOnMainThread();
+
+        assertCallbackNotReceived(c0_1);
+        assertCallbackNotReceived(c0_3);
+        assertCallbackNotReceived(c0_4);
+        assertCallbackNotReceived(c10_1);
+        assertCallbackNotReceived(c10_2);
+        assertCallbackNotReceived(c11_1);
+        assertCallbackReceived(c0_2, HANDLE_USER_P0, CALLING_PACKAGE_1, "s1", "s2", "s3", "s5");
+        assertCallbackReceived(cP0_1, HANDLE_USER_P0, CALLING_PACKAGE_1, "s1", "s2", "s3", "s4");
+
+        // Normal secondary user.
+
+        doAnswer(new AnswerIsUserRunning(false)).when(mMockUserManager).isUserRunning(anyInt());
+        doAnswer(new AnswerIsUserRunning(true)).when(mMockUserManager).isUserRunning(eq(USER_10));
+
+        resetAll(all);
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            mManager.removeDynamicShortcuts(list());
+        });
+        waitOnMainThread();
+
+        assertCallbackNotReceived(c0_1);
+        assertCallbackNotReceived(c0_2);
+        assertCallbackNotReceived(c0_3);
+        assertCallbackNotReceived(c0_4);
+        assertCallbackNotReceived(cP0_1);
+        assertCallbackNotReceived(c10_2);
+        assertCallbackNotReceived(c11_1);
+        assertCallbackReceived(c10_1, HANDLE_USER_10, CALLING_PACKAGE_1,
+                "x1", "x2", "x3", "x4", "x5");
+    }
+
+    // === Test for persisting ===
+
+    public void testSaveAndLoadUser_empty() {
+        assertTrue(mManager.setDynamicShortcuts(list()));
+
+        Log.i(TAG, "Saved state");
+        dumpsysOnLogcat();
+        dumpUserFile(0);
+
+        // Restore.
+        mService.saveDirtyInfo();
+        initService();
+
+        assertEquals(0, mManager.getDynamicShortcuts().size());
+    }
+
+    /**
+     * Try save and load, also stop/start the user.
+     */
+    public void testSaveAndLoadUser() {
+        // First, create some shortcuts and save.
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            final Icon icon1 = Icon.createWithResource(getTestContext(), R.drawable.black_64x16);
+            final Icon icon2 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                    getTestContext().getResources(), R.drawable.icon2));
+
+            final ShortcutInfo si1 = makeShortcut(
+                    "s1",
+                    "title1-1",
+                    makeComponent(ShortcutActivity.class),
+                    icon1,
+                    makeIntent(Intent.ACTION_ASSIST, ShortcutActivity2.class,
+                            "key1", "val1", "nest", makeBundle("key", 123)),
+                        /* weight */ 10);
+
+            final ShortcutInfo si2 = makeShortcut(
+                    "s2",
+                    "title1-2",
+                        /* activity */ null,
+                    icon2,
+                    makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                        /* weight */ 12);
+
+            assertTrue(mManager.setDynamicShortcuts(list(si1, si2)));
+
+            assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+            assertEquals(2, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            final Icon icon1 = Icon.createWithResource(getTestContext(), R.drawable.black_16x64);
+            final Icon icon2 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                    getTestContext().getResources(), R.drawable.icon2));
+
+            final ShortcutInfo si1 = makeShortcut(
+                    "s1",
+                    "title2-1",
+                    makeComponent(ShortcutActivity.class),
+                    icon1,
+                    makeIntent(Intent.ACTION_ASSIST, ShortcutActivity2.class,
+                            "key1", "val1", "nest", makeBundle("key", 123)),
+                        /* weight */ 10);
+
+            final ShortcutInfo si2 = makeShortcut(
+                    "s2",
+                    "title2-2",
+                        /* activity */ null,
+                    icon2,
+                    makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                        /* weight */ 12);
+
+            assertTrue(mManager.setDynamicShortcuts(list(si1, si2)));
+
+            assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+            assertEquals(2, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            final Icon icon1 = Icon.createWithResource(getTestContext(), R.drawable.black_64x64);
+            final Icon icon2 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                    getTestContext().getResources(), R.drawable.icon2));
+
+            final ShortcutInfo si1 = makeShortcut(
+                    "s1",
+                    "title10-1-1",
+                    makeComponent(ShortcutActivity.class),
+                    icon1,
+                    makeIntent(Intent.ACTION_ASSIST, ShortcutActivity2.class,
+                            "key1", "val1", "nest", makeBundle("key", 123)),
+                        /* weight */ 10);
+
+            final ShortcutInfo si2 = makeShortcut(
+                    "s2",
+                    "title10-1-2",
+                        /* activity */ null,
+                    icon2,
+                    makeIntent(Intent.ACTION_ASSIST, ShortcutActivity3.class),
+                        /* weight */ 12);
+
+            assertTrue(mManager.setDynamicShortcuts(list(si1, si2)));
+
+            assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+            assertEquals(2, mManager.getRemainingCallCount());
+        });
+
+        mService.getShortcutsForTest().get(UserHandle.USER_SYSTEM).setDefaultLauncherComponent(
+                new ComponentName("pkg1", "class"));
+
+        // Restore.
+        mService.saveDirtyInfo();
+        initService();
+
+        // Before the load, the map should be empty.
+        assertEquals(0, mService.getShortcutsForTest().size());
+
+        // this will pre-load the per-user info.
+        mService.handleUnlockUser(UserHandle.USER_SYSTEM);
+
+        // Now it's loaded.
+        assertEquals(1, mService.getShortcutsForTest().size());
+
+        runWithCaller(CALLING_PACKAGE_1, UserHandle.USER_SYSTEM, () -> {
+            assertShortcutIds(assertAllDynamic(assertAllHaveIntents(assertAllHaveIcon(
+                    mManager.getDynamicShortcuts()))), "s1", "s2");
+            assertEquals(2, mManager.getRemainingCallCount());
+
+            assertEquals("title1-1", getCallerShortcut("s1").getTitle());
+            assertEquals("title1-2", getCallerShortcut("s2").getTitle());
+        });
+        runWithCaller(CALLING_PACKAGE_2, UserHandle.USER_SYSTEM, () -> {
+            assertShortcutIds(assertAllDynamic(assertAllHaveIntents(assertAllHaveIcon(
+                    mManager.getDynamicShortcuts()))), "s1", "s2");
+            assertEquals(2, mManager.getRemainingCallCount());
+
+            assertEquals("title2-1", getCallerShortcut("s1").getTitle());
+            assertEquals("title2-2", getCallerShortcut("s2").getTitle());
+        });
+
+        assertEquals("pkg1", mService.getShortcutsForTest().get(UserHandle.USER_SYSTEM)
+                .getDefaultLauncherComponent().getPackageName());
+
+        // Start another user
+        mService.handleUnlockUser(USER_10);
+
+        // Now the size is 2.
+        assertEquals(2, mService.getShortcutsForTest().size());
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertShortcutIds(assertAllDynamic(assertAllHaveIntents(assertAllHaveIcon(
+                    mManager.getDynamicShortcuts()))), "s1", "s2");
+            assertEquals(2, mManager.getRemainingCallCount());
+
+            assertEquals("title10-1-1", getCallerShortcut("s1").getTitle());
+            assertEquals("title10-1-2", getCallerShortcut("s2").getTitle());
+        });
+        assertNull(mService.getShortcutsForTest().get(USER_10).getDefaultLauncherComponent());
+
+        // Try stopping the user
+        mService.handleCleanupUser(USER_10);
+
+        // Now it's unloaded.
+        assertEquals(1, mService.getShortcutsForTest().size());
+
+        // TODO Check all other fields
+    }
+
+    public void testCleanupPackage() {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s0_1"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s0_2"))));
+        });
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s0_1"),
+                    HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s0_2"),
+                    HANDLE_USER_0);
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s0_1"),
+                    HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s0_2"),
+                    HANDLE_USER_0);
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s10_1"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s10_2"))));
+        });
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s10_1"),
+                    HANDLE_USER_10);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s10_2"),
+                    HANDLE_USER_10);
+        });
+        runWithCaller(LAUNCHER_2, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s10_1"),
+                    HANDLE_USER_10);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("s10_2"),
+                    HANDLE_USER_10);
+        });
+
+        // Remove all dynamic shortcuts; now all shortcuts are just pinned.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.removeAllDynamicShortcuts();
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            mManager.removeAllDynamicShortcuts();
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            mManager.removeAllDynamicShortcuts();
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            mManager.removeAllDynamicShortcuts();
+        });
+
+
+        final SparseArray<ShortcutUser> users =  mService.getShortcutsForTest();
+        assertEquals(2, users.size());
+        assertEquals(USER_0, users.keyAt(0));
+        assertEquals(USER_10, users.keyAt(1));
+
+        final ShortcutUser user0 =  users.get(USER_0);
+        final ShortcutUser user10 =  users.get(USER_10);
+
+
+        // Check the registered packages.
+        dumpsysOnLogcat();
+        assertEquals(set(CALLING_PACKAGE_1, CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(CALLING_PACKAGE_1, CALLING_PACKAGE_2),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_10, LAUNCHER_1),
+                        PackageWithUser.of(USER_10, LAUNCHER_2)),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_1", "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_1", "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+
+        // Nonexistent package.
+        uninstallPackage(USER_0, "abc");
+        mService.cleanUpPackageLocked("abc", USER_0, USER_0, /* appStillExists = */ false);
+
+        // No changes.
+        assertEquals(set(CALLING_PACKAGE_1, CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(CALLING_PACKAGE_1, CALLING_PACKAGE_2),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_10, LAUNCHER_1),
+                        PackageWithUser.of(USER_10, LAUNCHER_2)),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_1", "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_1", "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+
+        // Remove a package.
+        uninstallPackage(USER_0, CALLING_PACKAGE_1);
+        mService.cleanUpPackageLocked(CALLING_PACKAGE_1, USER_0, USER_0,
+                /* appStillExists = */ false);
+
+        assertEquals(set(CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(CALLING_PACKAGE_1, CALLING_PACKAGE_2),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_10, LAUNCHER_1),
+                        PackageWithUser.of(USER_10, LAUNCHER_2)),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+
+        // Remove a launcher.
+        uninstallPackage(USER_10, LAUNCHER_1);
+        mService.cleanUpPackageLocked(LAUNCHER_1, USER_10, USER_10, /* appStillExists = */ false);
+
+        assertEquals(set(CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(CALLING_PACKAGE_1, CALLING_PACKAGE_2),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_10, LAUNCHER_2)),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_10),
+                "s10_1", "s10_2");
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+
+        // Remove a package.
+        uninstallPackage(USER_10, CALLING_PACKAGE_2);
+        mService.cleanUpPackageLocked(CALLING_PACKAGE_2, USER_10, USER_10,
+                /* appStillExists = */ false);
+
+        assertEquals(set(CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(CALLING_PACKAGE_1),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_10, LAUNCHER_2)),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_10),
+                "s10_1");
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutNotExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+
+        // Remove the other launcher from user 10 too.
+        uninstallPackage(USER_10, LAUNCHER_2);
+        mService.cleanUpPackageLocked(LAUNCHER_2, USER_10, USER_10,
+                /* appStillExists = */ false);
+
+        assertEquals(set(CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(CALLING_PACKAGE_1),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(
+                set(),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_2");
+
+        // Note the pinned shortcuts on user-10 no longer referred, so they should both be removed.
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutNotExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+
+        // More remove.
+        uninstallPackage(USER_10, CALLING_PACKAGE_1);
+        mService.cleanUpPackageLocked(CALLING_PACKAGE_1, USER_10, USER_10,
+                /* appStillExists = */ false);
+
+        assertEquals(set(CALLING_PACKAGE_2),
+                hashSet(user0.getAllPackagesForTest().keySet()));
+        assertEquals(set(),
+                hashSet(user10.getAllPackagesForTest().keySet()));
+        assertEquals(
+                set(PackageWithUser.of(USER_0, LAUNCHER_1),
+                        PackageWithUser.of(USER_0, LAUNCHER_2)),
+                hashSet(user0.getAllLaunchersForTest().keySet()));
+        assertEquals(set(),
+                hashSet(user10.getAllLaunchersForTest().keySet()));
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_1, USER_0),
+                "s0_2");
+        assertShortcutIds(getLauncherPinnedShortcuts(LAUNCHER_2, USER_0),
+                "s0_2");
+
+        // Note the pinned shortcuts on user-10 no longer referred, so they should both be removed.
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s0_1", USER_0);
+        assertShortcutExists(CALLING_PACKAGE_2, "s0_2", USER_0);
+        assertShortcutNotExists(CALLING_PACKAGE_1, "s10_1", USER_10);
+        assertShortcutNotExists(CALLING_PACKAGE_2, "s10_2", USER_10);
+
+        mService.saveDirtyInfo();
+    }
+
+    public void testCleanupPackage_republishManifests() {
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s2", "s3", "ms1", "ms2"), HANDLE_USER_0);
+        });
+
+        // Remove ms2 from manifest.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"))));
+
+            // Make sure the shortcuts are in the intended state.
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "s1", "s2", "s3")
+
+                    .selectByIds("ms1")
+                    .areAllManifest()
+                    .areAllPinned()
+
+                    .revertToOriginalList()
+                    .selectByIds("ms2")
+                    .areAllNotManifest()
+                    .areAllPinned()
+
+                    .revertToOriginalList()
+                    .selectByIds("s1")
+                    .areAllDynamic()
+                    .areAllNotPinned()
+
+                    .revertToOriginalList()
+                    .selectByIds("s2")
+                    .areAllDynamic()
+                    .areAllPinned()
+
+                    .revertToOriginalList()
+                    .selectByIds("s3")
+                    .areAllNotDynamic()
+                    .areAllPinned();
+        });
+
+        // Clean up + re-publish manifests.
+        mService.cleanUpPackageLocked(CALLING_PACKAGE_1, USER_0, USER_0,
+                /* appStillExists = */ true);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1")
+                    .areAllManifest();
+        });
+    }
+
+    public void testHandleGonePackage_crossProfile() {
+        // Create some shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"))));
+        });
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        // Pin some.
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s1"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s2"), UserHandle.of(USER_P0));
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s3"), HANDLE_USER_0);
+        });
+
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s2"), HANDLE_USER_0);
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s3"), UserHandle.of(USER_P0));
+
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2,
+                    list("s1"), HANDLE_USER_0);
+        });
+
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s3"), HANDLE_USER_10);
+        });
+
+        // Check the state.
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        // Make sure all the information is persisted.
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_0);
+        mService.handleUnlockUser(USER_P0);
+        mService.handleUnlockUser(USER_10);
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        // Start uninstalling.
+        uninstallPackage(USER_10, LAUNCHER_1);
+        mService.checkPackageChanges(USER_10);
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        // Uninstall.
+        uninstallPackage(USER_10, CALLING_PACKAGE_1);
+        mService.checkPackageChanges(USER_10);
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        uninstallPackage(USER_P0, LAUNCHER_1);
+        mService.checkPackageChanges(USER_0);
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        mService.checkPackageChanges(USER_P0);
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        uninstallPackage(USER_P0, CALLING_PACKAGE_1);
+
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_0);
+        mService.handleUnlockUser(USER_P0);
+        mService.handleUnlockUser(USER_10);
+
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicAndPinned(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        // Uninstall
+        uninstallPackage(USER_0, LAUNCHER_1);
+
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_0);
+        mService.handleUnlockUser(USER_P0);
+        mService.handleUnlockUser(USER_10);
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+
+        uninstallPackage(USER_0, CALLING_PACKAGE_2);
+
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_0);
+        mService.handleUnlockUser(USER_P0);
+        mService.handleUnlockUser(USER_10);
+
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_0));
+        assertDynamicOnly(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_P0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_P0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_P0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_2, "s2", USER_0));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_2, "s3", USER_0));
+
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s2", USER_10));
+        assertNull(getPackageShortcut(CALLING_PACKAGE_1, "s3", USER_10));
+    }
+
+    protected void checkCanRestoreTo(boolean expected, ShortcutPackageInfo spi,
+            int version, String... signatures) {
+        assertEquals(expected, spi.canRestoreTo(mService, genPackage(
+                "dummy", /* uid */ 0, version, signatures)));
+    }
+
+    public void testCanRestoreTo() {
+        addPackage(CALLING_PACKAGE_1, CALLING_UID_1, 10, "sig1");
+        addPackage(CALLING_PACKAGE_2, CALLING_UID_1, 10, "sig1", "sig2");
+
+        final ShortcutPackageInfo spi1 = ShortcutPackageInfo.generateForInstalledPackage(
+                mService, CALLING_PACKAGE_1, USER_0);
+        final ShortcutPackageInfo spi2 = ShortcutPackageInfo.generateForInstalledPackage(
+                mService, CALLING_PACKAGE_2, USER_0);
+
+        checkCanRestoreTo(true, spi1, 10, "sig1");
+        checkCanRestoreTo(true, spi1, 10, "x", "sig1");
+        checkCanRestoreTo(true, spi1, 10, "sig1", "y");
+        checkCanRestoreTo(true, spi1, 10, "x", "sig1", "y");
+        checkCanRestoreTo(true, spi1, 11, "sig1");
+
+        checkCanRestoreTo(false, spi1, 10 /* empty */);
+        checkCanRestoreTo(false, spi1, 10, "x");
+        checkCanRestoreTo(false, spi1, 10, "x", "y");
+        checkCanRestoreTo(false, spi1, 10, "x");
+        checkCanRestoreTo(false, spi1, 9, "sig1");
+
+        checkCanRestoreTo(true, spi2, 10, "sig1", "sig2");
+        checkCanRestoreTo(true, spi2, 10, "sig2", "sig1");
+        checkCanRestoreTo(true, spi2, 10, "x", "sig1", "sig2");
+        checkCanRestoreTo(true, spi2, 10, "x", "sig2", "sig1");
+        checkCanRestoreTo(true, spi2, 10, "sig1", "sig2", "y");
+        checkCanRestoreTo(true, spi2, 10, "sig2", "sig1", "y");
+        checkCanRestoreTo(true, spi2, 10, "x", "sig1", "sig2", "y");
+        checkCanRestoreTo(true, spi2, 10, "x", "sig2", "sig1", "y");
+        checkCanRestoreTo(true, spi2, 11, "x", "sig2", "sig1", "y");
+
+        checkCanRestoreTo(false, spi2, 10, "sig1", "sig2x");
+        checkCanRestoreTo(false, spi2, 10, "sig2", "sig1x");
+        checkCanRestoreTo(false, spi2, 10, "x", "sig1x", "sig2");
+        checkCanRestoreTo(false, spi2, 10, "x", "sig2x", "sig1");
+        checkCanRestoreTo(false, spi2, 10, "sig1", "sig2x", "y");
+        checkCanRestoreTo(false, spi2, 10, "sig2", "sig1x", "y");
+        checkCanRestoreTo(false, spi2, 10, "x", "sig1x", "sig2", "y");
+        checkCanRestoreTo(false, spi2, 10, "x", "sig2x", "sig1", "y");
+        checkCanRestoreTo(false, spi2, 11, "x", "sig2x", "sig1", "y");
+    }
+
+    public void testHandlePackageDelete() {
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+        setCaller(CALLING_PACKAGE_1, USER_0);
+        assertTrue(mManager.addDynamicShortcuts(list(
+                makeShortcutWithIcon("s1", bmp32x32), makeShortcutWithIcon("s2", bmp32x32)
+        )));
+        // Also add a manifest shortcut, which should be removed too.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1", "s2", "ms1")
+
+                    .selectManifest()
+                    .haveIds("ms1");
+        });
+
+        setCaller(CALLING_PACKAGE_2, USER_0);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_3, USER_0);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_1, USER_10);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_2, USER_10);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_3, USER_10);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+
+        uninstallPackage(USER_0, CALLING_PACKAGE_1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageDeleteIntent(CALLING_PACKAGE_1, USER_0));
+
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+
+        uninstallPackage(USER_10, CALLING_PACKAGE_2);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageDeleteIntent(CALLING_PACKAGE_2, USER_10));
+
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+
+        mInjectedPackages.remove(CALLING_PACKAGE_1);
+        mInjectedPackages.remove(CALLING_PACKAGE_3);
+
+        mService.handleUnlockUser(USER_0);
+
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+
+        mService.handleUnlockUser(USER_10);
+
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+    }
+
+    /** Almost ame as testHandlePackageDelete, except it doesn't uninstall packages. */
+    public void testHandlePackageClearData() {
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+        setCaller(CALLING_PACKAGE_1, USER_0);
+        assertTrue(mManager.addDynamicShortcuts(list(
+                makeShortcutWithIcon("s1", bmp32x32), makeShortcutWithIcon("s2", bmp32x32)
+        )));
+
+        setCaller(CALLING_PACKAGE_2, USER_0);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_3, USER_0);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_1, USER_10);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_2, USER_10);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        setCaller(CALLING_PACKAGE_3, USER_10);
+        assertTrue(mManager.addDynamicShortcuts(list(makeShortcutWithIcon("s1", bmp32x32))));
+
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageDataClear(CALLING_PACKAGE_1, USER_0));
+
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageDataClear(CALLING_PACKAGE_2, USER_10));
+
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_0));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "s1", USER_10));
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_2, "s1", USER_10));
+        assertNotNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_3, "s1", USER_10));
+
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_0));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_1, USER_10));
+        assertFalse(bitmapDirectoryExists(CALLING_PACKAGE_2, USER_10));
+        assertTrue(bitmapDirectoryExists(CALLING_PACKAGE_3, USER_10));
+    }
+
+    public void testHandlePackageClearData_manifestRepublished() {
+
+        // Add two manifests and two dynamics.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.addDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"))));
+        });
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms2", "s2"), HANDLE_USER_10);
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "s1", "s2")
+                    .areAllEnabled()
+
+                    .selectPinned()
+                    .haveIds("ms2", "s2");
+        });
+
+        // Clear data
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageDataClear(CALLING_PACKAGE_1, USER_10));
+
+        // Only manifest shortcuts will remain, and are no longer pinned.
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2")
+                    .areAllEnabled()
+                    .areAllNotPinned();
+        });
+    }
+
+    public void testHandlePackageUpdate() throws Throwable {
+        // Set up shortcuts and launchers.
+
+        final Icon res32x32 = Icon.createWithResource(getTestContext(), R.drawable.black_32x32);
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"),
+                    makeShortcutWithIcon("s2", res32x32),
+                    makeShortcutWithIcon("s3", res32x32),
+                    makeShortcutWithIcon("s4", bmp32x32))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"),
+                    makeShortcutWithIcon("s2", bmp32x32))));
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("s1", res32x32))));
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("s1", res32x32),
+                    makeShortcutWithIcon("s2", res32x32))));
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcutWithIcon("s1", bmp32x32),
+                    makeShortcutWithIcon("s2", bmp32x32))));
+        });
+
+        LauncherApps.Callback c0 = mock(LauncherApps.Callback.class);
+        LauncherApps.Callback c10 = mock(LauncherApps.Callback.class);
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.registerCallback(c0, new Handler(Looper.getMainLooper()));
+        });
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            mLauncherApps.registerCallback(c10, new Handler(Looper.getMainLooper()));
+        });
+
+        mInjectedCurrentTimeMillis = START_TIME + 100;
+
+        ArgumentCaptor<List> shortcuts;
+
+        // First, call the event without updating the versions.
+        reset(c0);
+        reset(c10);
+
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageUpdateIntent(CALLING_PACKAGE_1, USER_0));
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageUpdateIntent(CALLING_PACKAGE_1, USER_10));
+
+        waitOnMainThread();
+
+        // Version not changed, so no callback.
+        verify(c0, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                any(List.class),
+                any(UserHandle.class));
+        verify(c10, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                any(List.class),
+                any(UserHandle.class));
+
+        // Next, update the version info for package 1.
+        reset(c0);
+        reset(c10);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+
+        // Then send the broadcast, to only user-0.
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageUpdateIntent(CALLING_PACKAGE_1, USER_0));
+
+        waitOnMainThread();
+
+        // User-0 should get the notification.
+        shortcuts = ArgumentCaptor.forClass(List.class);
+        verify(c0).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                shortcuts.capture(),
+                eq(HANDLE_USER_0));
+
+        // User-10 shouldn't yet get the notification.
+        verify(c10, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                any(List.class),
+                any(UserHandle.class));
+        assertShortcutIds(shortcuts.getValue(), "s1", "s2", "s3", "s4");
+        assertEquals(START_TIME,
+                findShortcut(shortcuts.getValue(), "s1").getLastChangedTimestamp());
+        assertEquals(START_TIME + 100,
+                findShortcut(shortcuts.getValue(), "s2").getLastChangedTimestamp());
+        assertEquals(START_TIME + 100,
+                findShortcut(shortcuts.getValue(), "s3").getLastChangedTimestamp());
+        assertEquals(START_TIME,
+                findShortcut(shortcuts.getValue(), "s4").getLastChangedTimestamp());
+
+        // Next, send unlock even on user-10.  Now we scan packages on this user and send a
+        // notification to the launcher.
+        mInjectedCurrentTimeMillis = START_TIME + 200;
+
+        doAnswer(new AnswerIsUserRunning(true)).when(mMockUserManager).isUserRunning(eq(USER_10));
+
+        reset(c0);
+        reset(c10);
+        mService.handleUnlockUser(USER_10);
+
+        shortcuts = ArgumentCaptor.forClass(List.class);
+        verify(c0, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                any(List.class),
+                any(UserHandle.class));
+
+        verify(c10).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                shortcuts.capture(),
+                eq(HANDLE_USER_10));
+
+        assertShortcutIds(shortcuts.getValue(), "s1", "s2");
+        assertEquals(START_TIME + 200,
+                findShortcut(shortcuts.getValue(), "s1").getLastChangedTimestamp());
+        assertEquals(START_TIME + 200,
+                findShortcut(shortcuts.getValue(), "s2").getLastChangedTimestamp());
+
+
+        // Do the same thing for package 2, which doesn't have resource icons.
+        mInjectedCurrentTimeMillis = START_TIME + 300;
+
+        reset(c0);
+        reset(c10);
+        updatePackageVersion(CALLING_PACKAGE_2, 10);
+
+        // Then send the broadcast, to only user-0.
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageUpdateIntent(CALLING_PACKAGE_2, USER_0));
+        mService.handleUnlockUser(USER_10);
+
+        waitOnMainThread();
+
+        verify(c0, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                any(List.class),
+                any(UserHandle.class));
+
+        verify(c10, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_1),
+                any(List.class),
+                any(UserHandle.class));
+
+        // Do the same thing for package 3
+        mInjectedCurrentTimeMillis = START_TIME + 400;
+
+        reset(c0);
+        reset(c10);
+        updatePackageVersion(CALLING_PACKAGE_3, 100);
+
+        // Then send the broadcast, to only user-0.
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageUpdateIntent(CALLING_PACKAGE_3, USER_0));
+        mService.handleUnlockUser(USER_10);
+
+        waitOnMainThread();
+
+        shortcuts = ArgumentCaptor.forClass(List.class);
+        verify(c0).onShortcutsChanged(
+                eq(CALLING_PACKAGE_3),
+                shortcuts.capture(),
+                eq(HANDLE_USER_0));
+
+        // User 10 doesn't have package 3, so no callback.
+        verify(c10, times(0)).onShortcutsChanged(
+                eq(CALLING_PACKAGE_3),
+                any(List.class),
+                any(UserHandle.class));
+
+        assertShortcutIds(shortcuts.getValue(), "s1");
+        assertEquals(START_TIME + 400,
+                findShortcut(shortcuts.getValue(), "s1").getLastChangedTimestamp());
+    }
+
+    /**
+     * Test the case where an updated app has resource IDs changed.
+     */
+    public void testHandlePackageUpdate_resIdChanged() throws Exception {
+        final Icon icon1 = Icon.createWithResource(getTestContext(), /* res ID */ 1000);
+        final Icon icon2 = Icon.createWithResource(getTestContext(), /* res ID */ 1001);
+
+        // Set up shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            // Note resource strings are not officially supported (they're hidden), but
+            // should work.
+
+            final ShortcutInfo s1 = new ShortcutInfo.Builder(mClientContext)
+                    .setId("s1")
+                    .setActivity(makeComponent(ShortcutActivity.class))
+                    .setIntent(new Intent(Intent.ACTION_VIEW))
+                    .setIcon(icon1)
+                    .setTitleResId(10000)
+                    .setTextResId(10001)
+                    .setDisabledMessageResId(10002)
+                    .build();
+
+            final ShortcutInfo s2 = new ShortcutInfo.Builder(mClientContext)
+                    .setId("s2")
+                    .setActivity(makeComponent(ShortcutActivity.class))
+                    .setIntent(new Intent(Intent.ACTION_VIEW))
+                    .setIcon(icon2)
+                    .setTitleResId(20000)
+                    .build();
+
+            assertTrue(mManager.setDynamicShortcuts(list(s1, s2)));
+        });
+
+        // Verify.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ShortcutInfo s1 = getCallerShortcut("s1");
+            final ShortcutInfo s2 = getCallerShortcut("s2");
+
+            assertEquals(1000, s1.getIconResourceId());
+            assertEquals(10000, s1.getTitleResId());
+            assertEquals(10001, s1.getTextResId());
+            assertEquals(10002, s1.getDisabledMessageResourceId());
+
+            assertEquals(1001, s2.getIconResourceId());
+            assertEquals(20000, s2.getTitleResId());
+            assertEquals(0, s2.getTextResId());
+            assertEquals(0, s2.getDisabledMessageResourceId());
+        });
+
+        mService.saveDirtyInfo();
+        initService();
+
+        // Set up the mock resources again, with an "adjustment".
+        // When the package is updated, the service will fetch the updated res-IDs with res-names,
+        // and the new IDs will have this offset.
+        setUpAppResources(10);
+
+        // Update the package.
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageUpdateIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ShortcutInfo s1 = getCallerShortcut("s1");
+            final ShortcutInfo s2 = getCallerShortcut("s2");
+
+            assertEquals(1010, s1.getIconResourceId());
+            assertEquals(10010, s1.getTitleResId());
+            assertEquals(10011, s1.getTextResId());
+            assertEquals(10012, s1.getDisabledMessageResourceId());
+
+            assertEquals(1011, s2.getIconResourceId());
+            assertEquals(20010, s2.getTitleResId());
+            assertEquals(0, s2.getTextResId());
+            assertEquals(0, s2.getDisabledMessageResourceId());
+        });
+    }
+
+    public void testHandlePackageChanged() {
+        final ComponentName ACTIVITY1 = new ComponentName(CALLING_PACKAGE_1, "act1");
+        final ComponentName ACTIVITY2 = new ComponentName(CALLING_PACKAGE_1, "act2");
+
+        addManifestShortcutResource(ACTIVITY1, R.xml.shortcut_1);
+        addManifestShortcutResource(ACTIVITY2, R.xml.shortcut_1_alt);
+
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertTrue(mManager.addDynamicShortcuts(list(
+                    makeShortcutWithActivity("s1", ACTIVITY1),
+                    makeShortcutWithActivity("s2", ACTIVITY2)
+            )));
+        });
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms1-alt", "s2"), HANDLE_USER_10);
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms1-alt", "s1", "s2")
+                    .areAllEnabled()
+
+                    .selectPinned()
+                    .haveIds("ms1-alt", "s2")
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1", "s1")
+                    .areAllWithActivity(ACTIVITY1)
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1-alt", "s2")
+                    .areAllWithActivity(ACTIVITY2)
+                    ;
+        });
+
+        // First, no changes.
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageChangedIntent(CALLING_PACKAGE_1, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms1-alt", "s1", "s2")
+                    .areAllEnabled()
+
+                    .selectPinned()
+                    .haveIds("ms1-alt", "s2")
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1", "s1")
+                    .areAllWithActivity(ACTIVITY1)
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1-alt", "s2")
+                    .areAllWithActivity(ACTIVITY2)
+            ;
+        });
+
+        // Disable activity 1
+        mEnabledActivityChecker = (activity, userId) -> !ACTIVITY1.equals(activity);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageChangedIntent(CALLING_PACKAGE_1, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1-alt", "s2")
+                    .areAllEnabled()
+
+                    .selectPinned()
+                    .haveIds("ms1-alt", "s2")
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1-alt", "s2")
+                    .areAllWithActivity(ACTIVITY2)
+            ;
+        });
+
+        // Re-enable activity 1.
+        // Manifest shortcuts will be re-published, but dynamic ones are not.
+        mEnabledActivityChecker = (activity, userId) -> true;
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageChangedIntent(CALLING_PACKAGE_1, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms1-alt", "s2")
+                    .areAllEnabled()
+
+                    .selectPinned()
+                    .haveIds("ms1-alt", "s2")
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1")
+                    .areAllWithActivity(ACTIVITY1)
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1-alt", "s2")
+                    .areAllWithActivity(ACTIVITY2)
+                    ;
+        });
+
+        // Disable activity 2
+        // Because "ms1-alt" and "s2" are both pinned, they will remain, but disabled.
+        mEnabledActivityChecker = (activity, userId) -> !ACTIVITY2.equals(activity);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageChangedIntent(CALLING_PACKAGE_1, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms1-alt", "s2")
+
+                    .selectDynamic().isEmpty().revertToOriginalList() // no dynamics.
+
+                    .selectPinned()
+                    .haveIds("ms1-alt", "s2")
+                    .areAllDisabled()
+
+                    .revertToOriginalList()
+                    .selectByIds("ms1")
+                    .areAllWithActivity(ACTIVITY1)
+                    .areAllEnabled()
+            ;
+        });
+    }
+
+    public void testHandlePackageUpdate_activityNoLongerMain() throws Throwable {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcutWithActivity("s1a",
+                            new ComponentName(getCallingPackage(), "act1")),
+                    makeShortcutWithActivity("s1b",
+                            new ComponentName(getCallingPackage(), "act1")),
+                    makeShortcutWithActivity("s2a",
+                            new ComponentName(getCallingPackage(), "act2")),
+                    makeShortcutWithActivity("s2b",
+                            new ComponentName(getCallingPackage(), "act2")),
+                    makeShortcutWithActivity("s3a",
+                            new ComponentName(getCallingPackage(), "act3")),
+                    makeShortcutWithActivity("s3b",
+                            new ComponentName(getCallingPackage(), "act3"))
+            )));
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1a", "s1b", "s2a", "s2b", "s3a", "s3b")
+                    .areAllDynamic();
+        });
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("s1b", "s2b", "s3b"),
+                    HANDLE_USER_0);
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1a", "s1b", "s2a", "s2b", "s3a", "s3b")
+                    .areAllDynamic()
+
+                    .selectByIds("s1b", "s2b", "s3b")
+                    .areAllPinned();
+        });
+
+        // Update the app and act2 and act3 are no longer main.
+        mMainActivityChecker = (activity, userId) -> {
+            return activity.getClassName().equals("act1");
+        };
+
+        setCaller(LAUNCHER_1, USER_0);
+        assertForLauncherCallback(mLauncherApps, () -> {
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageUpdateIntent(CALLING_PACKAGE_1, USER_0));
+        }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0)
+                // Make sure the launcher gets callbacks.
+                .haveIds("s1a", "s1b", "s2b", "s3b")
+                .areAllWithKeyFieldsOnly();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            // s2a and s3a are gone, but s2b and s3b will remain because they're pinned, and
+            // disabled.
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1a", "s1b", "s2b", "s3b")
+
+                    .selectByIds("s1a", "s1b")
+                    .areAllDynamic()
+                    .areAllEnabled()
+
+                    .revertToOriginalList()
+                    .selectByIds("s2b", "s3b")
+                    .areAllNotDynamic()
+                    .areAllDisabled()
+                    .areAllPinned()
+                    ;
+        });
+    }
+
+    protected void prepareForBackupTest() {
+
+        prepareCrossProfileDataSet();
+
+        backupAndRestore();
+    }
+
+    /**
+     * Make sure the backup data doesn't have the following information:
+     * - Launchers on other users.
+     * - Non-backup app information.
+     *
+     * But restores all other infomation.
+     *
+     * It also omits the following pieces of information, but that's tested in
+     * {@link ShortcutManagerTest2#testShortcutInfoSaveAndLoad_forBackup}.
+     * - Unpinned dynamic shortcuts
+     * - Bitmaps
+     */
+    public void testBackupAndRestore() {
+        prepareForBackupTest();
+
+        checkBackupAndRestore_success();
+    }
+
+    public void testBackupAndRestore_backupRestoreTwice() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        dumpsysOnLogcat("Before second backup");
+
+        backupAndRestore();
+
+        dumpsysOnLogcat("After second backup");
+
+        checkBackupAndRestore_success();
+    }
+
+    public void testBackupAndRestore_backupRestoreMultiple() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        // This also shouldn't affect the result.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcut("s1"), makeShortcut("s2"), makeShortcut("s3"),
+                    makeShortcut("s4"), makeShortcut("s5"), makeShortcut("s6"))));
+        });
+
+        backupAndRestore();
+
+        checkBackupAndRestore_success();
+    }
+
+    public void testBackupAndRestore_restoreToNewVersion() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        addPackage(CALLING_PACKAGE_1, CALLING_UID_1, 2);
+        addPackage(LAUNCHER_1, LAUNCHER_UID_1, 5);
+
+        checkBackupAndRestore_success();
+    }
+
+    public void testBackupAndRestore_restoreToSuperSetSignatures() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        // Change package signatures.
+        addPackage(CALLING_PACKAGE_1, CALLING_UID_1, 1, "sigx", CALLING_PACKAGE_1);
+        addPackage(LAUNCHER_1, LAUNCHER_UID_1, 4, LAUNCHER_1, "sigy");
+
+        checkBackupAndRestore_success();
+    }
+
+    protected void checkBackupAndRestore_success() {
+        // Make sure non-system user is not restored.
+        final ShortcutUser userP0 = mService.getUserShortcutsLocked(USER_P0);
+        assertEquals(0, userP0.getAllPackagesForTest().size());
+        assertEquals(0, userP0.getAllLaunchersForTest().size());
+
+        // Make sure only "allowBackup" apps are restored, and are shadow.
+        final ShortcutUser user0 = mService.getUserShortcutsLocked(USER_0);
+        assertExistsAndShadow(user0.getAllPackagesForTest().get(CALLING_PACKAGE_1));
+        assertExistsAndShadow(user0.getAllPackagesForTest().get(CALLING_PACKAGE_2));
+        assertExistsAndShadow(user0.getAllLaunchersForTest().get(PackageWithUser.of(USER_0, LAUNCHER_1)));
+        assertExistsAndShadow(user0.getAllLaunchersForTest().get(PackageWithUser.of(USER_0, LAUNCHER_2)));
+
+        assertNull(user0.getAllPackagesForTest().get(CALLING_PACKAGE_3));
+        assertNull(user0.getAllLaunchersForTest().get(PackageWithUser.of(USER_0, LAUNCHER_3)));
+        assertNull(user0.getAllLaunchersForTest().get(PackageWithUser.of(USER_P0, LAUNCHER_1)));
+
+        installPackage(USER_0, CALLING_PACKAGE_1);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2");
+        });
+
+        installPackage(USER_0, LAUNCHER_1);
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0))
+                    /* empty, not restored */ );
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty, not restored */ );
+
+            assertEquals(0, mLauncherApps.getShortcuts(QUERY_ALL, HANDLE_USER_P0).size());
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_2);
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3");
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s1", "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty, not restored */ );
+
+            assertEquals(0, mLauncherApps.getShortcuts(QUERY_ALL, HANDLE_USER_P0).size());
+        });
+
+        // 3 shouldn't be backed up, so no pinned shortcuts.
+        installPackage(USER_0, CALLING_PACKAGE_3);
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        // Launcher on a different profile shouldn't be restored.
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            assertEquals(0,
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)
+                            .size());
+            assertEquals(0,
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)
+                            .size());
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* wasn't restored, so still empty */ );
+        });
+
+        // Package on a different profile, no restore.
+        installPackage(USER_P0, CALLING_PACKAGE_1);
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        // Restore launcher 2 on user 0.
+        installPackage(USER_0, LAUNCHER_2);
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)),
+                    "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* wasn't restored, so still empty */ );
+
+            assertEquals(0, mLauncherApps.getShortcuts(QUERY_ALL, HANDLE_USER_P0).size());
+        });
+
+
+        // Restoration of launcher2 shouldn't affect other packages; so do the same checks and
+        // make sure they still have the same result.
+        installPackage(USER_0, CALLING_PACKAGE_1);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2");
+        });
+
+        installPackage(USER_0, LAUNCHER_1);
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)),
+                    "s1");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s1", "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* wasn't restored, so still empty */ );
+
+            assertEquals(0, mLauncherApps.getShortcuts(QUERY_ALL, HANDLE_USER_P0).size());
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_2);
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3");
+        });
+    }
+
+    public void testBackupAndRestore_publisherLowerVersion() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        addPackage(CALLING_PACKAGE_1, CALLING_UID_1, 0); // Lower version
+
+        checkBackupAndRestore_publisherNotRestored();
+    }
+
+    public void testBackupAndRestore_publisherWrongSignature() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        addPackage(CALLING_PACKAGE_1, CALLING_UID_1, 10, "sigx"); // different signature
+
+        checkBackupAndRestore_publisherNotRestored();
+    }
+
+    public void testBackupAndRestore_publisherNoLongerBackupTarget() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        updatePackageInfo(CALLING_PACKAGE_1,
+                pi -> pi.applicationInfo.flags &= ~ApplicationInfo.FLAG_ALLOW_BACKUP);
+
+        checkBackupAndRestore_publisherNotRestored();
+    }
+
+    protected void checkBackupAndRestore_publisherNotRestored() {
+        installPackage(USER_0, CALLING_PACKAGE_1);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_2);
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3");
+        });
+
+        installPackage(USER_0, LAUNCHER_1);
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s1", "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+        installPackage(USER_0, LAUNCHER_2);
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_3);
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s1", "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+    }
+
+    public void testBackupAndRestore_launcherLowerVersion() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        addPackage(LAUNCHER_1, LAUNCHER_UID_1, 0); // Lower version
+
+        checkBackupAndRestore_launcherNotRestored();
+    }
+
+    public void testBackupAndRestore_launcherWrongSignature() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        addPackage(LAUNCHER_1, LAUNCHER_UID_1, 10, "sigx"); // different signature
+
+        checkBackupAndRestore_launcherNotRestored();
+    }
+
+    public void testBackupAndRestore_launcherNoLongerBackupTarget() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        updatePackageInfo(LAUNCHER_1,
+                pi -> pi.applicationInfo.flags &= ~ApplicationInfo.FLAG_ALLOW_BACKUP);
+
+        checkBackupAndRestore_launcherNotRestored();
+    }
+
+    protected void checkBackupAndRestore_launcherNotRestored() {
+        installPackage(USER_0, CALLING_PACKAGE_1);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+
+            // s1 was pinned by launcher 1, which is not restored, yet, so we still see "s1" here.
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2");
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_2);
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3");
+        });
+
+        // Now we try to restore launcher 1.  Then we realize it's not restorable, so L1 has no pinned
+        // shortcuts.
+        installPackage(USER_0, LAUNCHER_1);
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+
+            // Now CALLING_PACKAGE_1 realizes "s1" is no longer pinned.
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s2");
+        });
+
+        installPackage(USER_0, LAUNCHER_2);
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)),
+                    "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_3);
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0)),
+                    "s2");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+    }
+
+    public void testBackupAndRestore_launcherAndPackageNoLongerBackupTarget() {
+        prepareForBackupTest();
+
+        // Note doing a backup & restore again here shouldn't affect the result.
+        backupAndRestore();
+
+        updatePackageInfo(CALLING_PACKAGE_1,
+                pi -> pi.applicationInfo.flags &= ~ApplicationInfo.FLAG_ALLOW_BACKUP);
+
+        updatePackageInfo(LAUNCHER_1,
+                pi -> pi.applicationInfo.flags &= ~ApplicationInfo.FLAG_ALLOW_BACKUP);
+
+        checkBackupAndRestore_publisherAndLauncherNotRestored();
+    }
+
+    protected void checkBackupAndRestore_publisherAndLauncherNotRestored() {
+        installPackage(USER_0, CALLING_PACKAGE_1);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_2);
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3");
+        });
+
+        installPackage(USER_0, LAUNCHER_1);
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+        installPackage(USER_0, LAUNCHER_2);
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+
+        // Because launcher 1 wasn't restored, "s1" is no longer pinned.
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertShortcutIds(assertAllPinned(
+                    mManager.getPinnedShortcuts()),
+                    "s2", "s3");
+        });
+
+        installPackage(USER_0, CALLING_PACKAGE_3);
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(0, mManager.getDynamicShortcuts().size());
+            assertEquals(0, mManager.getPinnedShortcuts().size());
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0))
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_2), HANDLE_USER_0)),
+                    "s2", "s3");
+            assertShortcutIds(assertAllPinned(
+                    mLauncherApps.getShortcuts(buildAllQuery(CALLING_PACKAGE_3), HANDLE_USER_0))
+                    /* empty */);
+        });
+    }
+
+    public void testSaveAndLoad_crossProfile() {
+        prepareCrossProfileDataSet();
+
+        dumpsysOnLogcat("Before save & load");
+
+        mService.saveDirtyInfo();
+        initService();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3", "s4");
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3", "s4", "s5");
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3", "s4", "s5", "s6");
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts())
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts())
+                    /* empty */);
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()),
+                    "s1", "s2", "s3");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()),
+                    "s1", "s2", "s3", "s4", "s5", "s6");
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_P0, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts())
+                    /* empty */);
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts())
+                    /* empty */);
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertShortcutIds(assertAllDynamic(mManager.getDynamicShortcuts()),
+                    "x1", "x2", "x3");
+            assertShortcutIds(assertAllPinned(mManager.getPinnedShortcuts()),
+                    "x4", "x5");
+        });
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_0),
+                    "s1");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_0),
+                    "s1", "s2");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_3), HANDLE_USER_0),
+                    "s1", "s2", "s3");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_4), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_P0),
+                    "s1", "s4");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_P0)
+                    /* empty */);
+            assertExpectException(
+                    SecurityException.class, "", () -> {
+                        mLauncherApps.getShortcuts(
+                                buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_10);
+                    });
+        });
+        runWithCaller(LAUNCHER_2, USER_0, () -> {
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_0),
+                    "s2");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_0),
+                    "s2", "s3");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_3), HANDLE_USER_0),
+                    "s2", "s3", "s4");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_4), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_P0),
+                    "s2", "s5");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_P0)
+                    /* empty */);
+        });
+        runWithCaller(LAUNCHER_3, USER_0, () -> {
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_0),
+                    "s3");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_0),
+                    "s3", "s4");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_3), HANDLE_USER_0),
+                    "s3", "s4", "s5");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_4), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_P0),
+                    "s3", "s6");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_P0)
+                    /* empty */);
+        });
+        runWithCaller(LAUNCHER_4, USER_0, () -> {
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_3), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_4), HANDLE_USER_0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_P0)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_P0)
+                    /* empty */);
+        });
+        runWithCaller(LAUNCHER_1, USER_P0, () -> {
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_0),
+                    "s3", "s4");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_0),
+                    "s3", "s4", "s5");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_3), HANDLE_USER_0),
+                    "s3", "s4", "s5", "s6");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_P0),
+                    "s1", "s4");
+            assertExpectException(
+                    SecurityException.class, "unrelated profile", () -> {
+                        mLauncherApps.getShortcuts(
+                                buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_10);
+                    });
+        });
+        runWithCaller(LAUNCHER_1, USER_10, () -> {
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_1), HANDLE_USER_10),
+                    "x4", "x5");
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_2), HANDLE_USER_10)
+                    /* empty */);
+            assertShortcutIds(
+                    mLauncherApps.getShortcuts(buildPinnedQuery(CALLING_PACKAGE_3), HANDLE_USER_10)
+                    /* empty */);
+            assertExpectException(
+                    SecurityException.class, "unrelated profile", () -> {
+                        mLauncherApps.getShortcuts(
+                                buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_0);
+                    });
+            assertExpectException(
+                    SecurityException.class, "unrelated profile", () -> {
+                        mLauncherApps.getShortcuts(
+                                buildAllQuery(CALLING_PACKAGE_1), HANDLE_USER_P0);
+                    });
+        });
+    }
+
+    public void testOnApplicationActive_permission() {
+        assertExpectException(SecurityException.class, "Missing permission", () ->
+                mManager.onApplicationActive(CALLING_PACKAGE_1, USER_0));
+
+        // Has permission, now it should pass.
+        mCallerPermissions.add(permission.RESET_SHORTCUT_MANAGER_THROTTLING);
+        mManager.onApplicationActive(CALLING_PACKAGE_1, USER_0);
+    }
+
+    public void testDumpsys_crossProfile() {
+        prepareCrossProfileDataSet();
+        dumpsysOnLogcat("test1", /* force= */ true);
+    }
+
+    public void testDumpsys_withIcons() throws IOException {
+        testIcons();
+        // Dump after having some icons.
+        dumpsysOnLogcat("test1", /* force= */ true);
+    }
+
+    public void testManifestShortcut_publishOnUnlockUser() {
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_3, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+
+        // Unlock user-0.
+        mService.handleUnlockUser(USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Try on another user, with some packages uninstalled.
+        uninstallPackage(USER_10, CALLING_PACKAGE_1);
+        uninstallPackage(USER_10, CALLING_PACKAGE_3);
+
+        mService.handleUnlockUser(USER_10);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_10, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Now change the resources for package 1, and unlock again.
+        // But we still see *old* shortcuts, because the package version and install time
+        // hasn't changed.
+        shutdownServices();
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_3, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+
+        initService();
+        mService.handleUnlockUser(USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Do it again, but this time we change the app version, so we do detect the changes.
+        shutdownServices();
+
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        updatePackageLastUpdateTime(CALLING_PACKAGE_3, 1);
+
+        initService();
+        mService.handleUnlockUser(USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Next, try removing all shortcuts, with some of them pinned.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms3"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("ms2"), HANDLE_USER_0);
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_3, list("ms1"), HANDLE_USER_0);
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5");
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllManifest(
+                    assertAllEnabled(mManager.getPinnedShortcuts())))),
+                    "ms3");
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllManifest(
+                    assertAllEnabled(mManager.getPinnedShortcuts())))),
+                    "ms2");
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllManifest(
+                    assertAllEnabled(mManager.getPinnedShortcuts())))),
+                    "ms1");
+        });
+
+        shutdownServices();
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_0);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_3, ShortcutActivity.class.getName()),
+                R.xml.shortcut_0);
+
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        updatePackageVersion(CALLING_PACKAGE_2, 1);
+        updatePackageVersion(CALLING_PACKAGE_3, 1);
+
+        initService();
+        mService.handleUnlockUser(USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllNotManifest(
+                    assertAllDisabled(mManager.getPinnedShortcuts())))),
+                    "ms3");
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllNotManifest(
+                    assertAllDisabled(mManager.getPinnedShortcuts())))),
+                    "ms2");
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllNotManifest(
+                    assertAllDisabled(mManager.getPinnedShortcuts())))),
+                    "ms1");
+        });
+
+        // Make sure we don't have ShortcutPackage for packages that don't have shortcuts.
+        assertNull(mService.getPackageShortcutForTest(CALLING_PACKAGE_4, USER_0));
+        assertNull(mService.getPackageShortcutForTest(LAUNCHER_1, USER_0));
+    }
+
+    public void testManifestShortcut_publishOnBroadcast() {
+        // First, no packages are installed.
+        uninstallPackage(USER_0, CALLING_PACKAGE_1);
+        uninstallPackage(USER_0, CALLING_PACKAGE_2);
+        uninstallPackage(USER_0, CALLING_PACKAGE_3);
+        uninstallPackage(USER_0, CALLING_PACKAGE_4);
+        uninstallPackage(USER_10, CALLING_PACKAGE_1);
+        uninstallPackage(USER_10, CALLING_PACKAGE_2);
+        uninstallPackage(USER_10, CALLING_PACKAGE_3);
+        uninstallPackage(USER_10, CALLING_PACKAGE_4);
+
+        mService.handleUnlockUser(USER_0);
+        mService.handleUnlockUser(USER_10);
+
+        // Originally no manifest shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Package 1 updated, with manifest shortcuts.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Package 2 updated, with manifest shortcuts.
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+        updatePackageVersion(CALLING_PACKAGE_2, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_2, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5");
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()))
+                    .haveRanksInOrder("ms1", "ms2", "ms3", "ms4", "ms5");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // Package 2 updated, with less manifest shortcuts.
+        // This time we use updatePackageLastUpdateTime() instead of updatePackageVersion().
+
+        dumpsysOnLogcat("Before pinning");
+
+        // Also pin some.
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list("ms2", "ms3"), HANDLE_USER_0);
+        });
+
+        dumpsysOnLogcat("After pinning");
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        updatePackageLastUpdateTime(CALLING_PACKAGE_2, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_2, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()))
+                    .haveRanksInOrder("ms1", "ms2");
+            assertShortcutIds(assertAllImmutable(assertAllPinned(
+                    mManager.getPinnedShortcuts())),
+                    "ms2", "ms3");
+            // ms3 is no longer in manifest, so should be disabled.
+            // but ms1 and ms2 should be enabled.
+            assertAllEnabled(list(getCallerShortcut("ms1")));
+            assertAllEnabled(list(getCallerShortcut("ms2")));
+            assertAllDisabled(list(getCallerShortcut("ms3")));
+        });
+
+        // Package 2 on user 10 has no shortcuts yet.
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+        // Send PACKAGE_ADD broadcast to have Package 2 on user-10 publish manifest shortcuts.
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_2, USER_10));
+
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()))
+                    .haveRanksInOrder("ms1", "ms2");
+            assertEmpty(mManager.getPinnedShortcuts());
+        });
+
+        // But it shouldn't affect user-0.
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()))
+                    .haveRanksInOrder("ms1", "ms2");
+            assertShortcutIds(assertAllImmutable(assertAllPinned(
+                    mManager.getPinnedShortcuts())),
+                    "ms2", "ms3");
+            assertAllEnabled(list(getCallerShortcut("ms1")));
+            assertAllEnabled(list(getCallerShortcut("ms2")));
+            assertAllDisabled(list(getCallerShortcut("ms3")));
+        });
+
+        // Multiple activities.
+        // Add shortcuts on activity 2 for package 2.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5_alt);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity2.class.getName()),
+                R.xml.shortcut_5_reverse);
+
+        updatePackageLastUpdateTime(CALLING_PACKAGE_2, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_2, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5",
+                    "ms1_alt", "ms2_alt", "ms3_alt", "ms4_alt", "ms5_alt");
+
+            // Make sure they have the correct ranks, regardless of their ID's alphabetical order.
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()))
+                    .haveRanksInOrder("ms1_alt", "ms2_alt", "ms3_alt", "ms4_alt", "ms5_alt");
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_2, ShortcutActivity2.class.getName()))
+                    .haveRanksInOrder("ms5", "ms4", "ms3", "ms2", "ms1");
+        });
+
+        // Package 2 now has no manifest shortcuts.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity.class.getName()),
+                R.xml.shortcut_0);
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_2, ShortcutActivity2.class.getName()),
+                R.xml.shortcut_0);
+        updatePackageLastUpdateTime(CALLING_PACKAGE_2, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_2, USER_0));
+
+        // No manifest shortcuts, and pinned ones are disabled.
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertShortcutIds(assertAllImmutable(assertAllPinned(assertAllDisabled(
+                    mManager.getPinnedShortcuts()))),
+                    "ms2", "ms3");
+        });
+    }
+
+    public void testManifestShortcuts_missingMandatoryFields() {
+        // Start with no apps installed.
+        uninstallPackage(USER_0, CALLING_PACKAGE_1);
+        uninstallPackage(USER_0, CALLING_PACKAGE_2);
+        uninstallPackage(USER_0, CALLING_PACKAGE_3);
+        uninstallPackage(USER_0, CALLING_PACKAGE_4);
+
+        mService.handleUnlockUser(USER_0);
+
+        // Make sure no manifest shortcuts.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+        });
+
+        // Package 1 updated, which has one valid manifest shortcut and one invalid.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_error_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Only the valid one is published.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "x1");
+        });
+
+        // Package 1 updated, which has one valid manifest shortcut and one invalid.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_error_2);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Only the valid one is published.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "x2");
+        });
+
+        // Package 1 updated, which has one valid manifest shortcut and one invalid.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_error_3);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Only the valid one is published.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "x3");
+        });
+    }
+
+    public void testManifestShortcuts_intentDefinitions() {
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_error_4);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            // Make sure invalid ones are not published.
+            // Note that at this point disabled ones don't show up because they weren't pinned.
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2")
+                    .areAllManifest()
+                    .areAllNotDynamic()
+                    .areAllNotPinned()
+                    .areAllImmutable()
+                    .areAllEnabled()
+                    .forShortcutWithId("ms1", si -> {
+                        assertTrue(si.isEnabled());
+                        assertEquals("action1", si.getIntent().getAction());
+                    })
+                    .forShortcutWithId("ms2", si -> {
+                        assertTrue(si.isEnabled());
+                        assertEquals("action2_1", si.getIntent().getAction());
+                    });
+        });
+
+        // Publish 5 enabled to pin some, so we can later test disabled manfiest shortcuts..
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            // Make sure 5 manifest shortcuts are published.
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "ms3", "ms4", "ms5")
+                    .areAllManifest()
+                    .areAllNotDynamic()
+                    .areAllNotPinned()
+                    .areAllImmutable()
+                    .areAllEnabled();
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1,
+                    list("ms3", "ms4", "ms5"), HANDLE_USER_0);
+        });
+
+        // Make sure they're pinned.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "ms3", "ms4", "ms5")
+                    .selectByIds("ms1", "ms2")
+                    .areAllNotPinned()
+                    .areAllEnabled()
+
+                    .revertToOriginalList()
+                    .selectByIds("ms3", "ms4", "ms5")
+                    .areAllPinned()
+                    .areAllEnabled();
+        });
+
+        // Update the app.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_error_4);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Make sure 3, 4 and 5 still exist but disabled.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "ms3", "ms4", "ms5")
+                    .areAllNotDynamic()
+                    .areAllImmutable()
+
+                    .selectByIds("ms1", "ms2")
+                    .areAllManifest()
+                    .areAllNotPinned()
+                    .areAllEnabled()
+
+                    .revertToOriginalList()
+                    .selectByIds("ms3", "ms4", "ms5")
+                    .areAllNotManifest()
+                    .areAllPinned()
+                    .areAllDisabled()
+
+                    .revertToOriginalList()
+                    .forShortcutWithId("ms1", si -> {
+                        assertEquals(si.getId(), "action1", si.getIntent().getAction());
+                    })
+                    .forShortcutWithId("ms2", si -> {
+                        assertEquals(si.getId(), "action2_1", si.getIntent().getAction());
+                    })
+                    .forShortcutWithId("ms3", si -> {
+                        assertEquals(si.getId(), Intent.ACTION_VIEW, si.getIntent().getAction());
+                    })
+                    .forShortcutWithId("ms4", si -> {
+                        assertEquals(si.getId(), Intent.ACTION_VIEW, si.getIntent().getAction());
+                    })
+                    .forShortcutWithId("ms5", si -> {
+                        assertEquals(si.getId(), "action", si.getIntent().getAction());
+                    });
+        });
+    }
+
+    public void testManifestShortcuts_checkAllFields() {
+        mService.handleUnlockUser(USER_0);
+
+        // Package 1 updated, which has one valid manifest shortcut and one invalid.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Only the valid one is published.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("ms1", "ms2", "ms3", "ms4", "ms5")
+                    .areAllManifest()
+                    .areAllImmutable()
+                    .areAllEnabled()
+                    .areAllNotPinned()
+                    .areAllNotDynamic()
+
+                    .forShortcutWithId("ms1", si -> {
+                        assertEquals(R.drawable.icon1, si.getIconResourceId());
+                        assertEquals(new ComponentName(CALLING_PACKAGE_1,
+                                ShortcutActivity.class.getName()),
+                                si.getActivity());
+
+                        assertEquals(R.string.shortcut_title1, si.getTitleResId());
+                        assertEquals("r" + R.string.shortcut_title1, si.getTitleResName());
+                        assertEquals(R.string.shortcut_text1, si.getTextResId());
+                        assertEquals("r" + R.string.shortcut_text1, si.getTextResName());
+                        assertEquals(R.string.shortcut_disabled_message1,
+                                si.getDisabledMessageResourceId());
+                        assertEquals("r" + R.string.shortcut_disabled_message1,
+                                si.getDisabledMessageResName());
+
+                        assertEquals(set("android.shortcut.conversation", "android.shortcut.media"),
+                                si.getCategories());
+                        assertEquals("action1", si.getIntent().getAction());
+                        assertEquals(Uri.parse("http://a.b.c/1"), si.getIntent().getData());
+                    })
+
+                    .forShortcutWithId("ms2", si -> {
+                        assertEquals("ms2", si.getId());
+                        assertEquals(R.drawable.icon2, si.getIconResourceId());
+
+                        assertEquals(R.string.shortcut_title2, si.getTitleResId());
+                        assertEquals("r" + R.string.shortcut_title2, si.getTitleResName());
+                        assertEquals(R.string.shortcut_text2, si.getTextResId());
+                        assertEquals("r" + R.string.shortcut_text2, si.getTextResName());
+                        assertEquals(R.string.shortcut_disabled_message2,
+                                si.getDisabledMessageResourceId());
+                        assertEquals("r" + R.string.shortcut_disabled_message2,
+                                si.getDisabledMessageResName());
+
+                        assertEquals(set("android.shortcut.conversation"), si.getCategories());
+                        assertEquals("action2", si.getIntent().getAction());
+                        assertEquals(null, si.getIntent().getData());
+                    })
+
+                    .forShortcutWithId("ms3", si -> {
+                        assertEquals(0, si.getIconResourceId());
+                        assertEquals(R.string.shortcut_title1, si.getTitleResId());
+                        assertEquals("r" + R.string.shortcut_title1, si.getTitleResName());
+
+                        assertEquals(0, si.getTextResId());
+                        assertEquals(null, si.getTextResName());
+                        assertEquals(0, si.getDisabledMessageResourceId());
+                        assertEquals(null, si.getDisabledMessageResName());
+
+                        assertEmpty(si.getCategories());
+                        assertEquals("android.intent.action.VIEW", si.getIntent().getAction());
+                        assertEquals(null, si.getIntent().getData());
+                    })
+
+                    .forShortcutWithId("ms4", si -> {
+                        assertEquals(0, si.getIconResourceId());
+                        assertEquals(R.string.shortcut_title2, si.getTitleResId());
+                        assertEquals("r" + R.string.shortcut_title2, si.getTitleResName());
+
+                        assertEquals(0, si.getTextResId());
+                        assertEquals(null, si.getTextResName());
+                        assertEquals(0, si.getDisabledMessageResourceId());
+                        assertEquals(null, si.getDisabledMessageResName());
+
+                        assertEquals(set("cat"), si.getCategories());
+                        assertEquals("android.intent.action.VIEW2", si.getIntent().getAction());
+                        assertEquals(null, si.getIntent().getData());
+                    })
+
+                    .forShortcutWithId("ms5", si -> {
+                        si = getCallerShortcut("ms5");
+                        assertEquals("action", si.getIntent().getAction());
+                        assertEquals("http://www/", si.getIntent().getData().toString());
+                        assertEquals("foo/bar", si.getIntent().getType());
+                        assertEquals(
+                                new ComponentName("abc", ".xyz"), si.getIntent().getComponent());
+
+                        assertEquals(set("cat1", "cat2"), si.getIntent().getCategories());
+                        assertEquals("value1", si.getIntent().getStringExtra("key1"));
+                        assertEquals("value2", si.getIntent().getStringExtra("key2"));
+                    });
+        });
+    }
+
+    public void testManifestShortcuts_localeChange() {
+        mService.handleUnlockUser(USER_0);
+
+        // Package 1 updated, which has one valid manifest shortcut and one invalid.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.setDynamicShortcuts(list(makeShortcutWithTitle("s1", "title")));
+
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2");
+
+            // check first shortcut.
+            ShortcutInfo si = getCallerShortcut("ms1");
+
+            assertEquals("ms1", si.getId());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title1 + "/en",
+                    si.getTitle());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text1 + "/en",
+                    si.getText());
+            assertEquals("string-com.android.test.1-user:0-res:"
+                            + R.string.shortcut_disabled_message1 + "/en",
+                    si.getDisabledMessage());
+            assertEquals(START_TIME, si.getLastChangedTimestamp());
+
+            // check another
+            si = getCallerShortcut("ms2");
+
+            assertEquals("ms2", si.getId());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title2 + "/en",
+                    si.getTitle());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text2 + "/en",
+                    si.getText());
+            assertEquals("string-com.android.test.1-user:0-res:"
+                            + R.string.shortcut_disabled_message2 + "/en",
+                    si.getDisabledMessage());
+            assertEquals(START_TIME, si.getLastChangedTimestamp());
+
+            // Check the dynamic one.
+            si = getCallerShortcut("s1");
+
+            assertEquals("s1", si.getId());
+            assertEquals("title", si.getTitle());
+            assertEquals(null, si.getText());
+            assertEquals(null, si.getDisabledMessage());
+            assertEquals(START_TIME, si.getLastChangedTimestamp());
+        });
+
+        mInjectedCurrentTimeMillis++;
+
+        mInjectedLocale = Locale.JAPANESE;
+        mInternal.onSystemLocaleChangedNoLock();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            // check first shortcut.
+            ShortcutInfo si = getCallerShortcut("ms1");
+
+            assertEquals("ms1", si.getId());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title1 + "/ja",
+                    si.getTitle());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text1 + "/ja",
+                    si.getText());
+            assertEquals("string-com.android.test.1-user:0-res:"
+                            + R.string.shortcut_disabled_message1 + "/ja",
+                    si.getDisabledMessage());
+            assertEquals(START_TIME + 1, si.getLastChangedTimestamp());
+
+            // check another
+            si = getCallerShortcut("ms2");
+
+            assertEquals("ms2", si.getId());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title2 + "/ja",
+                    si.getTitle());
+            assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text2 + "/ja",
+                    si.getText());
+            assertEquals("string-com.android.test.1-user:0-res:"
+                            + R.string.shortcut_disabled_message2 + "/ja",
+                    si.getDisabledMessage());
+            assertEquals(START_TIME + 1, si.getLastChangedTimestamp());
+
+            // Check the dynamic one.  (locale change shouldn't affect.)
+            si = getCallerShortcut("s1");
+
+            assertEquals("s1", si.getId());
+            assertEquals("title", si.getTitle());
+            assertEquals(null, si.getText());
+            assertEquals(null, si.getDisabledMessage());
+            assertEquals(START_TIME, si.getLastChangedTimestamp()); // Not changed.
+        });
+    }
+
+    public void testManifestShortcuts_updateAndDisabled_notPinned() {
+        mService.handleUnlockUser(USER_0);
+
+        // First, just publish a manifest shortcut.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Only the valid one is published.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+
+            // Make sure there's no other dangling shortcuts.
+            assertShortcutIds(getCallerShortcuts(), "ms1");
+        });
+
+        // Now version up, the manifest shortcut is disabled now.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1_disable);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Because shortcut 1 wasn't pinned, it'll just go away.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertEmpty(mManager.getPinnedShortcuts());
+
+            // Make sure there's no other dangling shortcuts.
+            assertEmpty(getCallerShortcuts());
+        });
+    }
+
+    public void testManifestShortcuts_updateAndDisabled_pinned() {
+        mService.handleUnlockUser(USER_0);
+
+        // First, just publish a manifest shortcut.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Only the valid one is published.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+            assertEmpty(mManager.getPinnedShortcuts());
+
+            // Make sure there's no other dangling shortcuts.
+            assertShortcutIds(getCallerShortcuts(), "ms1");
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms1"), HANDLE_USER_0);
+        });
+
+        // Now upgrade, the manifest shortcut is disabled now.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1_disable);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        // Because shortcut 1 was pinned, it'll still exist as pinned, but disabled.
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEmpty(mManager.getManifestShortcuts());
+            assertShortcutIds(assertAllNotManifest(assertAllImmutable(assertAllDisabled(
+                    mManager.getPinnedShortcuts()))),
+                    "ms1");
+
+            // Make sure the fields are updated.
+            ShortcutInfo si = getCallerShortcut("ms1");
+
+            assertEquals("ms1", si.getId());
+            assertEquals(R.drawable.icon2, si.getIconResourceId());
+            assertEquals(R.string.shortcut_title2, si.getTitleResId());
+            assertEquals(R.string.shortcut_text2, si.getTextResId());
+            assertEquals(R.string.shortcut_disabled_message2, si.getDisabledMessageResourceId());
+            assertEquals(Intent.ACTION_VIEW, si.getIntent().getAction());
+
+            // Make sure there's no other dangling shortcuts.
+            assertShortcutIds(getCallerShortcuts(), "ms1");
+        });
+    }
+
+    public void testManifestShortcuts_duplicateInSingleActivity() {
+        mService.handleUnlockUser(USER_0);
+
+        // The XML has two shortcuts with the same ID.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2_duplicate);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1");
+
+            // Make sure the first one has survived.  (the second one has a different title.)
+            ShortcutInfo si = getCallerShortcut("ms1");
+            assertEquals(R.string.shortcut_title1, si.getTitleResId());
+
+            // Make sure there's no other dangling shortcuts.
+            assertShortcutIds(getCallerShortcuts(), "ms1");
+        });
+    }
+
+    public void testManifestShortcuts_duplicateInTwoActivities() {
+        mService.handleUnlockUser(USER_0);
+
+        // ShortcutActivity has shortcut ms1
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+
+        // ShortcutActivity2 has two shortcuts, ms1 and ms2.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity2.class.getName()),
+                R.xml.shortcut_5);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(
+                    mManager.getManifestShortcuts()))),
+                    "ms1", "ms2", "ms3", "ms4", "ms5");
+
+            // ms1 should belong to ShortcutActivity.
+            ShortcutInfo si = getCallerShortcut("ms1");
+            assertEquals(R.string.shortcut_title1, si.getTitleResId());
+            assertEquals(new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    si.getActivity());
+            assertEquals(0, si.getRank());
+
+            // ms2 should belong to ShortcutActivity*2*.
+            si = getCallerShortcut("ms2");
+            assertEquals(R.string.shortcut_title2, si.getTitleResId());
+            assertEquals(new ComponentName(CALLING_PACKAGE_1, ShortcutActivity2.class.getName()),
+                    si.getActivity());
+
+            // Also check the ranks
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()))
+                    .haveRanksInOrder("ms1");
+            assertWith(getCallerShortcuts()).selectManifest()
+                    .selectByActivity(
+                            new ComponentName(CALLING_PACKAGE_1, ShortcutActivity2.class.getName()))
+                    .haveRanksInOrder("ms2", "ms3", "ms4", "ms5");
+
+            // Make sure there's no other dangling shortcuts.
+            assertShortcutIds(getCallerShortcuts(), "ms1", "ms2", "ms3", "ms4", "ms5");
+        });
+    }
+
+    /**
+     * Manifest shortcuts cannot override shortcuts that were published via the APIs.
+     */
+    public void testManifestShortcuts_cannotOverrideNonManifest() {
+        mService.handleUnlockUser(USER_0);
+
+        // Create a non-pinned dynamic shortcut and a non-dynamic pinned shortcut.
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.setDynamicShortcuts(list(
+                    makeShortcut("ms1", "title1",
+                            new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    /* icon */ null, new Intent("action1"), /* rank */ 0),
+                    makeShortcut("ms2", "title2",
+                            new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    /* icon */ null, new Intent("action1"), /* rank */ 0)));
+        });
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms2"), HANDLE_USER_0);
+        });
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.removeDynamicShortcuts(list("ms2"));
+
+            assertShortcutIds(mManager.getDynamicShortcuts(), "ms1");
+            assertShortcutIds(mManager.getPinnedShortcuts(), "ms2");
+            assertEmpty(mManager.getManifestShortcuts());
+        });
+
+        // Then update the app with 5 manifest shortcuts.
+        // Make sure "ms1" and "ms2" won't be replaced.
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllNotManifest(mManager.getDynamicShortcuts()), "ms1");
+            assertShortcutIds(assertAllNotManifest(mManager.getPinnedShortcuts()), "ms2");
+            assertShortcutIds(assertAllManifest(mManager.getManifestShortcuts()),
+                    "ms3", "ms4", "ms5");
+
+            // ms1 and ms2 shouold keep the original title.
+            ShortcutInfo si = getCallerShortcut("ms1");
+            assertEquals("title1", si.getTitle());
+
+            si = getCallerShortcut("ms2");
+            assertEquals("title2", si.getTitle());
+        });
+    }
+
+    protected void checkManifestShortcuts_immutable_verify() {
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertShortcutIds(assertAllNotManifest(assertAllEnabled(
+                    mManager.getDynamicShortcuts())),
+                    "s1");
+            assertShortcutIds(assertAllManifest(assertAllEnabled(
+                    mManager.getManifestShortcuts())),
+                    "ms1");
+            assertShortcutIds(assertAllNotManifest(assertAllDisabled(
+                    mManager.getPinnedShortcuts())),
+                    "ms2");
+
+            assertEquals("t1", getCallerShortcut("s1").getTitle());
+
+            // Make sure there are no other shortcuts.
+            assertShortcutIds(getCallerShortcuts(), "s1", "ms1", "ms2");
+        });
+    }
+
+    /**
+     * Make sure the APIs won't work on manifest shortcuts.
+     */
+    public void testManifestShortcuts_immutable() {
+        mService.handleUnlockUser(USER_0);
+
+        // Create a non-pinned manifest shortcut, a pinned shortcut that was originally
+        // a manifest shortcut, as well as a dynamic shortcut.
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_2);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms2"), HANDLE_USER_0);
+        });
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_1);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            mManager.addDynamicShortcuts(list(makeShortcutWithTitle("s1", "t1")));
+        });
+
+        checkManifestShortcuts_immutable_verify();
+
+        // Note that even though the first argument is not immutable and only the second one
+        // is immutable, the first argument should not be executed either.
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertCannotUpdateImmutable(() -> {
+                mManager.setDynamicShortcuts(list(makeShortcut("xx"), makeShortcut("ms1")));
+            });
+            assertCannotUpdateImmutable(() -> {
+                mManager.setDynamicShortcuts(list(makeShortcut("xx"), makeShortcut("ms2")));
+            });
+        });
+        checkManifestShortcuts_immutable_verify();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertCannotUpdateImmutable(() -> {
+                mManager.addDynamicShortcuts(list(makeShortcut("xx"), makeShortcut("ms1")));
+            });
+            assertCannotUpdateImmutable(() -> {
+                mManager.addDynamicShortcuts(list(makeShortcut("xx"), makeShortcut("ms2")));
+            });
+        });
+        checkManifestShortcuts_immutable_verify();
+
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertCannotUpdateImmutable(() -> {
+                mManager.updateShortcuts(list(makeShortcut("s1"), makeShortcut("ms1")));
+            });
+            assertCannotUpdateImmutable(() -> {
+                mManager.updateShortcuts(list(makeShortcut("s1"), makeShortcut("ms2")));
+            });
+        });
+        checkManifestShortcuts_immutable_verify();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertCannotUpdateImmutable(() -> {
+                mManager.removeDynamicShortcuts(list("s1", "ms1"));
+            });
+            assertCannotUpdateImmutable(() -> {
+                mManager.removeDynamicShortcuts(list("s2", "ms2"));
+            });
+        });
+        checkManifestShortcuts_immutable_verify();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertCannotUpdateImmutable(() -> {
+                mManager.disableShortcuts(list("s1", "ms1"));
+            });
+        });
+        checkManifestShortcuts_immutable_verify();
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertCannotUpdateImmutable(() -> {
+                mManager.enableShortcuts(list("s1", "ms2"));
+            });
+        });
+        checkManifestShortcuts_immutable_verify();
+    }
+
+
+    /**
+     * Make sure the APIs won't work on manifest shortcuts.
+     */
+    public void testManifestShortcuts_tooMany() {
+        // Change the max number of shortcuts.
+        mService.updateConfigurationLocked(ConfigConstants.KEY_MAX_SHORTCUTS + "=3");
+
+        mService.handleUnlockUser(USER_0);
+
+        addManifestShortcutResource(
+                new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                R.xml.shortcut_5);
+        updatePackageVersion(CALLING_PACKAGE_1, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            // Only the first 3 should be published.
+            assertShortcutIds(mManager.getManifestShortcuts(), "ms1", "ms2", "ms3");
+        });
+    }
+
+    public void testMaxShortcutCount_set() {
+        // Change the max number of shortcuts.
+        mService.updateConfigurationLocked(ConfigConstants.KEY_MAX_SHORTCUTS + "=3");
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ComponentName a1 = new ComponentName(mClientContext, ShortcutActivity.class);
+            final ComponentName a2 = new ComponentName(mClientContext, ShortcutActivity2.class);
+            final ShortcutInfo s1_1 = makeShortcutWithActivity("s11", a1);
+            final ShortcutInfo s1_2 = makeShortcutWithActivity("s12", a1);
+            final ShortcutInfo s1_3 = makeShortcutWithActivity("s13", a1);
+            final ShortcutInfo s1_4 = makeShortcutWithActivity("s14", a1);
+            final ShortcutInfo s1_5 = makeShortcutWithActivity("s15", a1);
+            final ShortcutInfo s1_6 = makeShortcutWithActivity("s16", a1);
+            final ShortcutInfo s2_1 = makeShortcutWithActivity("s21", a2);
+            final ShortcutInfo s2_2 = makeShortcutWithActivity("s22", a2);
+            final ShortcutInfo s2_3 = makeShortcutWithActivity("s23", a2);
+            final ShortcutInfo s2_4 = makeShortcutWithActivity("s24", a2);
+
+            // 3 shortcuts for 2 activities -> okay
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+
+            mManager.removeAllDynamicShortcuts();
+
+            // 4 shortcut for activity 1 -> too many.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3, s1_4, s2_1, s2_2, s2_3));
+            });
+            assertEmpty(mManager.getDynamicShortcuts());
+
+            // 4 shortcut for activity 2 -> too many.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3, s2_4));
+            });
+            assertEmpty(mManager.getDynamicShortcuts());
+
+            // First, set 3.  Then set 4, which should be ignored.
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13");
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.setDynamicShortcuts(list(s2_1, s2_2, s2_3, s2_4));
+            });
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13");
+
+            // Set will remove the old dynamic set, unlike add, so the following should pass.
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13");
+            mManager.setDynamicShortcuts(list(s1_4, s1_5, s1_6));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s14", "s15", "s16");
+
+            // Now, test with 2 manifest shortcuts.
+            mManager.removeAllDynamicShortcuts();
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_2);
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+            assertEquals(2, mManager.getManifestShortcuts().size());
+
+            // Setting 1 to activity 1 will work.
+            mManager.setDynamicShortcuts(list(s1_1, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s21", "s22", "s23");
+            assertEquals(2, mManager.getManifestShortcuts().size());
+
+            // But setting 2 will not.
+            mManager.removeAllDynamicShortcuts();
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.setDynamicShortcuts(list(s1_1, s1_2, s2_1, s2_2, s2_3));
+            });
+            assertEmpty(mManager.getDynamicShortcuts());
+            assertEquals(2, mManager.getManifestShortcuts().size());
+        });
+    }
+
+    public void testMaxShortcutCount_add() {
+        // Change the max number of shortcuts.
+        mService.updateConfigurationLocked(ConfigConstants.KEY_MAX_SHORTCUTS + "=3");
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ComponentName a1 = new ComponentName(mClientContext, ShortcutActivity.class);
+            final ComponentName a2 = new ComponentName(mClientContext, ShortcutActivity2.class);
+            final ShortcutInfo s1_1 = makeShortcutWithActivity("s11", a1);
+            final ShortcutInfo s1_2 = makeShortcutWithActivity("s12", a1);
+            final ShortcutInfo s1_3 = makeShortcutWithActivity("s13", a1);
+            final ShortcutInfo s1_4 = makeShortcutWithActivity("s14", a1);
+            final ShortcutInfo s2_1 = makeShortcutWithActivity("s21", a2);
+            final ShortcutInfo s2_2 = makeShortcutWithActivity("s22", a2);
+            final ShortcutInfo s2_3 = makeShortcutWithActivity("s23", a2);
+            final ShortcutInfo s2_4 = makeShortcutWithActivity("s24", a2);
+
+            // 3 shortcuts for 2 activities -> okay
+            mManager.addDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+
+            mManager.removeAllDynamicShortcuts();
+
+            // 4 shortcut for activity 1 -> too many.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.addDynamicShortcuts(list(s1_1, s1_2, s1_3, s1_4, s2_1, s2_2, s2_3));
+            });
+            assertEmpty(mManager.getDynamicShortcuts());
+
+            // 4 shortcut for activity 2 -> too many.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.addDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3, s2_4));
+            });
+            assertEmpty(mManager.getDynamicShortcuts());
+
+            // First, set 3.  Then add 1 more, which should be ignored.
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13");
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.addDynamicShortcuts(list(s1_4, s2_1));
+            });
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13");
+
+            // Update existing one, which should work.
+            mManager.addDynamicShortcuts(list(makeShortcutWithActivityAndTitle(
+                    "s11", a1, "xxx"), s2_1));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21");
+            assertEquals("xxx", getCallerShortcut("s11").getTitle());
+
+            // Make sure pinned shortcuts won't affect.
+            // - Pin s11 - s13, and remove all dynamic.
+            runWithCaller(LAUNCHER_1, USER_0, () -> {
+                mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s11", "s12", "s13"),
+                        HANDLE_USER_0);
+            });
+            mManager.removeAllDynamicShortcuts();
+
+            assertEmpty(mManager.getDynamicShortcuts());
+            assertShortcutIds(mManager.getPinnedShortcuts(),
+                    "s11", "s12", "s13");
+
+            // Then add dynamic.
+            mManager.addDynamicShortcuts(list(s1_4, s2_1, s2_2, s2_3));
+
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s14", "s21", "s22", "s23");
+            assertShortcutIds(mManager.getPinnedShortcuts(),
+                    "s11", "s12", "s13");
+
+            // Adding "s11" and "s12" back, should work
+            mManager.addDynamicShortcuts(list(s1_1, s1_2));
+
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s14", "s11", "s12", "s21", "s22", "s23");
+            assertShortcutIds(mManager.getPinnedShortcuts(),
+                    "s11", "s12", "s13");
+
+            // Adding back s13 doesn't work.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.addDynamicShortcuts(list(s1_3));
+            });
+
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a1),
+                    "s11", "s12", "s14");
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a2),
+                    "s21", "s22", "s23");
+
+            // Now swap the activities.
+            mManager.updateShortcuts(list(
+                    makeShortcutWithActivity("s11", a2),
+                    makeShortcutWithActivity("s21", a1)));
+
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a1),
+                    "s21", "s12", "s14");
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a2),
+                    "s11", "s22", "s23");
+
+            // Now, test with 2 manifest shortcuts.
+            mManager.removeAllDynamicShortcuts();
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_2);
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+
+            assertEquals(2, mManager.getManifestShortcuts().size());
+
+            // Adding one shortcut to activity 1 works fine.
+            mManager.addDynamicShortcuts(list(s1_1, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s21", "s22", "s23");
+            assertEquals(2, mManager.getManifestShortcuts().size());
+
+            // But adding one more doesn't.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.addDynamicShortcuts(list(s1_4, s2_1));
+            });
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s21", "s22", "s23");
+            assertEquals(2, mManager.getManifestShortcuts().size());
+        });
+    }
+
+    public void testMaxShortcutCount_update() {
+        // Change the max number of shortcuts.
+        mService.updateConfigurationLocked(ConfigConstants.KEY_MAX_SHORTCUTS + "=3");
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ComponentName a1 = new ComponentName(mClientContext, ShortcutActivity.class);
+            final ComponentName a2 = new ComponentName(mClientContext, ShortcutActivity2.class);
+            final ShortcutInfo s1_1 = makeShortcutWithActivity("s11", a1);
+            final ShortcutInfo s1_2 = makeShortcutWithActivity("s12", a1);
+            final ShortcutInfo s1_3 = makeShortcutWithActivity("s13", a1);
+            final ShortcutInfo s1_4 = makeShortcutWithActivity("s14", a1);
+            final ShortcutInfo s1_5 = makeShortcutWithActivity("s15", a1);
+            final ShortcutInfo s2_1 = makeShortcutWithActivity("s21", a2);
+            final ShortcutInfo s2_2 = makeShortcutWithActivity("s22", a2);
+            final ShortcutInfo s2_3 = makeShortcutWithActivity("s23", a2);
+            final ShortcutInfo s2_4 = makeShortcutWithActivity("s24", a2);
+
+            // 3 shortcuts for 2 activities -> okay
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+
+            // Trying to move s11 from a1 to a2 should fail.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.updateShortcuts(list(makeShortcutWithActivity("s11", a2)));
+            });
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+
+            // Trying to move s21 from a2 to a1 should also fail.
+            assertDynamicShortcutCountExceeded(() -> {
+                mManager.updateShortcuts(list(makeShortcutWithActivity("s21", a1)));
+            });
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+
+            // But, if we do these two at the same time, it should work.
+            mManager.updateShortcuts(list(
+                    makeShortcutWithActivity("s11", a2),
+                    makeShortcutWithActivity("s21", a1)));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a1),
+                    "s21", "s12", "s13");
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a2),
+                    "s11", "s22", "s23");
+
+            // Then reset.
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s11", "s12", "s13", "s21", "s22", "s23");
+
+            // Pin some to have more shortcuts for a1.
+            runWithCaller(LAUNCHER_1, USER_0, () -> {
+                mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s11", "s12", "s13"),
+                        HANDLE_USER_0);
+            });
+            mManager.setDynamicShortcuts(list(s1_4, s1_5, s2_1, s2_2, s2_3));
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s14", "s15", "s21", "s22", "s23");
+            assertShortcutIds(mManager.getPinnedShortcuts(),
+                    "s11", "s12", "s13");
+
+            // a1 already has 2 dynamic shortcuts (and 3 pinned shortcuts that used to belong on it)
+            // But that doesn't matter for update -- the following should still work.
+            mManager.updateShortcuts(list(
+                    makeShortcutWithActivityAndTitle("s11", a1, "xxx1"),
+                    makeShortcutWithActivityAndTitle("s12", a1, "xxx2"),
+                    makeShortcutWithActivityAndTitle("s13", a1, "xxx3"),
+                    makeShortcutWithActivityAndTitle("s14", a1, "xxx4"),
+                    makeShortcutWithActivityAndTitle("s15", a1, "xxx5")));
+            // All the shortcuts should still exist they all belong on same activities,
+            // with the updated titles.
+            assertShortcutIds(mManager.getDynamicShortcuts(),
+                    "s14", "s15", "s21", "s22", "s23");
+            assertShortcutIds(mManager.getPinnedShortcuts(),
+                    "s11", "s12", "s13");
+
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a1),
+                    "s14", "s15");
+            assertShortcutIds(filterByActivity(mManager.getDynamicShortcuts(), a2),
+                    "s21", "s22", "s23");
+
+            assertEquals("xxx1", getCallerShortcut("s11").getTitle());
+            assertEquals("xxx2", getCallerShortcut("s12").getTitle());
+            assertEquals("xxx3", getCallerShortcut("s13").getTitle());
+            assertEquals("xxx4", getCallerShortcut("s14").getTitle());
+            assertEquals("xxx5", getCallerShortcut("s15").getTitle());
+        });
+    }
+
+    public void testShortcutsPushedOutByManifest() {
+        // Change the max number of shortcuts.
+        mService.updateConfigurationLocked(ConfigConstants.KEY_MAX_SHORTCUTS + "=3");
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            final ComponentName a1 = new ComponentName(mClientContext, ShortcutActivity.class);
+            final ComponentName a2 = new ComponentName(mClientContext, ShortcutActivity2.class);
+            final ShortcutInfo s1_1 = makeShortcutWithActivityAndRank("s11", a1, 4);
+            final ShortcutInfo s1_2 = makeShortcutWithActivityAndRank("s12", a1, 3);
+            final ShortcutInfo s1_3 = makeShortcutWithActivityAndRank("s13", a1, 2);
+            final ShortcutInfo s1_4 = makeShortcutWithActivityAndRank("s14", a1, 1);
+            final ShortcutInfo s1_5 = makeShortcutWithActivityAndRank("s15", a1, 0);
+            final ShortcutInfo s2_1 = makeShortcutWithActivityAndRank("s21", a2, 0);
+            final ShortcutInfo s2_2 = makeShortcutWithActivityAndRank("s22", a2, 1);
+            final ShortcutInfo s2_3 = makeShortcutWithActivityAndRank("s23", a2, 2);
+            final ShortcutInfo s2_4 = makeShortcutWithActivityAndRank("s24", a2, 3);
+            final ShortcutInfo s2_5 = makeShortcutWithActivityAndRank("s25", a2, 4);
+
+            // Initial state.
+            mManager.setDynamicShortcuts(list(s1_1, s1_2, s1_3, s2_1, s2_2, s2_3));
+            runWithCaller(LAUNCHER_1, USER_0, () -> {
+                mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("s11", "s12", "s21", "s22"),
+                        HANDLE_USER_0);
+            });
+            mManager.setDynamicShortcuts(list(s1_2, s1_3, s1_4, s2_2, s2_3, s2_4));
+            assertShortcutIds(assertAllEnabled(mManager.getDynamicShortcuts()),
+                    "s12", "s13", "s14",
+                    "s22", "s23", "s24");
+            assertShortcutIds(assertAllEnabled(mManager.getPinnedShortcuts()),
+                    "s11", "s12",
+                    "s21", "s22");
+
+            // Add 1 manifest shortcut to a1.
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_1);
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+            assertEquals(1, mManager.getManifestShortcuts().size());
+
+            // s12 removed.
+            assertShortcutIds(assertAllEnabled(mManager.getDynamicShortcuts()),
+                    "s13", "s14",
+                    "s22", "s23", "s24");
+            assertShortcutIds(assertAllEnabled(mManager.getPinnedShortcuts()),
+                    "s11", "s12",
+                    "s21", "s22");
+
+            // Add more manifest shortcuts.
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_2);
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity2.class.getName()),
+                    R.xml.shortcut_1_alt);
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+            assertEquals(3, mManager.getManifestShortcuts().size());
+
+            // Note the ones with the highest rank values (== least important) will be removed.
+            assertShortcutIds(assertAllEnabled(mManager.getDynamicShortcuts()),
+                    "s14",
+                    "s22", "s23");
+            assertShortcutIds(assertAllEnabled(mManager.getPinnedShortcuts()),
+                    "s11", "s12",
+                    "s21", "s22");
+
+            // Add more manifest shortcuts.
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_2);
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity2.class.getName()),
+                    R.xml.shortcut_5_alt); // manifest has 5, but max is 3, so a2 will have 3.
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+            assertEquals(5, mManager.getManifestShortcuts().size());
+
+            assertShortcutIds(assertAllEnabled(mManager.getDynamicShortcuts()),
+                    "s14" // a1 has 1 dynamic
+            ); // a2 has no dynamic
+            assertShortcutIds(assertAllEnabled(mManager.getPinnedShortcuts()),
+                    "s11", "s12",
+                    "s21", "s22");
+
+            // Update, no manifest shortucts.  This doesn't affect anything.
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()),
+                    R.xml.shortcut_0);
+            addManifestShortcutResource(
+                    new ComponentName(CALLING_PACKAGE_1, ShortcutActivity2.class.getName()),
+                    R.xml.shortcut_0);
+            updatePackageVersion(CALLING_PACKAGE_1, 1);
+            mService.mPackageMonitor.onReceive(getTestContext(),
+                    genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
+            assertEquals(0, mManager.getManifestShortcuts().size());
+
+            assertShortcutIds(assertAllEnabled(mManager.getDynamicShortcuts()),
+                    "s14");
+            assertShortcutIds(assertAllEnabled(mManager.getPinnedShortcuts()),
+                    "s11", "s12",
+                    "s21", "s22");
+        });
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
new file mode 100644
index 0000000..f570ff2
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
@@ -0,0 +1,1811 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertBundlesEqual;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertExpectException;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makeBundle;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.parceled;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set;
+
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.Manifest.permission;
+import android.app.ActivityManager;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ShortcutInfo;
+import android.content.res.Resources;
+import android.graphics.BitmapFactory;
+import android.graphics.drawable.Icon;
+import android.net.Uri;
+import android.os.PersistableBundle;
+import android.os.UserHandle;
+import android.test.MoreAsserts;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.frameworks.servicestests.R;
+import com.android.server.pm.ShortcutService.ConfigConstants;
+
+/**
+ * Tests for ShortcutService and ShortcutManager.
+ *
+ m FrameworksServicesTests &&
+ adb install \
+ -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
+ adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 \
+ -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ */
+@SmallTest
+public class ShortcutManagerTest2 extends BaseShortcutManagerTest {
+    // ShortcutInfo tests
+
+    public void testShortcutInfoMissingMandatoryFields() {
+        // Disable throttling.
+        mService.updateConfigurationLocked(
+                ShortcutService.ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "=99999999,"
+                + ShortcutService.ConfigConstants.KEY_MAX_SHORTCUTS + "=99999999"
+        );
+
+        assertExpectException(
+                IllegalArgumentException.class,
+                "ID must be provided",
+                () -> new ShortcutInfo.Builder(getTestContext()).build());
+
+        assertExpectException(
+                RuntimeException.class,
+                "id cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), null));
+
+        assertExpectException(
+                RuntimeException.class,
+                "id cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), ""));
+
+        assertExpectException(
+                RuntimeException.class,
+                "intent cannot be null",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setIntent(null));
+
+        assertExpectException(
+                RuntimeException.class,
+                "action must be set",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setIntent(new Intent()));
+
+        assertExpectException(
+                RuntimeException.class,
+                "activity cannot be null",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setActivity(null));
+
+        assertExpectException(
+                RuntimeException.class,
+                "shortLabel cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setShortLabel(null));
+
+        assertExpectException(
+                RuntimeException.class,
+                "shortLabel cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setShortLabel(""));
+
+        assertExpectException(
+                RuntimeException.class,
+                "longLabel cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setLongLabel(null));
+
+        assertExpectException(
+                RuntimeException.class,
+                "longLabel cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setLongLabel(""));
+
+        assertExpectException(
+                RuntimeException.class,
+                "disabledMessage cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setDisabledMessage(null));
+
+        assertExpectException(
+                RuntimeException.class,
+                "disabledMessage cannot be empty",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setDisabledMessage(""));
+
+        assertExpectException(NullPointerException.class, "action must be set",
+                () -> new ShortcutInfo.Builder(getTestContext(), "id").setIntent(new Intent()));
+
+        // same for add.
+        assertExpectException(
+                IllegalArgumentException.class, "Short label must be provided", () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
+                    .setActivity(new ComponentName(getTestContext().getPackageName(), "s"))
+                    .build();
+            assertTrue(getManager().setDynamicShortcuts(list(si)));
+        });
+
+        assertExpectException(
+                IllegalArgumentException.class, "Short label must be provided", () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
+                    .setActivity(new ComponentName(getTestContext().getPackageName(), "s"))
+                    .build();
+            assertTrue(getManager().addDynamicShortcuts(list(si)));
+        });
+
+        // same for add.
+        assertExpectException(NullPointerException.class, "Intent must be provided", () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
+                    .setActivity(new ComponentName(getTestContext().getPackageName(), "s"))
+                    .setShortLabel("x")
+                    .build();
+            assertTrue(getManager().setDynamicShortcuts(list(si)));
+        });
+
+        // same for add.
+        assertExpectException(NullPointerException.class, "Intent must be provided", () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
+                    .setActivity(new ComponentName(getTestContext().getPackageName(), "s"))
+                    .setShortLabel("x")
+                    .build();
+            assertTrue(getManager().addDynamicShortcuts(list(si)));
+        });
+
+        assertExpectException(
+                IllegalStateException.class, "does not belong to package", () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
+                    .setActivity(new ComponentName("xxx", "s"))
+                    .build();
+            assertTrue(getManager().setDynamicShortcuts(list(si)));
+        });
+
+        // same for add.
+        assertExpectException(
+                IllegalStateException.class, "does not belong to package", () -> {
+            ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
+                    .setActivity(new ComponentName("xxx", "s"))
+                    .build();
+            assertTrue(getManager().addDynamicShortcuts(list(si)));
+        });
+    }
+
+    public void testShortcutInfoParcel() {
+        setCaller(CALLING_PACKAGE_1, USER_10);
+        ShortcutInfo si = parceled(new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setTitle("title")
+                .setIntent(makeIntent("action", ShortcutActivity.class))
+                .build());
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals(USER_10, si.getUserId());
+        assertEquals(HANDLE_USER_10, si.getUserHandle());
+        assertEquals("id", si.getId());
+        assertEquals("title", si.getTitle());
+        assertEquals("action", si.getIntent().getAction());
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+
+        si = new ShortcutInfo.Builder(getTestContext())
+                .setId("id")
+                .setActivity(new ComponentName("a", "b"))
+                .setIcon(Icon.createWithResource(mClientContext, 123))
+                .setTitle("title")
+                .setText("text")
+                .setDisabledMessage("dismes")
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        si.addFlags(ShortcutInfo.FLAG_PINNED);
+        si.setBitmapPath("abc");
+        si.setIconResourceId(456);
+
+        si = parceled(si);
+
+        assertEquals(getTestContext().getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(123, si.getIcon().getResId());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals("abc", si.getBitmapPath());
+        assertEquals(456, si.getIconResourceId());
+
+        assertEquals(0, si.getTitleResId());
+        assertEquals(null, si.getTitleResName());
+        assertEquals(0, si.getTextResId());
+        assertEquals(null, si.getTextResName());
+        assertEquals(0, si.getDisabledMessageResourceId());
+        assertEquals(null, si.getDisabledMessageResName());
+    }
+
+    public void testShortcutInfoParcel_resId() {
+        setCaller(CALLING_PACKAGE_1, USER_10);
+        ShortcutInfo si;
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+
+        si = new ShortcutInfo.Builder(getTestContext())
+                .setId("id")
+                .setActivity(new ComponentName("a", "b"))
+                .setIcon(Icon.createWithResource(mClientContext, 123))
+                .setTitleResId(10)
+                .setTextResId(11)
+                .setDisabledMessageResId(12)
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        si.addFlags(ShortcutInfo.FLAG_PINNED);
+        si.setBitmapPath("abc");
+        si.setIconResourceId(456);
+
+        lookupAndFillInResourceNames(si);
+
+        si = parceled(si);
+
+        assertEquals(getTestContext().getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(123, si.getIcon().getResId());
+        assertEquals(10, si.getTitleResId());
+        assertEquals("r10", si.getTitleResName());
+        assertEquals(11, si.getTextResId());
+        assertEquals("r11", si.getTextResName());
+        assertEquals(12, si.getDisabledMessageResourceId());
+        assertEquals("r12", si.getDisabledMessageResName());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals("abc", si.getBitmapPath());
+        assertEquals(456, si.getIconResourceId());
+        assertEquals("string/r456", si.getIconResName());
+    }
+
+    public void testShortcutInfoClone() {
+        setCaller(CALLING_PACKAGE_1, USER_11);
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setActivity(new ComponentName("a", "b"))
+                .setIcon(Icon.createWithResource(mClientContext, 123))
+                .setTitle("title")
+                .setText("text")
+                .setDisabledMessage("dismes")
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        sorig.addFlags(ShortcutInfo.FLAG_PINNED);
+        sorig.setBitmapPath("abc");
+        sorig.setIconResourceId(456);
+
+        lookupAndFillInResourceNames(sorig);
+
+        ShortcutInfo si = sorig.clone(/* clone flags*/ 0);
+
+        assertEquals(USER_11, si.getUserId());
+        assertEquals(HANDLE_USER_11, si.getUserHandle());
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(123, si.getIcon().getResId());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals("abc", si.getBitmapPath());
+        assertEquals(456, si.getIconResourceId());
+        assertEquals("string/r456", si.getIconResName());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_CREATOR);
+
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(null, si.getIcon());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals(null, si.getBitmapPath());
+
+        assertEquals(456, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER);
+
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(null, si.getIcon());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals(null, si.getIntent());
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals(null, si.getBitmapPath());
+
+        assertEquals(456, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO);
+
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(null, si.getIcon());
+        assertEquals(null, si.getTitle());
+        assertEquals(null, si.getText());
+        assertEquals(null, si.getDisabledMessage());
+        assertEquals(null, si.getCategories());
+        assertEquals(null, si.getIntent());
+        assertEquals(0, si.getRank());
+        assertEquals(null, si.getExtras());
+
+        assertEquals(ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_KEY_FIELDS_ONLY, si.getFlags());
+        assertEquals(null, si.getBitmapPath());
+
+        assertEquals(456, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+    }
+
+    public void testShortcutInfoClone_resId() {
+        setCaller(CALLING_PACKAGE_1, USER_11);
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setActivity(new ComponentName("a", "b"))
+                .setIcon(Icon.createWithResource(mClientContext, 123))
+                .setTitleResId(10)
+                .setTextResId(11)
+                .setDisabledMessageResId(12)
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        sorig.addFlags(ShortcutInfo.FLAG_PINNED);
+        sorig.setBitmapPath("abc");
+        sorig.setIconResourceId(456);
+
+        lookupAndFillInResourceNames(sorig);
+
+        ShortcutInfo si = sorig.clone(/* clone flags*/ 0);
+
+        assertEquals(USER_11, si.getUserId());
+        assertEquals(HANDLE_USER_11, si.getUserHandle());
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(123, si.getIcon().getResId());
+        assertEquals(10, si.getTitleResId());
+        assertEquals("r10", si.getTitleResName());
+        assertEquals(11, si.getTextResId());
+        assertEquals("r11", si.getTextResName());
+        assertEquals(12, si.getDisabledMessageResourceId());
+        assertEquals("r12", si.getDisabledMessageResName());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals("abc", si.getBitmapPath());
+        assertEquals(456, si.getIconResourceId());
+        assertEquals("string/r456", si.getIconResName());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_CREATOR);
+
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(null, si.getIcon());
+        assertEquals(10, si.getTitleResId());
+        assertEquals(null, si.getTitleResName());
+        assertEquals(11, si.getTextResId());
+        assertEquals(null, si.getTextResName());
+        assertEquals(12, si.getDisabledMessageResourceId());
+        assertEquals(null, si.getDisabledMessageResName());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals(null, si.getBitmapPath());
+
+        assertEquals(456, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER);
+
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(null, si.getIcon());
+        assertEquals(10, si.getTitleResId());
+        assertEquals(null, si.getTitleResName());
+        assertEquals(11, si.getTextResId());
+        assertEquals(null, si.getTextResName());
+        assertEquals(12, si.getDisabledMessageResourceId());
+        assertEquals(null, si.getDisabledMessageResName());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals(null, si.getIntent());
+        assertEquals(123, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED, si.getFlags());
+        assertEquals(null, si.getBitmapPath());
+
+        assertEquals(456, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO);
+
+        assertEquals(mClientContext.getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(new ComponentName("a", "b"), si.getActivity());
+        assertEquals(null, si.getIcon());
+        assertEquals(0, si.getTitleResId());
+        assertEquals(null, si.getTitleResName());
+        assertEquals(0, si.getTextResId());
+        assertEquals(null, si.getTextResName());
+        assertEquals(0, si.getDisabledMessageResourceId());
+        assertEquals(null, si.getDisabledMessageResName());
+        assertEquals(null, si.getCategories());
+        assertEquals(null, si.getIntent());
+        assertEquals(0, si.getRank());
+        assertEquals(null, si.getExtras());
+
+        assertEquals(ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_KEY_FIELDS_ONLY, si.getFlags());
+        assertEquals(null, si.getBitmapPath());
+
+        assertEquals(456, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+    }
+
+    public void testShortcutInfoClone_minimum() {
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(getTestContext())
+                .setId("id")
+                .setTitle("title")
+                .setIntent(makeIntent("action", ShortcutActivity.class))
+                .build();
+        ShortcutInfo si = sorig.clone(/* clone flags*/ 0);
+
+        assertEquals(getTestContext().getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals("title", si.getTitle());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals(null, si.getCategories());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_CREATOR);
+
+        assertEquals(getTestContext().getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals("title", si.getTitle());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals(null, si.getCategories());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER);
+
+        assertEquals(getTestContext().getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals("title", si.getTitle());
+        assertEquals(null, si.getIntent());
+        assertEquals(null, si.getCategories());
+
+        si = sorig.clone(ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO);
+
+        assertEquals(getTestContext().getPackageName(), si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(null, si.getTitle());
+        assertEquals(null, si.getIntent());
+        assertEquals(null, si.getCategories());
+    }
+
+    public void testShortcutInfoCopyNonNullFieldsFrom() throws InterruptedException {
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(getTestContext())
+                .setId("id")
+                .setActivity(new ComponentName("a", "b"))
+                .setIcon(Icon.createWithResource(mClientContext, 123))
+                .setTitle("title")
+                .setText("text")
+                .setDisabledMessage("dismes")
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        sorig.addFlags(ShortcutInfo.FLAG_PINNED);
+        sorig.setBitmapPath("abc");
+        sorig.setIconResourceId(456);
+
+        lookupAndFillInResourceNames(sorig);
+
+        ShortcutInfo si;
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setActivity(new ComponentName("x", "y")).build());
+        assertEquals("text", si.getText());
+        assertEquals(123, si.getRank());
+        assertEquals(new ComponentName("x", "y"), si.getActivity());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setIcon(Icon.createWithResource(mClientContext, 456)).build());
+        assertEquals("text", si.getText());
+        assertEquals(456, si.getIcon().getResId());
+        assertEquals(0, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+        assertEquals(null, si.getBitmapPath());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setTitle("xyz").build());
+        assertEquals("text", si.getText());
+        assertEquals("xyz", si.getTitle());
+        assertEquals(0, si.getTitleResId());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setTitleResId(123).build());
+        assertEquals("text", si.getText());
+        assertEquals(null, si.getTitle());
+        assertEquals(123, si.getTitleResId());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setText("xxx").build());
+        assertEquals(123, si.getRank());
+        assertEquals("xxx", si.getText());
+        assertEquals(0, si.getTextResId());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setTextResId(1111).build());
+        assertEquals(123, si.getRank());
+        assertEquals(null, si.getText());
+        assertEquals(1111, si.getTextResId());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setDisabledMessage("xxx").build());
+        assertEquals(123, si.getRank());
+        assertEquals("xxx", si.getDisabledMessage());
+        assertEquals(0, si.getDisabledMessageResourceId());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setDisabledMessageResId(11111).build());
+        assertEquals(123, si.getRank());
+        assertEquals(null, si.getDisabledMessage());
+        assertEquals(11111, si.getDisabledMessageResourceId());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setCategories(set()).build());
+        assertEquals("text", si.getText());
+        assertEquals(set(), si.getCategories());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setCategories(set("x")).build());
+        assertEquals("text", si.getText());
+        assertEquals(set("x"), si.getCategories());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setIntent(makeIntent("action2", ShortcutActivity.class)).build());
+        assertEquals("text", si.getText());
+        assertEquals("action2", si.getIntent().getAction());
+        assertEquals(null, si.getIntent().getStringExtra("key"));
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setIntent(makeIntent("action3", ShortcutActivity.class, "key", "x")).build());
+        assertEquals("text", si.getText());
+        assertEquals("action3", si.getIntent().getAction());
+        assertEquals("x", si.getIntent().getStringExtra("key"));
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setRank(999).build());
+        assertEquals("text", si.getText());
+        assertEquals(999, si.getRank());
+
+
+        PersistableBundle pb2 = new PersistableBundle();
+        pb2.putInt("x", 99);
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setExtras(pb2).build());
+        assertEquals("text", si.getText());
+        assertEquals(99, si.getExtras().getInt("x"));
+    }
+
+    public void testShortcutInfoCopyNonNullFieldsFrom_resId() throws InterruptedException {
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(getTestContext())
+                .setId("id")
+                .setActivity(new ComponentName("a", "b"))
+                .setIcon(Icon.createWithResource(mClientContext, 123))
+                .setTitleResId(10)
+                .setTextResId(11)
+                .setDisabledMessageResId(12)
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        sorig.addFlags(ShortcutInfo.FLAG_PINNED);
+        sorig.setBitmapPath("abc");
+        sorig.setIconResourceId(456);
+
+        ShortcutInfo si;
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setActivity(new ComponentName("x", "y")).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(new ComponentName("x", "y"), si.getActivity());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setIcon(Icon.createWithResource(mClientContext, 456)).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(456, si.getIcon().getResId());
+        assertEquals(0, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+        assertEquals(null, si.getBitmapPath());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setTitle("xyz").build());
+        assertEquals(11, si.getTextResId());
+        assertEquals("xyz", si.getTitle());
+        assertEquals(0, si.getTitleResId());
+        assertEquals(null, si.getTitleResName());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setTitleResId(123).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(null, si.getTitle());
+        assertEquals(123, si.getTitleResId());
+        assertEquals(null, si.getTitleResName());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setText("xxx").build());
+        assertEquals(123, si.getRank());
+        assertEquals("xxx", si.getText());
+        assertEquals(0, si.getTextResId());
+        assertEquals(null, si.getTextResName());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setTextResId(1111).build());
+        assertEquals(123, si.getRank());
+        assertEquals(null, si.getText());
+        assertEquals(1111, si.getTextResId());
+        assertEquals(null, si.getTextResName());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setDisabledMessage("xxx").build());
+        assertEquals(123, si.getRank());
+        assertEquals("xxx", si.getDisabledMessage());
+        assertEquals(0, si.getDisabledMessageResourceId());
+        assertEquals(null, si.getDisabledMessageResName());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setDisabledMessageResId(11111).build());
+        assertEquals(123, si.getRank());
+        assertEquals(null, si.getDisabledMessage());
+        assertEquals(11111, si.getDisabledMessageResourceId());
+        assertEquals(null, si.getDisabledMessageResName());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setCategories(set()).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(set(), si.getCategories());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setCategories(set("x")).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(set("x"), si.getCategories());
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setIntent(makeIntent("action2", ShortcutActivity.class)).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals("action2", si.getIntent().getAction());
+        assertEquals(null, si.getIntent().getStringExtra("key"));
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setIntent(makeIntent("action3", ShortcutActivity.class, "key", "x")).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals("action3", si.getIntent().getAction());
+        assertEquals("x", si.getIntent().getStringExtra("key"));
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setRank(999).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(999, si.getRank());
+
+
+        PersistableBundle pb2 = new PersistableBundle();
+        pb2.putInt("x", 99);
+
+        si = sorig.clone(/* flags=*/ 0);
+        si.copyNonNullFieldsFrom(new ShortcutInfo.Builder(getTestContext()).setId("id")
+                .setExtras(pb2).build());
+        assertEquals(11, si.getTextResId());
+        assertEquals(99, si.getExtras().getInt("x"));
+    }
+
+    public void testShortcutInfoSaveAndLoad() throws InterruptedException {
+        setCaller(CALLING_PACKAGE_1, USER_10);
+
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIcon(bmp32x32)
+                .setTitle("title")
+                .setText("text")
+                .setDisabledMessage("dismes")
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        sorig.setTimestamp(mInjectedCurrentTimeMillis);
+
+        ShortcutInfo sorig2 = new ShortcutInfo.Builder(mClientContext)
+                .setId("id2")
+                .setTitle("x")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(456)
+                .build();
+        sorig2.setTimestamp(mInjectedCurrentTimeMillis);
+
+        mManager.addDynamicShortcuts(list(sorig, sorig2));
+
+        mInjectedCurrentTimeMillis += 1;
+        final long now = mInjectedCurrentTimeMillis;
+        mInjectedCurrentTimeMillis += 1;
+
+        // Save and load.
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_10);
+
+        ShortcutInfo si;
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_10);
+
+        assertEquals(USER_10, si.getUserId());
+        assertEquals(HANDLE_USER_10, si.getUserHandle());
+        assertEquals(CALLING_PACKAGE_1, si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(ShortcutActivity2.class.getName(), si.getActivity().getClassName());
+        assertEquals(null, si.getIcon());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(0, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_HAS_ICON_FILE
+                | ShortcutInfo.FLAG_STRINGS_RESOLVED, si.getFlags());
+        assertNotNull(si.getBitmapPath()); // Something should be set.
+        assertEquals(0, si.getIconResourceId());
+        assertTrue(si.getLastChangedTimestamp() < now);
+
+        // Make sure ranks are saved too.  Because of the auto-adjusting, we need two shortcuts
+        // to test it.
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id2", USER_10);
+        assertEquals(1, si.getRank());
+    }
+
+    public void testShortcutInfoSaveAndLoad_resId() throws InterruptedException {
+        setCaller(CALLING_PACKAGE_1, USER_10);
+
+        final Icon res32x32 = Icon.createWithResource(mClientContext, R.drawable.black_32x32);
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIcon(res32x32)
+                .setTitleResId(10)
+                .setTextResId(11)
+                .setDisabledMessageResId(12)
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+        sorig.setTimestamp(mInjectedCurrentTimeMillis);
+
+        ShortcutInfo sorig2 = new ShortcutInfo.Builder(mClientContext)
+                .setId("id2")
+                .setTitle("x")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(456)
+                .build();
+        sorig2.setTimestamp(mInjectedCurrentTimeMillis);
+
+        mManager.addDynamicShortcuts(list(sorig, sorig2));
+
+        mInjectedCurrentTimeMillis += 1;
+        final long now = mInjectedCurrentTimeMillis;
+        mInjectedCurrentTimeMillis += 1;
+
+        // Save and load.
+        mService.saveDirtyInfo();
+        initService();
+        mService.handleUnlockUser(USER_10);
+
+        ShortcutInfo si;
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_10);
+
+        assertEquals(USER_10, si.getUserId());
+        assertEquals(HANDLE_USER_10, si.getUserHandle());
+        assertEquals(CALLING_PACKAGE_1, si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(ShortcutActivity2.class.getName(), si.getActivity().getClassName());
+        assertEquals(null, si.getIcon());
+        assertEquals(10, si.getTitleResId());
+        assertEquals("r10", si.getTitleResName());
+        assertEquals(11, si.getTextResId());
+        assertEquals("r11", si.getTextResName());
+        assertEquals(12, si.getDisabledMessageResourceId());
+        assertEquals("r12", si.getDisabledMessageResName());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(0, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_HAS_ICON_RES
+                | ShortcutInfo.FLAG_STRINGS_RESOLVED, si.getFlags());
+        assertNull(si.getBitmapPath());
+        assertEquals(R.drawable.black_32x32, si.getIconResourceId());
+        assertTrue(si.getLastChangedTimestamp() < now);
+
+        // Make sure ranks are saved too.  Because of the auto-adjusting, we need two shortcuts
+        // to test it.
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id2", USER_10);
+        assertEquals(1, si.getRank());
+    }
+
+    public void testShortcutInfoSaveAndLoad_forBackup() {
+        setCaller(CALLING_PACKAGE_1, USER_0);
+
+        final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(
+                getTestContext().getResources(), R.drawable.black_32x32));
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIcon(bmp32x32)
+                .setTitle("title")
+                .setText("text")
+                .setDisabledMessage("dismes")
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+
+        ShortcutInfo sorig2 = new ShortcutInfo.Builder(mClientContext)
+                .setId("id2")
+                .setTitle("x")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(456)
+                .build();
+
+        mManager.addDynamicShortcuts(list(sorig, sorig2));
+
+        // Dynamic shortcuts won't be backed up, so we need to pin it.
+        setCaller(LAUNCHER_1, USER_0);
+        mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("id", "id2"), HANDLE_USER_0);
+
+        // Do backup & restore.
+        backupAndRestore();
+
+        mService.handleUnlockUser(USER_0); // Load user-0.
+
+        ShortcutInfo si;
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_0);
+
+        assertEquals(CALLING_PACKAGE_1, si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(ShortcutActivity2.class.getName(), si.getActivity().getClassName());
+        assertEquals(null, si.getIcon());
+        assertEquals("title", si.getTitle());
+        assertEquals("text", si.getText());
+        assertEquals("dismes", si.getDisabledMessage());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(0, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_STRINGS_RESOLVED, si.getFlags());
+        assertNull(si.getBitmapPath()); // No icon.
+        assertEquals(0, si.getIconResourceId());
+
+        // Note when restored from backup, it's no longer dynamic, so shouldn't have a rank.
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id2", USER_0);
+        assertEquals(0, si.getRank());
+    }
+
+    public void testShortcutInfoSaveAndLoad_forBackup_resId() {
+        setCaller(CALLING_PACKAGE_1, USER_0);
+
+        final Icon res32x32 = Icon.createWithResource(mClientContext, R.drawable.black_32x32);
+
+        PersistableBundle pb = new PersistableBundle();
+        pb.putInt("k", 1);
+        ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext)
+                .setId("id")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIcon(res32x32)
+                .setTitleResId(10)
+                .setTextResId(11)
+                .setDisabledMessageResId(12)
+                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(123)
+                .setExtras(pb)
+                .build();
+
+        ShortcutInfo sorig2 = new ShortcutInfo.Builder(mClientContext)
+                .setId("id2")
+                .setTitle("x")
+                .setActivity(new ComponentName(mClientContext, ShortcutActivity2.class))
+                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
+                .setRank(456)
+                .build();
+
+        mManager.addDynamicShortcuts(list(sorig, sorig2));
+
+        // Dynamic shortcuts won't be backed up, so we need to pin it.
+        setCaller(LAUNCHER_1, USER_0);
+        mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("id", "id2"), HANDLE_USER_0);
+
+        // Do backup & restore.
+        backupAndRestore();
+
+        mService.handleUnlockUser(USER_0); // Load user-0.
+
+        ShortcutInfo si;
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_0);
+
+        assertEquals(CALLING_PACKAGE_1, si.getPackage());
+        assertEquals("id", si.getId());
+        assertEquals(ShortcutActivity2.class.getName(), si.getActivity().getClassName());
+        assertEquals(null, si.getIcon());
+        assertEquals(10, si.getTitleResId());
+        assertEquals("r10", si.getTitleResName());
+        assertEquals(11, si.getTextResId());
+        assertEquals("r11", si.getTextResName());
+        assertEquals(12, si.getDisabledMessageResourceId());
+        assertEquals("r12", si.getDisabledMessageResName());
+        assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
+        assertEquals("action", si.getIntent().getAction());
+        assertEquals("val", si.getIntent().getStringExtra("key"));
+        assertEquals(0, si.getRank());
+        assertEquals(1, si.getExtras().getInt("k"));
+
+        assertEquals(ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_STRINGS_RESOLVED, si.getFlags());
+        assertNull(si.getBitmapPath()); // No icon.
+        assertEquals(0, si.getIconResourceId());
+        assertEquals(null, si.getIconResName());
+
+        // Note when restored from backup, it's no longer dynamic, so shouldn't have a rank.
+        si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id2", USER_0);
+        assertEquals(0, si.getRank());
+    }
+
+    private void checkShortcutInfoSaveAndLoad_intents(Intent intent) {
+        assertTrue(mManager.setDynamicShortcuts(list(
+                makeShortcutWithIntent("s1", intent))));
+        initService();
+        mService.handleUnlockUser(USER_0);
+
+        assertWith(getCallerShortcuts())
+                .haveIds("s1")
+                .forShortcutWithId("s1", si -> {
+                    assertEquals(intent.getAction(), si.getIntent().getAction());
+                    assertEquals(intent.getData(), si.getIntent().getData());
+                    assertEquals(intent.getComponent(), si.getIntent().getComponent());
+                    assertBundlesEqual(intent.getExtras(), si.getExtras());
+                });
+    }
+
+    public void testShortcutInfoSaveAndLoad_intents() {
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_VIEW));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_MAIN));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_VIEW,
+                Uri.parse("http://www.example.com/")));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_MAIN,
+                Uri.parse("http://www.example.com/")));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_VIEW)
+                .setComponent(new ComponentName("a", "b")));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_MAIN)
+                .setComponent(new ComponentName("a", "b")));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_VIEW)
+                .putExtras(makeBundle("a", "b")));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+
+
+        checkShortcutInfoSaveAndLoad_intents(new Intent(Intent.ACTION_MAIN)
+                .putExtras(makeBundle("a", "b")));
+
+        mInjectedCurrentTimeMillis += INTERVAL; // reset throttling.
+    }
+
+    public void testThrottling() {
+        final ShortcutInfo si1 = makeShortcut("shortcut1");
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(1, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        // Reached the max
+
+        mInjectedCurrentTimeMillis++;
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        // Still throttled
+        mInjectedCurrentTimeMillis = START_TIME + INTERVAL - 1;
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        // Now it should work.
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1))); // fail
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 2, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(1, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 2, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 2, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 2, mManager.getRateLimitResetTime());
+
+        // 4 hours later...
+        mInjectedCurrentTimeMillis = START_TIME + 4 * INTERVAL;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 5, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(1, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 5, mManager.getRateLimitResetTime());
+
+        // Make sure getRemainingCallCount() itself gets reset without calling setDynamicShortcuts().
+        mInjectedCurrentTimeMillis = START_TIME + 8 * INTERVAL;
+        assertEquals(3, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 9, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL * 9, mManager.getRateLimitResetTime());
+    }
+
+    public void testThrottling_rewind() {
+        final ShortcutInfo si1 = makeShortcut("shortcut1");
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        mInjectedCurrentTimeMillis = 12345; // Clock reset!
+
+        // Since the clock looks invalid, the counter shouldn't have reset.
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        // Forward again.  Still haven't reset yet.
+        mInjectedCurrentTimeMillis = START_TIME + INTERVAL - 1;
+        assertEquals(2, mManager.getRemainingCallCount());
+        assertEquals(START_TIME + INTERVAL, mManager.getRateLimitResetTime());
+
+        // Now rewind -- this will reset the counters.
+        mInjectedCurrentTimeMillis = START_TIME - 100000;
+        assertEquals(3, mManager.getRemainingCallCount());
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        // Forward again, should be reset now.
+        mInjectedCurrentTimeMillis += INTERVAL;
+        assertEquals(3, mManager.getRemainingCallCount());
+    }
+
+    public void testThrottling_perPackage() {
+        final ShortcutInfo si1 = makeShortcut("shortcut1");
+
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(1, mManager.getRemainingCallCount());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+
+        // Reached the max
+
+        mInjectedCurrentTimeMillis++;
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+
+        // Try from a different caller.
+        mInjectedClientPackage = CALLING_PACKAGE_2;
+        mInjectedCallingUid = CALLING_UID_2;
+
+        // Need to create a new one wit the updated package name.
+        final ShortcutInfo si2 = makeShortcut("shortcut1");
+
+        assertEquals(3, mManager.getRemainingCallCount());
+
+        assertTrue(mManager.setDynamicShortcuts(list(si2)));
+        assertEquals(2, mManager.getRemainingCallCount());
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si2)));
+        assertEquals(1, mManager.getRemainingCallCount());
+
+        // Back to the original caller, still throttled.
+        mInjectedClientPackage = CALLING_PACKAGE_1;
+        mInjectedCallingUid = CALLING_UID_1;
+
+        mInjectedCurrentTimeMillis = START_TIME + INTERVAL - 1;
+        assertEquals(0, mManager.getRemainingCallCount());
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+        assertEquals(0, mManager.getRemainingCallCount());
+
+        // Now it should work.
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+
+        mInjectedCurrentTimeMillis++;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+
+        mInjectedCurrentTimeMillis++;
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+
+        mInjectedCurrentTimeMillis = START_TIME + 4 * INTERVAL;
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertTrue(mManager.setDynamicShortcuts(list(si1)));
+        assertFalse(mManager.setDynamicShortcuts(list(si1)));
+
+        mInjectedClientPackage = CALLING_PACKAGE_2;
+        mInjectedCallingUid = CALLING_UID_2;
+
+        assertEquals(3, mManager.getRemainingCallCount());
+
+        assertTrue(mManager.setDynamicShortcuts(list(si2)));
+        assertTrue(mManager.setDynamicShortcuts(list(si2)));
+        assertTrue(mManager.setDynamicShortcuts(list(si2)));
+        assertFalse(mManager.setDynamicShortcuts(list(si2)));
+    }
+
+    public void testThrottling_localeChanges() {
+        prepareCrossProfileDataSet();
+
+        dumpsysOnLogcat("Before save & load");
+
+        mService.saveDirtyInfo();
+        initService();
+
+        final long origSequenceNumber = mService.getLocaleChangeSequenceNumber();
+
+        mInternal.onSystemLocaleChangedNoLock();
+        assertEquals(origSequenceNumber + 1, mService.getLocaleChangeSequenceNumber());
+
+        // Note at this point only user-0 is loaded, and the counters are reset for this user,
+        // but it will work for other users too, because we persist when
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+
+        mService.saveDirtyInfo();
+        initService();
+
+        // Make sure the counter is persisted.
+        assertEquals(origSequenceNumber + 1, mService.getLocaleChangeSequenceNumber());
+    }
+
+    public void testThrottling_foreground() throws Exception {
+        prepareCrossProfileDataSet();
+
+        dumpsysOnLogcat("Before save & load");
+
+        mService.saveDirtyInfo();
+        initService();
+
+        // We need to update the current time from time to time, since some of the internal checks
+        // rely on the time being correctly incremented.
+        mInjectedCurrentTimeMillis++;
+
+        // First, all packages have less than 3 (== initial value) remaining calls.
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mInjectedCurrentTimeMillis++;
+
+        // State changed, but not foreground, so no resetting.
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_1, ActivityManager.PROCESS_STATE_TOP_SLEEPING);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mInjectedCurrentTimeMillis++;
+
+        // State changed, package1 foreground, reset.
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_1, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_1, ActivityManager.PROCESS_STATE_TOP_SLEEPING);
+
+        mInjectedCurrentTimeMillis++;
+
+        // Different app comes to foreground briefly, and goes back to background.
+        // Now, make sure package 2's counter is reset, even in this case.
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_2, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE);
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_2, ActivityManager.PROCESS_STATE_TOP_SLEEPING);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mInjectedCurrentTimeMillis++;
+
+        // Do the same thing one more time.  This would catch the bug with mixuing up
+        // the current time and the elapsed time.
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            mManager.updateShortcuts(list(makeShortcut("s")));
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_2, ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE);
+        mService.mUidObserver.onUidStateChanged(
+                CALLING_UID_2, ActivityManager.PROCESS_STATE_TOP_SLEEPING);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mInjectedCurrentTimeMillis++;
+
+        // Package 1 on user-10 comes to foreground.
+        // Now, also try calling some APIs and make sure foreground apps don't get throttled.
+        mService.mUidObserver.onUidStateChanged(
+                UserHandle.getUid(USER_10, CALLING_UID_1),
+                ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE);
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+
+            assertEquals(0, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+
+            assertEquals(0, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+
+            assertEquals(0, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+
+            assertEquals(0, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+
+            assertEquals(0, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+            mManager.setDynamicShortcuts(list(makeShortcut("s")));
+
+            assertEquals(3, mManager.getRemainingCallCount()); // Still 3!
+        });
+    }
+
+
+    public void testThrottling_resetByInternalCall() throws Exception {
+        prepareCrossProfileDataSet();
+
+        dumpsysOnLogcat("Before save & load");
+
+        mService.saveDirtyInfo();
+        initService();
+
+        // First, all packages have less than 3 (== initial value) remaining calls.
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        // Simulate a call from sys UI.
+        mCallerPermissions.add(permission.RESET_SHORTCUT_MANAGER_THROTTLING);
+        mManager.onApplicationActive(CALLING_PACKAGE_1, USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mManager.onApplicationActive(CALLING_PACKAGE_3, USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+
+        mManager.onApplicationActive(CALLING_PACKAGE_1, USER_10);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_3, USER_0, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_4, USER_0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_P0, () -> {
+            MoreAsserts.assertNotEqual(3, mManager.getRemainingCallCount());
+        });
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            assertEquals(3, mManager.getRemainingCallCount());
+        });
+    }
+
+    public void testReportShortcutUsed() {
+        runWithCaller(CALLING_PACKAGE_1, USER_10, () -> {
+            reset(mMockUsageStatsManagerInternal);
+
+            // Report with an nonexistent shortcut.
+            mManager.reportShortcutUsed("s1");
+            verify(mMockUsageStatsManagerInternal, times(0)).reportShortcutUsage(
+                    anyString(), anyString(), anyInt());
+
+            // Publish s2, but s1 still doesn't exist.
+            mManager.setDynamicShortcuts(list(makeShortcut("s2")));
+            mManager.reportShortcutUsed("s1");
+            verify(mMockUsageStatsManagerInternal, times(0)).reportShortcutUsage(
+                    anyString(), anyString(), anyInt());
+
+            mManager.reportShortcutUsed("s2");
+            verify(mMockUsageStatsManagerInternal, times(1)).reportShortcutUsage(
+                    eq(CALLING_PACKAGE_1), eq("s2"), eq(USER_10));
+
+        });
+        runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
+            // Try with a different package.
+            reset(mMockUsageStatsManagerInternal);
+
+            // Report with an nonexistent shortcut.
+            mManager.reportShortcutUsed("s2");
+            verify(mMockUsageStatsManagerInternal, times(0)).reportShortcutUsage(
+                    anyString(), anyString(), anyInt());
+
+            // Publish s2, but s1 still doesn't exist.
+            mManager.setDynamicShortcuts(list(makeShortcut("s3")));
+            mManager.reportShortcutUsed("s2");
+            verify(mMockUsageStatsManagerInternal, times(0)).reportShortcutUsage(
+                    anyString(), anyString(), anyInt());
+
+            mManager.reportShortcutUsed("s3");
+            verify(mMockUsageStatsManagerInternal, times(1)).reportShortcutUsage(
+                    eq(CALLING_PACKAGE_2), eq("s3"), eq(USER_10));
+
+        });
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testGetResourcePackageName() {
+        assertEquals(null, ShortcutInfo.getResourcePackageName(""));
+        assertEquals(null, ShortcutInfo.getResourcePackageName("abc"));
+        assertEquals("p", ShortcutInfo.getResourcePackageName("p:"));
+        assertEquals("p", ShortcutInfo.getResourcePackageName("p:xx"));
+        assertEquals("pac", ShortcutInfo.getResourcePackageName("pac:"));
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testGetResourceTypeName() {
+        assertEquals(null, ShortcutInfo.getResourceTypeName(""));
+        assertEquals(null, ShortcutInfo.getResourceTypeName(":"));
+        assertEquals(null, ShortcutInfo.getResourceTypeName("/"));
+        assertEquals(null, ShortcutInfo.getResourceTypeName("/:"));
+        assertEquals("a", ShortcutInfo.getResourceTypeName(":a/"));
+        assertEquals("type", ShortcutInfo.getResourceTypeName("xxx:type/yyy"));
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testGetResourceTypeAndEntryName() {
+        assertEquals(null, ShortcutInfo.getResourceTypeAndEntryName(""));
+        assertEquals(null, ShortcutInfo.getResourceTypeAndEntryName("abc"));
+        assertEquals("", ShortcutInfo.getResourceTypeAndEntryName("p:"));
+        assertEquals("x", ShortcutInfo.getResourceTypeAndEntryName(":x"));
+        assertEquals("x", ShortcutInfo.getResourceTypeAndEntryName("p:x"));
+        assertEquals("xyz", ShortcutInfo.getResourceTypeAndEntryName("pac:xyz"));
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testGetResourceEntryName() {
+        assertEquals(null, ShortcutInfo.getResourceEntryName(""));
+        assertEquals(null, ShortcutInfo.getResourceEntryName("ab:"));
+        assertEquals("", ShortcutInfo.getResourceEntryName("/"));
+        assertEquals("abc", ShortcutInfo.getResourceEntryName("/abc"));
+        assertEquals("abc", ShortcutInfo.getResourceEntryName("xyz/abc"));
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testLookUpResourceName_systemResources() {
+        // For android system resources, lookUpResourceName will simply return the value as a
+        // string, regardless of "withType".
+        final Resources res = getTestContext().getResources();
+
+        assertEquals("" + android.R.string.cancel, ShortcutInfo.lookUpResourceName(res,
+                android.R.string.cancel, true, getTestContext().getPackageName()));
+        assertEquals("" + android.R.drawable.alert_dark_frame, ShortcutInfo.lookUpResourceName(res,
+                android.R.drawable.alert_dark_frame, true, getTestContext().getPackageName()));
+        assertEquals("" + android.R.string.cancel, ShortcutInfo.lookUpResourceName(res,
+                android.R.string.cancel, false, getTestContext().getPackageName()));
+    }
+
+    public void testLookUpResourceName_appResources() {
+        final Resources res = getTestContext().getResources();
+
+        assertEquals("shortcut_text1", ShortcutInfo.lookUpResourceName(res,
+                R.string.shortcut_text1, false, getTestContext().getPackageName()));
+        assertEquals("string/shortcut_text1", ShortcutInfo.lookUpResourceName(res,
+                R.string.shortcut_text1, true, getTestContext().getPackageName()));
+
+        assertEquals("black_16x64", ShortcutInfo.lookUpResourceName(res,
+                R.drawable.black_16x64, false, getTestContext().getPackageName()));
+        assertEquals("drawable/black_16x64", ShortcutInfo.lookUpResourceName(res,
+                R.drawable.black_16x64, true, getTestContext().getPackageName()));
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testLookUpResourceId_systemResources() {
+        final Resources res = getTestContext().getResources();
+
+        assertEquals(android.R.string.cancel, ShortcutInfo.lookUpResourceId(res,
+                "" + android.R.string.cancel, null,
+                getTestContext().getPackageName()));
+        assertEquals(android.R.drawable.alert_dark_frame, ShortcutInfo.lookUpResourceId(res,
+                "" + android.R.drawable.alert_dark_frame, null,
+                getTestContext().getPackageName()));
+    }
+
+    // Test for a ShortcutInfo method.
+    public void testLookUpResourceId_appResources() {
+        final Resources res = getTestContext().getResources();
+
+        assertEquals(R.string.shortcut_text1,
+                ShortcutInfo.lookUpResourceId(res, "shortcut_text1", "string",
+                        getTestContext().getPackageName()));
+
+        assertEquals(R.string.shortcut_text1,
+                ShortcutInfo.lookUpResourceId(res, "string/shortcut_text1", null,
+                        getTestContext().getPackageName()));
+
+        assertEquals(R.drawable.black_16x64,
+                ShortcutInfo.lookUpResourceId(res, "black_16x64", "drawable",
+                        getTestContext().getPackageName()));
+
+        assertEquals(R.drawable.black_16x64,
+                ShortcutInfo.lookUpResourceId(res, "drawable/black_16x64", null,
+                        getTestContext().getPackageName()));
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java
new file mode 100644
index 0000000..eb4db7a
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest3.java
@@ -0,0 +1,505 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
+
+import android.content.ComponentName;
+import android.content.pm.ShortcutInfo;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.frameworks.servicestests.R;
+import com.android.server.pm.ShortcutService.ConfigConstants;
+
+/**
+ * Tests related to shortcut rank auto-adjustment.
+ */
+@SmallTest
+public class ShortcutManagerTest3 extends BaseShortcutManagerTest {
+
+    private static final String CALLING_PACKAGE = CALLING_PACKAGE_1;
+
+    private static final ComponentName A1 = new ComponentName(CALLING_PACKAGE,
+            ShortcutActivity.class.getName());
+
+    private static final ComponentName A2 = new ComponentName(CALLING_PACKAGE,
+            ShortcutActivity2.class.getName());
+
+    private static final ComponentName A3 = new ComponentName(CALLING_PACKAGE,
+            ShortcutActivity3.class.getName());
+
+    private ShortcutInfo shortcut(String id, ComponentName activity, int rank) {
+        return makeShortcutWithActivityAndRank(id, activity, rank);
+    }
+
+    private ShortcutInfo shortcut(String id, ComponentName activity) {
+        return makeShortcutWithActivityAndRank(id, activity, ShortcutInfo.RANK_NOT_SET);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // We don't need throttling during this test class, and also relax the max cap.
+        mService.updateConfigurationLocked(
+                ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL + "=99999999,"
+                + ConfigConstants.KEY_MAX_SHORTCUTS + "=99999999"
+        );
+
+        setCaller(CALLING_PACKAGE, USER_0);
+    }
+
+    private void publishManifestShortcuts(ComponentName activity, int resId) {
+        addManifestShortcutResource(activity, resId);
+        updatePackageVersion(CALLING_PACKAGE, 1);
+        mService.mPackageMonitor.onReceive(getTestContext(),
+                genPackageAddIntent(CALLING_PACKAGE, USER_0));
+    }
+
+    public void testSetDynamicShortcuts_noManifestShortcuts() {
+        mManager.setDynamicShortcuts(list(
+                shortcut("s1", A1)
+        ));
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s1");
+
+        assertTrue(mManager.setDynamicShortcuts(list(
+                shortcut("s5", A1),
+                shortcut("s4", A1),
+                shortcut("s3", A1)
+        )));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s4", "s3");
+
+        // RANK_NOT_SET is always the last.
+        assertTrue(mManager.setDynamicShortcuts(list(
+                shortcut("s5", A1),
+                shortcut("s4", A1, 5),
+                shortcut("s3", A1, 3),
+                shortcut("s2", A1)
+        )));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s3", "s4", "s5", "s2");
+
+        // Same rank, preserve the argument order.
+        assertTrue(mManager.setDynamicShortcuts(list(
+                shortcut("s5", A1, 5),
+                shortcut("s4", A1, 0),
+                shortcut("s3", A1, 5)
+        )));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s4", "s5", "s3");
+
+        // Multiple activities.
+        assertTrue(mManager.setDynamicShortcuts(list(
+                shortcut("s5", A1),
+                shortcut("s4", A2),
+                shortcut("s3", A3)
+        )));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5");
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("s4");
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A3)
+                .haveRanksInOrder("s3");
+
+        assertTrue(mManager.setDynamicShortcuts(list(
+                shortcut("s5", A1, 5),
+                shortcut("s4", A1),
+                shortcut("s3", A1, 5),
+                shortcut("x5", A2, 5),
+                shortcut("x4", A2),
+                shortcut("x3", A2, 1)
+        )));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s4");
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x5", "x4");
+
+        // Clear.  Make sure it wouldn't lead to invalid internals state.
+        // (ShortcutService.verifyStates() will do so internally.)
+        assertTrue(mManager.setDynamicShortcuts(list()));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1).isEmpty();
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2).isEmpty();
+    }
+
+    private void runTestWithManifestShortcuts(Runnable r) {
+        publishManifestShortcuts(A1, R.xml.shortcut_5_alt);
+        publishManifestShortcuts(A2, R.xml.shortcut_1);
+
+        assertWith(getCallerShortcuts()).selectManifest().selectByActivity(A1)
+                .haveRanksInOrder("ms1_alt", "ms2_alt", "ms3_alt", "ms4_alt", "ms5_alt");
+
+        assertWith(getCallerShortcuts()).selectManifest().selectByActivity(A2)
+                .haveRanksInOrder("ms1");
+
+        // Existence of manifest shortcuts shouldn't affect dynamic shortcut ranks,
+        // so running another test here should pass.
+        r.run();
+
+        // And dynamic shortcut tests shouldn't affect manifest shortcuts, so repeat the
+        // same check.
+        assertWith(getCallerShortcuts()).selectManifest().selectByActivity(A1)
+                .haveRanksInOrder("ms1_alt", "ms2_alt", "ms3_alt", "ms4_alt", "ms5_alt");
+
+        assertWith(getCallerShortcuts()).selectManifest().selectByActivity(A2)
+                .haveRanksInOrder("ms1");
+    }
+
+    public void testSetDynamicShortcuts_withManifestShortcuts() {
+        runTestWithManifestShortcuts(() -> testSetDynamicShortcuts_noManifestShortcuts());
+    }
+
+    public void testAddDynamicShortcuts_noManifestShortcuts() {
+        mManager.addDynamicShortcuts(list(
+                shortcut("s1", A1)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s1");
+
+        //------------------------------------------------------
+        long lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.addDynamicShortcuts(list(
+                shortcut("s5", A1, 0),
+                shortcut("s4", A1),
+                shortcut("s2", A1, 3),
+                shortcut("x1", A2),
+                shortcut("x3", A2, 2),
+                shortcut("x2", A2, 2),
+                shortcut("s3", A1, 0)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s1", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s5", "s3", "s1", "s2", "s4", "x3", "x2", "x1");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.addDynamicShortcuts(list(
+                shortcut("s1", A1, 1)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s1", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s1", "s3");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.addDynamicShortcuts(list(
+                shortcut("s1", A1, 1),
+
+                // This is add, not update, so the following means s5 will have NO_RANK,
+                // which puts it at the end.
+                shortcut("s5", A1),
+                shortcut("s3", A1, 0),
+
+                // s10 also has NO_RANK, so it'll be put at the end, even after "s5" as we preserve
+                // the argument order.
+                shortcut("s10", A1),
+
+                // Note we're changing the activity for x2.
+                shortcut("x2", A1, 0),
+                shortcut("x10", A2)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s3", "x2", "s1", "s2", "s4", "s5", "s10");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x1", "x10");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s3", "x2", "s1", "s5", "s10", "x1", "x10");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        // Change the activities again.
+        mManager.addDynamicShortcuts(list(
+                shortcut("s1", A2),
+                shortcut("s2", A2, 999)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s3", "x2", "s4", "s5", "s10");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x1", "x10", "s2", "s1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s1", "s2", "s4", "s5", "s10");
+    }
+
+    public void testAddDynamicShortcuts_withManifestShortcuts() {
+        runTestWithManifestShortcuts(() -> testAddDynamicShortcuts_noManifestShortcuts());
+    }
+
+    public void testUpdateShortcuts_noManifestShortcuts() {
+        mManager.addDynamicShortcuts(list(
+                shortcut("s5", A1, 0),
+                shortcut("s4", A1),
+                shortcut("s2", A1, 3),
+                shortcut("x1", A2),
+                shortcut("x3", A2, 2),
+                shortcut("x2", A2, 2),
+                shortcut("s3", A1, 0)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        //------------------------------------------------------
+        long lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.updateShortcuts(list());
+        // Same order.
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .isEmpty();
+
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE, list("s2", "s4", "x2"), HANDLE_USER_0);
+        });
+        // Still same order.
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.updateShortcuts(list(
+                shortcut("s4", A1, 1),
+
+                // Rank not changing, should keep the same positions.
+                // c.f. in case of addDynamicShortcuts, this means "put them at the end".
+                shortcut("s3", A1),
+                shortcut("x2", A2)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s4", "s3", "s2");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s4", "s3", "s2", "x2");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.updateShortcuts(list(
+                shortcut("s4", A1, 0),
+
+                // Change the activity without specifying a rank -> keep the same rank.
+                shortcut("s5", A2),
+
+                // Change the activity without specifying a rank -> assign a new rank.
+                shortcut("x2", A1, 2),
+
+                // "xx" doesn't exist, so it'll be ignored.
+                shortcut("xx", A1, 0)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s4", "x2", "s3", "s2");
+
+        // Interesting case: both x3 and s5 originally had rank=0, and in this case s5 has moved
+        // to A2 without changing the rank.  So they're tie for the new rank, as well as
+        // the "rank changed" bit.  Also in this case, "s5" won't have an implicit order, since
+        // its rank isn't changing.  So we sort them by ID, thus s5 comes before x3.
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("s5", "x3", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s4", "x2", "s5", "x3");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.updateShortcuts(list(
+                shortcut("s3", A3)));
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s4", "x2", "s2");
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("s5", "x3", "x1");
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A3)
+                .haveRanksInOrder("s3");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s3", "s2");
+    }
+
+    public void testUpdateShortcuts_withManifestShortcuts() {
+        runTestWithManifestShortcuts(() -> testUpdateShortcuts_noManifestShortcuts());
+    }
+
+    public void testDeleteDynamicShortcuts_noManifestShortcuts() {
+        mManager.addDynamicShortcuts(list(
+                shortcut("s5", A1, 0),
+                shortcut("s4", A1),
+                shortcut("s2", A1, 3),
+                shortcut("x1", A2),
+                shortcut("x3", A2, 2),
+                shortcut("x2", A2, 2),
+                shortcut("s3", A1, 0)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        //------------------------------------------------------
+        long lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.removeDynamicShortcuts(list());
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .isEmpty();
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(
+                    CALLING_PACKAGE, list("s2", "s4", "x1", "x2"), HANDLE_USER_0);
+        });
+        // Still same order.
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.removeDynamicShortcuts(list("s3", "x1", "xxxx"));
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s2", "s4");
+    }
+
+    public void testDeleteDynamicShortcuts_withManifestShortcuts() {
+        runTestWithManifestShortcuts(() -> testDeleteDynamicShortcuts_noManifestShortcuts());
+    }
+
+    public void testDisableShortcuts_noManifestShortcuts() {
+        mManager.addDynamicShortcuts(list(
+                shortcut("s5", A1, 0),
+                shortcut("s4", A1),
+                shortcut("s2", A1, 3),
+                shortcut("x1", A2),
+                shortcut("x3", A2, 2),
+                shortcut("x2", A2, 2),
+                shortcut("s3", A1, 0)
+        ));
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        //------------------------------------------------------
+        long lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.disableShortcuts(list());
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s3", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2", "x1");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .isEmpty();
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.disableShortcuts(list("s3", "x1", "xxxx"));
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s2", "s4");
+
+        runWithCaller(LAUNCHER_1, USER_0, () -> {
+            mLauncherApps.pinShortcuts(CALLING_PACKAGE, list("s2", "s4", "x2"), HANDLE_USER_0);
+        });
+        // Still same order.
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s2", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x3", "x2");
+
+        //------------------------------------------------------
+        lastApiTime = ++mInjectedCurrentTimeMillis;
+
+        mManager.disableShortcuts(list("s2", "x3"));
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A1)
+                .haveRanksInOrder("s5", "s4");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByActivity(A2)
+                .haveRanksInOrder("x2");
+
+        assertWith(getCallerShortcuts()).selectDynamic().selectByChangedSince(lastApiTime)
+                .haveIds("s4", "x2");
+    }
+
+    public void testDisableShortcuts_withManifestShortcuts() {
+        runTestWithManifestShortcuts(() -> testDisableShortcuts_noManifestShortcuts());
+    }
+
+}
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest4.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest4.java
new file mode 100644
index 0000000..54c4b22
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest4.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertBundlesEqual;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makeBundle;
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makePersistableBundle;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.PersistableBundle;
+import android.test.suitebuilder.annotation.SmallTest;
+
+@SmallTest
+public class ShortcutManagerTest4 extends BaseShortcutManagerTest {
+
+    private static Bundle sIntentExtras = makeBundle(
+            "key{\u0000}", "value{\u0000}",
+            "key{\u0001}", "value{\u0001}",
+            "key{\u001f}", "value{\u001f}",
+            "key{\u007f}", "value{\u007f}",
+
+            "key{\ud800\udc00}", "value{\ud800\udc00}",
+            "key{\ud801\udc01}", "value{\ud801\udc01}",
+            "key{\udbff\udfff}", "value{\udbff\udfff}",
+
+            "key{\ud801}x", 1, // broken surrogate pair
+            "key{\uDC01}\"x", 2, // broken surrogate pair
+
+            "x1", "value{\ud801}x", // broken surrogate pair
+            "x2", "value{\uDC01}\"x" // broken surrogate pair
+    );
+
+    // Same as above, except broken surrogate pairs are replaced with '?'s.
+    private static Bundle sIntentExtrasDecoded = makeBundle(
+            "key{\u0000}", "value{\u0000}",
+            "key{\u0001}", "value{\u0001}",
+            "key{\u001f}", "value{\u001f}",
+            "key{\u007f}", "value{\u007f}",
+
+            "key{\ud800\udc00}", "value{\ud800\udc00}",
+            "key{\ud801\udc01}", "value{\ud801\udc01}",
+            "key{\udbff\udfff}", "value{\udbff\udfff}",
+
+            "key{?}x", 1,
+            "key{?}\"x", 2,
+
+            "x1", "value{?}x",
+            "x2", "value{?}\"x"
+    );
+
+    private static PersistableBundle sShortcutExtras = makePersistableBundle(
+            "key{\u0000}", "value{\u0000}",
+            "key{\u0001}", "value{\u0001}",
+            "key{\u001f}", "value{\u001f}",
+            "key{\u007f}", "value{\u007f}",
+
+            "key{\ud800\udc00}", "value{\ud800\udc00}",
+            "key{\ud801\udc01}", "value{\ud801\udc01}",
+            "key{\udbff\udfff}", "value{\udbff\udfff}",
+
+            "key{\ud801}", 1, // broken surrogate pair
+            "key{\uDC01}", 2, // broken surrogate pair
+
+            "x1", "value{\ud801}", // broken surrogate pair
+            "x2", "value{\uDC01}" // broken surrogate pair
+    );
+
+    // Same as above, except broken surrogate pairs are replaced with '?'s.
+    private static PersistableBundle sShortcutExtrasDecoded = makePersistableBundle(
+            "key{\u0000}", "value{\u0000}",
+            "key{\u0001}", "value{\u0001}",
+            "key{\u001f}", "value{\u001f}",
+            "key{\u007f}", "value{\u007f}",
+
+            "key{\ud800\udc00}", "value{\ud800\udc00}",
+            "key{\ud801\udc01}", "value{\ud801\udc01}",
+            "key{\udbff\udfff}", "value{\udbff\udfff}",
+
+            "key{?}", 1,
+            "key{?}", 2,
+
+            "x1", "value{?}",
+            "x2", "value{?}"
+    );
+
+    public void testPersistingWeirdCharacters() {
+        final Intent intent = new Intent(Intent.ACTION_VIEW)
+                .putExtras(sIntentExtras);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertTrue(mManager.setDynamicShortcuts(list(
+                    makeShortcutWithExtras("s1", intent, sShortcutExtras),
+                    makeShortcut("s{\u0000}{\u0001}{\uD800\uDC00}x[\uD801][\uDC01]")
+            )));
+        });
+
+        // Make sure save & load works fine. (i.e. shouldn't crash even with invalid characters.)
+        initService();
+        mService.handleUnlockUser(USER_0);
+
+        runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
+            assertWith(getCallerShortcuts())
+                    .haveIds("s1", "s{\u0000}{\u0001}{\uD800\uDC00}x[?][?]")
+                    .forShortcutWithId("s1", si -> {
+                        assertBundlesEqual(si.getIntent().getExtras(), sIntentExtrasDecoded);
+                        assertBundlesEqual(si.getExtras(), sShortcutExtrasDecoded);
+                    });
+        });
+    }
+}
\ No newline at end of file
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest5.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest5.java
new file mode 100644
index 0000000..29c98dc
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest5.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm;
+
+import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set;
+
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.ShortcutServiceInternal;
+import android.content.res.XmlResourceParser;
+import android.os.Looper;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.server.LocalServices;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Unit tests for all the IPackageManager related methods in {@link ShortcutService}.
+ *
+ * All the tests here actually talks to the real IPackageManager, so we can't test complicated
+ * cases.  Instead we just make sure they all work reasonably without at least crashing.
+ */
+@SmallTest
+public class ShortcutManagerTest5 extends BaseShortcutManagerTest {
+    private ShortcutService mShortcutService;
+
+    private String mMyPackage;
+    private int mMyUserId;
+
+    public static class ShortcutEnabled extends Activity {
+    }
+
+    public static class ShortcutDisabled extends Activity {
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        LocalServices.removeServiceForTest(ShortcutServiceInternal.class);
+        mShortcutService = new ShortcutService(getTestContext(), Looper.getMainLooper(),
+                /* onyForPackageManagerApis */ true);
+
+        mMyPackage = getTestContext().getPackageName();
+        mMyUserId = android.os.Process.myUserHandle().getIdentifier();
+    }
+
+    public void testGetPackageUid() {
+        assertTrue(mShortcutService.injectGetPackageUid(
+                mMyPackage, mMyUserId) != 0);
+
+        assertEquals(-1, mShortcutService.injectGetPackageUid(
+                "no.such.package", mMyUserId));
+    }
+
+    public void testGetPackageInfo() {
+        PackageInfo pi = mShortcutService.getPackageInfo(
+                mMyPackage, mMyUserId, /*signature*/ false);
+        assertEquals(mMyPackage, pi.packageName);
+        assertNull(pi.signatures);
+
+        pi = mShortcutService.getPackageInfo(
+                mMyPackage, mMyUserId, /*signature*/ true);
+        assertEquals(mMyPackage, pi.packageName);
+        assertNotNull(pi.signatures);
+
+        pi = mShortcutService.getPackageInfo(
+                "no.such.package", mMyUserId, /*signature*/ true);
+        assertNull(pi);
+    }
+
+    public void testGetApplicationInfo() {
+        ApplicationInfo ai = mShortcutService.getApplicationInfo(
+                mMyPackage, mMyUserId);
+        assertEquals(mMyPackage, ai.packageName);
+
+        ai = mShortcutService.getApplicationInfo(
+                "no.such.package", mMyUserId);
+        assertNull(ai);
+    }
+
+    public void testGetActivityInfoWithMetadata() {
+        // Disabled activity
+        ActivityInfo ai = mShortcutService.getActivityInfoWithMetadata(
+                new ComponentName(mMyPackage, "ShortcutDisabled"), mMyUserId);
+        assertNull(ai);
+
+        // Nonexistent
+        ai = mShortcutService.getActivityInfoWithMetadata(
+                new ComponentName("no.such.package", "ShortcutDisabled"), mMyUserId);
+        assertNull(ai);
+
+        // Existent, with no metadata.
+        ai = mShortcutService.getActivityInfoWithMetadata(
+                new ComponentName(mMyPackage, "a.ShortcutEnabled"), mMyUserId);
+        assertEquals(mMyPackage, ai.packageName);
+        assertEquals("a.ShortcutEnabled", ai.name);
+        assertNull(ai.loadXmlMetaData(getTestContext().getPackageManager(),
+                "android.app.shortcuts"));
+
+        // Existent, with a shortcut metadata.
+        ai = mShortcutService.getActivityInfoWithMetadata(
+                new ComponentName(mMyPackage, "a.Shortcut1"), mMyUserId);
+        assertEquals(mMyPackage, ai.packageName);
+        assertEquals("a.Shortcut1", ai.name);
+        XmlResourceParser meta = ai.loadXmlMetaData(getTestContext().getPackageManager(),
+                "android.app.shortcuts");
+        assertNotNull(meta);
+        meta.close();
+    }
+
+    public void testGetInstalledPackages() {
+        List<PackageInfo> apks = mShortcutService.getInstalledPackages(mMyUserId);
+
+        Set<String> expectedPackages = set("com.android.settings", mMyPackage);
+        for (PackageInfo pi : apks) {
+            expectedPackages.remove(pi.packageName);
+        }
+        assertEquals(set(), expectedPackages);
+    }
+
+    public void testGetDefaultMainActivity() {
+        ComponentName cn = mShortcutService.injectGetDefaultMainActivity(
+                "com.android.settings", mMyUserId);
+
+        assertEquals(
+                ComponentName.unflattenFromString("com.android.settings/.Settings"),
+                cn);
+
+        // This package has no main activity.
+        assertNull(mShortcutService.injectGetDefaultMainActivity(
+                mMyPackage, mMyUserId));
+
+        // Nonexistent.
+        assertNull(mShortcutService.injectGetDefaultMainActivity(
+                "no.such.package", mMyUserId));
+    }
+
+    public void testIsMainActivity() {
+        assertTrue(mShortcutService.injectIsMainActivity(
+                ComponentName.unflattenFromString("com.android.settings/.Settings"), mMyUserId));
+        assertFalse(mShortcutService.injectIsMainActivity(
+                ComponentName.unflattenFromString("com.android.settings/.xxx"), mMyUserId));
+        assertFalse(mShortcutService.injectIsMainActivity(
+                ComponentName.unflattenFromString("no.such.package/.xxx"), mMyUserId));
+
+        assertFalse(mShortcutService.injectIsMainActivity(
+                new ComponentName(mMyPackage, "a.DisabledMain"), mMyUserId));
+        assertFalse(mShortcutService.injectIsMainActivity(
+                new ComponentName(mMyPackage, "a.UnexportedMain"), mMyUserId));
+
+    }
+
+    public void testGetMainActivities() {
+        assertEquals(1, mShortcutService.injectGetMainActivities(
+                "com.android.settings", mMyUserId).size());
+
+        // This APK has no main activities.
+        assertEquals(0, mShortcutService.injectGetMainActivities(
+                mMyPackage, mMyUserId).size());
+    }
+
+    public void testIsActivityEnabledAndExported() {
+        assertTrue(mShortcutService.injectIsActivityEnabledAndExported(
+                ComponentName.unflattenFromString("com.android.settings/.Settings"), mMyUserId));
+        assertFalse(mShortcutService.injectIsActivityEnabledAndExported(
+                ComponentName.unflattenFromString("com.android.settings/.xxx"), mMyUserId));
+        assertFalse(mShortcutService.injectIsActivityEnabledAndExported(
+                ComponentName.unflattenFromString("no.such.package/.xxx"), mMyUserId));
+
+        assertTrue(mShortcutService.injectIsActivityEnabledAndExported(
+                new ComponentName(mMyPackage, "com.android.server.pm.ShortcutTestActivity"),
+                mMyUserId));
+
+        assertTrue(mShortcutService.injectIsActivityEnabledAndExported(
+                new ComponentName(mMyPackage, "a.ShortcutEnabled"), mMyUserId));
+
+        assertFalse(mShortcutService.injectIsActivityEnabledAndExported(
+                new ComponentName(mMyPackage, "a.ShortcutDisabled"), mMyUserId));
+        assertFalse(mShortcutService.injectIsActivityEnabledAndExported(
+                new ComponentName(mMyPackage, "a.ShortcutUnexported"), mMyUserId));
+
+    }
+}
diff --git a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl b/services/tests/servicestests/src/com/android/server/pm/ShortcutTestActivity.java
similarity index 69%
copy from telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
copy to services/tests/servicestests/src/com/android/server/pm/ShortcutTestActivity.java
index b7e78d1..d82b0d5 100644
--- a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutTestActivity.java
@@ -1,11 +1,11 @@
 /*
- * Copyright 2016, The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,10 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package com.android.server.pm;
 
-package android.telecom;
+import android.app.Activity;
 
-/**
- * {@hide}
- */
-parcelable ParcelableCallAnalytics;
+public class ShortcutTestActivity extends Activity {
+}
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceTest.java
index 48a11c5..9f77297 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceTest.java
@@ -23,12 +23,14 @@
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
 import android.util.AtomicFile;
 
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 
+@SmallTest
 public class UserManagerServiceTest extends AndroidTestCase {
     private static String[] STRING_ARRAY = new String[] {"<tag", "<![CDATA["};
     private File restrictionsFile;
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
index 6c2fcd5..ced4980 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
@@ -25,6 +25,7 @@
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
 
 import com.android.internal.util.ArrayUtils;
 
@@ -33,6 +34,7 @@
 import java.util.List;
 
 /** Test {@link UserManager} functionality. */
+@MediumTest
 public class UserManagerTest extends AndroidTestCase {
     private static final int REMOVE_CHECK_INTERVAL = 500;
     private static final int REMOVE_TIMEOUT = 60 * 1000;
@@ -96,7 +98,7 @@
                     && !user.isPrimary()) {
                 found = true;
                 Bundle restrictions = mUserManager.getUserRestrictions(user.getUserHandle());
-                assertFalse("New user should have DISALLOW_CONFIG_WIFI =false by default",
+                assertTrue("Guest user should have DISALLOW_CONFIG_WIFI=true by default",
                         restrictions.getBoolean(UserManager.DISALLOW_CONFIG_WIFI));
             }
         }
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java b/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
index 5bdf6f7..e2dce853 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
@@ -23,6 +23,7 @@
 import android.os.UserManager;
 import android.test.AndroidTestCase;
 import android.test.MoreAsserts;
+import android.test.suitebuilder.annotation.SmallTest;
 
 /**
  * Tests for {@link com.android.server.pm.UserRestrictionsUtils}.
@@ -35,6 +36,7 @@
      -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
  * </pre>
  */
+@SmallTest
 public class UserRestrictionsUtilsTest extends AndroidTestCase {
     public void testNonNull() {
         Bundle out = UserRestrictionsUtils.nonNull(null);
diff --git a/services/tests/shortcutmanagerutils/Android.mk b/services/tests/shortcutmanagerutils/Android.mk
new file mode 100644
index 0000000..701e058
--- /dev/null
+++ b/services/tests/shortcutmanagerutils/Android.mk
@@ -0,0 +1,31 @@
+# Copyright (C) 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+    $(call all-java-files-under, src)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    mockito-target
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_MODULE := ShortcutManagerTestUtils
+
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java b/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java
new file mode 100644
index 0000000..f89c4e4
--- /dev/null
+++ b/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ShortcutManagerTestUtils.java
@@ -0,0 +1,978 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.server.pm.shortcutmanagertest;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyList;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.app.Instrumentation;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.LauncherApps;
+import android.content.pm.LauncherApps.Callback;
+import android.content.pm.ShortcutInfo;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.os.BaseBundle;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Parcel;
+import android.os.ParcelFileDescriptor;
+import android.os.PersistableBundle;
+import android.os.UserHandle;
+import android.test.MoreAsserts;
+import android.util.Log;
+
+import junit.framework.Assert;
+
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mockito;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.concurrent.CountDownLatch;
+import java.util.function.BooleanSupplier;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
+
+/**
+ * Common utility methods for ShortcutManager tests.  This is used by both CTS and the unit tests.
+ * Because it's used by CTS too, it can only access the public APIs.
+ */
+public class ShortcutManagerTestUtils {
+    private static final String TAG = "ShortcutManagerUtils";
+
+    private static final boolean ENABLE_DUMPSYS = false; // DO NOT SUBMIT WITH true
+
+    private static final int STANDARD_TIMEOUT_SEC = 5;
+
+    private static final String[] EMPTY_STRINGS = new String[0];
+
+    private ShortcutManagerTestUtils() {
+    }
+
+    private static List<String> readAll(ParcelFileDescriptor pfd) {
+        try {
+            try {
+                final ArrayList<String> ret = new ArrayList<>();
+                try (BufferedReader r = new BufferedReader(
+                        new FileReader(pfd.getFileDescriptor()))) {
+                    String line;
+                    while ((line = r.readLine()) != null) {
+                        ret.add(line);
+                    }
+                    r.readLine();
+                }
+                return ret;
+            } finally {
+                pfd.close();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static String concatResult(List<String> result) {
+        final StringBuilder sb = new StringBuilder();
+        for (String s : result) {
+            sb.append(s);
+            sb.append("\n");
+        }
+        return sb.toString();
+    }
+
+    private static List<String> runCommand(Instrumentation instrumentation, String command) {
+        return runCommand(instrumentation, command, null);
+    }
+    private static List<String> runCommand(Instrumentation instrumentation, String command,
+            Predicate<List<String>> resultAsserter) {
+        Log.d(TAG, "Running command: " + command);
+        final List<String> result;
+        try {
+            result = readAll(
+                    instrumentation.getUiAutomation().executeShellCommand(command));
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        if (resultAsserter != null && !resultAsserter.test(result)) {
+            fail("Command '" + command + "' failed, output was:\n" + concatResult(result));
+        }
+        return result;
+    }
+
+    private static void runCommandForNoOutput(Instrumentation instrumentation, String command) {
+        runCommand(instrumentation, command, result -> result.size() == 0);
+    }
+
+    private static List<String> runShortcutCommand(Instrumentation instrumentation, String command,
+            Predicate<List<String>> resultAsserter) {
+        return runCommand(instrumentation, "cmd shortcut " + command, resultAsserter);
+    }
+
+    public static List<String> runShortcutCommandForSuccess(Instrumentation instrumentation,
+            String command) {
+        return runShortcutCommand(instrumentation, command, result -> result.contains("Success"));
+    }
+
+    public static String getDefaultLauncher(Instrumentation instrumentation) {
+        final String PREFIX = "Launcher: ComponentInfo{";
+        final String POSTFIX = "}";
+        final List<String> result = runShortcutCommandForSuccess(
+                instrumentation, "get-default-launcher");
+        for (String s : result) {
+            if (s.startsWith(PREFIX) && s.endsWith(POSTFIX)) {
+                return s.substring(PREFIX.length(), s.length() - POSTFIX.length());
+            }
+        }
+        fail("Default launcher not found");
+        return null;
+    }
+
+    public static void setDefaultLauncher(Instrumentation instrumentation, String component) {
+        runCommand(instrumentation, "cmd package set-home-activity " + component,
+                result -> result.contains("Success"));
+    }
+
+    public static void setDefaultLauncher(Instrumentation instrumentation, Context packageContext) {
+        setDefaultLauncher(instrumentation, packageContext.getPackageName()
+                + "/android.content.pm.cts.shortcutmanager.packages.Launcher");
+    }
+
+    public static void overrideConfig(Instrumentation instrumentation, String config) {
+        runShortcutCommandForSuccess(instrumentation, "override-config " + config);
+    }
+
+    public static void resetConfig(Instrumentation instrumentation) {
+        runShortcutCommandForSuccess(instrumentation, "reset-config");
+    }
+
+    public static void resetThrottling(Instrumentation instrumentation) {
+        runShortcutCommandForSuccess(instrumentation, "reset-throttling");
+    }
+
+    public static void resetAllThrottling(Instrumentation instrumentation) {
+        runShortcutCommandForSuccess(instrumentation, "reset-all-throttling");
+    }
+
+    public static void clearShortcuts(Instrumentation instrumentation, int userId,
+            String packageName) {
+        runShortcutCommandForSuccess(instrumentation, "clear-shortcuts "
+                + " --user " + userId + " " + packageName);
+    }
+
+    public static void dumpsysShortcut(Instrumentation instrumentation) {
+        if (!ENABLE_DUMPSYS) {
+            return;
+        }
+        Log.e(TAG, "Dumpsys shortcut");
+        for (String s : runCommand(instrumentation, "dumpsys shortcut")) {
+            Log.e(TAG, s);
+        }
+    }
+
+    public static Bundle makeBundle(Object... keysAndValues) {
+        assertTrue((keysAndValues.length % 2) == 0);
+
+        if (keysAndValues.length == 0) {
+            return null;
+        }
+        final Bundle ret = new Bundle();
+
+        for (int i = keysAndValues.length - 2; i >= 0; i -= 2) {
+            final String key = keysAndValues[i].toString();
+            final Object value = keysAndValues[i + 1];
+
+            if (value == null) {
+                ret.putString(key, null);
+            } else if (value instanceof Integer) {
+                ret.putInt(key, (Integer) value);
+            } else if (value instanceof String) {
+                ret.putString(key, (String) value);
+            } else if (value instanceof Bundle) {
+                ret.putBundle(key, (Bundle) value);
+            } else {
+                fail("Type not supported yet: " + value.getClass().getName());
+            }
+        }
+        return ret;
+    }
+
+    public static PersistableBundle makePersistableBundle(Object... keysAndValues) {
+        assertTrue((keysAndValues.length % 2) == 0);
+
+        if (keysAndValues.length == 0) {
+            return null;
+        }
+        final PersistableBundle ret = new PersistableBundle();
+
+        for (int i = keysAndValues.length - 2; i >= 0; i -= 2) {
+            final String key = keysAndValues[i].toString();
+            final Object value = keysAndValues[i + 1];
+
+            if (value == null) {
+                ret.putString(key, null);
+            } else if (value instanceof Integer) {
+                ret.putInt(key, (Integer) value);
+            } else if (value instanceof String) {
+                ret.putString(key, (String) value);
+            } else if (value instanceof PersistableBundle) {
+                ret.putPersistableBundle(key, (PersistableBundle) value);
+            } else {
+                fail("Type not supported yet: " + value.getClass().getName());
+            }
+        }
+        return ret;
+    }
+
+    public static <T> List<T> list(T... array) {
+        return Arrays.asList(array);
+    }
+
+    public static <T> Set<T> hashSet(Set<T> in) {
+        return new LinkedHashSet<>(in);
+    }
+
+    public static <T> Set<T> set(T... values) {
+        return set(v -> v, values);
+    }
+
+    public static <T, V> Set<T> set(Function<V, T> converter, V... values) {
+        return set(converter, Arrays.asList(values));
+    }
+
+    public static <T, V> Set<T> set(Function<V, T> converter, List<V> values) {
+        final LinkedHashSet<T> ret = new LinkedHashSet<>();
+        for (V v : values) {
+            ret.add(converter.apply(v));
+        }
+        return ret;
+    }
+
+    public static void resetAll(Collection<?> mocks) {
+        for (Object o : mocks) {
+            reset(o);
+        }
+    }
+
+    public static <T extends Collection<?>> T assertEmpty(T collection) {
+        if (collection == null) {
+            return collection; // okay.
+        }
+        assertEquals(0, collection.size());
+        return collection;
+    }
+
+    public static List<ShortcutInfo> filter(List<ShortcutInfo> list, Predicate<ShortcutInfo> p) {
+        final ArrayList<ShortcutInfo> ret = new ArrayList<>(list);
+        ret.removeIf(si -> !p.test(si));
+        return ret;
+    }
+
+    public static List<ShortcutInfo> filterByActivity(List<ShortcutInfo> list,
+            ComponentName activity) {
+        return filter(list, si ->
+                (si.getActivity().equals(activity)
+                        && (si.isDeclaredInManifest() || si.isDynamic())));
+    }
+
+    public static List<ShortcutInfo> changedSince(List<ShortcutInfo> list, long time) {
+        return filter(list, si -> si.getLastChangedTimestamp() >= time);
+    }
+
+    public static void assertExpectException(Class<? extends Throwable> expectedExceptionType,
+            String expectedExceptionMessageRegex, Runnable r) {
+        assertExpectException("", expectedExceptionType, expectedExceptionMessageRegex, r);
+    }
+
+    public static void assertCannotUpdateImmutable(Runnable r) {
+        assertExpectException(
+                IllegalArgumentException.class, "may not be manipulated via APIs", r);
+    }
+
+    public static void assertDynamicShortcutCountExceeded(Runnable r) {
+        assertExpectException(IllegalArgumentException.class,
+                "Max number of dynamic shortcuts exceeded", r);
+    }
+
+    public static void assertExpectException(String message,
+            Class<? extends Throwable> expectedExceptionType,
+            String expectedExceptionMessageRegex, Runnable r) {
+        try {
+            r.run();
+        } catch (Throwable e) {
+            Assert.assertTrue(
+                    "Expected exception type was " + expectedExceptionType.getName()
+                            + " but caught " + e + " (message=" + message + ")",
+                    expectedExceptionType.isAssignableFrom(e.getClass()));
+            if (expectedExceptionMessageRegex != null) {
+                MoreAsserts.assertContainsRegex(expectedExceptionMessageRegex, e.getMessage());
+            }
+            return; // Pass
+        }
+        Assert.fail("Expected exception type " + expectedExceptionType.getName()
+                + " was not thrown");
+    }
+
+    public static List<ShortcutInfo> assertShortcutIds(List<ShortcutInfo> actualShortcuts,
+            String... expectedIds) {
+        final SortedSet<String> expected = new TreeSet<>(list(expectedIds));
+        final SortedSet<String> actual = new TreeSet<>();
+        for (ShortcutInfo s : actualShortcuts) {
+            actual.add(s.getId());
+        }
+
+        // Compare the sets.
+        assertEquals(expected, actual);
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertShortcutIdsOrdered(List<ShortcutInfo> actualShortcuts,
+            String... expectedIds) {
+        final ArrayList<String> expected = new ArrayList<>(list(expectedIds));
+        final ArrayList<String> actual = new ArrayList<>();
+        for (ShortcutInfo s : actualShortcuts) {
+            actual.add(s.getId());
+        }
+        assertEquals(expected, actual);
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllHaveIntents(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertNotNull("ID " + s.getId(), s.getIntent());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllNotHaveIntents(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertNull("ID " + s.getId(), s.getIntent());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllHaveTitle(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertNotNull("ID " + s.getId(), s.getShortLabel());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllNotHaveTitle(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertNull("ID " + s.getId(), s.getShortLabel());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllKeyFieldsOnly(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.hasKeyFieldsOnly());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllNotKeyFieldsOnly(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertFalse("ID " + s.getId(), s.hasKeyFieldsOnly());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllDynamic(List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.isDynamic());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllPinned(List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.isPinned());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllDynamicOrPinned(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.isDynamic() || s.isPinned());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllManifest(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.isDeclaredInManifest());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllNotManifest(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertFalse("ID " + s.getId(), s.isDeclaredInManifest());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllDisabled(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), !s.isEnabled());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllEnabled(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.isEnabled());
+        }
+        return actualShortcuts;
+    }
+
+    public static List<ShortcutInfo> assertAllImmutable(
+            List<ShortcutInfo> actualShortcuts) {
+        for (ShortcutInfo s : actualShortcuts) {
+            assertTrue("ID " + s.getId(), s.isImmutable());
+        }
+        return actualShortcuts;
+    }
+
+    public static void assertDynamicOnly(ShortcutInfo si) {
+        assertTrue(si.isDynamic());
+        assertFalse(si.isPinned());
+    }
+
+    public static void assertPinnedOnly(ShortcutInfo si) {
+        assertFalse(si.isDynamic());
+        assertFalse(si.isDeclaredInManifest());
+        assertTrue(si.isPinned());
+    }
+
+    public static void assertDynamicAndPinned(ShortcutInfo si) {
+        assertTrue(si.isDynamic());
+        assertTrue(si.isPinned());
+    }
+
+    public static void assertBitmapSize(int expectedWidth, int expectedHeight, Bitmap bitmap) {
+        assertEquals("width", expectedWidth, bitmap.getWidth());
+        assertEquals("height", expectedHeight, bitmap.getHeight());
+    }
+
+    public static <T> void assertAllUnique(Collection<T> list) {
+        final Set<Object> set = new LinkedHashSet<>();
+        for (T item : list) {
+            if (set.contains(item)) {
+                fail("Duplicate item found: " + item + " (in the list: " + list + ")");
+            }
+            set.add(item);
+        }
+    }
+
+    public static ShortcutInfo findShortcut(List<ShortcutInfo> list, String id) {
+        for (ShortcutInfo si : list) {
+            if (si.getId().equals(id)) {
+                return si;
+            }
+        }
+        fail("Shortcut " + id + " not found in the list");
+        return null;
+    }
+
+    public static Bitmap pfdToBitmap(ParcelFileDescriptor pfd) {
+        assertNotNull(pfd);
+        try {
+            try {
+                return BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor());
+            } finally {
+                pfd.close();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static void assertBundleEmpty(BaseBundle b) {
+        assertTrue(b == null || b.size() == 0);
+    }
+
+    public static void assertCallbackNotReceived(LauncherApps.Callback mock) {
+        verify(mock, times(0)).onShortcutsChanged(anyString(), anyList(),
+                any(UserHandle.class));
+    }
+
+    public static void assertCallbackReceived(LauncherApps.Callback mock,
+            UserHandle user, String packageName, String... ids) {
+        verify(mock).onShortcutsChanged(eq(packageName), checkShortcutIds(ids),
+                eq(user));
+    }
+
+    public static boolean checkAssertSuccess(Runnable r) {
+        try {
+            r.run();
+            return true;
+        } catch (AssertionError e) {
+            return false;
+        }
+    }
+
+    public static <T> T checkArgument(Predicate<T> checker, String description,
+            List<T> matchedCaptor) {
+        final Matcher<T> m = new BaseMatcher<T>() {
+            @Override
+            public boolean matches(Object item) {
+                if (item == null) {
+                    return false;
+                }
+                final T value = (T) item;
+                if (!checker.test(value)) {
+                    return false;
+                }
+
+                if (matchedCaptor != null) {
+                    matchedCaptor.add(value);
+                }
+                return true;
+            }
+
+            @Override
+            public void describeTo(Description d) {
+                d.appendText(description);
+            }
+        };
+        return Mockito.argThat(m);
+    }
+
+    public static List<ShortcutInfo> checkShortcutIds(String... ids) {
+        return checkArgument((List<ShortcutInfo> list) -> {
+            final Set<String> actualSet = set(si -> si.getId(), list);
+            return actualSet.equals(set(ids));
+
+        }, "Shortcut IDs=[" + Arrays.toString(ids) + "]", null);
+    }
+
+    public static ShortcutInfo parceled(ShortcutInfo si) {
+        Parcel p = Parcel.obtain();
+        p.writeParcelable(si, 0);
+        p.setDataPosition(0);
+        ShortcutInfo si2 = p.readParcelable(ShortcutManagerTestUtils.class.getClassLoader());
+        p.recycle();
+        return si2;
+    }
+
+    public static List<ShortcutInfo> cloneShortcutList(List<ShortcutInfo> list) {
+        if (list == null) {
+            return null;
+        }
+        final List<ShortcutInfo> ret = new ArrayList<>(list.size());
+        for (ShortcutInfo si : list) {
+            ret.add(parceled(si));
+        }
+
+        return ret;
+    }
+
+    private static final Comparator<ShortcutInfo> sRankComparator =
+            (ShortcutInfo a, ShortcutInfo b) -> Integer.compare(a.getRank(), b.getRank());
+
+    public static List<ShortcutInfo> sortedByRank(List<ShortcutInfo> shortcuts) {
+        final ArrayList<ShortcutInfo> ret = new ArrayList<>(shortcuts);
+        Collections.sort(ret, sRankComparator);
+        return ret;
+    }
+
+    public static void waitUntil(String message, BooleanSupplier condition) {
+        waitUntil(message, condition, STANDARD_TIMEOUT_SEC);
+    }
+
+    public static void waitUntil(String message, BooleanSupplier condition, int timeoutSeconds) {
+        final long timeout = System.currentTimeMillis() + (timeoutSeconds * 1000L);
+        while (System.currentTimeMillis() < timeout) {
+            if (condition.getAsBoolean()) {
+                return;
+            }
+            try {
+                Thread.sleep(100);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        fail("Timed out for: " + message);
+    }
+
+    public static ShortcutListAsserter assertWith(List<ShortcutInfo> list) {
+        return new ShortcutListAsserter(list);
+    }
+
+    /**
+     * New style assertion that allows chained calls.
+     */
+    public static class ShortcutListAsserter {
+        private final ShortcutListAsserter mOriginal;
+        private final List<ShortcutInfo> mList;
+
+        ShortcutListAsserter(List<ShortcutInfo> list) {
+            this(null, list);
+        }
+
+        private ShortcutListAsserter(ShortcutListAsserter original, List<ShortcutInfo> list) {
+            mOriginal = (original == null) ? this : original;
+            mList = (list == null) ? new ArrayList<>(0) : new ArrayList<>(list);
+        }
+
+        public ShortcutListAsserter revertToOriginalList() {
+            return mOriginal;
+        }
+
+        public ShortcutListAsserter selectDynamic() {
+            return new ShortcutListAsserter(this,
+                    filter(mList, ShortcutInfo::isDynamic));
+        }
+
+        public ShortcutListAsserter selectManifest() {
+            return new ShortcutListAsserter(this,
+                    filter(mList, ShortcutInfo::isDeclaredInManifest));
+        }
+
+        public ShortcutListAsserter selectPinned() {
+            return new ShortcutListAsserter(this,
+                    filter(mList, ShortcutInfo::isPinned));
+        }
+
+        public ShortcutListAsserter selectByActivity(ComponentName activity) {
+            return new ShortcutListAsserter(this,
+                    ShortcutManagerTestUtils.filterByActivity(mList, activity));
+        }
+
+        public ShortcutListAsserter selectByChangedSince(long time) {
+            return new ShortcutListAsserter(this,
+                    ShortcutManagerTestUtils.changedSince(mList, time));
+        }
+
+        public ShortcutListAsserter selectByIds(String... ids) {
+            final Set<String> idSet = set(ids);
+            final ArrayList<ShortcutInfo> selected = new ArrayList<>();
+            for (ShortcutInfo si : mList) {
+                if (idSet.contains(si.getId())) {
+                    selected.add(si);
+                    idSet.remove(si.getId());
+                }
+            }
+            if (idSet.size() > 0) {
+                fail("Shortcuts not found for IDs=" + idSet);
+            }
+
+            return new ShortcutListAsserter(this, selected);
+        }
+
+        public ShortcutListAsserter toSortByRank() {
+            return new ShortcutListAsserter(this,
+                    ShortcutManagerTestUtils.sortedByRank(mList));
+        }
+
+        public ShortcutListAsserter call(Consumer<List<ShortcutInfo>> c) {
+            c.accept(mList);
+            return this;
+        }
+
+        public ShortcutListAsserter haveIds(String... expectedIds) {
+            assertShortcutIds(mList, expectedIds);
+            return this;
+        }
+
+        public ShortcutListAsserter haveIdsOrdered(String... expectedIds) {
+            assertShortcutIdsOrdered(mList, expectedIds);
+            return this;
+        }
+
+        private ShortcutListAsserter haveSequentialRanks() {
+            for (int i = 0; i < mList.size(); i++) {
+                final ShortcutInfo si = mList.get(i);
+                assertEquals("Rank not sequential: id=" + si.getId(), i, si.getRank());
+            }
+            return this;
+        }
+
+        public ShortcutListAsserter haveRanksInOrder(String... expectedIds) {
+            toSortByRank()
+                    .haveSequentialRanks()
+                    .haveIdsOrdered(expectedIds);
+            return this;
+        }
+
+        public ShortcutListAsserter isEmpty() {
+            assertEquals(0, mList.size());
+            return this;
+        }
+
+        public ShortcutListAsserter areAllDynamic() {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.isDynamic()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllNotDynamic() {
+            forAllShortcuts(s -> assertFalse("id=" + s.getId(), s.isDynamic()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllPinned() {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.isPinned()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllNotPinned() {
+            forAllShortcuts(s -> assertFalse("id=" + s.getId(), s.isPinned()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllManifest() {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.isDeclaredInManifest()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllNotManifest() {
+            forAllShortcuts(s -> assertFalse("id=" + s.getId(), s.isDeclaredInManifest()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllImmutable() {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.isImmutable()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllMutable() {
+            forAllShortcuts(s -> assertFalse("id=" + s.getId(), s.isImmutable()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllEnabled() {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.isEnabled()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllDisabled() {
+            forAllShortcuts(s -> assertFalse("id=" + s.getId(), s.isEnabled()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllWithKeyFieldsOnly() {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.hasKeyFieldsOnly()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllNotWithKeyFieldsOnly() {
+            forAllShortcuts(s -> assertFalse("id=" + s.getId(), s.hasKeyFieldsOnly()));
+            return this;
+        }
+
+        public ShortcutListAsserter areAllWithActivity(ComponentName activity) {
+            forAllShortcuts(s -> assertTrue("id=" + s.getId(), s.getActivity().equals(activity)));
+            return this;
+        }
+
+        public ShortcutListAsserter forAllShortcuts(Consumer<ShortcutInfo> sa) {
+            boolean found = false;
+            for (int i = 0; i < mList.size(); i++) {
+                final ShortcutInfo si = mList.get(i);
+                found = true;
+                sa.accept(si);
+            }
+            assertTrue("No shortcuts found.", found);
+            return this;
+        }
+
+        public ShortcutListAsserter forShortcut(Predicate<ShortcutInfo> p,
+                Consumer<ShortcutInfo> sa) {
+            boolean found = false;
+            for (int i = 0; i < mList.size(); i++) {
+                final ShortcutInfo si = mList.get(i);
+                if (p.test(si)) {
+                    found = true;
+                    try {
+                        sa.accept(si);
+                    } catch (Throwable e) {
+                        throw new AssertionError("Assertion failed for shortcut " + si.getId(), e);
+                    }
+                }
+            }
+            assertTrue("Shortcut with the given condition not found.", found);
+            return this;
+        }
+
+        public ShortcutListAsserter forShortcutWithId(String id, Consumer<ShortcutInfo> sa) {
+            forShortcut(si -> si.getId().equals(id), sa);
+
+            return this;
+        }
+    }
+
+    public static void assertBundlesEqual(BaseBundle b1, BaseBundle b2) {
+        if (b1 == null && b2 == null) {
+            return; // pass
+        }
+        assertNotNull(b1);
+        assertNotNull(b2);
+
+        // HashSet makes the error message readable.
+        assertEquals(set(b1.keySet()), set(b2.keySet()));
+
+        for (String key : b1.keySet()) {
+            final Object v1 = b1.get(key);
+            final Object v2 = b2.get(key);
+            if (v1 == null) {
+                if (v2 == null) {
+                    return;
+                }
+            }
+            if (v1.equals(v2)) {
+                return;
+            }
+
+            assertTrue("Only either value is null: key=" + key
+                    + " b1=" + b1 + " b2=" + b2, v1 != null && v2 != null);
+            assertEquals("Class mismatch: key=" + key, v1.getClass(), v2.getClass());
+
+            if (v1 instanceof BaseBundle) {
+                assertBundlesEqual((BaseBundle) v1, (BaseBundle) v2);
+
+            } else if (v1 instanceof boolean[]) {
+                assertTrue(Arrays.equals((boolean[]) v1, (boolean[]) v2));
+
+            } else if (v1 instanceof int[]) {
+                MoreAsserts.assertEquals((int[]) v1, (int[]) v2);
+
+            } else if (v1 instanceof double[]) {
+                MoreAsserts.assertEquals((double[]) v1, (double[]) v2);
+
+            } else if (v1 instanceof String[]) {
+                MoreAsserts.assertEquals((String[]) v1, (String[]) v2);
+
+            } else if (v1 instanceof Double) {
+                if (((Double) v1).isNaN()) {
+                    assertTrue(((Double) v2).isNaN());
+                } else {
+                    assertEquals(v1, v2);
+                }
+
+            } else {
+                assertEquals(v1, v2);
+            }
+        }
+    }
+
+    public static void waitOnMainThread() throws InterruptedException {
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        new Handler(Looper.getMainLooper()).post(() -> latch.countDown());
+
+        latch.await();
+    }
+
+    public static class LauncherCallbackAsserter {
+        private final LauncherApps.Callback mCallback = mock(LauncherApps.Callback.class);
+
+        private Callback getMockCallback() {
+            return mCallback;
+        }
+
+        public LauncherCallbackAsserter assertNoCallbackCalled() {
+            verify(mCallback, times(0)).onShortcutsChanged(
+                    anyString(),
+                    any(List.class),
+                    any(UserHandle.class));
+            return this;
+        }
+
+        public LauncherCallbackAsserter assertNoCallbackCalledForPackage(
+                String publisherPackageName) {
+            verify(mCallback, times(0)).onShortcutsChanged(
+                    eq(publisherPackageName),
+                    any(List.class),
+                    any(UserHandle.class));
+            return this;
+        }
+
+        public LauncherCallbackAsserter assertNoCallbackCalledForPackageAndUser(
+                String publisherPackageName, UserHandle publisherUserHandle) {
+            verify(mCallback, times(0)).onShortcutsChanged(
+                    eq(publisherPackageName),
+                    any(List.class),
+                    eq(publisherUserHandle));
+            return this;
+        }
+
+        public ShortcutListAsserter assertCallbackCalledForPackageAndUser(
+                String publisherPackageName, UserHandle publisherUserHandle) {
+            final ArgumentCaptor<List> shortcuts = ArgumentCaptor.forClass(List.class);
+            verify(mCallback, times(1)).onShortcutsChanged(
+                    eq(publisherPackageName),
+                    shortcuts.capture(),
+                    eq(publisherUserHandle));
+            return new ShortcutListAsserter(shortcuts.getValue());
+        }
+    }
+
+    public static LauncherCallbackAsserter assertForLauncherCallback(
+            LauncherApps launcherApps, Runnable body) throws InterruptedException {
+        final LauncherCallbackAsserter asserter = new LauncherCallbackAsserter();
+        launcherApps.registerCallback(asserter.getMockCallback(),
+                new Handler(Looper.getMainLooper()));
+
+        body.run();
+
+        waitOnMainThread();
+
+        return asserter;
+    }
+}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index ecfeff9..eb3c665 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -1412,6 +1412,24 @@
         }
 
         @Override
+        public void reportShortcutUsage(String packageName, String shortcutId, int userId) {
+            if (packageName == null || shortcutId == null) {
+                Slog.w(TAG, "Event reported without a package name or a shortcut ID");
+                return;
+            }
+
+            UsageEvents.Event event = new UsageEvents.Event();
+            event.mPackage = packageName.intern();
+            event.mShortcutId = shortcutId.intern();
+
+            // This will later be converted to system time.
+            event.mTimeStamp = SystemClock.elapsedRealtime();
+
+            event.mEventType = Event.SHORTCUT_INVOCATION;
+            mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
+        }
+
+        @Override
         public void reportContentProviderUsage(String name, String packageName, int userId) {
             SomeArgs args = SomeArgs.obtain();
             args.arg1 = name;
diff --git a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
index c95ff23..03cee9c 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
@@ -51,6 +51,7 @@
     private static final String ACTIVE_ATTR = "active";
     private static final String LAST_EVENT_ATTR = "lastEvent";
     private static final String TYPE_ATTR = "type";
+    private static final String SHORTCUT_ID_ATTR = "shortcutId";
 
     // Time attributes stored as an offset of the beginTime.
     private static final String LAST_TIME_ACTIVE_ATTR = "lastTimeActive";
@@ -106,9 +107,15 @@
         event.mTimeStamp = statsOut.beginTime + XmlUtils.readLongAttribute(parser, TIME_ATTR);
 
         event.mEventType = XmlUtils.readIntAttribute(parser, TYPE_ATTR);
-        if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE) {
-            event.mConfiguration = new Configuration();
-            Configuration.readXmlAttrs(parser, event.mConfiguration);
+        switch (event.mEventType) {
+            case UsageEvents.Event.CONFIGURATION_CHANGE:
+                event.mConfiguration = new Configuration();
+                Configuration.readXmlAttrs(parser, event.mConfiguration);
+                break;
+            case UsageEvents.Event.SHORTCUT_INVOCATION:
+                final String id = XmlUtils.readStringAttribute(parser, SHORTCUT_ID_ATTR);
+                event.mShortcutId = (id != null) ? id.intern() : null;
+                break;
         }
 
         if (statsOut.events == null) {
@@ -165,9 +172,17 @@
         }
         XmlUtils.writeIntAttribute(xml, TYPE_ATTR, event.mEventType);
 
-        if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE
-                && event.mConfiguration != null) {
-            Configuration.writeXmlAttrs(xml, event.mConfiguration);
+        switch (event.mEventType) {
+            case UsageEvents.Event.CONFIGURATION_CHANGE:
+                if (event.mConfiguration != null) {
+                    Configuration.writeXmlAttrs(xml, event.mConfiguration);
+                }
+                break;
+            case UsageEvents.Event.SHORTCUT_INVOCATION:
+                if (event.mShortcutId != null) {
+                    XmlUtils.writeStringAttribute(xml, SHORTCUT_ID_ATTR, event.mShortcutId);
+                }
+                break;
         }
 
         xml.endTag(null, EVENT_TAG);
diff --git a/services/usage/java/com/android/server/usage/UserUsageStatsService.java b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
index 7d003f3..59e4c80 100644
--- a/services/usage/java/com/android/server/usage/UserUsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
@@ -549,6 +549,9 @@
             if (event.mConfiguration != null) {
                 pw.printPair("config", Configuration.resourceQualifierString(event.mConfiguration));
             }
+            if (event.mShortcutId != null) {
+                pw.printPair("shortcutId", event.mShortcutId);
+            }
             pw.println();
         }
         pw.decreaseIndent();
@@ -588,6 +591,8 @@
                 return "SYSTEM_INTERACTION";
             case UsageEvents.Event.USER_INTERACTION:
                 return "USER_INTERACTION";
+            case UsageEvents.Event.SHORTCUT_INVOCATION:
+                return "SHORTCUT_INVOCATION";
             default:
                 return "UNKNOWN";
         }
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java
index 0f68cca..0dcd1521 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java
@@ -40,11 +40,12 @@
     static final boolean DBG = false;
 
     private static final String NAME = "sound_model.db";
-    private static final int VERSION = 4;
+    private static final int VERSION = 5;
 
     public static interface SoundModelContract {
         public static final String TABLE = "sound_model";
         public static final String KEY_MODEL_UUID = "model_uuid";
+        public static final String KEY_VENDOR_UUID = "vendor_uuid";
         public static final String KEY_KEYPHRASE_ID = "keyphrase_id";
         public static final String KEY_TYPE = "type";
         public static final String KEY_DATA = "data";
@@ -58,6 +59,7 @@
     private static final String CREATE_TABLE_SOUND_MODEL = "CREATE TABLE "
             + SoundModelContract.TABLE + "("
             + SoundModelContract.KEY_MODEL_UUID + " TEXT PRIMARY KEY,"
+            + SoundModelContract.KEY_VENDOR_UUID + " TEXT, "
             + SoundModelContract.KEY_KEYPHRASE_ID + " INTEGER,"
             + SoundModelContract.KEY_TYPE + " INTEGER,"
             + SoundModelContract.KEY_DATA + " BLOB,"
@@ -78,9 +80,19 @@
 
     @Override
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-        // TODO: For now, drop older tables and recreate new ones.
-        db.execSQL("DROP TABLE IF EXISTS " + SoundModelContract.TABLE);
-        onCreate(db);
+        if (oldVersion < 4) {
+            // For old versions just drop the tables and recreate new ones.
+            db.execSQL("DROP TABLE IF EXISTS " + SoundModelContract.TABLE);
+            onCreate(db);
+        } else {
+            // In the jump to version 5, we added support for the vendor UUID.
+            if (oldVersion == 4) {
+                Slog.d(TAG, "Adding vendor UUID column");
+                db.execSQL("ALTER TABLE " + SoundModelContract.TABLE + " ADD COLUMN "
+                        + SoundModelContract.KEY_VENDOR_UUID + " TEXT");
+                oldVersion++;
+            }
+        }
     }
 
     /**
@@ -93,6 +105,9 @@
             SQLiteDatabase db = getWritableDatabase();
             ContentValues values = new ContentValues();
             values.put(SoundModelContract.KEY_MODEL_UUID, soundModel.uuid.toString());
+            if (soundModel.vendorUuid != null) {
+                values.put(SoundModelContract.KEY_VENDOR_UUID, soundModel.vendorUuid.toString());
+            }
             values.put(SoundModelContract.KEY_TYPE, SoundTrigger.SoundModel.TYPE_KEYPHRASE);
             values.put(SoundModelContract.KEY_DATA, soundModel.data);
 
@@ -176,6 +191,11 @@
                             continue;
                         }
 
+                        String vendorUuidString = null;
+                        int vendorUuidColumn = c.getColumnIndex(SoundModelContract.KEY_VENDOR_UUID);
+                        if (vendorUuidColumn != -1) {
+                            vendorUuidString = c.getString(vendorUuidColumn);
+                        }
                         byte[] data = c.getBlob(c.getColumnIndex(SoundModelContract.KEY_DATA));
                         int recognitionModes = c.getInt(
                                 c.getColumnIndex(SoundModelContract.KEY_RECOGNITION_MODES));
@@ -212,9 +232,12 @@
                         Keyphrase[] keyphrases = new Keyphrase[1];
                         keyphrases[0] = new Keyphrase(
                                 keyphraseId, recognitionModes, modelLocale, text, users);
+                        UUID vendorUuid = null;
+                        if (vendorUuidString != null) {
+                            vendorUuid = UUID.fromString(vendorUuidString);
+                        }
                         KeyphraseSoundModel model = new KeyphraseSoundModel(
-                                UUID.fromString(modelUuid),
-                                null /* FIXME use vendor UUID */, data, keyphrases);
+                                UUID.fromString(modelUuid), vendorUuid, data, keyphrases);
                         if (DBG) {
                             Slog.d(TAG, "Found SoundModel for the given keyphrase/locale/user: "
                                     + model);
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index 23c58fe..43d2a1f 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -41,6 +41,7 @@
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Parcel;
+import android.os.RemoteCallbackList;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.provider.Settings;
@@ -55,15 +56,16 @@
 import android.util.Log;
 import android.util.Slog;
 
+import com.android.internal.app.IVoiceInteractionSessionListener;
 import com.android.internal.app.IVoiceInteractionManagerService;
 import com.android.internal.app.IVoiceInteractionSessionShowCallback;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.os.BackgroundThread;
 import com.android.server.LocalServices;
-import com.android.server.soundtrigger.SoundTriggerInternal;
 import com.android.server.SystemService;
 import com.android.server.UiThread;
+import com.android.server.soundtrigger.SoundTriggerInternal;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -84,6 +86,9 @@
     final TreeSet<Integer> mLoadedKeyphraseIds;
     SoundTriggerInternal mSoundTriggerInternal;
 
+    private final RemoteCallbackList<IVoiceInteractionSessionListener>
+            mVoiceInteractionSessionListeners = new RemoteCallbackList<>();
+
     public VoiceInteractionManagerService(Context context) {
         super(context);
         mContext = context;
@@ -1038,6 +1043,48 @@
         }
 
         @Override
+        public void registerVoiceInteractionSessionListener(
+                IVoiceInteractionSessionListener listener) {
+            enforceCallingPermission(Manifest.permission.ACCESS_VOICE_INTERACTION_SERVICE);
+            synchronized (this) {
+                mVoiceInteractionSessionListeners.register(listener);
+            }
+        }
+
+        public void onSessionShown() {
+            synchronized (this) {
+                final int size = mVoiceInteractionSessionListeners.beginBroadcast();
+                for (int i = 0; i < size; ++i) {
+                    final IVoiceInteractionSessionListener listener =
+                            mVoiceInteractionSessionListeners.getBroadcastItem(i);
+                    try {
+                        listener.onVoiceSessionShown();
+                    } catch (RemoteException e) {
+                        Slog.e(TAG, "Error delivering voice interaction open event.", e);
+                    }
+                }
+                mVoiceInteractionSessionListeners.finishBroadcast();
+            }
+        }
+
+        public void onSessionHidden() {
+            synchronized (this) {
+                final int size = mVoiceInteractionSessionListeners.beginBroadcast();
+                for (int i = 0; i < size; ++i) {
+                    final IVoiceInteractionSessionListener listener =
+                            mVoiceInteractionSessionListeners.getBroadcastItem(i);
+                    try {
+                        listener.onVoiceSessionHidden();
+
+                    } catch (RemoteException e) {
+                        Slog.e(TAG, "Error delivering voice interaction closed event.", e);
+                    }
+                }
+                mVoiceInteractionSessionListeners.finishBroadcast();
+            }
+        }
+
+        @Override
         public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             if (mContext.checkCallingOrSelfPermission(Manifest.permission.DUMP)
                     != PackageManager.PERMISSION_GRANTED) {
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index 3f9da4c15..a46ccee 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -41,6 +41,7 @@
 import android.util.Slog;
 import android.view.IWindowManager;
 
+import com.android.internal.app.IVoiceInteractionSessionListener;
 import com.android.internal.app.IVoiceInteractionSessionShowCallback;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.server.LocalServices;
@@ -58,7 +59,7 @@
 
     final Context mContext;
     final Handler mHandler;
-    final Object mLock;
+    final VoiceInteractionManagerService.VoiceInteractionManagerServiceStub mServiceStub;
     final int mUser;
     final ComponentName mComponent;
     final IActivityManager mAm;
@@ -77,7 +78,7 @@
             if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction())) {
                 String reason = intent.getStringExtra("reason");
                 if (!CLOSE_REASON_VOICE_INTERACTION.equals(reason) && !"dream".equals(reason)) {
-                    synchronized (mLock) {
+                    synchronized (mServiceStub) {
                         if (mActiveSession != null && mActiveSession.mSession != null) {
                             try {
                                 mActiveSession.mSession.closeSystemDialogs();
@@ -93,7 +94,7 @@
     final ServiceConnection mConnection = new ServiceConnection() {
         @Override
         public void onServiceConnected(ComponentName name, IBinder service) {
-            synchronized (mLock) {
+            synchronized (mServiceStub) {
                 mService = IVoiceInteractionService.Stub.asInterface(service);
                 try {
                     mService.ready();
@@ -108,11 +109,12 @@
         }
     };
 
-    VoiceInteractionManagerServiceImpl(Context context, Handler handler, Object lock,
+    VoiceInteractionManagerServiceImpl(Context context, Handler handler,
+            VoiceInteractionManagerService.VoiceInteractionManagerServiceStub stub,
             int userHandle, ComponentName service) {
         mContext = context;
         mHandler = handler;
-        mLock = lock;
+        mServiceStub = stub;
         mUser = userHandle;
         mComponent = service;
         mAm = ActivityManagerNative.getDefault();
@@ -148,8 +150,9 @@
     public boolean showSessionLocked(Bundle args, int flags,
             IVoiceInteractionSessionShowCallback showCallback, IBinder activityToken) {
         if (mActiveSession == null) {
-            mActiveSession = new VoiceInteractionSessionConnection(mLock, mSessionComponentName,
-                    mUser, mContext, this, mInfo.getServiceInfo().applicationInfo.uid, mHandler);
+            mActiveSession = new VoiceInteractionSessionConnection(mServiceStub,
+                    mSessionComponentName, mUser, mContext, this,
+                    mInfo.getServiceInfo().applicationInfo.uid, mHandler);
         }
         List<IBinder> activityTokens = null;
         if (activityToken == null) {
@@ -355,8 +358,18 @@
 
     @Override
     public void sessionConnectionGone(VoiceInteractionSessionConnection connection) {
-        synchronized (mLock) {
+        synchronized (mServiceStub) {
             finishLocked(connection.mToken, false);
         }
     }
+
+    @Override
+    public void onSessionShown(VoiceInteractionSessionConnection connection) {
+        mServiceStub.onSessionShown();
+    }
+
+    @Override
+    public void onSessionHidden(VoiceInteractionSessionConnection connection) {
+        mServiceStub.onSessionHidden();
+    }
 }
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java
index 0694911..b0cc2ac 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java
@@ -130,6 +130,8 @@
 
     public interface Callback {
         public void sessionConnectionGone(VoiceInteractionSessionConnection connection);
+        public void onSessionShown(VoiceInteractionSessionConnection connection);
+        public void onSessionHidden(VoiceInteractionSessionConnection connection);
     }
 
     final ServiceConnection mFullConnection = new ServiceConnection() {
@@ -313,6 +315,7 @@
             } else if (showCallback != null) {
                 mPendingShowCallbacks.add(showCallback);
             }
+            mCallback.onSessionShown(this);
             return true;
         }
         if (showCallback != null) {
@@ -468,6 +471,7 @@
                     } catch (RemoteException e) {
                     }
                 }
+                mCallback.onSessionHidden(this);
             }
             if (mFullyBound) {
                 mContext.unbindService(mFullConnection);
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 7d7e1eb..62625bd 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -23,6 +23,7 @@
 
 import java.lang.String;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -104,7 +105,6 @@
      * An {@link InCallService} will only see this state if it has the
      * {@link TelecomManager#METADATA_INCLUDE_EXTERNAL_CALLS} metadata set to {@code true} in its
      * manifest.
-     * @hide
      */
     public static final int STATE_PULLING_CALL = 11;
 
@@ -252,7 +252,6 @@
          * <p>
          * See {@link Connection#CAPABILITY_CAN_PULL_CALL} and
          * {@link Connection#PROPERTY_IS_EXTERNAL_CALL}.
-         * @hide
          */
         public static final int CAPABILITY_CAN_PULL_CALL = 0x00800000;
 
@@ -305,10 +304,14 @@
          * in its manifest.
          * <p>
          * See {@link Connection#PROPERTY_IS_EXTERNAL_CALL}.
-         * @hide
          */
         public static final int PROPERTY_IS_EXTERNAL_CALL = 0x00000040;
 
+        /**
+         * Indicates that the call has CDMA Enhanced Voice Privacy enabled.
+         */
+        public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 0x00000080;
+
         //******************************************************************************************
         // Next PROPERTY value: 0x00000100
         //******************************************************************************************
@@ -465,6 +468,9 @@
             if (hasProperty(properties, PROPERTY_IS_EXTERNAL_CALL)) {
                 builder.append(" PROPERTY_IS_EXTERNAL_CALL");
             }
+            if(hasProperty(properties, PROPERTY_HAS_CDMA_VOICE_PRIVACY)) {
+                builder.append(" PROPERTY_HAS_CDMA_VOICE_PRIVACY");
+            }
             builder.append("]");
             return builder.toString();
         }
@@ -695,6 +701,24 @@
         }
     }
 
+    /**
+     * Defines callbacks which inform the {@link InCallService} of changes to a {@link Call}.
+     * These callbacks can originate from the Telecom framework, or a {@link ConnectionService}
+     * implementation.
+     * <p>
+     * You can handle these callbacks by extending the {@link Callback} class and overriding the
+     * callbacks that your {@link InCallService} is interested in.  The callback methods include the
+     * {@link Call} for which the callback applies, allowing reuse of a single instance of your
+     * {@link Callback} implementation, if desired.
+     * <p>
+     * Use {@link Call#registerCallback(Callback)} to register your callback(s).  Ensure
+     * {@link Call#unregisterCallback(Callback)} is called when you no longer require callbacks
+     * (typically in {@link InCallService#onCallRemoved(Call)}).
+     * Note: Callbacks which occur before you call {@link Call#registerCallback(Callback)} will not
+     * reach your implementation of {@link Callback}, so it is important to register your callback
+     * as soon as your {@link InCallService} is notified of a new call via
+     * {@link InCallService#onCallAdded(Call)}.
+     */
     public static abstract class Callback {
         /**
          * Invoked when the state of this {@code Call} has changed. See {@link #getState()}.
@@ -779,14 +803,19 @@
         public void onConferenceableCallsChanged(Call call, List<Call> conferenceableCalls) {}
 
         /**
-         * Invoked when a call receives an event from its associated {@link Connection}.
+         * Invoked when a {@link Call} receives an event from its associated {@link Connection}.
+         * <p>
+         * Where possible, the Call should make an attempt to handle {@link Connection} events which
+         * are part of the {@code android.telecom.*} namespace.  The Call should ignore any events
+         * it does not wish to handle.  Unexpected events should be handled gracefully, as it is
+         * possible that a {@link ConnectionService} has defined its own Connection events which a
+         * Call is not aware of.
          * <p>
          * See {@link Connection#sendConnectionEvent(String, Bundle)}.
          *
          * @param call The {@code Call} receiving the event.
          * @param event The event.
          * @param extras Extras associated with the connection event.
-         * @hide
          */
         public void onConnectionEvent(Call call, String event, Bundle extras) {}
     }
@@ -965,7 +994,6 @@
      * An {@link InCallService} will only see calls which support this method if it has the
      * {@link TelecomManager#METADATA_INCLUDE_EXTERNAL_CALLS} metadata set to {@code true}
      * in its manifest.
-     * @hide
      */
     public void pullExternalCall() {
         // If this isn't an external call, ignore the request.
@@ -980,15 +1008,35 @@
      * Sends a {@code Call} event from this {@code Call} to the associated {@link Connection} in
      * the {@link ConnectionService}.
      * <p>
+     * Call events are used to communicate point in time information from an {@link InCallService}
+     * to a {@link ConnectionService}.  A {@link ConnectionService} implementation could define
+     * events which enable the {@link InCallService}, for example, toggle a unique feature of the
+     * {@link ConnectionService}.
+     * <p>
+     * A {@link ConnectionService} can communicate to the {@link InCallService} using
+     * {@link Connection#sendConnectionEvent(String, Bundle)}.
+     * <p>
      * Events are exposed to {@link ConnectionService} implementations via
      * {@link android.telecom.Connection#onCallEvent(String, Bundle)}.
      * <p>
      * No assumptions should be made as to how a {@link ConnectionService} will handle these events.
-     * Events should be fully qualified (e.g., com.example.event.MY_EVENT) to avoid conflicts.
+     * The {@link InCallService} must assume that the {@link ConnectionService} could chose to
+     * ignore some events altogether.
+     * <p>
+     * Events should be fully qualified (e.g., {@code com.example.event.MY_EVENT}) to avoid
+     * conflicts between {@link InCallService} implementations.  Further, {@link InCallService}
+     * implementations shall not re-purpose events in the {@code android.*} namespace, nor shall
+     * they define their own event types in this namespace.  When defining a custom event type,
+     * ensure the contents of the extras {@link Bundle} is clearly defined.  Extra keys for this
+     * bundle should be named similar to the event type (e.g. {@code com.example.extra.MY_EXTRA}).
+     * <p>
+     * When defining events and the associated extras, it is important to keep their behavior
+     * consistent when the associated {@link InCallService} is updated.  Support for deprecated
+     * events/extras should me maintained to ensure backwards compatibility with older
+     * {@link ConnectionService} implementations which were built to support the older behavior.
      *
      * @param event The connection event.
      * @param extras Bundle containing extra information associated with the event.
-     * @hide
      */
     public void sendCallEvent(String event, Bundle extras) {
         mInCallAdapter.sendCallEvent(mTelecomCallId, event, extras);
@@ -1002,7 +1050,6 @@
      * extras.  Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.
      *
      * @param extras The extras to add.
-     * @hide
      */
     public final void putExtras(Bundle extras) {
         if (extras == null) {
@@ -1032,7 +1079,7 @@
     }
 
     /**
-     * Adds an integer extra to this {@code Connection}.
+     * Adds an integer extra to this {@link Call}.
      *
      * @param key The extra key.
      * @param value The value.
@@ -1047,7 +1094,7 @@
     }
 
     /**
-     * Adds a string extra to this {@code Connection}.
+     * Adds a string extra to this {@link Call}.
      *
      * @param key The extra key.
      * @param value The value.
@@ -1062,10 +1109,9 @@
     }
 
     /**
-     * Removes extras from this {@code Connection}.
+     * Removes extras from this {@link Call}.
      *
      * @param keys The keys of the extras to remove.
-     * @hide
      */
     public final void removeExtras(List<String> keys) {
         if (mExtras != null) {
@@ -1080,6 +1126,15 @@
     }
 
     /**
+     * Removes extras from this {@link Call}.
+     *
+     * @param keys The keys of the extras to remove.
+     */
+    public final void removeExtras(String ... keys) {
+        removeExtras(Arrays.asList(keys));
+    }
+
+    /**
      * Obtains the parent of this {@code Call} in a conference, if any.
      *
      * @return The parent {@code Call}, or {@code null} if this {@code Call} is not a
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index 0227d27..a012082 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -24,6 +24,7 @@
 import android.util.ArraySet;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
@@ -164,7 +165,6 @@
      * {@link Connection} for valid values.
      *
      * @return A bitmask of the properties of the conference call.
-     * @hide
      */
     public final int getConnectionProperties() {
         return mConnectionProperties;
@@ -256,60 +256,63 @@
     }
 
     /**
-     * Invoked when the Conference and all it's {@link Connection}s should be disconnected.
+     * Notifies the {@link Conference} when the Conference and all it's {@link Connection}s should
+     * be disconnected.
      */
     public void onDisconnect() {}
 
     /**
-     * Invoked when the specified {@link Connection} should be separated from the conference call.
+     * Notifies the {@link Conference} when the specified {@link Connection} should be separated
+     * from the conference call.
      *
      * @param connection The connection to separate.
      */
     public void onSeparate(Connection connection) {}
 
     /**
-     * Invoked when the specified {@link Connection} should merged with the conference call.
+     * Notifies the {@link Conference} when the specified {@link Connection} should merged with the
+     * conference call.
      *
      * @param connection The {@code Connection} to merge.
      */
     public void onMerge(Connection connection) {}
 
     /**
-     * Invoked when the conference should be put on hold.
+     * Notifies the {@link Conference} when it should be put on hold.
      */
     public void onHold() {}
 
     /**
-     * Invoked when the conference should be moved from hold to active.
+     * Notifies the {@link Conference} when it should be moved from a held to active state.
      */
     public void onUnhold() {}
 
     /**
-     * Invoked when the child calls should be merged. Only invoked if the conference contains the
-     * capability {@link Connection#CAPABILITY_MERGE_CONFERENCE}.
+     * Notifies the {@link Conference} when the child calls should be merged.  Only invoked if the
+     * conference contains the capability {@link Connection#CAPABILITY_MERGE_CONFERENCE}.
      */
     public void onMerge() {}
 
     /**
-     * Invoked when the child calls should be swapped. Only invoked if the conference contains the
-     * capability {@link Connection#CAPABILITY_SWAP_CONFERENCE}.
+     * Notifies the {@link Conference} when the child calls should be swapped. Only invoked if the
+     * conference contains the capability {@link Connection#CAPABILITY_SWAP_CONFERENCE}.
      */
     public void onSwap() {}
 
     /**
-     * Notifies this conference of a request to play a DTMF tone.
+     * Notifies the {@link Conference} of a request to play a DTMF tone.
      *
      * @param c A DTMF character.
      */
     public void onPlayDtmfTone(char c) {}
 
     /**
-     * Notifies this conference of a request to stop any currently playing DTMF tones.
+     * Notifies the {@link Conference} of a request to stop any currently playing DTMF tones.
      */
     public void onStopDtmfTone() {}
 
     /**
-     * Notifies this conference that the {@link #getAudioState()} property has a new value.
+     * Notifies the {@link Conference} that the {@link #getAudioState()} property has a new value.
      *
      * @param state The new call audio state.
      * @deprecated Use {@link #onCallAudioStateChanged(CallAudioState)} instead.
@@ -320,14 +323,15 @@
     public void onAudioStateChanged(AudioState state) {}
 
     /**
-     * Notifies this conference that the {@link #getCallAudioState()} property has a new value.
+     * Notifies the {@link Conference} that the {@link #getCallAudioState()} property has a new
+     * value.
      *
      * @param state The new call audio state.
      */
     public void onCallAudioStateChanged(CallAudioState state) {}
 
     /**
-     * Notifies this conference that a connection has been added to it.
+     * Notifies the {@link Conference} that a {@link Connection} has been added to it.
      *
      * @param connection The newly added connection.
      */
@@ -396,7 +400,6 @@
      * {@link Connection} for valid values.
      *
      * @param connectionProperties A bitmask of the {@code Properties} of the conference call.
-     * @hide
      */
     public final void setConnectionProperties(int connectionProperties) {
         if (connectionProperties != mConnectionProperties) {
@@ -681,8 +684,11 @@
      * New or existing keys are replaced in the {@code Conference} extras.  Keys which are no longer
      * in the new extras, but were present the last time {@code setExtras} was called are removed.
      * <p>
+     * Alternatively you may use the {@link #putExtras(Bundle)}, and
+     * {@link #removeExtras(String...)} methods to modify the extras.
+     * <p>
      * No assumptions should be made as to how an In-Call UI or service will handle these extras.
-     * Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.
+     * Keys should be fully qualified (e.g., com.example.extras.MY_EXTRA) to avoid conflicts.
      *
      * @param extras The extras associated with this {@code Conference}.
      */
@@ -727,7 +733,6 @@
      * Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.
      *
      * @param extras The extras to add.
-     * @hide
      */
     public final void putExtras(@NonNull Bundle extras) {
         if (extras == null) {
@@ -790,10 +795,9 @@
     }
 
     /**
-     * Removes an extra from this {@link Conference}.
+     * Removes extras from this {@link Conference}.
      *
-     * @param keys The key of the extra key to remove.
-     * @hide
+     * @param keys The keys of the extras to remove.
      */
     public final void removeExtras(List<String> keys) {
         if (keys == null || keys.isEmpty()) {
@@ -815,7 +819,25 @@
     }
 
     /**
+     * Removes extras from this {@link Conference}.
+     *
+     * @param keys The keys of the extras to remove.
+     */
+    public final void removeExtras(String ... keys) {
+        removeExtras(Arrays.asList(keys));
+    }
+
+    /**
      * Returns the extras associated with this conference.
+     * <p>
+     * Extras should be updated using {@link #putExtras(Bundle)} and {@link #removeExtras(List)}.
+     * <p>
+     * Telecom or an {@link InCallService} can also update the extras via
+     * {@link android.telecom.Call#putExtras(Bundle)}, and
+     * {@link Call#removeExtras(List)}.
+     * <p>
+     * The conference is notified of changes to the extras made by Telecom or an
+     * {@link InCallService} by {@link #onExtrasChanged(Bundle)}.
      *
      * @return The extras associated with this connection.
      */
@@ -832,7 +854,6 @@
      * {@link Call#removeExtras(List)}.
      *
      * @param extras The new extras bundle.
-     * @hide
      */
     public void onExtrasChanged(Bundle extras) {}
 
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index ff220f3..441efb7 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -35,6 +35,7 @@
 import android.view.Surface;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
@@ -52,6 +53,37 @@
  * Implementations are then responsible for updating the state of the {@code Connection}, and
  * must call {@link #destroy()} to signal to the framework that the {@code Connection} is no
  * longer used and associated resources may be recovered.
+ * <p>
+ * Subclasses of {@code Connection} override the {@code on*} methods to provide the the
+ * {@link ConnectionService}'s implementation of calling functionality.  The {@code on*} methods are
+ * called by Telecom to inform an instance of a {@code Connection} of actions specific to that
+ * {@code Connection} instance.
+ * <p>
+ * Basic call support requires overriding the following methods: {@link #onAnswer()},
+ * {@link #onDisconnect()}, {@link #onReject()}, {@link #onAbort()}
+ * <p>
+ * Where a {@code Connection} has {@link #CAPABILITY_SUPPORT_HOLD}, the {@link #onHold()} and
+ * {@link #onUnhold()} methods should be overridden to provide hold support for the
+ * {@code Connection}.
+ * <p>
+ * Where a {@code Connection} supports a variation of video calling (e.g. the
+ * {@code CAPABILITY_SUPPORTS_VT_*} capability bits), {@link #onAnswer(int)} should be overridden
+ * to support answering a call as a video call.
+ * <p>
+ * Where a {@code Connection} has {@link #PROPERTY_IS_EXTERNAL_CALL} and
+ * {@link #CAPABILITY_CAN_PULL_CALL}, {@link #onPullExternalCall()} should be overridden to provide
+ * support for pulling the external call.
+ * <p>
+ * Where a {@code Connection} supports conference calling {@link #onSeparate()} should be
+ * overridden.
+ * <p>
+ * There are a number of other {@code on*} methods which a {@code Connection} can choose to
+ * implement, depending on whether it is concerned with the associated calls from Telecom.  If,
+ * for example, call events from a {@link InCallService} are handled,
+ * {@link #onCallEvent(String, Bundle)} should be overridden.  Another example is
+ * {@link #onExtrasChanged(Bundle)}, which should be overridden if the {@code Connection} wishes to
+ * make use of extra information provided via the {@link Call#putExtras(Bundle)} and
+ * {@link Call#removeExtras(String...)} methods.
  */
 public abstract class Connection extends Conferenceable {
 
@@ -100,7 +132,6 @@
      * <p>
      * A connection can only be in this state if the {@link #PROPERTY_IS_EXTERNAL_CALL} property and
      * {@link #CAPABILITY_CAN_PULL_CALL} capability bits are set on the connection.
-     * @hide
      */
     public static final int STATE_PULLING_CALL = 7;
 
@@ -284,7 +315,6 @@
      * <p>
      * Should only be set on a {@code Connection} where {@link #PROPERTY_IS_EXTERNAL_CALL}
      * is set.
-     * @hide
      */
     public static final int CAPABILITY_CAN_PULL_CALL = 0x01000000;
 
@@ -332,13 +362,16 @@
      * external connections.  Only those {@link InCallService}s which have the
      * {@link TelecomManager#METADATA_INCLUDE_EXTERNAL_CALLS} metadata set to {@code true} in its
      * manifest will see external connections.
-     * @hide
      */
     public static final int PROPERTY_IS_EXTERNAL_CALL = 1<<4;
 
+    /**
+     * Indicates that the connection has CDMA Enhanced Voice Privacy enabled.
+     */
+    public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 1<<5;
 
     //**********************************************************************************************
-    // Next PROPERTY value: 1<<5
+    // Next PROPERTY value: 1<<6
     //**********************************************************************************************
 
     /**
@@ -365,9 +398,25 @@
     public static final String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
 
     /**
+     * Boolean connection extra key set on a {@link Connection} in
+     * {@link Connection#STATE_RINGING} state to indicate that answering the call will cause the
+     * current active foreground call to be dropped.
+     */
+    public static final String EXTRA_ANSWERING_DROPS_FG_CALL =
+            "android.telecom.extra.ANSWERING_DROPS_FG_CALL";
+
+    /**
+     * Boolean connection extra key on a {@link Connection} which indicates that adding an
+     * additional call is disallowed.
+     * @hide
+     */
+    public static final String EXTRA_DISABLE_ADD_CALL =
+            "android.telecom.extra.DISABLE_ADD_CALL";
+
+    /**
      * Connection event used to inform Telecom that it should play the on hold tone.  This is used
      * to play a tone when the peer puts the current call on hold.  Sent to Telecom via
-     * {@link #sendConnectionEvent(String)}.
+     * {@link #sendConnectionEvent(String, Bundle)}.
      * @hide
      */
     public static final String EVENT_ON_HOLD_TONE_START =
@@ -376,7 +425,7 @@
     /**
      * Connection event used to inform Telecom that it should stop the on hold tone.  This is used
      * to stop a tone when the peer puts the current call on hold.  Sent to Telecom via
-     * {@link #sendConnectionEvent(String)}.
+     * {@link #sendConnectionEvent(String, Bundle)}.
      * @hide
      */
     public static final String EVENT_ON_HOLD_TONE_END =
@@ -391,10 +440,21 @@
      * {@link Call.Details#PROPERTY_IS_EXTERNAL_CALL} and
      * {@link Call.Details#CAPABILITY_CAN_PULL_CALL}, but the {@link ConnectionService} could not
      * pull the external call due to an error condition.
-     * @hide
+     * <p>
+     * Sent via {@link #sendConnectionEvent(String, Bundle)}.  The {@link Bundle} parameter is
+     * expected to be null when this connection event is used.
      */
     public static final String EVENT_CALL_PULL_FAILED = "android.telecom.event.CALL_PULL_FAILED";
 
+    /**
+     * Connection event used to inform {@link InCallService}s when the merging of two calls has
+     * failed. The User Interface should use this message to inform the user of the error.
+     * <p>
+     * Sent via {@link #sendConnectionEvent(String, Bundle)}.  The {@link Bundle} parameter is
+     * expected to be null when this connection event is used.
+     */
+    public static final String EVENT_CALL_MERGE_FAILED = "android.telecom.event.CALL_MERGE_FAILED";
+
     // Flag controlling whether PII is emitted into the logs
     private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG);
 
@@ -441,7 +501,12 @@
         mConnectionCapabilities |= capability;
     }
 
-
+    /**
+     * Renders a set of capability bits ({@code CAPABILITY_*}) as a human readable string.
+     *
+     * @param capabilities A capability bit field.
+     * @return A human readable string representation.
+     */
     public static String capabilitiesToString(int capabilities) {
         StringBuilder builder = new StringBuilder();
         builder.append("[Capabilities:");
@@ -511,11 +576,10 @@
     }
 
     /**
-     * Builds a string representation of a properties bit-mask.
+     * Renders a set of property bits ({@code PROPERTY_*}) as a human readable string.
      *
-     * @param properties The properties bit-mask.
-     * @return String representation.
-     * @hide
+     * @param properties A property bit field.
+     * @return A human readable string representation.
      */
     public static String propertiesToString(int properties) {
         StringBuilder builder = new StringBuilder();
@@ -541,6 +605,10 @@
             builder.append(" PROPERTY_IS_EXTERNAL_CALL");
         }
 
+        if (can(properties, PROPERTY_HAS_CDMA_VOICE_PRIVACY)) {
+            builder.append(" PROPERTY_HAS_CDMA_VOICE_PRIVACY");
+        }
+
         builder.append("]");
         return builder.toString();
     }
@@ -574,6 +642,8 @@
         public void onExtrasChanged(Connection c, Bundle extras) {}
         public void onExtrasRemoved(Connection c, List<String> keys) {}
         public void onConnectionEvent(Connection c, String event, Bundle extras) {}
+        /** @hide */
+        public void onConferenceSupportedChanged(Connection c, boolean isConferenceSupported) {}
     }
 
     /**
@@ -1385,6 +1455,15 @@
 
     /**
      * Returns the extras associated with this connection.
+     * <p>
+     * Extras should be updated using {@link #putExtras(Bundle)}.
+     * <p>
+     * Telecom or an {@link InCallService} can also update the extras via
+     * {@link android.telecom.Call#putExtras(Bundle)}, and
+     * {@link Call#removeExtras(List)}.
+     * <p>
+     * The connection is notified of changes to the extras made by Telecom or an
+     * {@link InCallService} by {@link #onExtrasChanged(Bundle)}.
      *
      * @return The extras associated with this connection.
      */
@@ -1493,7 +1572,6 @@
 
     /**
      * Returns the connection's properties, as a bit mask of the {@code PROPERTY_*} constants.
-     * @hide
      */
     public final int getConnectionProperties() {
         return mConnectionProperties;
@@ -1594,6 +1672,16 @@
     }
 
     /**
+     * Sets state to pulling (e.g. the connection is being pulled to the local device from another
+     * device).  Only applicable for {@link Connection}s with
+     * {@link Connection#PROPERTY_IS_EXTERNAL_CALL} and {@link Connection#CAPABILITY_CAN_PULL_CALL}.
+     */
+    public final void setPulling() {
+        checkImmutable();
+        setState(STATE_PULLING_CALL);
+    }
+
+    /**
      * Sets state to be on hold.
      */
     public final void setOnHold() {
@@ -1699,7 +1787,6 @@
      * Sets the connection's properties as a bit mask of the {@code PROPERTY_*} constants.
      *
      * @param connectionProperties The new connection properties.
-     * @hide
      */
     public final void setConnectionProperties(int connectionProperties) {
         checkImmutable();
@@ -1880,6 +1967,9 @@
      * New or existing keys are replaced in the {@code Connection} extras.  Keys which are no longer
      * in the new extras, but were present the last time {@code setExtras} was called are removed.
      * <p>
+     * Alternatively you may use the {@link #putExtras(Bundle)}, and
+     * {@link #removeExtras(String...)} methods to modify the extras.
+     * <p>
      * No assumptions should be made as to how an In-Call UI or service will handle these extras.
      * Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.
      *
@@ -1924,7 +2014,6 @@
      * Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.
      *
      * @param extras The extras to add.
-     * @hide
      */
     public final void putExtras(@NonNull Bundle extras) {
         checkImmutable();
@@ -1988,10 +2077,9 @@
     }
 
     /**
-     * Removes an extra from this {@code Connection}.
+     * Removes extras from this {@code Connection}.
      *
-     * @param keys The key of the extra key to remove.
-     * @hide
+     * @param keys The keys of the extras to remove.
      */
     public final void removeExtras(List<String> keys) {
         synchronized (mExtrasLock) {
@@ -2008,6 +2096,15 @@
     }
 
     /**
+     * Removes extras from this {@code Connection}.
+     *
+     * @param keys The keys of the extras to remove.
+     */
+    public final void removeExtras(String ... keys) {
+        removeExtras(Arrays.asList(keys));
+    }
+
+    /**
      * Notifies this Connection that the {@link #getAudioState()} property has a new value.
      *
      * @param state The new connection audio state.
@@ -2129,7 +2226,6 @@
      * capability and {@link Connection#PROPERTY_IS_EXTERNAL_CALL} property bits must be set.
      * <p>
      * For more information on external calls, see {@link Connection#PROPERTY_IS_EXTERNAL_CALL}.
-     * @hide
      */
     public void onPullExternalCall() {}
 
@@ -2138,11 +2234,16 @@
      * <p>
      * The {@link InCallService} issues a Call event via {@link Call#sendCallEvent(String, Bundle)}.
      * <p>
+     * Where possible, the Connection should make an attempt to handle {@link Call} events which
+     * are part of the {@code android.telecom.*} namespace.  The Connection should ignore any events
+     * it does not wish to handle.  Unexpected events should be handled gracefully, as it is
+     * possible that a {@link InCallService} has defined its own Call events which a Connection is
+     * not aware of.
+     * <p>
      * See also {@link Call#sendCallEvent(String, Bundle)}.
      *
      * @param event The call event.
      * @param extras Extras associated with the call event.
-     * @hide
      */
     public void onCallEvent(String event, Bundle extras) {}
 
@@ -2155,7 +2256,6 @@
      * {@link Call#removeExtras(List)}.
      *
      * @param extras The new extras bundle.
-     * @hide
      */
     public void onExtrasChanged(Bundle extras) {}
 
@@ -2330,17 +2430,54 @@
     }
 
     /**
-     * Sends an event associated with this {@code Connection}, with associated event extras.
-     *
-     * Events are exposed to {@link InCallService} implementations via the
-     * {@link Call.Callback#onConnectionEvent(Call, String, Bundle)} API.
-     *
+     * Notifies listeners when a change has occurred to the Connection which impacts its ability to
+     * be a part of a conference call.
+     * @param isConferenceSupported {@code true} if the connection supports being part of a
+     *      conference call, {@code false} otherwise.
+     * @hide
+     */
+    protected void notifyConferenceSupportedChanged(boolean isConferenceSupported) {
+        for (Listener l : mListeners) {
+            l.onConferenceSupportedChanged(this, isConferenceSupported);
+        }
+    }
+
+    /**
+     * Sends an event associated with this {@code Connection} with associated event extras to the
+     * {@link InCallService}.
+     * <p>
+     * Connection events are used to communicate point in time information from a
+     * {@link ConnectionService} to a {@link InCallService} implementations.  An example of a
+     * custom connection event includes notifying the UI when a WIFI call has been handed over to
+     * LTE, which the InCall UI might use to inform the user that billing charges may apply.  The
+     * Android Telephony framework will send the {@link #EVENT_CALL_MERGE_FAILED} connection event
+     * when a call to {@link Call#mergeConference()} has failed to complete successfully.  A
+     * connection event could also be used to trigger UI in the {@link InCallService} which prompts
+     * the user to make a choice (e.g. whether they want to incur roaming costs for making a call),
+     * which is communicated back via {@link Call#sendCallEvent(String, Bundle)}.
+     * <p>
+     * Events are exposed to {@link InCallService} implementations via
+     * {@link Call.Callback#onConnectionEvent(Call, String, Bundle)}.
+     * <p>
      * No assumptions should be made as to how an In-Call UI or service will handle these events.
-     * Events should be fully qualified (e.g., com.example.event.MY_EVENT) to avoid conflicts.
+     * The {@link ConnectionService} must assume that the In-Call UI could even chose to ignore
+     * some events altogether.
+     * <p>
+     * Events should be fully qualified (e.g. {@code com.example.event.MY_EVENT}) to avoid
+     * conflicts between {@link ConnectionService} implementations.  Further, custom
+     * {@link ConnectionService} implementations shall not re-purpose events in the
+     * {@code android.*} namespace, nor shall they define new event types in this namespace.  When
+     * defining a custom event type, ensure the contents of the extras {@link Bundle} is clearly
+     * defined.  Extra keys for this bundle should be named similar to the event type (e.g.
+     * {@code com.example.extra.MY_EXTRA}).
+     * <p>
+     *  When defining events and the associated extras, it is important to keep their behavior
+     * consistent when the associated {@link ConnectionService} is updated.  Support for deprecated
+     * events/extras should me maintained to ensure backwards compatibility with older
+     * {@link InCallService} implementations which were built to support the older behavior.
      *
      * @param event The connection event.
-     * @param extras Bundle containing extra information associated with the event.
-     * @hide
+     * @param extras Optional bundle containing extra information associated with the event.
      */
     public void sendConnectionEvent(String event, Bundle extras) {
         for (Listener l : mListeners) {
diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java
index 65437d9..6860269 100644
--- a/telecomm/java/android/telecom/DisconnectCause.java
+++ b/telecomm/java/android/telecom/DisconnectCause.java
@@ -67,13 +67,11 @@
     /**
      * Disconnected because the user did not locally answer the incoming call, but it was answered
      * on another device where the call was ringing.
-     * @hide
      */
     public static final int ANSWERED_ELSEWHERE = 11;
 
     /**
      * Disconnected because the call was pulled from the current device to another device.
-     * @hide
      */
     public static final int CALL_PULLED = 12;
 
@@ -277,6 +275,12 @@
             case CONNECTION_MANAGER_NOT_SUPPORTED:
                 code = "CONNECTION_MANAGER_NOT_SUPPORTED";
                 break;
+            case CALL_PULLED:
+                code = "CALL_PULLED";
+                break;
+            case ANSWERED_ELSEWHERE:
+                code = "ANSWERED_ELSEWHERE";
+                break;
             default:
                 code = "invalid code: " + mDisconnectCode;
                 break;
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index e2399ff..df6715d 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -457,7 +457,6 @@
      * @param call The call the event is associated with.
      * @param event The event.
      * @param extras Any associated extras.
-     * @hide
      */
     public void onConnectionEvent(Call call, String event, Bundle extras) {
     }
diff --git a/telecomm/java/android/telecom/ParcelableCallAnalytics.java b/telecomm/java/android/telecom/ParcelableCallAnalytics.java
index e7c9672..383d10b 100644
--- a/telecomm/java/android/telecom/ParcelableCallAnalytics.java
+++ b/telecomm/java/android/telecom/ParcelableCallAnalytics.java
@@ -20,11 +20,231 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
 /**
  * @hide
  */
 @SystemApi
 public class ParcelableCallAnalytics implements Parcelable {
+    /** {@hide} */
+    public static final class VideoEvent implements Parcelable {
+        public static final int SEND_LOCAL_SESSION_MODIFY_REQUEST = 0;
+        public static final int SEND_LOCAL_SESSION_MODIFY_RESPONSE = 1;
+        public static final int RECEIVE_REMOTE_SESSION_MODIFY_REQUEST = 2;
+        public static final int RECEIVE_REMOTE_SESSION_MODIFY_RESPONSE = 3;
+
+        public static final Parcelable.Creator<VideoEvent> CREATOR =
+                new Parcelable.Creator<VideoEvent> () {
+
+                    @Override
+                    public VideoEvent createFromParcel(Parcel in) {
+                        return new VideoEvent(in);
+                    }
+
+                    @Override
+                    public VideoEvent[] newArray(int size) {
+                        return new VideoEvent[size];
+                    }
+                };
+
+        private int mEventName;
+        private long mTimeSinceLastEvent;
+        private int mVideoState;
+
+        public VideoEvent(int eventName, long timeSinceLastEvent, int videoState) {
+            mEventName = eventName;
+            mTimeSinceLastEvent = timeSinceLastEvent;
+            mVideoState = videoState;
+        }
+
+        VideoEvent(Parcel in) {
+            mEventName = in.readInt();
+            mTimeSinceLastEvent = in.readLong();
+            mVideoState = in.readInt();
+        }
+
+        public int getEventName() {
+            return mEventName;
+        }
+
+        public long getTimeSinceLastEvent() {
+            return mTimeSinceLastEvent;
+        }
+
+        public int getVideoState() {
+            return mVideoState;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            out.writeInt(mEventName);
+            out.writeLong(mTimeSinceLastEvent);
+            out.writeInt(mVideoState);
+        }
+    }
+
+    public static final class AnalyticsEvent implements Parcelable {
+        public static final int SET_SELECT_PHONE_ACCOUNT = 0;
+        public static final int SET_ACTIVE = 1;
+        public static final int SET_DISCONNECTED = 2;
+        public static final int START_CONNECTION = 3;
+        public static final int SET_DIALING = 4;
+        public static final int BIND_CS = 5;
+        public static final int CS_BOUND = 6;
+        public static final int REQUEST_ACCEPT = 7;
+        public static final int REQUEST_REJECT = 8;
+
+        public static final int SCREENING_SENT = 100;
+        public static final int SCREENING_COMPLETED = 101;
+        public static final int DIRECT_TO_VM_INITIATED = 102;
+        public static final int DIRECT_TO_VM_FINISHED = 103;
+        public static final int BLOCK_CHECK_INITIATED = 104;
+        public static final int BLOCK_CHECK_FINISHED = 105;
+        public static final int FILTERING_INITIATED = 106;
+        public static final int FILTERING_COMPLETED = 107;
+        public static final int FILTERING_TIMED_OUT = 108;
+
+        public static final int SKIP_RINGING = 200;
+        public static final int SILENCE = 201;
+        public static final int MUTE = 202;
+        public static final int UNMUTE = 203;
+        public static final int AUDIO_ROUTE_BT = 204;
+        public static final int AUDIO_ROUTE_EARPIECE = 205;
+        public static final int AUDIO_ROUTE_HEADSET = 206;
+        public static final int AUDIO_ROUTE_SPEAKER = 207;
+
+        public static final int CONFERENCE_WITH = 300;
+        public static final int SPLIT_CONFERENCE = 301;
+        public static final int SET_PARENT = 302;
+
+        public static final int REQUEST_HOLD = 400;
+        public static final int REQUEST_UNHOLD = 401;
+        public static final int REMOTELY_HELD = 402;
+        public static final int REMOTELY_UNHELD = 403;
+        public static final int SET_HOLD = 404;
+        public static final int SWAP = 405;
+
+        public static final int REQUEST_PULL = 500;
+
+
+        public static final Parcelable.Creator<AnalyticsEvent> CREATOR =
+                new Parcelable.Creator<AnalyticsEvent> () {
+
+                    @Override
+                    public AnalyticsEvent createFromParcel(Parcel in) {
+                        return new AnalyticsEvent(in);
+                    }
+
+                    @Override
+                    public AnalyticsEvent[] newArray(int size) {
+                        return new AnalyticsEvent[size];
+                    }
+                };
+
+        private int mEventName;
+        private long mTimeSinceLastEvent;
+
+        public AnalyticsEvent(int eventName, long timestamp) {
+            mEventName = eventName;
+            mTimeSinceLastEvent = timestamp;
+        }
+
+        AnalyticsEvent(Parcel in) {
+            mEventName = in.readInt();
+            mTimeSinceLastEvent = in.readLong();
+        }
+
+        public int getEventName() {
+            return mEventName;
+        }
+
+        public long getTimeSinceLastEvent() {
+            return mTimeSinceLastEvent;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            out.writeInt(mEventName);
+            out.writeLong(mTimeSinceLastEvent);
+        }
+    }
+
+    public static final class EventTiming implements Parcelable {
+        public static final int ACCEPT_TIMING = 0;
+        public static final int REJECT_TIMING = 1;
+        public static final int DISCONNECT_TIMING = 2;
+        public static final int HOLD_TIMING = 3;
+        public static final int UNHOLD_TIMING = 4;
+        public static final int OUTGOING_TIME_TO_DIALING_TIMING = 5;
+        public static final int BIND_CS_TIMING = 6;
+        public static final int SCREENING_COMPLETED_TIMING = 7;
+        public static final int DIRECT_TO_VM_FINISHED_TIMING = 8;
+        public static final int BLOCK_CHECK_FINISHED_TIMING = 9;
+        public static final int FILTERING_COMPLETED_TIMING = 10;
+        public static final int FILTERING_TIMED_OUT_TIMING = 11;
+
+        public static final int INVALID = 999999;
+
+        public static final Parcelable.Creator<EventTiming> CREATOR =
+                new Parcelable.Creator<EventTiming> () {
+
+                    @Override
+                    public EventTiming createFromParcel(Parcel in) {
+                        return new EventTiming(in);
+                    }
+
+                    @Override
+                    public EventTiming[] newArray(int size) {
+                        return new EventTiming[size];
+                    }
+                };
+
+        private int mName;
+        private long mTime;
+
+        public EventTiming(int name, long time) {
+            this.mName = name;
+            this.mTime = time;
+        }
+
+        private EventTiming(Parcel in) {
+            mName = in.readInt();
+            mTime = in.readLong();
+        }
+
+        public int getName() {
+            return mName;
+        }
+
+        public long getTime() {
+            return mTime;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            out.writeInt(mName);
+            out.writeLong(mTime);
+        }
+    }
+
     public static final int CALLTYPE_UNKNOWN = 0;
     public static final int CALLTYPE_INCOMING = 1;
     public static final int CALLTYPE_OUTGOING = 2;
@@ -87,10 +307,23 @@
     // Whether the call object was created from an existing connection.
     private final boolean isCreatedFromExistingConnection;
 
+    // A list of events that are associated with this call
+    private final List<AnalyticsEvent> analyticsEvents;
+
+    // A map from event-pair names to their durations.
+    private final List<EventTiming> eventTimings;
+
+    // Whether the call has ever been a video call.
+    private boolean isVideoCall = false;
+
+    // A list of video events that have occurred.
+    private List<VideoEvent> videoEvents;
+
     public ParcelableCallAnalytics(long startTimeMillis, long callDurationMillis, int callType,
             boolean isAdditionalCall, boolean isInterrupted, int callTechnologies,
             int callTerminationCode, boolean isEmergencyCall, String connectionService,
-            boolean isCreatedFromExistingConnection) {
+            boolean isCreatedFromExistingConnection, List<AnalyticsEvent> analyticsEvents,
+            List<EventTiming> eventTimings) {
         this.startTimeMillis = startTimeMillis;
         this.callDurationMillis = callDurationMillis;
         this.callType = callType;
@@ -101,6 +334,8 @@
         this.isEmergencyCall = isEmergencyCall;
         this.connectionService = connectionService;
         this.isCreatedFromExistingConnection = isCreatedFromExistingConnection;
+        this.analyticsEvents = analyticsEvents;
+        this.eventTimings = eventTimings;
     }
 
     public ParcelableCallAnalytics(Parcel in) {
@@ -114,6 +349,13 @@
         isEmergencyCall = readByteAsBoolean(in);
         connectionService = in.readString();
         isCreatedFromExistingConnection = readByteAsBoolean(in);
+        analyticsEvents = new ArrayList<>();
+        in.readTypedList(analyticsEvents, AnalyticsEvent.CREATOR);
+        eventTimings = new ArrayList<>();
+        in.readTypedList(eventTimings, EventTiming.CREATOR);
+        isVideoCall = readByteAsBoolean(in);
+        videoEvents = new LinkedList<>();
+        in.readTypedList(videoEvents, VideoEvent.CREATOR);
     }
 
     public void writeToParcel(Parcel out, int flags) {
@@ -127,6 +369,20 @@
         writeBooleanAsByte(out, isEmergencyCall);
         out.writeString(connectionService);
         writeBooleanAsByte(out, isCreatedFromExistingConnection);
+        out.writeTypedList(analyticsEvents);
+        out.writeTypedList(eventTimings);
+        writeBooleanAsByte(out, isVideoCall);
+        out.writeTypedList(videoEvents);
+    }
+
+    /** {@hide} */
+    public void setIsVideoCall(boolean isVideoCall) {
+        this.isVideoCall = isVideoCall;
+    }
+
+    /** {@hide} */
+    public void setVideoEvents(List<VideoEvent> videoEvents) {
+        this.videoEvents = videoEvents;
     }
 
     public long getStartTimeMillis() {
@@ -169,6 +425,24 @@
         return isCreatedFromExistingConnection;
     }
 
+    public List<AnalyticsEvent> analyticsEvents() {
+        return analyticsEvents;
+    }
+
+    public List<EventTiming> getEventTimings() {
+        return eventTimings;
+    }
+
+    /** {@hide} */
+    public boolean isVideoCall() {
+        return isVideoCall;
+    }
+
+    /** {@hide} */
+    public List<VideoEvent> getVideoEvents() {
+        return videoEvents;
+    }
+
     @Override
     public int describeContents() {
         return 0;
diff --git a/telecomm/java/android/telecom/RemoteConference.java b/telecomm/java/android/telecom/RemoteConference.java
index bf6038a..943da6d 100644
--- a/telecomm/java/android/telecom/RemoteConference.java
+++ b/telecomm/java/android/telecom/RemoteConference.java
@@ -97,7 +97,6 @@
          *
          * @param conference The {@code RemoteConference} invoking this method.
          * @param connectionProperties The new properties of the {@code RemoteConference}.
-         * @hide
          */
         public void onConnectionPropertiesChanged(
                 RemoteConference conference,
diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java
index 8e06659db..dc8eaf6 100644
--- a/telecomm/java/android/telecom/RemoteConnection.java
+++ b/telecomm/java/android/telecom/RemoteConnection.java
@@ -95,7 +95,6 @@
          *
          * @param connection The {@code RemoteConnection} invoking this method.
          * @param connectionProperties The new properties of the {@code RemoteConnection}.
-         * @hide
          */
         public void onConnectionPropertiesChanged(
                 RemoteConnection connection,
@@ -230,7 +229,6 @@
          * @param connection The {@code RemoteConnection} invoking this method.
          * @param event The connection event.
          * @param extras Extras associated with the event.
-         * @hide
          */
         public void onConnectionEvent(RemoteConnection connection, String event, Bundle extras) {}
     }
@@ -738,7 +736,6 @@
      *
      * @return A bitmask of the properties of the {@code RemoteConnection}, as defined in the
      *         {@code PROPERTY_*} constants in class {@link Connection}.
-     * @hide
      */
     public int getConnectionProperties() {
         return mConnectionProperties;
@@ -993,7 +990,6 @@
      * Instructs this {@link RemoteConnection} to pull itself to the local device.
      * <p>
      * See {@link Call#pullExternalCall()} for more information.
-     * @hide
      */
     public void pullExternalCall() {
         try {
diff --git a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl b/telecomm/java/android/telecom/TelecomAnalytics.aidl
similarity index 94%
rename from telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
rename to telecomm/java/android/telecom/TelecomAnalytics.aidl
index b7e78d1..08ad0a2 100644
--- a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
+++ b/telecomm/java/android/telecom/TelecomAnalytics.aidl
@@ -19,4 +19,4 @@
 /**
  * {@hide}
  */
-parcelable ParcelableCallAnalytics;
+parcelable TelecomAnalytics;
diff --git a/telecomm/java/android/telecom/TelecomAnalytics.java b/telecomm/java/android/telecom/TelecomAnalytics.java
new file mode 100644
index 0000000..6e0d02c
--- /dev/null
+++ b/telecomm/java/android/telecom/TelecomAnalytics.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.telecom;
+
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @hide
+ */
+@SystemApi
+public final class TelecomAnalytics implements Parcelable {
+    public static final Parcelable.Creator<TelecomAnalytics> CREATOR =
+            new Parcelable.Creator<TelecomAnalytics> () {
+
+                @Override
+                public TelecomAnalytics createFromParcel(Parcel in) {
+                    return new TelecomAnalytics(in);
+                }
+
+                @Override
+                public TelecomAnalytics[] newArray(int size) {
+                    return new TelecomAnalytics[size];
+                }
+            };
+
+    public static final class SessionTiming extends TimedEvent<Integer> implements Parcelable {
+        public static final Parcelable.Creator<SessionTiming> CREATOR =
+                new Parcelable.Creator<SessionTiming> () {
+
+                    @Override
+                    public SessionTiming createFromParcel(Parcel in) {
+                        return new SessionTiming(in);
+                    }
+
+                    @Override
+                    public SessionTiming[] newArray(int size) {
+                        return new SessionTiming[size];
+                    }
+                };
+
+        public static final int ICA_ANSWER_CALL = 1;
+        public static final int ICA_REJECT_CALL = 2;
+        public static final int ICA_DISCONNECT_CALL = 3;
+        public static final int ICA_HOLD_CALL = 4;
+        public static final int ICA_UNHOLD_CALL = 5;
+        public static final int ICA_MUTE = 6;
+        public static final int ICA_SET_AUDIO_ROUTE = 7;
+        public static final int ICA_CONFERENCE = 8;
+
+        public static final int CSW_HANDLE_CREATE_CONNECTION_COMPLETE = 100;
+        public static final int CSW_SET_ACTIVE = 101;
+        public static final int CSW_SET_RINGING = 102;
+        public static final int CSW_SET_DIALING = 103;
+        public static final int CSW_SET_DISCONNECTED = 104;
+        public static final int CSW_SET_ON_HOLD = 105;
+        public static final int CSW_REMOVE_CALL = 106;
+        public static final int CSW_SET_IS_CONFERENCED = 107;
+        public static final int CSW_ADD_CONFERENCE_CALL = 108;
+
+        private int mId;
+        private long mTime;
+
+        public SessionTiming(int id, long time) {
+            this.mId = id;
+            this.mTime = time;
+        }
+
+        private SessionTiming(Parcel in) {
+            mId = in.readInt();
+            mTime = in.readLong();
+        }
+
+        @Override
+        public Integer getKey() {
+            return mId;
+        }
+
+        @Override
+        public long getTime() {
+            return mTime;
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            out.writeInt(mId);
+            out.writeLong(mTime);
+        }
+    }
+
+    private List<SessionTiming> mSessionTimings;
+    private List<ParcelableCallAnalytics> mCallAnalytics;
+
+    public TelecomAnalytics(List<SessionTiming> sessionTimings,
+            List<ParcelableCallAnalytics> callAnalytics) {
+        this.mSessionTimings = sessionTimings;
+        this.mCallAnalytics = callAnalytics;
+    }
+
+    private TelecomAnalytics(Parcel in) {
+        mSessionTimings = new ArrayList<>();
+        in.readTypedList(mSessionTimings, SessionTiming.CREATOR);
+        mCallAnalytics = new ArrayList<>();
+        in.readTypedList(mCallAnalytics, ParcelableCallAnalytics.CREATOR);
+    }
+
+    public List<SessionTiming> getSessionTimings() {
+        return mSessionTimings;
+    }
+
+    public List<ParcelableCallAnalytics> getCallAnalytics() {
+        return mCallAnalytics;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeTypedList(mSessionTimings);
+        out.writeTypedList(mCallAnalytics);
+    }
+}
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index da0d048..f12886a 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -348,7 +348,6 @@
      * informed of external calls should set this meta-data to {@code true} in the manifest
      * registration of their {@link InCallService}.  By default, the {@link InCallService} will NOT
      * be informed of external calls.
-     * @hide
      */
     public static final String METADATA_INCLUDE_EXTERNAL_CALLS =
             "android.telecom.INCLUDE_EXTERNAL_CALLS";
@@ -1444,9 +1443,9 @@
      */
     @SystemApi
     @RequiresPermission(Manifest.permission.DUMP)
-    public List<ParcelableCallAnalytics> dumpAnalytics() {
+    public TelecomAnalytics dumpAnalytics() {
         ITelecomService service = getTelecomService();
-        List<ParcelableCallAnalytics> result = null;
+        TelecomAnalytics result = null;
         if (service != null) {
             try {
                 result = service.dumpCallAnalytics();
diff --git a/telecomm/java/android/telecom/TimedEvent.java b/telecomm/java/android/telecom/TimedEvent.java
new file mode 100644
index 0000000..e484e79
--- /dev/null
+++ b/telecomm/java/android/telecom/TimedEvent.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.telecom;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @hide
+ */
+public abstract class TimedEvent<T> {
+    public abstract long getTime();
+    public abstract T getKey();
+
+    public static <T> Map<T, Double> averageTimings(Collection<? extends TimedEvent<T>> events) {
+        HashMap<T, Integer> counts = new HashMap<>();
+        HashMap<T, Double> result = new HashMap<>();
+
+        for (TimedEvent<T> entry : events) {
+            if (counts.containsKey(entry.getKey())) {
+                counts.put(entry.getKey(), counts.get(entry.getKey()) + 1);
+                result.put(entry.getKey(), result.get(entry.getKey()) + entry.getTime());
+            } else {
+                counts.put(entry.getKey(), 1);
+                result.put(entry.getKey(), (double) entry.getTime());
+            }
+        }
+
+        for (Map.Entry<T, Double> entry : result.entrySet()) {
+            result.put(entry.getKey(), entry.getValue() / counts.get(entry.getKey()));
+        }
+
+        return result;
+    }
+}
+
diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index 871565d..5c412e7 100644
--- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -18,7 +18,7 @@
 
 import android.content.ComponentName;
 import android.content.Intent;
-import android.telecom.ParcelableCallAnalytics;
+import android.telecom.TelecomAnalytics;
 import android.telecom.PhoneAccountHandle;
 import android.net.Uri;
 import android.os.Bundle;
@@ -148,7 +148,7 @@
     /**
     * @see TelecomServiceImpl#dumpCallAnalytics
     */
-    List<ParcelableCallAnalytics> dumpCallAnalytics();
+    TelecomAnalytics dumpCallAnalytics();
 
     //
     // Internal system apis relating to call management.
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index ff7ca62..9603662 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -530,6 +530,17 @@
     public static final String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
 
     /**
+     * Determines whether video conference calls are supported by a carrier.  When {@code true},
+     * video calls can be merged into conference calls, {@code false} otherwiwse.
+     * <p>
+     * Note: even if video conference calls are not supported, audio calls may be merged into a
+     * conference if {@link #KEY_SUPPORT_CONFERENCE_CALL_BOOL} is {@code true}.
+     * @hide
+     */
+    public static final String KEY_SUPPORT_VIDEO_CONFERENCE_CALL_BOOL =
+            "support_video_conference_call_bool";
+
+    /**
      * Determine whether user can toggle Enhanced 4G LTE Mode in Settings.
      */
     public static final String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool";
@@ -582,6 +593,14 @@
     public static final String KEY_WFC_DATA_SPN_FORMAT_IDX_INT = "wfc_data_spn_format_idx_int";
 
     /**
+     * The Component Name of the activity that can setup the emergency addrees for WiFi Calling
+     * as per carrier requirement.
+     * @hide
+     */
+     public static final String KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING =
+            "wfc_emergency_address_carrier_app_string";
+
+    /**
      * Boolean to decide whether to use #KEY_CARRIER_NAME_STRING from CarrierConfig app.
      * @hide
      */
@@ -594,7 +613,6 @@
      */
     public static final String KEY_CARRIER_NAME_STRING = "carrier_name_string";
 
-
     /**
      * If this is true, the SIM card (through Customer Service Profile EF file) will be able to
      * prevent manual operator selection. If false, this SIM setting will be ignored and manual
@@ -615,6 +633,13 @@
     public static final String KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL =
             "broadcast_emergency_call_state_changes_bool";
 
+    /**
+     * Cell broadcast additional channels enbled by the carrier
+     * @hide
+     */
+    public static final String KEY_CARRIER_ADDITIONAL_CBS_CHANNELS_STRINGS =
+            "carrier_additional_cbs_channels_strings";
+
     // These variables are used by the MMS service and exposed through another API, {@link
     // SmsManager}. The variable names and string values are copied from there.
     public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
@@ -658,10 +683,44 @@
      * example:
      * <item>com.google.android.carrierPackageName</item>
      * <item>com.google.android.carrierPackageName.CarrierActivityName</item>
+     * The ComponentName of the carrier activity that can setup the device and activate with the
+     * network as part of the Setup Wizard flow.
      * @hide
      */
-     public static final String KEY_SIM_PROVISIONING_STATUS_DETECTION_CARRIER_APP_STRING_ARRAY =
-            "sim_state_detection_carrier_app_string_array";
+     public static final String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string";
+
+    /**
+     * A list of component name of carrier signalling receivers which are interested in intent
+     * android.intent.action.CARRIER_SIGNAL_REDIRECTED.
+     * Example:
+     * <item>com.google.android.carrierPackageName/.CarrierSignalReceiverNameA</item>
+     * <item>com.google.android.carrierPackageName/.CarrierSignalReceiverNameB</item>
+     * @hide
+     */
+    public static final String KEY_SIGNAL_REDIRECTION_RECEIVER_STRING_ARRAY =
+            "signal_redirection_receiver_string_array";
+
+    /**
+     * A list of component name of carrier signalling receivers which are interested in intent
+     * android.intent.action.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED.
+     * Example:
+     * <item>com.google.android.carrierPackageName/.CarrierSignalReceiverNameA</item>
+     * <item>com.google.android.carrierPackageName/.CarrierSignalReceiverNameB</item>
+     * @hide
+     */
+    public static final String KEY_SIGNAL_DCFAILURE_RECEIVER_STRING_ARRAY =
+            "signal_dcfailure_receiver_string_array";
+
+    /**
+     * A list of component name of carrier signalling receivers which are interested in intent
+     * android.intent.action.CARRIER_SIGNAL_PCO_VALUE.
+     * Example:
+     * <item>com.google.android.carrierPackageName/.CarrierSignalReceiverNameA</item>
+     * <item>com.google.android.carrierPackageName/.CarrierSignalReceiverNameB</item>
+     * @hide
+     */
+    public static final String KEY_SIGNAL_PCO_RECEIVER_STRING_ARRAY =
+            "signal_pco_receiver_string_array";
 
     /**
      * Determines whether the carrier supports making non-emergency phone calls while the phone is
@@ -718,6 +777,55 @@
     /** @hide */
     public static final int CDMA_ROAMING_MODE_ANY = 2;
 
+    /**
+     * The families of Radio Access Technologies that will get clustered and ratcheted,
+     * ie, we will report transitions up within the family, but not down until we change
+     * cells.  This prevents flapping between base technologies and higher techs that are
+     * granted on demand within the cell.
+     * @hide
+     */
+    public static final String KEY_RATCHET_RAT_FAMILIES =
+            "ratchet_rat_families";
+
+    /**
+     * Flag indicating whether some telephony logic will treat a call which was formerly a video
+     * call as if it is still a video call.  When {@code true}:
+     * <p>
+     * Logic which will automatically drop a video call which takes place over WIFI when a
+     * voice call is answered (see {@link #KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL}.
+     * <p>
+     * Logic which determines whether the user can use TTY calling.
+     */
+    public static final String KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL =
+            "treat_downgraded_video_calls_as_video_calls_bool";
+
+    /**
+     * When {@code true}, if the user is in an ongoing video call over WIFI and answers an incoming
+     * audio call, the video call will be disconnected before the audio call is answered.  This is
+     * in contrast to the usual expected behavior where a foreground video call would be put into
+     * the background and held when an incoming audio call is answered.
+     */
+    public static final String KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL =
+            "drop_video_call_when_answering_audio_call_bool";
+
+    /**
+     * Flag indicating whether the carrier supports merging wifi calls when VoWIFI is disabled.
+     * This can happen in the case of a carrier which allows offloading video calls to WIFI
+     * separately of whether voice over wifi is enabled.  In such a scenario when two video calls
+     * are downgraded to voice, they remain over wifi.  However, if VoWIFI is disabled, these calls
+     * cannot be merged.
+     */
+    public static final String KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL =
+            "allow_merge_wifi_calls_when_vowifi_off_bool";
+
+    /**
+     * When true, indicates that adding a call is disabled when there is an ongoing video call
+     * or when there is an ongoing call on wifi which was downgraded from video and VoWifi is
+     * turned off.
+     */
+    public static final String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL =
+            "allow_add_call_during_video_call";
+
     /** The default value for every variable. */
     private final static PersistableBundle sDefaults;
 
@@ -808,6 +916,7 @@
         sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0);
         sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100);
         sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true);
+        sDefaults.putBoolean(KEY_SUPPORT_VIDEO_CONFERENCE_CALL_BOOL, false);
         sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true);
         sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false);
         sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false);
@@ -816,6 +925,7 @@
         sDefaults.putStringArray(KEY_WFC_OPERATOR_ERROR_CODES_STRING_ARRAY, null);
         sDefaults.putInt(KEY_WFC_SPN_FORMAT_IDX_INT, 0);
         sDefaults.putInt(KEY_WFC_DATA_SPN_FORMAT_IDX_INT, 0);
+        sDefaults.putString(KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING, "");
         sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false);
         sDefaults.putBoolean(KEY_CARRIER_NAME_OVERRIDE_BOOL, false);
         sDefaults.putString(KEY_CARRIER_NAME_STRING, "");
@@ -856,9 +966,21 @@
         sDefaults.putBoolean(KEY_USE_RCS_PRESENCE_BOOL, false);
         sDefaults.putInt(KEY_CDMA_ROAMING_MODE_INT, CDMA_ROAMING_MODE_RADIO_DEFAULT);
 
-        // Used for Sim card State detection app
-        sDefaults.putStringArray(KEY_SIM_PROVISIONING_STATUS_DETECTION_CARRIER_APP_STRING_ARRAY,
-                null);
+        // Carrier Signalling Receivers
+        sDefaults.putStringArray(KEY_SIGNAL_REDIRECTION_RECEIVER_STRING_ARRAY, null);
+        sDefaults.putStringArray(KEY_SIGNAL_DCFAILURE_RECEIVER_STRING_ARRAY, null);
+        sDefaults.putStringArray(KEY_SIGNAL_PCO_RECEIVER_STRING_ARRAY, null);
+        sDefaults.putString(KEY_CARRIER_SETUP_APP_STRING, "");
+
+        // Rat families: {GPRS, EDGE}, {EVDO, EVDO_A, EVDO_B}, {UMTS, HSPA, HSDPA, HSUPA, HSPAP},
+        // {LTE, LTE_CA}
+        // Order is important - lowest precidence first
+        sDefaults.putStringArray(KEY_RATCHET_RAT_FAMILIES,
+                new String[]{"1,2","7,8,12","3,11,9,10,15","14,19"});
+        sDefaults.putBoolean(KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL, false);
+        sDefaults.putBoolean(KEY_DROP_VIDEO_CALL_WHEN_ANSWERING_AUDIO_CALL_BOOL, false);
+        sDefaults.putBoolean(KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL, true);
+        sDefaults.putBoolean(KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL, true);
     }
 
     /**
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 9eb1304..80ae4af 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -194,6 +194,18 @@
      */
     public static final int VIDEO_CALL_NOT_ALLOWED_WHILE_TTY_ENABLED = 50;
 
+    /**
+     * The call was terminated because it was pulled to another device.
+     * {@hide}
+     */
+    public static final int CALL_PULLED = 51;
+
+    /**
+     * The call was terminated because it was answered on another device.
+     * {@hide}
+     */
+    public static final int ANSWERED_ELSEWHERE = 52;
+
     //*********************************************************************************************
     // When adding a disconnect type:
     // 1) Please assign the new type the next id value below.
@@ -202,14 +214,14 @@
     // 4) Update toString() with the newly added disconnect type.
     // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
     //
-    // NextId: 50
+    // NextId: 53
     //*********************************************************************************************
 
     /** Smallest valid value for call disconnect codes. */
     public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
 
     /** Largest valid value for call disconnect codes. */
-    public static final int MAXIMUM_VALID_VALUE = VIDEO_CALL_NOT_ALLOWED_WHILE_TTY_ENABLED;
+    public static final int MAXIMUM_VALID_VALUE = ANSWERED_ELSEWHERE;
 
     /** Private constructor to avoid class instantiation. */
     private DisconnectCause() {
@@ -318,7 +330,11 @@
         case CDMA_ALREADY_ACTIVATED:
             return "CDMA_ALREADY_ACTIVATED";
         case VIDEO_CALL_NOT_ALLOWED_WHILE_TTY_ENABLED:
-                return "VIDEO_CALL_NOT_ALLOWED_WHILE_TTY_ENABLED";
+            return "VIDEO_CALL_NOT_ALLOWED_WHILE_TTY_ENABLED";
+        case CALL_PULLED:
+            return "CALL_PULLED";
+        case ANSWERED_ELSEWHERE:
+            return "ANSWERED_ELSEWHERE";
         default:
             return "INVALID: " + cause;
         }
diff --git a/telephony/java/android/telephony/PcoData.aidl b/telephony/java/android/telephony/PcoData.aidl
new file mode 100644
index 0000000..a93b8d3
--- /dev/null
+++ b/telephony/java/android/telephony/PcoData.aidl
@@ -0,0 +1,21 @@
+/*
+**
+** Copyright (C) 2016 The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.telephony;
+
+parcelable PcoData;
+
diff --git a/telephony/java/android/telephony/PcoData.java b/telephony/java/android/telephony/PcoData.java
new file mode 100644
index 0000000..3e735e7
--- /dev/null
+++ b/telephony/java/android/telephony/PcoData.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Contains Carrier-specific (and opaque) Protocol configuration Option
+ * Data.  In general this is only passed on to carrier-specific applications
+ * for interpretation.
+ *
+ * @hide
+ */
+public class PcoData implements Parcelable {
+
+    public final int cid;
+    public final String bearerProto;
+    public final int pcoId;
+    public final byte[] contents;
+
+    public PcoData(int cid, String bearerProto, int pcoId, byte[]contents) {
+        this.cid = cid;
+        this.bearerProto = bearerProto;
+        this.pcoId = pcoId;
+        this.contents = contents;
+    }
+
+    public PcoData(Parcel in) {
+        cid = in.readInt();
+        bearerProto = in.readString();
+        pcoId = in.readInt();
+        contents = in.createByteArray();
+    }
+
+    /**
+     * {@link Parcelable#writeToParcel}
+     */
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeInt(cid);
+        out.writeString(bearerProto);
+        out.writeInt(pcoId);
+        out.writeByteArray(contents);
+    }
+
+    /**
+     * {@link Parcelable#describeContents}
+     */
+    public int describeContents() {
+        return 0;
+    }
+
+    /**
+     * {@link Parcelable.Creator}
+     *
+     * @hide
+     */
+    public static final Parcelable.Creator<PcoData> CREATOR = new Parcelable.Creator() {
+        public PcoData createFromParcel(Parcel in) {
+            return new PcoData(in);
+        }
+
+        public PcoData[] newArray(int size) {
+            return new PcoData[size];
+        }
+    };
+
+    @Override
+    public String toString() {
+        return "PcoData(" + cid + ", " + bearerProto + ", " + pcoId + ", contents[" +
+                contents.length + "])";
+    }
+}
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index 962a600..03d6d21 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -30,6 +30,7 @@
 import android.os.SystemProperties;
 import android.provider.Contacts;
 import android.provider.ContactsContract;
+import android.telecom.PhoneAccount;
 import android.text.Editable;
 import android.text.Spannable;
 import android.text.SpannableStringBuilder;
@@ -2599,6 +2600,48 @@
     }
 
     /**
+     * Given a {@link Uri} with a {@code sip} scheme, attempts to build an equivalent {@code tel}
+     * scheme {@link Uri}.  If the source {@link Uri} does not contain a valid number, or is not
+     * using the {@code sip} scheme, the original {@link Uri} is returned.
+     *
+     * @param source The {@link Uri} to convert.
+     * @return The equivalent {@code tel} scheme {@link Uri}.
+     *
+     * @hide
+     */
+    public static Uri convertSipUriToTelUri(Uri source) {
+        // A valid SIP uri has the format: sip:user:password@host:port;uri-parameters?headers
+        // Per RFC3261, the "user" can be a telephone number.
+        // For example: sip:1650555121;phone-context=blah.com@host.com
+        // In this case, the phone number is in the user field of the URI, and the parameters can be
+        // ignored.
+        //
+        // A SIP URI can also specify a phone number in a format similar to:
+        // sip:+1-212-555-1212@something.com;user=phone
+        // In this case, the phone number is again in user field and the parameters can be ignored.
+        // We can get the user field in these instances by splitting the string on the @, ;, or :
+        // and looking at the first found item.
+
+        String scheme = source.getScheme();
+
+        if (!PhoneAccount.SCHEME_SIP.equals(scheme)) {
+            // Not a sip URI, bail.
+            return source;
+        }
+
+        String number = source.getSchemeSpecificPart();
+        String numberParts[] = number.split("[@;:]");
+
+        if (numberParts.length == 0) {
+            // Number not found, bail.
+            return source;
+        }
+        number = numberParts[0];
+
+        return Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null);
+    }
+
+    /**
      * This function handles the plus code conversion
      * If the number format is
      * 1)+1NANP,remove +,
diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java
index 2bfaf1b..b530a64 100644
--- a/telephony/java/android/telephony/RadioAccessFamily.java
+++ b/telephony/java/android/telephony/RadioAccessFamily.java
@@ -47,6 +47,7 @@
     public static final int RAF_HSPAP = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP);
     public static final int RAF_GSM = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_GSM);
     public static final int RAF_TD_SCDMA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA);
+    public static final int RAF_LTE_CA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA);
 
     // Grouping of RAFs
     private static final int GSM = RAF_GSM | RAF_GPRS | RAF_EDGE;
@@ -54,6 +55,7 @@
     private static final int CDMA = RAF_IS95A | RAF_IS95B | RAF_1xRTT;
     private static final int EVDO = RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B | RAF_EHRPD;
     private static final int WCDMA = HS | RAF_UMTS;
+    private static final int LTE = RAF_LTE | RAF_LTE_CA;
 
     /* Phone ID of phone */
     private int mPhoneId;
@@ -162,19 +164,19 @@
                 raf = CDMA | EVDO;
                 break;
             case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO:
-                raf = RAF_LTE | CDMA | EVDO;
+                raf = LTE | CDMA | EVDO;
                 break;
             case RILConstants.NETWORK_MODE_LTE_GSM_WCDMA:
-                raf = RAF_LTE | GSM | WCDMA;
+                raf = LTE | GSM | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
-                raf = RAF_LTE | CDMA | EVDO | GSM | WCDMA;
+                raf = LTE | CDMA | EVDO | GSM | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_LTE_ONLY:
-                raf = RAF_LTE;
+                raf = LTE;
                 break;
             case RILConstants.NETWORK_MODE_LTE_WCDMA:
-                raf = RAF_LTE | WCDMA;
+                raf = LTE | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_CDMA_NO_EVDO:
                 raf = CDMA;
@@ -192,28 +194,28 @@
                 raf = RAF_TD_SCDMA | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_LTE_TDSCDMA:
-                raf = RAF_LTE | RAF_TD_SCDMA;
+                raf = LTE | RAF_TD_SCDMA;
                 break;
             case RILConstants.NETWORK_MODE_TDSCDMA_GSM:
                 raf = RAF_TD_SCDMA | GSM;
                 break;
             case RILConstants.NETWORK_MODE_LTE_TDSCDMA_GSM:
-                raf = RAF_LTE | RAF_TD_SCDMA | GSM;
+                raf = LTE | RAF_TD_SCDMA | GSM;
                 break;
             case RILConstants.NETWORK_MODE_TDSCDMA_GSM_WCDMA:
                 raf = RAF_TD_SCDMA | GSM | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_LTE_TDSCDMA_WCDMA:
-                raf = RAF_LTE | RAF_TD_SCDMA | WCDMA;
+                raf = LTE | RAF_TD_SCDMA | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA:
-                raf = RAF_LTE | RAF_TD_SCDMA | GSM | WCDMA;
+                raf = LTE | RAF_TD_SCDMA | GSM | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
                 raf = RAF_TD_SCDMA | CDMA | EVDO | GSM | WCDMA;
                 break;
             case RILConstants.NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-                raf = RAF_LTE | RAF_TD_SCDMA | CDMA | EVDO | GSM | WCDMA;
+                raf = LTE | RAF_TD_SCDMA | CDMA | EVDO | GSM | WCDMA;
                 break;
             default:
                 raf = RAF_UNKNOWN;
@@ -232,6 +234,7 @@
         raf = ((WCDMA & raf) > 0) ? (WCDMA | raf) : raf;
         raf = ((CDMA & raf) > 0) ? (CDMA | raf) : raf;
         raf = ((EVDO & raf) > 0) ? (EVDO | raf) : raf;
+        raf = ((LTE & raf) > 0) ? (LTE | raf) : raf;
 
         return raf;
     }
@@ -254,19 +257,19 @@
             case (CDMA | EVDO):
                 type = RILConstants.NETWORK_MODE_CDMA;
                 break;
-            case (RAF_LTE | CDMA | EVDO):
+            case (LTE | CDMA | EVDO):
                 type = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO;
                 break;
-            case (RAF_LTE | GSM | WCDMA):
+            case (LTE | GSM | WCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_GSM_WCDMA;
                 break;
-            case (RAF_LTE | CDMA | EVDO | GSM | WCDMA):
+            case (LTE | CDMA | EVDO | GSM | WCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA;
                 break;
-            case RAF_LTE:
+            case LTE:
                 type = RILConstants.NETWORK_MODE_LTE_ONLY;
                 break;
-            case (RAF_LTE | WCDMA):
+            case (LTE | WCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_WCDMA;
                 break;
             case CDMA:
@@ -284,28 +287,28 @@
             case (RAF_TD_SCDMA | WCDMA):
                 type = RILConstants.NETWORK_MODE_TDSCDMA_WCDMA;
                 break;
-            case (RAF_LTE | RAF_TD_SCDMA):
+            case (LTE | RAF_TD_SCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_TDSCDMA;
                 break;
             case (RAF_TD_SCDMA | GSM):
                 type = RILConstants.NETWORK_MODE_TDSCDMA_GSM;
                 break;
-            case (RAF_LTE | RAF_TD_SCDMA | GSM):
+            case (LTE | RAF_TD_SCDMA | GSM):
                 type = RILConstants.NETWORK_MODE_LTE_TDSCDMA_GSM;
                 break;
             case (RAF_TD_SCDMA | GSM | WCDMA):
                 type = RILConstants.NETWORK_MODE_TDSCDMA_GSM_WCDMA;
                 break;
-            case (RAF_LTE | RAF_TD_SCDMA | WCDMA):
+            case (LTE | RAF_TD_SCDMA | WCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_TDSCDMA_WCDMA;
                 break;
-            case (RAF_LTE | RAF_TD_SCDMA | GSM | WCDMA):
+            case (LTE | RAF_TD_SCDMA | GSM | WCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA;
                 break;
             case (RAF_TD_SCDMA | CDMA | EVDO | GSM | WCDMA):
                 type = RILConstants.NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA;
                 break;
-            case (RAF_LTE | RAF_TD_SCDMA | RAF_LTE | CDMA | EVDO | GSM | WCDMA):
+            case (LTE | RAF_TD_SCDMA | CDMA | EVDO | GSM | WCDMA):
                 type = RILConstants.NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA;
                 break;
             default:
@@ -339,6 +342,7 @@
             case "CDMA":    return CDMA;
             case "EVDO":    return EVDO;
             case "WCDMA":   return WCDMA;
+            case "LTE_CA":  return RAF_LTE_CA;
             default:        return RAF_UNKNOWN;
         }
     }
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 39a9295..8446dd0 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -155,6 +155,12 @@
      */
     public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18;
 
+    /**
+     * LTE_CA
+     * @hide
+     */
+    public static final int RIL_RADIO_TECHNOLOGY_LTE_CA = 19;
+
     /** @hide */
     public static final int RIL_RADIO_CDMA_TECHNOLOGY_BITMASK =
             (1 << (RIL_RADIO_TECHNOLOGY_IS95A - 1))
@@ -746,6 +752,9 @@
             case RIL_RADIO_TECHNOLOGY_TD_SCDMA:
                 rtString = "TD-SCDMA";
                 break;
+            case RIL_RADIO_TECHNOLOGY_LTE_CA:
+                rtString = "LTE_CA";
+                break;
             default:
                 rtString = "Unexpected";
                 Rlog.w(LOG_TAG, "Unexpected radioTechnology=" + rt);
@@ -1088,6 +1097,8 @@
             return TelephonyManager.NETWORK_TYPE_TD_SCDMA;
         case ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN:
             return TelephonyManager.NETWORK_TYPE_IWLAN;
+        case ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA:
+            return TelephonyManager.NETWORK_TYPE_LTE_CA;
         default:
             return TelephonyManager.NETWORK_TYPE_UNKNOWN;
         }
@@ -1139,7 +1150,9 @@
                 || radioTechnology == RIL_RADIO_TECHNOLOGY_HSPAP
                 || radioTechnology == RIL_RADIO_TECHNOLOGY_GSM
                 || radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA
-                || radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN;
+                || radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN
+                || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA;
+
     }
 
     /** @hide */
@@ -1154,6 +1167,12 @@
     }
 
     /** @hide */
+    public static boolean isLte(int radioTechnology) {
+        return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE ||
+                radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA;
+    }
+
+    /** @hide */
     public static boolean bearerBitmapHasCdma(int radioTechnologyBitmap) {
         return (RIL_RADIO_CDMA_TECHNOLOGY_BITMASK & radioTechnologyBitmap) != 0;
     }
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index b5cf212e..6229ed9 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -90,14 +90,6 @@
     private int mDataRoaming;
 
     /**
-     * Sim Provisioning Status:
-     * {@See SubscriptionManager#SIM_PROVISIONED}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_COLD}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_OUT_OF_CREDIT}
-     */
-    private int mSimProvisioningStatus;
-
-    /**
      * SIM Icon bitmap
      */
     private Bitmap mIconBitmap;
@@ -122,7 +114,7 @@
      */
     public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName,
             CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
-            Bitmap icon, int mcc, int mnc, String countryIso, int simProvisioningStatus) {
+            Bitmap icon, int mcc, int mnc, String countryIso) {
         this.mId = id;
         this.mIccId = iccId;
         this.mSimSlotIndex = simSlotIndex;
@@ -136,7 +128,6 @@
         this.mMcc = mcc;
         this.mMnc = mnc;
         this.mCountryIso = countryIso;
-        this.mSimProvisioningStatus = simProvisioningStatus;
     }
 
     /**
@@ -273,17 +264,6 @@
     }
 
     /**
-     * @return Sim Provisioning Status
-     * {@See SubscriptionManager#SIM_PROVISIONED}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_COLD}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_OUT_OF_CREDIT}
-     * @hide
-     */
-    public int getSimProvisioningStatus() {
-        return this.mSimProvisioningStatus;
-    }
-
-    /**
      * @return the MCC.
      */
     public int getMcc() {
@@ -319,12 +299,10 @@
             int mcc = source.readInt();
             int mnc = source.readInt();
             String countryIso = source.readString();
-            int simProvisioningStatus = source.readInt();
             Bitmap iconBitmap = Bitmap.CREATOR.createFromParcel(source);
 
             return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName,
-                    nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso,
-                    simProvisioningStatus);
+                    nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso);
         }
 
         @Override
@@ -347,7 +325,6 @@
         dest.writeInt(mMcc);
         dest.writeInt(mMnc);
         dest.writeString(mCountryIso);
-        dest.writeInt(mSimProvisioningStatus);
         mIconBitmap.writeToParcel(dest, flags);
     }
 
@@ -378,6 +355,6 @@
                 + " displayName=" + mDisplayName + " carrierName=" + mCarrierName
                 + " nameSource=" + mNameSource + " iconTint=" + mIconTint
                 + " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc
-                + " mnc " + mMnc + " SimProvisioningStatus " + mSimProvisioningStatus +"}";
+                + " mnc " + mMnc + "}";
     }
 }
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index c49966a..dd6f9cb 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -232,25 +232,12 @@
     /** Indicates that data roaming is disabled for a subscription */
     public static final int DATA_ROAMING_DISABLE = 0;
 
-    /** Sim provisioning status: provisioned */
-    /** @hide */
-    public static final int SIM_PROVISIONED = 0;
-
-    /** Sim provisioning status: un-provisioned due to cold sim */
-    /** @hide */
-    public static final int SIM_UNPROVISIONED_COLD = 1;
-
-    /** Sim provisioning status: un-provisioned due to out of credit */
-    /** @hide */
-    public static final int SIM_UNPROVISIONED_OUT_OF_CREDIT = 2;
-
-    /** Maximum possible sim provisioning status */
-    /** @hide */
-    public static final int MAX_SIM_PROVISIONING_STATUS = SIM_UNPROVISIONED_OUT_OF_CREDIT;
-
     /** @hide */
     public static final int DATA_ROAMING_DEFAULT = DATA_ROAMING_DISABLE;
 
+    /** @hide */
+    public static final int SIM_PROVISIONED = 0;
+
     /**
      * TelephonyProvider column name for the MCC associated with a SIM.
      * <P>Type: INTEGER (int)</P>
@@ -843,40 +830,6 @@
     }
 
     /**
-     * Set Sim Provisioning Status by subscription ID
-     * @param simProvisioningStatus with the subscription
-     * {@See SubscriptionManager#SIM_PROVISIONED}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_COLD}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_OUT_OF_CREDIT}
-     * @param subId the unique SubInfoRecord index in database
-     * @return the number of records updated
-     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
-     * @hide
-     */
-    public int setSimProvisioningStatus(int simProvisioningStatus, int subId) {
-        if (VDBG) {
-            logd("[setSimProvisioningStatus]+ status:" + simProvisioningStatus + " subId:" + subId);
-        }
-        if (simProvisioningStatus < 0 || simProvisioningStatus > MAX_SIM_PROVISIONING_STATUS ||
-                !isValidSubscriptionId(subId)) {
-            logd("[setSimProvisioningStatus]- fail");
-            return -1;
-        }
-
-        int result = 0;
-
-        try {
-            ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
-            if (iSub != null) {
-                result = iSub.setSimProvisioningStatus(simProvisioningStatus, subId);
-            }
-        } catch (RemoteException ex) {
-            // ignore it
-        }
-        return result;
-    }
-
-    /**
      * Get slotId associated with the subscription.
      * @return slotId as a positive integer or a negative value if an error either
      * SIM_NOT_INSERTED or < 0 if an invalid slot index
diff --git a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl b/telephony/java/android/telephony/TelephonyHistogram.aidl
similarity index 74%
copy from telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
copy to telephony/java/android/telephony/TelephonyHistogram.aidl
index b7e78d1..8de81cf 100644
--- a/telecomm/java/android/telecom/ParcelableCallAnalytics.aidl
+++ b/telephony/java/android/telephony/TelephonyHistogram.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright 2016, The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,10 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-package android.telecom;
-
+package android.telephony;
 /**
- * {@hide}
+ * @hide
  */
-parcelable ParcelableCallAnalytics;
+parcelable TelephonyHistogram;
diff --git a/telephony/java/android/telephony/TelephonyHistogram.java b/telephony/java/android/telephony/TelephonyHistogram.java
new file mode 100644
index 0000000..e1c3d7b
--- /dev/null
+++ b/telephony/java/android/telephony/TelephonyHistogram.java
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony;
+
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Parcelable class to store Telephony histogram.
+ * @hide
+ */
+@SystemApi
+public final class TelephonyHistogram implements Parcelable {
+    // Type of Telephony histogram Eg: RIL histogram will have all timing data associated with
+    // RIL calls. Similarly we can have any other Telephony histogram.
+    private final int mCategory;
+
+    // Unique Id identifying a sample within particular category of histogram
+    private final int mId;
+
+    // Min time taken in ms
+    private int mMinTimeMs;
+
+    // Max time taken in ms
+    private int mMaxTimeMs;
+
+    // Average time taken in ms
+    private int mAverageTimeMs;
+
+    // Total count of samples
+    private int mSampleCount;
+
+    // Array storing time taken for first #RANGE_CALCULATION_COUNT samples of histogram.
+    private int[] mInitialTimings;
+
+    // Total number of time ranges expected (must be greater than 1)
+    private final int mBucketCount;
+
+    // Array storing endpoints of range buckets. Calculated based on values of minTime & maxTime
+    // after totalTimeCount is #RANGE_CALCULATION_COUNT.
+    private final int[] mBucketEndPoints;
+
+    // Array storing counts for each time range starting from smallest value range
+    private final int[] mBucketCounters;
+
+    /**
+     * Constant for Telephony category
+     */
+    public static final int TELEPHONY_CATEGORY_RIL = 1;
+
+    // Count of Histogram samples after which time buckets are created.
+    private static final int RANGE_CALCULATION_COUNT = 10;
+
+
+    // Constant used to indicate #initialTimings is null while parceling
+    private static final int ABSENT = 0;
+
+    // Constant used to indicate #initialTimings is not null while parceling
+    private static final int PRESENT = 1;
+
+    // Throws exception if #totalBuckets is not greater than one.
+    public TelephonyHistogram (int category, int id, int bucketCount) {
+        if (bucketCount <= 1) {
+            throw new IllegalArgumentException("Invalid number of buckets");
+        }
+        mCategory = category;
+        mId = id;
+        mMinTimeMs = Integer.MAX_VALUE;
+        mMaxTimeMs = 0;
+        mAverageTimeMs = 0;
+        mSampleCount = 0;
+        mInitialTimings = new int[RANGE_CALCULATION_COUNT];
+        mBucketCount = bucketCount;
+        mBucketEndPoints = new int[bucketCount - 1];
+        mBucketCounters = new int[bucketCount];
+    }
+
+    public TelephonyHistogram(TelephonyHistogram th) {
+        mCategory = th.getCategory();
+        mId = th.getId();
+        mMinTimeMs = th.getMinTime();
+        mMaxTimeMs = th.getMaxTime();
+        mAverageTimeMs = th.getAverageTime();
+        mSampleCount = th.getSampleCount();
+        mInitialTimings = th.getInitialTimings();
+        mBucketCount = th.getBucketCount();
+        mBucketEndPoints = th.getBucketEndPoints();
+        mBucketCounters = th.getBucketCounters();
+    }
+
+    public int getCategory() {
+        return mCategory;
+    }
+
+    public int getId() {
+        return mId;
+    }
+
+    public int getMinTime() {
+        return mMinTimeMs;
+    }
+
+    public int getMaxTime() {
+        return mMaxTimeMs;
+    }
+
+    public int getAverageTime() {
+        return mAverageTimeMs;
+    }
+
+    public int getSampleCount () {
+        return mSampleCount;
+    }
+
+    private int[] getInitialTimings() {
+        return mInitialTimings;
+    }
+
+    public int getBucketCount() {
+        return mBucketCount;
+    }
+
+    public int[] getBucketEndPoints() {
+        if (mSampleCount > 1 && mSampleCount < 10) {
+            int[] tempEndPoints = new int[mBucketCount - 1];
+            calculateBucketEndPoints(tempEndPoints);
+            return tempEndPoints;
+        } else {
+            return getDeepCopyOfArray(mBucketEndPoints);
+        }
+    }
+
+    public int[] getBucketCounters() {
+        if (mSampleCount > 1 && mSampleCount < 10) {
+            int[] tempEndPoints = new int[mBucketCount - 1];
+            int[] tempBucketCounters = new int[mBucketCount];
+            calculateBucketEndPoints(tempEndPoints);
+            for (int j = 0; j < mSampleCount; j++) {
+                addToBucketCounter(tempEndPoints, tempBucketCounters, mInitialTimings[j]);
+            }
+            return tempBucketCounters;
+        } else {
+            return getDeepCopyOfArray(mBucketCounters);
+        }
+    }
+
+    private int[] getDeepCopyOfArray(int[] array) {
+        int[] clone = new int[array.length];
+        System.arraycopy(array, 0, clone, 0, array.length);
+        return clone;
+    }
+
+    private void addToBucketCounter(int[] bucketEndPoints, int[] bucketCounters, int time) {
+        int i;
+        for (i = 0; i < bucketEndPoints.length; i++) {
+            if (time <= bucketEndPoints[i]) {
+                bucketCounters[i]++;
+                return;
+            }
+        }
+        bucketCounters[i]++;
+    }
+
+    private void calculateBucketEndPoints(int[] bucketEndPoints) {
+        for (int i = 1; i < mBucketCount; i++) {
+            int endPt = mMinTimeMs + (i * (mMaxTimeMs - mMinTimeMs)) / mBucketCount;
+            bucketEndPoints[i - 1] = endPt;
+        }
+    }
+
+    // Add new value of time taken
+    // This function updates minTime, maxTime, averageTime & totalTimeCount every time it is
+    // called. initialTimings[] is updated if totalTimeCount <= #RANGE_CALCULATION_COUNT. When
+    // totalTimeCount = RANGE_CALCULATION_COUNT, based on the min, max time & the number of buckets
+    // expected, bucketEndPoints[] would be calculated. Then bucketCounters[] would be filled up
+    // using values stored in initialTimings[]. Thereafter bucketCounters[] will always be updated.
+    public void addTimeTaken(int time) {
+        // Initialize all fields if its first entry or if integer overflow is going to occur while
+        // trying to calculate averageTime
+        if (mSampleCount == 0 || (mSampleCount == Integer.MAX_VALUE)) {
+            if (mSampleCount == 0) {
+                mMinTimeMs = time;
+                mMaxTimeMs = time;
+                mAverageTimeMs = time;
+            } else {
+                mInitialTimings = new int[RANGE_CALCULATION_COUNT];
+            }
+            mSampleCount = 1;
+            Arrays.fill(mInitialTimings, 0);
+            mInitialTimings[0] = time;
+            Arrays.fill(mBucketEndPoints, 0);
+            Arrays.fill(mBucketCounters, 0);
+        } else {
+            if (time < mMinTimeMs) {
+                mMinTimeMs = time;
+            }
+            if (time > mMaxTimeMs) {
+                mMaxTimeMs = time;
+            }
+            long totalTime = ((long)mAverageTimeMs) * mSampleCount + time;
+            mAverageTimeMs = (int)(totalTime/++mSampleCount);
+
+            if (mSampleCount < RANGE_CALCULATION_COUNT) {
+                mInitialTimings[mSampleCount - 1] = time;
+            } else if (mSampleCount == RANGE_CALCULATION_COUNT) {
+                mInitialTimings[mSampleCount - 1] = time;
+
+                // Calculate bucket endpoints based on bucketCount expected
+                calculateBucketEndPoints(mBucketEndPoints);
+
+                // Use values stored in initialTimings[] to update bucketCounters
+                for (int j = 0; j < RANGE_CALCULATION_COUNT; j++) {
+                    addToBucketCounter(mBucketEndPoints, mBucketCounters, mInitialTimings[j]);
+                }
+                mInitialTimings = null;
+            } else {
+                addToBucketCounter(mBucketEndPoints, mBucketCounters, time);
+            }
+
+        }
+    }
+
+    public String toString() {
+        String basic = " Histogram id = " + mId + " Time(ms): min = " + mMinTimeMs + " max = "
+                + mMaxTimeMs + " avg = " + mAverageTimeMs + " Count = " + mSampleCount;
+        if (mSampleCount < RANGE_CALCULATION_COUNT) {
+            return basic;
+        } else {
+            StringBuffer intervals = new StringBuffer(" Interval Endpoints:");
+            for (int i = 0; i < mBucketEndPoints.length; i++) {
+                intervals.append(" " + mBucketEndPoints[i]);
+            }
+            intervals.append(" Interval counters:");
+            for (int i = 0; i < mBucketCounters.length; i++) {
+                intervals.append(" " + mBucketCounters[i]);
+            }
+            return basic + intervals;
+        }
+    }
+
+    public static final Parcelable.Creator<TelephonyHistogram> CREATOR =
+            new Parcelable.Creator<TelephonyHistogram> () {
+
+                @Override
+                public TelephonyHistogram createFromParcel(Parcel in) {
+                    return new TelephonyHistogram(in);
+                }
+
+                @Override
+                public TelephonyHistogram[] newArray(int size) {
+                    return new TelephonyHistogram[size];
+                }
+            };
+
+    public TelephonyHistogram(Parcel in) {
+        mCategory = in.readInt();
+        mId = in.readInt();
+        mMinTimeMs = in.readInt();
+        mMaxTimeMs = in.readInt();
+        mAverageTimeMs = in.readInt();
+        mSampleCount = in.readInt();
+        if (in.readInt() == PRESENT) {
+            mInitialTimings = new int[RANGE_CALCULATION_COUNT];
+            in.readIntArray(mInitialTimings);
+        }
+        mBucketCount = in.readInt();
+        mBucketEndPoints = new int[mBucketCount - 1];
+        in.readIntArray(mBucketEndPoints);
+        mBucketCounters = new int[mBucketCount];
+        in.readIntArray(mBucketCounters);
+    }
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeInt(mCategory);
+        out.writeInt(mId);
+        out.writeInt(mMinTimeMs);
+        out.writeInt(mMaxTimeMs);
+        out.writeInt(mAverageTimeMs);
+        out.writeInt(mSampleCount);
+        if (mInitialTimings == null) {
+            out.writeInt(ABSENT);
+        } else {
+            out.writeInt(PRESENT);
+            out.writeIntArray(mInitialTimings);
+        }
+        out.writeInt(mBucketCount);
+        out.writeIntArray(mBucketEndPoints);
+        out.writeIntArray(mBucketCounters);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 2304346..26ef0cb 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -34,8 +34,10 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.SystemProperties;
+import android.service.carrier.CarrierIdentifier;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
+import android.telephony.TelephonyHistogram;
 import android.util.Log;
 
 import com.android.internal.telecom.ITelecomService;
@@ -50,6 +52,7 @@
 
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.regex.Matcher;
@@ -1442,13 +1445,14 @@
     public static final int NETWORK_TYPE_EHRPD = 14;
     /** Current network is HSPA+ */
     public static final int NETWORK_TYPE_HSPAP = 15;
-    /** Current network is GSM {@hide} */
+    /** Current network is GSM */
     public static final int NETWORK_TYPE_GSM = 16;
-     /** Current network is TD_SCDMA {@hide} */
+    /** Current network is TD_SCDMA */
     public static final int NETWORK_TYPE_TD_SCDMA = 17;
-   /** Current network is IWLAN {@hide} */
+    /** Current network is IWLAN */
     public static final int NETWORK_TYPE_IWLAN = 18;
-
+    /** Current network is LTE_CA {@hide} */
+    public static final int NETWORK_TYPE_LTE_CA = 19;
     /**
      * @return the NETWORK_TYPE_xxxx for current data connection.
      */
@@ -1651,6 +1655,7 @@
                 return NETWORK_CLASS_3_G;
             case NETWORK_TYPE_LTE:
             case NETWORK_TYPE_IWLAN:
+            case NETWORK_TYPE_LTE_CA:
                 return NETWORK_CLASS_4_G;
             default:
                 return NETWORK_CLASS_UNKNOWN;
@@ -1714,6 +1719,8 @@
                 return "TD_SCDMA";
             case NETWORK_TYPE_IWLAN:
                 return "IWLAN";
+            case NETWORK_TYPE_LTE_CA:
+                return "LTE_CA";
             default:
                 return "UNKNOWN";
         }
@@ -1756,6 +1763,11 @@
      *@hide
      */
     public static final int SIM_STATE_CARD_IO_ERROR = 8;
+    /** SIM card state: SIM Card restricted, present but not usable due to
+     * carrier restrictions.
+     *@hide
+     */
+    public static final int SIM_STATE_CARD_RESTRICTED = 9;
 
     /**
      * @return true if a ICC card is present
@@ -1909,7 +1921,7 @@
         return getSimOperatorNumericForPhone(phoneId);
     }
 
-   /**
+    /**
      * Returns the MCC+MNC (mobile country code + mobile network code) of the
      * provider of the SIM for a particular subscription. 5 or 6 decimal digits.
      * <p>
@@ -2461,6 +2473,102 @@
     }
 
     /**
+     * Enables the visual voicemail SMS filter for a phone account. When the filter is
+     * enabled, Incoming SMS messages matching the OMTP VVM SMS interface will be redirected to the
+     * visual voicemail client with
+     * {@link android.provider.VoicemailContract.ACTION_VOICEMAIL_SMS_RECEIVED}.
+     *
+     * <p>This takes effect only when the caller is the default dialer. The enabled status and
+     * settings persist through default dialer changes, but the filter will only honor the setting
+     * set by the current default dialer.
+     *
+     *
+     * @param subId The subscription id of the phone account.
+     * @param settings The settings for the filter.
+     */
+    /** @hide */
+    public void enableVisualVoicemailSmsFilter(int subId,
+            VisualVoicemailSmsFilterSettings settings) {
+        if(settings == null){
+            throw new IllegalArgumentException("Settings cannot be null");
+        }
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null) {
+                telephony.enableVisualVoicemailSmsFilter(mContext.getOpPackageName(), subId,
+                        settings);
+            }
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+    }
+
+    /**
+     * Disables the visual voicemail SMS filter for a phone account.
+     *
+     * <p>This takes effect only when the caller is the default dialer. The enabled status and
+     * settings persist through default dialer changes, but the filter will only honor the setting
+     * set by the current default dialer.
+     */
+    /** @hide */
+    public void disableVisualVoicemailSmsFilter(int subId) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null) {
+                telephony.disableVisualVoicemailSmsFilter(mContext.getOpPackageName(), subId);
+            }
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+    }
+
+    /**
+     * @returns the settings of the visual voicemail SMS filter for a phone account, or {@code null}
+     * if the filter is disabled.
+     *
+     * <p>This takes effect only when the caller is the default dialer. The enabled status and
+     * settings persist through default dialer changes, but the filter will only honor the setting
+     * set by the current default dialer.
+     */
+    /** @hide */
+    @Nullable
+    public VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(int subId) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null) {
+                return telephony
+                        .getVisualVoicemailSmsFilterSettings(mContext.getOpPackageName(), subId);
+            }
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+
+        return null;
+    }
+
+    /**
+     * @returns the settings of the visual voicemail SMS filter for a phone account set by the
+     * package, or {@code null} if the filter is disabled.
+     *
+     * <p>Requires the calling app to have READ_PRIVILEGED_PHONE_STATE permission.
+     */
+    /** @hide */
+    @Nullable
+    public VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String packageName,
+            int subId) {
+        try {
+            ITelephony telephony = getITelephony();
+            if (telephony != null) {
+                return telephony.getSystemVisualVoicemailSmsFilterSettings(packageName, subId);
+            }
+        } catch (RemoteException ex) {
+        } catch (NullPointerException ex) {
+        }
+
+        return null;
+    }
+
+    /**
      * Returns the voice mail count. Return 0 if unavailable, -1 if there are unread voice messages
      * but the count is unknown.
      * <p>
@@ -5246,4 +5354,189 @@
         }
         return false;
     }
+
+    /**
+     * Return the application ID for the app type like {@link APPTYPE_CSIM}.
+     *
+     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+     *
+     * @param appType the uicc app type like {@link APPTYPE_CSIM}
+     * @return Application ID for specificied app type or null if no uicc or error.
+     * @hide
+     */
+    public String getAidForAppType(int appType) {
+        return getAidForAppType(getDefaultSubscription(), appType);
+    }
+
+    /**
+     * Return the application ID for the app type like {@link APPTYPE_CSIM}.
+     *
+     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+     *
+     * @param subId the subscription ID that this request applies to.
+     * @param appType the uicc app type, like {@link APPTYPE_CSIM}
+     * @return Application ID for specificied app type or null if no uicc or error.
+     * @hide
+     */
+    public String getAidForAppType(int subId, int appType) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getAidForAppType(subId, appType);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#getAidForAppType", e);
+        }
+        return null;
+    }
+
+    /**
+     * Return the Electronic Serial Number.
+     *
+     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+     *
+     * @return ESN or null if error.
+     * @hide
+     */
+    public String getEsn() {
+        return getEsn(getDefaultSubscription());
+    }
+
+    /**
+     * Return the Electronic Serial Number.
+     *
+     * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+     *
+     * @param subId the subscription ID that this request applies to.
+     * @return ESN or null if error.
+     * @hide
+     */
+    public String getEsn(int subId) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getEsn(subId);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#getEsn", e);
+        }
+        return null;
+    }
+
+    /**
+     * Get snapshot of Telephony histograms
+     * @return List of Telephony histograms
+     * Requires Permission:
+     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+     * Or the calling app has carrier privileges.
+     * @hide
+     */
+    @SystemApi
+    public List<TelephonyHistogram> getTelephonyHistograms() {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getTelephonyHistograms();
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#getTelephonyHistograms", e);
+        }
+        return null;
+    }
+
+    /**
+     * Set the allowed carrier list for slotId
+     * Require system privileges. In the future we may add this to carrier APIs.
+     *
+     * @return The number of carriers set successfully. Should be length of
+     * carrierList on success; -1 on error.
+     * @hide
+     */
+    public int setAllowedCarriers(int slotId, List<CarrierIdentifier> carriers) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.setAllowedCarriers(slotId, carriers);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#setAllowedCarriers", e);
+        }
+        return -1;
+    }
+
+    /**
+     * Get the allowed carrier list for slotId.
+     * Require system privileges. In the future we may add this to carrier APIs.
+     *
+     * @return List of {@link android.telephony.CarrierIdentifier}; empty list
+     * means all carriers are allowed.
+     * @hide
+     */
+    public List<CarrierIdentifier> getAllowedCarriers(int slotId) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getAllowedCarriers(slotId);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#getAllowedCarriers", e);
+        }
+        return new ArrayList<CarrierIdentifier>(0);
+    }
+
+    /**
+     * Action set from carrier signalling broadcast receivers to enable/disable metered apns
+     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
+     * @param subId the subscription ID that this action applies to.
+     * @param enabled control enable or disable metered apns.
+     * @hide
+     */
+    public void carrierActionSetMeteredApnsEnabled(int subId, boolean enabled) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                service.carrierActionSetMeteredApnsEnabled(subId, enabled);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#carrierActionSetMeteredApnsEnabled", e);
+        }
+    }
+
+    /**
+     * Action set from carrier signalling broadcast receivers to enable/disable radio
+     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
+     * @param subId the subscription ID that this action applies to.
+     * @param enabled control enable or disable radio.
+     * @hide
+     */
+    public void carrierActionSetRadioEnabled(int subId, boolean enabled) {
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                service.carrierActionSetRadioEnabled(subId, enabled);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelephony#carrierActionSetRadioEnabled", e);
+        }
+    }
+
+    /**
+     * Get aggregated video call data usage since boot.
+     * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required.
+     * @return total data usage in bytes
+     * @hide
+     */
+    public long getVtDataUsage() {
+
+        try {
+            ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getVtDataUsage();
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling getVtDataUsage", e);
+        }
+        return 0;
+    }
 }
+
diff --git a/telephony/java/android/telephony/VisualVoicemailSmsFilterSettings.aidl b/telephony/java/android/telephony/VisualVoicemailSmsFilterSettings.aidl
new file mode 100644
index 0000000..4b0539d
--- /dev/null
+++ b/telephony/java/android/telephony/VisualVoicemailSmsFilterSettings.aidl
@@ -0,0 +1,19 @@
+/*
+* Copyright (C) 2016 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package android.telephony;
+
+parcelable VisualVoicemailSmsFilterSettings;
diff --git a/telephony/java/android/telephony/VisualVoicemailSmsFilterSettings.java b/telephony/java/android/telephony/VisualVoicemailSmsFilterSettings.java
new file mode 100644
index 0000000..5b81027
--- /dev/null
+++ b/telephony/java/android/telephony/VisualVoicemailSmsFilterSettings.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Class to represent various settings for the visual voicemail SMS filter. When the filter is
+ * enabled, incoming SMS matching the generalized OMTP format:
+ *
+ * <p>[clientPrefix]:[prefix]:([key]=[value];)*
+ *
+ * <p>will be regarded as a visual voicemail SMS, and removed before reaching the SMS provider. The
+ * intent {@link android.provider.VoicemailContract#ACTION_VOICEMAIL_SMS_RECEIVED} will then be sent
+ * to the default dialer with the information extracted from the SMS.
+ *
+ * <p>Use {@link android.telephony.VisualVoicemailSmsFilterSettings.Builder} to construct this
+ * class.
+ *
+ * @see android.telephony.TelephonyManager#enableVisualVoicemailSmsFilter
+ *
+ * @hide
+ */
+public class VisualVoicemailSmsFilterSettings implements Parcelable {
+
+
+    /**
+     * The visual voicemail SMS message does not have to be a data SMS, and can be directed to any
+     * port.
+     *
+     * @hide
+     */
+    public static final int DESTINATION_PORT_ANY = -1;
+
+    /**
+     * The visual voicemail SMS message can be directed to any port, but must be a data SMS.
+     *
+     * @hide
+     */
+    public static final int DESTINATION_PORT_DATA_SMS = -2;
+
+    public static final String DEFAULT_CLIENT_PREFIX = "//VVM";
+    public static final List<String> DEFAULT_ORIGINATING_NUMBERS = Collections.emptyList();
+    public static final int DEFAULT_DESTINATION_PORT = DESTINATION_PORT_ANY;
+
+    /**
+     * Builder class for {@link VisualVoicemailSmsFilterSettings} objects.
+     *
+     * @hide
+     */
+    public static class Builder {
+
+        private String mClientPrefix = DEFAULT_CLIENT_PREFIX;
+        private List<String> mOriginatingNumbers = DEFAULT_ORIGINATING_NUMBERS;
+        private int mDestinationPort = DEFAULT_DESTINATION_PORT;
+
+        public VisualVoicemailSmsFilterSettings build() {
+            return new VisualVoicemailSmsFilterSettings(this);
+        }
+
+        /**
+         * Sets the client prefix for the visual voicemail SMS filter. The client prefix will appear
+         * at the start of a visual voicemail SMS message, followed by a colon(:).
+         */
+        public Builder setClientPrefix(String clientPrefix) {
+            if (clientPrefix == null) {
+                throw new IllegalArgumentException("Client prefix cannot be null");
+            }
+            mClientPrefix = clientPrefix;
+            return this;
+        }
+
+        /**
+         * Sets the originating number whitelist for the visual voicemail SMS filter. If the list is
+         * not null only the SMS messages from a number in the list can be considered as a visual
+         * voicemail SMS. Otherwise, messages from any address will be considered.
+         */
+        public Builder setOriginatingNumbers(List<String> originatingNumbers) {
+            if (originatingNumbers == null) {
+                throw new IllegalArgumentException("Originating numbers cannot be null");
+            }
+            mOriginatingNumbers = originatingNumbers;
+            return this;
+        }
+
+        /**
+         * Sets the destination port for the visual voicemail SMS filter.
+         *
+         * @param destinationPort The destination port, or {@link #DESTINATION_PORT_ANY}, or {@link
+         * #DESTINATION_PORT_DATA_SMS}
+         */
+        public Builder setDestinationPort(int destinationPort) {
+            mDestinationPort = destinationPort;
+            return this;
+        }
+
+    }
+
+    /**
+     * The client prefix for the visual voicemail SMS filter. The client prefix will appear at the
+     * start of a visual voicemail SMS message, followed by a colon(:).
+     */
+    public final String clientPrefix;
+
+    /**
+     * The originating number whitelist for the visual voicemail SMS filter of a phone account. If
+     * the list is not null only the SMS messages from a number in the list can be considered as a
+     * visual voicemail SMS. Otherwise, messages from any address will be considered.
+     */
+    public final List<String> originatingNumbers;
+
+    /**
+     * The destination port for the visual voicemail SMS filter, or {@link #DESTINATION_PORT_ANY},
+     * or {@link #DESTINATION_PORT_DATA_SMS}
+     */
+    public final int destinationPort;
+
+    /**
+     * Use {@link Builder} to construct
+     */
+    private VisualVoicemailSmsFilterSettings(Builder builder) {
+        clientPrefix = builder.mClientPrefix;
+        originatingNumbers = builder.mOriginatingNumbers;
+        destinationPort = builder.mDestinationPort;
+    }
+
+    public static final Creator<VisualVoicemailSmsFilterSettings> CREATOR =
+            new Creator<VisualVoicemailSmsFilterSettings>() {
+                @Override
+                public VisualVoicemailSmsFilterSettings createFromParcel(Parcel in) {
+                    Builder builder = new Builder();
+                    builder.setClientPrefix(in.readString());
+                    builder.setOriginatingNumbers(in.createStringArrayList());
+                    builder.setDestinationPort(in.readInt());
+
+                    return builder.build();
+                }
+
+                @Override
+                public VisualVoicemailSmsFilterSettings[] newArray(int size) {
+                    return new VisualVoicemailSmsFilterSettings[size];
+                }
+            };
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(clientPrefix);
+        dest.writeStringList(originatingNumbers);
+        dest.writeInt(destinationPort);
+    }
+
+}
diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java
index 92b70e8..65254d8 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.java
+++ b/telephony/java/com/android/ims/ImsCallProfile.java
@@ -448,6 +448,15 @@
     }
 
     /**
+     * Determines if the {@link ImsCallProfile} represents a video call.
+     *
+     * @return {@code true} if the profile is for a video call, {@code false} otherwise.
+     */
+    public boolean isVideoCall() {
+        return VideoProfile.isVideo(getVideoStateFromCallType(mCallType));
+    }
+
+    /**
      * Determines if a video state is set in a video state bit-mask.
      *
      * @param videoState The video state bit mask.
diff --git a/telephony/java/com/android/ims/internal/IImsService.aidl b/telephony/java/com/android/ims/internal/IImsService.aidl
index a9614a6..406d22d 100644
--- a/telephony/java/com/android/ims/internal/IImsService.aidl
+++ b/telephony/java/com/android/ims/internal/IImsService.aidl
@@ -38,8 +38,19 @@
     void close(int serviceId);
     boolean isConnected(int serviceId, int serviceType, int callType);
     boolean isOpened(int serviceId);
+
+    /**
+     * Replace existing registration listener
+     *
+     */
     void setRegistrationListener(int serviceId, in IImsRegistrationListener listener);
 
+    /**
+     * Add new registration listener
+     */
+    void addRegistrationListener(int phoneId, int serviceClass,
+            in IImsRegistrationListener listener);
+
     ImsCallProfile createCallProfile(int serviceId, int serviceType, int callType);
 
     IImsCallSession createCallSession(int serviceId, in ImsCallProfile profile,
diff --git a/telephony/java/com/android/internal/telephony/DctConstants.java b/telephony/java/com/android/internal/telephony/DctConstants.java
index e4981ce..8166e00 100644
--- a/telephony/java/com/android/internal/telephony/DctConstants.java
+++ b/telephony/java/com/android/internal/telephony/DctConstants.java
@@ -104,6 +104,7 @@
     public static final int CMD_CLEAR_PROVISIONING_SPINNER = BASE + 42;
     public static final int EVENT_DEVICE_PROVISIONED_CHANGE = BASE + 43;
     public static final int EVENT_REDIRECTION_DETECTED = BASE + 44;
+    public static final int EVENT_PCO_DATA_RECEIVED = BASE + 45;
 
     /***** Constants *****/
 
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index 70a8653..6115656 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -184,7 +184,7 @@
      */
     void sendTextForSubscriberWithSelfPermissions(in int subId, String callingPkg,
             in String destAddr, in String scAddr, in String text, in PendingIntent sentIntent,
-            in PendingIntent deliveryIntent);
+            in PendingIntent deliveryIntent, in boolean persistMessage);
 
     /**
      * Inject an SMS PDU into the android platform.
diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl
index c61ed2a..f6aef08 100755
--- a/telephony/java/com/android/internal/telephony/ISub.aidl
+++ b/telephony/java/com/android/internal/telephony/ISub.aidl
@@ -118,17 +118,6 @@
     int setDisplayName(String displayName, int subId);
 
     /**
-     * Set Sim Provisioning Status by subscription ID
-     * @param simProvisionStatus with the subscription:
-     * {@See SubscriptionManager#SIM_PROVISIONED}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_COLD}
-     * {@See SubscriptionManager#SIM_UNPROVISIONED_OUT_OF_CREDIT}
-     * @param subId the unique SubInfoRecord index in database
-     * @return the number of records updated
-     */
-    int setSimProvisioningStatus(int simProvisioningStatus, int subId);
-
-    /**
      * Set display name by simInfo index with name source
      * @param displayName the display name of SIM card
      * @param subId the unique SubscriptionInfo index in database
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index bb8aaad5..2168b0e 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -20,6 +20,7 @@
 import android.os.Bundle;
 import android.os.ResultReceiver;
 import android.net.Uri;
+import android.service.carrier.CarrierIdentifier;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
 import android.telephony.CellInfo;
@@ -28,8 +29,11 @@
 import android.telephony.NeighboringCellInfo;
 import android.telephony.RadioAccessFamily;
 import android.telephony.ServiceState;
+import android.telephony.TelephonyHistogram;
+import android.telephony.VisualVoicemailSmsFilterSettings;
 import com.android.internal.telephony.CellNetworkScanResult;
 import com.android.internal.telephony.OperatorInfo;
+
 import java.util.List;
 
 
@@ -450,6 +454,20 @@
      */
     int getVoiceMessageCountForSubscriber(int subId);
 
+    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS
+    void enableVisualVoicemailSmsFilter(String callingPackage, int subId,
+            in VisualVoicemailSmsFilterSettings settings);
+
+    oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId);
+
+    // Get settings set by the calling package
+    VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage,
+            int subId);
+
+    // Get settings set by the package, requires READ_PRIVILEGED_PHONE_STATE permission
+    VisualVoicemailSmsFilterSettings getSystemVisualVoicemailSmsFilterSettings(String packageName,
+            int subId);
+
     /**
      * Returns the network type for data transmission
      * Legacy call, permission-free
@@ -1067,4 +1085,77 @@
      * Returns a list of packages that have carrier privileges.
      */
     List<String> getPackagesWithCarrierPrivileges();
+
+    /**
+     * Return the application ID for the app type.
+     *
+     * @param subId the subscription ID that this request applies to.
+     * @param appType the uicc app type,
+     * @return Application ID for specificied app type or null if no uicc or error.
+     */
+    String getAidForAppType(int subId, int appType);
+
+    /**
+    * Return the Electronic Serial Number.
+    *
+    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
+    *
+    * @param subId the subscription ID that this request applies to.
+    * @return ESN or null if error.
+    * @hide
+    */
+    String getEsn(int subId);
+
+    /**
+     * Get snapshot of Telephony histograms
+     * @return List of Telephony histograms
+     * Requires Permission:
+     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+     * Or the calling app has carrier privileges.
+     */
+    List<TelephonyHistogram> getTelephonyHistograms();
+
+    /**
+     * Set the allowed carrier list for slotId
+     * Require system privileges. In the future we may add this to carrier APIs.
+     *
+     * @return The number of carriers set successfully. Should match length of
+     * carriers on success.
+     */
+    int setAllowedCarriers(int slotId, in List<CarrierIdentifier> carriers);
+
+    /**
+     * Get the allowed carrier list for slotId.
+     * Require system privileges. In the future we may add this to carrier APIs.
+     *
+     * @return List of {@link android.service.carrier.CarrierIdentifier}; empty list
+     * means all carriers are allowed.
+     */
+    List<CarrierIdentifier> getAllowedCarriers(int slotId);
+
+    /**
+     * Action set from carrier signalling broadcast receivers to enable/disable metered apns
+     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
+     * @param subId the subscription ID that this action applies to.
+     * @param enabled control enable or disable metered apns.
+     * @hide
+     */
+    void carrierActionSetMeteredApnsEnabled(int subId, boolean visible);
+
+    /**
+     * Action set from carrier signalling broadcast receivers to enable/disable radio
+     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
+     * @param subId the subscription ID that this action applies to.
+     * @param enabled control enable or disable radio.
+     * @hide
+     */
+    void carrierActionSetRadioEnabled(int subId, boolean enabled);
+
+    /**
+     * Get aggregated video call data usage since boot.
+     * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required.
+     * @return total data usage in bytes
+     * @hide
+     */
+    long getVtDataUsage();
 }
diff --git a/telephony/java/com/android/internal/telephony/IccCardConstants.java b/telephony/java/com/android/internal/telephony/IccCardConstants.java
index c1e2518..f3d9335 100644
--- a/telephony/java/com/android/internal/telephony/IccCardConstants.java
+++ b/telephony/java/com/android/internal/telephony/IccCardConstants.java
@@ -32,6 +32,8 @@
     public static final String INTENT_VALUE_ICC_ABSENT = "ABSENT";
     /* CARD_IO_ERROR means for three consecutive times there was SIM IO error */
     static public final String INTENT_VALUE_ICC_CARD_IO_ERROR = "CARD_IO_ERROR";
+    /* CARD_RESTRICTED means card is present but not usable due to carrier restrictions */
+    static public final String INTENT_VALUE_ICC_CARD_RESTRICTED = "CARD_RESTRICTED";
     /* LOCKED means ICC is locked by pin or by network */
     public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED";
     //TODO: we can remove this state in the future if Bug 18489776 analysis
@@ -74,7 +76,8 @@
         READY,          /** ordinal(5) == {@See TelephonyManager#SIM_STATE_READY} */
         NOT_READY,      /** ordinal(6) == {@See TelephonyManager#SIM_STATE_NOT_READY} */
         PERM_DISABLED,  /** ordinal(7) == {@See TelephonyManager#SIM_STATE_PERM_DISABLED} */
-        CARD_IO_ERROR;  /** ordinal(8) == {@See TelephonyManager#SIM_STATE_CARD_IO_ERROR} */
+        CARD_IO_ERROR,  /** ordinal(8) == {@See TelephonyManager#SIM_STATE_CARD_IO_ERROR} */
+        CARD_RESTRICTED;/** ordinal(9) == {@See TelephonyManager#SIM_STATE_CARD_RESTRICTED} */
 
         public boolean isPinLocked() {
             return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED));
@@ -83,7 +86,8 @@
         public boolean iccCardExist() {
             return ((this == PIN_REQUIRED) || (this == PUK_REQUIRED)
                     || (this == NETWORK_LOCKED) || (this == READY)
-                    || (this == PERM_DISABLED) || (this == CARD_IO_ERROR));
+                    || (this == PERM_DISABLED) || (this == CARD_IO_ERROR)
+                    || (this == CARD_RESTRICTED));
         }
 
         public static State intToState(int state) throws IllegalArgumentException {
@@ -97,6 +101,7 @@
                 case 6: return NOT_READY;
                 case 7: return PERM_DISABLED;
                 case 8: return CARD_IO_ERROR;
+                case 9: return CARD_RESTRICTED;
                 default:
                     throw new IllegalArgumentException();
             }
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index 1680fe3..b417a1c 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -208,4 +208,14 @@
     public static final int AUTH_CONTEXT_EAP_SIM = 128;
     public static final int AUTH_CONTEXT_EAP_AKA = 129;
     public static final int AUTH_CONTEXT_UNDEFINED = -1;
+
+    /**
+     * Value for the global property CELL_ON
+     *  0: Cell radio is off
+     *  1: Cell radio is on
+     *  2: Cell radio is off because airplane mode is enabled
+     */
+    public static final int CELL_OFF_FLAG = 0;
+    public static final int CELL_ON_FLAG = 1;
+    public static final int CELL_OFF_DUE_TO_AIRPLANE_MODE_FLAG = 2;
 }
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index cfc5305..a91e9beb 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -409,6 +409,8 @@
     int RIL_REQUEST_STOP_LCE = 133;
     int RIL_REQUEST_PULL_LCEDATA = 134;
     int RIL_REQUEST_GET_ACTIVITY_INFO = 135;
+    int RIL_REQUEST_SET_ALLOWED_CARRIERS = 136;
+    int RIL_REQUEST_GET_ALLOWED_CARRIERS = 137;
 
     int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
 
@@ -459,4 +461,5 @@
     int RIL_UNSOL_ON_SS = 1043;
     int RIL_UNSOL_STK_CC_ALPHA_NOTIFY = 1044;
     int RIL_UNSOL_LCEDATA_RECV = 1045;
+    int RIL_UNSOL_PCO_DATA = 1046;
 }
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index 46b0fbd..0168874 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -402,34 +402,59 @@
     /**
      * <p>Broadcast Action: when data connections get redirected with validation failure.
      * intended for sim/account status checks and only sent to the specified carrier app
-     * feedback is via carrier/system APIs to report cold-sim, out-of-credit-sim, etc
      * The intent will have the following extra values:</p>
      * <ul>
-     *   <li>redirectUrl</li><dd>A string with the redirection url info.</dd>
-     *   <li>subId</li><dd>Sub Id which associated the data redirection.</dd>
+     *   <li>apnType</li><dd>A string with the apn type.</dd>
+     *   <li>redirectionUrl</li><dd>redirection url string</dd>
+     *   <li>subId</dt><li>Sub Id which associated the data connection failure.</dd>
      * </ul>
      * <p class="note">This is a protected intent that can only be sent by the system.</p>
      */
-    public static final String ACTION_DATA_CONNECTION_REDIRECTED =
-            "android.intent.action.REDIRECTION_DETECTED";
+    public static final String ACTION_CARRIER_SIGNAL_REDIRECTED =
+            "android.intent.action.CARRIER_SIGNAL_REDIRECTED";
     /**
      * <p>Broadcast Action: when data connections setup fails.
      * intended for sim/account status checks and only sent to the specified carrier app
-     * feedback is via carrier/system APIs to report cold-sim, out-of-credit-sim, etc
      * The intent will have the following extra values:</p>
      * <ul>
      *   <li>apnType</li><dd>A string with the apn type.</dd>
      *   <li>errorCode</li><dd>A integer with dataFailCause.</dd>
-     *   <li>subId</dt><li>Sub Id which associated the data redirection.</dd>
+     *   <li>subId</dt><li>Sub Id which associated the data connection failure.</dd>
      * </ul>
      * <p class="note">This is a protected intent that can only be sent by the system. </p>
      */
-    public static final String ACTION_REQUEST_NETWORK_FAILED =
-            "android.intent.action.REQUEST_NETWORK_FAILED";
+    public static final String ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED =
+            "android.intent.action.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED";
 
     /**
-     * Broadcast action to trigger CI OMA-DM Session.
+     * <p>Broadcast Action: when pco value is available.
+     * intended for sim/account status checks and only sent to the specified carrier app
+     * The intent will have the following extra values:</p>
+     * <ul>
+     *   <li>apnType</li><dd>A string with the apn type.</dd>
+     *   <li>apnProto</li><dd>A string with the protocol of the apn connection (IP,IPV6,
+     *                        IPV4V6)</dd>
+     *   <li>pcoId</li><dd>An integer indicating the pco id for the data.</dd>
+     *   <li>pcoValue</li><dd>A byte array of pco data read from modem.</dd>
+     *   <li>subId</dt><li>Sub Id which associated the data connection.</dd>
+     * </ul>
+     * <p class="note">This is a protected intent that can only be sent by the system. </p>
      */
+    public static final String ACTION_CARRIER_SIGNAL_PCO_VALUE =
+            "android.intent.action.CARRIER_SIGNAL_PCO_VALUE";
+
+    // CARRIER_SIGNAL_ACTION extra keys
+    public static final String EXTRA_REDIRECTION_URL_KEY = "redirectionUrl";
+    public static final String EXTRA_ERROR_CODE_KEY = "errorCode";
+    public static final String EXTRA_APN_TYPE_KEY = "apnType";
+    public static final String EXTRA_APN_PROTO_KEY = "apnProto";
+    public static final String EXTRA_PCO_ID_KEY = "pcoId";
+    public static final String EXTRA_PCO_VALUE_KEY = "pcoValue";
+
+
+   /**
+     * Broadcast action to trigger CI OMA-DM Session.
+    */
     public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE =
             "com.android.omadm.service.CONFIGURATION_UPDATE";
 }
diff --git a/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java b/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java
index 851bda9..0718628 100644
--- a/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java
+++ b/tests/Assist/src/com/android/test/assist/AssistInteractionSession.java
@@ -77,6 +77,9 @@
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
+
+        getWindow().getWindow().getDecorView().setSystemUiVisibility(
+                View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
     }
 
     @Override
diff --git a/tests/SoundTriggerTestApp/AndroidManifest.xml b/tests/SoundTriggerTestApp/AndroidManifest.xml
index 71d6001..87f3e92 100644
--- a/tests/SoundTriggerTestApp/AndroidManifest.xml
+++ b/tests/SoundTriggerTestApp/AndroidManifest.xml
@@ -1,25 +1,28 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="com.android.test.soundtrigger">
-
+    <uses-permission android:name="android.permission.CAPTURE_AUDIO_HOTWORD" />
     <uses-permission android:name="android.permission.MANAGE_SOUND_TRIGGER" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.WAKE_LOCK" />
     <application>
         <activity
-            android:name="TestSoundTriggerActivity"
+            android:name=".SoundTriggerTestActivity"
             android:label="SoundTrigger Test Application"
             android:screenOrientation="portrait"
             android:theme="@android:style/Theme.Material">
-            <!--
-            <intent-filter>
-                <action android:name="com.android.intent.action.MANAGE_SOUND_TRIGGER" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-            -->
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <service
+            android:name=".SoundTriggerTestService"
+            android:stopWithTask="false"
+            android:exported="true">
+            <intent-filter>
+                <action android:name="com.android.intent.action.MANAGE_SOUND_TRIGGER" />
+            </intent-filter>
+        </service>
     </application>
 </manifest>
diff --git a/tests/SoundTriggerTestApp/res/layout/main.xml b/tests/SoundTriggerTestApp/res/layout/main.xml
index 06949a0..0fd8b12 100644
--- a/tests/SoundTriggerTestApp/res/layout/main.xml
+++ b/tests/SoundTriggerTestApp/res/layout/main.xml
@@ -18,81 +18,107 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
-    >
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    >
+    android:orientation="vertical">
 
-    <Button
-        android:layout_width="wrap_content"
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/load"
+            android:onClick="onLoadButtonClicked"
+            android:padding="20dp" />
+
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/start_recog"
+            android:onClick="onStartRecognitionButtonClicked"
+            android:padding="20dp" />
+
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/stop_recog"
+            android:onClick="onStopRecognitionButtonClicked"
+            android:padding="20dp" />
+
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/unload"
+            android:onClick="onUnloadButtonClicked"
+            android:padding="20dp" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/reload"
+            android:onClick="onReloadButtonClicked"
+            android:padding="20dp" />
+
+        <Button
+            android:id="@+id/play_trigger_id"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/play_trigger"
+            android:onClick="onPlayTriggerButtonClicked"
+            android:padding="20dp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:text="@string/enroll"
-        android:onClick="onEnrollButtonClicked"
-        android:padding="20dp" />
+        android:layout_gravity="right">
 
-    <Button
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/reenroll"
-        android:onClick="onReEnrollButtonClicked"
-        android:padding="20dp" />
+        <CheckBox
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/capture"
+            android:id="@+id/caputre_check_box"
+            android:layout_gravity="center_horizontal"
+            android:padding="20dp" />
 
-    <Button
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/start_recog"
-        android:onClick="onStartRecognitionButtonClicked"
-        android:padding="20dp" />
+        <Button
+            android:id="@+id/play_captured_id"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/play_capture"
+            android:padding="20dp"
+            android:enabled="false" />
+    </LinearLayout>
 
-    <Button
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/stop_recog"
-        android:onClick="onStopRecognitionButtonClicked"
-        android:padding="20dp" />
-
-    <Button
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/unenroll"
-        android:onClick="onUnEnrollButtonClicked"
-        android:padding="20dp" />
-
-    <Button
-        android:id="@+id/play_trigger_id"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/play_trigger"
-        android:onClick="onPlayTriggerButtonClicked"
-        android:padding="20dp" />
-
-</LinearLayout>
-
-<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
+    <RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/model_group_id"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:padding="20dp"
-        android:orientation="vertical">
-</RadioGroup>
+        android:orientation="vertical" />
 
-<ScrollView
+    <ScrollView
        android:id="@+id/scroller_id"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:scrollbars="vertical"
        android:fillViewport="true">
 
-      <TextView
-        android:id="@+id/console"
-        android:paddingTop="20pt"
-        android:layout_height="fill_parent"
-        android:layout_width="fill_parent"
-        android:textSize="14dp"
-        android:layout_weight="1.0"
-        android:text="@string/none">
-     </TextView>
-</ScrollView>
+        <TextView
+            android:id="@+id/console"
+            android:paddingTop="20pt"
+            android:layout_height="fill_parent"
+            android:layout_width="fill_parent"
+            android:textSize="14dp"
+            android:layout_weight="1.0"
+            android:text="@string/none" />
+    </ScrollView>
 </LinearLayout>
diff --git a/tests/SoundTriggerTestApp/res/values/strings.xml b/tests/SoundTriggerTestApp/res/values/strings.xml
index 7c1f649..c48b648 100644
--- a/tests/SoundTriggerTestApp/res/values/strings.xml
+++ b/tests/SoundTriggerTestApp/res/values/strings.xml
@@ -16,11 +16,14 @@
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
 
-    <string name="enroll">Load</string>
-    <string name="reenroll">Re-load</string>
-    <string name="unenroll">Un-load</string>
+    <string name="load">Load</string>
+    <string name="reload">Reload</string>
+    <string name="unload">Unload</string>
     <string name="start_recog">Start</string>
     <string name="stop_recog">Stop</string>
     <string name="play_trigger">Play Trigger Audio</string>
+    <string name="capture">Capture Audio</string>
+    <string name="stop_capture">Stop Capturing Audio</string>
+    <string name="play_capture">Play Captured Audio</string>
     <string name="none">Debug messages appear here:\n</string>
 </resources>
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestActivity.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestActivity.java
new file mode 100644
index 0000000..4841bc5
--- /dev/null
+++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestActivity.java
@@ -0,0 +1,329 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.test.soundtrigger;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import android.Manifest;
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.PackageManager;
+import android.media.AudioManager;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.PowerManager;
+import android.text.Editable;
+import android.text.method.ScrollingMovementMethod;
+import android.util.Log;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.ScrollView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.android.test.soundtrigger.SoundTriggerTestService.SoundTriggerTestBinder;
+
+public class SoundTriggerTestActivity extends Activity implements SoundTriggerTestService.UserActivity {
+    private static final String TAG = "SoundTriggerTest";
+    private static final int AUDIO_PERMISSIONS_REQUEST = 1;
+
+    private SoundTriggerTestService mService = null;
+
+    private static UUID mSelectedModelUuid = null;
+
+    private Map<RadioButton, UUID> mButtonModelUuidMap;
+    private Map<UUID, RadioButton> mModelButtons;
+    private Map<UUID, String> mModelNames;
+    private List<RadioButton> mModelRadioButtons;
+
+    private TextView mDebugView = null;
+    private ScrollView mScrollView = null;
+    private Button mPlayTriggerButton = null;
+    private PowerManager.WakeLock mScreenWakelock;
+    private Handler mHandler;
+    private RadioGroup mRadioGroup;
+    private CheckBox mCaptureAudioCheckBox;
+    private Button mPlayCapturedAudioButton = null;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        // Make sure that this activity can punch through the lockscreen if needed.
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
+                             WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
+
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+        mDebugView = (TextView) findViewById(R.id.console);
+        mScrollView = (ScrollView) findViewById(R.id.scroller_id);
+        mRadioGroup = (RadioGroup) findViewById(R.id.model_group_id);
+        mPlayTriggerButton = (Button) findViewById(R.id.play_trigger_id);
+        mDebugView.setText(mDebugView.getText(), TextView.BufferType.EDITABLE);
+        mDebugView.setMovementMethod(new ScrollingMovementMethod());
+        mCaptureAudioCheckBox = (CheckBox) findViewById(R.id.caputre_check_box);
+        mPlayCapturedAudioButton = (Button) findViewById(R.id.play_captured_id);
+        mHandler = new Handler();
+        mButtonModelUuidMap = new HashMap();
+        mModelButtons = new HashMap();
+        mModelNames = new HashMap();
+        mModelRadioButtons = new LinkedList();
+
+        setVolumeControlStream(AudioManager.STREAM_MUSIC);
+
+        // Make sure that the service is started, so even if our activity goes down, we'll still
+        // have a request for it to run.
+        startService(new Intent(getBaseContext(), SoundTriggerTestService.class));
+
+        // Bind to SoundTriggerTestService.
+        Intent intent = new Intent(this, SoundTriggerTestService.class);
+        bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+
+        // Unbind from the service.
+        if (mService != null) {
+            mService.setUserActivity(null);
+            unbindService(mConnection);
+        }
+    }
+
+    @Override
+    public void addModel(UUID modelUuid, String name) {
+        // Create a new widget for this model, and insert everything we'd need into the map.
+        RadioButton button = new RadioButton(this);
+        mModelRadioButtons.add(button);
+        button.setText(name);
+        button.setOnClickListener(new View.OnClickListener() {
+            public void onClick(View v) {
+                onRadioButtonClicked(v);
+            }
+        });
+        mButtonModelUuidMap.put(button, modelUuid);
+        mModelButtons.put(modelUuid, button);
+        mModelNames.put(modelUuid, name);
+
+        // Sort all the radio buttons by name, then push them into the group in order.
+        Collections.sort(mModelRadioButtons, new Comparator<RadioButton>(){
+            @Override
+            public int compare(RadioButton button0, RadioButton button1) {
+                return button0.getText().toString().compareTo(button1.getText().toString());
+            }
+        });
+        mRadioGroup.removeAllViews();
+        for (View v : mModelRadioButtons) {
+            mRadioGroup.addView(v);
+        }
+
+        // If we don't have something selected, select this first thing.
+        if (mSelectedModelUuid == null || mSelectedModelUuid.equals(modelUuid)) {
+            button.setChecked(true);
+            onRadioButtonClicked(button);
+        }
+    }
+
+    @Override
+    public void setModelState(UUID modelUuid, String state) {
+        runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                String newButtonText = mModelNames.get(modelUuid);
+                if (state != null) {
+                    newButtonText += ": " + state;
+                }
+                mModelButtons.get(modelUuid).setText(newButtonText);
+                updateSelectModelSpecificUiElements();
+            }
+        });
+    }
+
+    @Override
+    public void showMessage(String msg, boolean showToast) {
+        // Append the message to the text field, then show the toast if requested.
+        this.runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                ((Editable) mDebugView.getText()).append(msg + "\n");
+                mScrollView.post(new Runnable() {
+                    public void run() {
+                        mScrollView.smoothScrollTo(0, mDebugView.getBottom());
+                    }
+                });
+                if (showToast) {
+                    Toast.makeText(SoundTriggerTestActivity.this, msg, Toast.LENGTH_SHORT).show();
+                }
+            }
+        });
+    }
+
+    @Override
+    public void handleDetection(UUID modelUuid) {
+        screenWakeup();
+        mHandler.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                screenRelease();
+            }
+        }, 1000L);
+    }
+
+    private void screenWakeup() {
+        if (mScreenWakelock == null) {
+            PowerManager pm = ((PowerManager)getSystemService(POWER_SERVICE));
+            mScreenWakelock =  pm.newWakeLock(
+                    PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG);
+        }
+        mScreenWakelock.acquire();
+    }
+
+    private void screenRelease() {
+        mScreenWakelock.release();
+    }
+
+    public void onLoadButtonClicked(View v) {
+        if (mService == null) {
+            Log.e(TAG, "Could not load sound model: not bound to SoundTriggerTestService");
+        } else {
+            mService.loadModel(mSelectedModelUuid);
+        }
+    }
+
+    public void onUnloadButtonClicked(View v) {
+        if (mService == null) {
+           Log.e(TAG, "Can't unload model: not bound to SoundTriggerTestService");
+        } else {
+            mService.unloadModel(mSelectedModelUuid);
+        }
+    }
+
+    public void onReloadButtonClicked(View v) {
+        if (mService == null) {
+            Log.e(TAG, "Can't reload model: not bound to SoundTriggerTestService");
+        } else {
+            mService.reloadModel(mSelectedModelUuid);
+        }
+    }
+
+    public void onStartRecognitionButtonClicked(View v) {
+        if (mService == null) {
+            Log.e(TAG, "Can't start recognition: not bound to SoundTriggerTestService");
+        } else {
+            mService.startRecognition(mSelectedModelUuid);
+        }
+    }
+
+    public void onStopRecognitionButtonClicked(View v) {
+        if (mService == null) {
+            Log.e(TAG, "Can't stop recognition: not bound to SoundTriggerTestService");
+        } else {
+            mService.stopRecognition(mSelectedModelUuid);
+        }
+    }
+
+    public synchronized void onPlayTriggerButtonClicked(View v) {
+        if (mService == null) {
+            Log.e(TAG, "Can't play trigger audio: not bound to SoundTriggerTestService");
+        } else {
+            mService.playTriggerAudio(mSelectedModelUuid);
+        }
+    }
+
+    public synchronized void onCaptureAudioCheckboxClicked(View v) {
+        // See if we have the right permissions
+        if (!mService.hasMicrophonePermission()) {
+            requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO},
+                    AUDIO_PERMISSIONS_REQUEST);
+            return;
+        } else {
+            mService.setCaptureAudio(mSelectedModelUuid, mCaptureAudioCheckBox.isChecked());
+        }
+    }
+
+    @Override
+    public synchronized void onRequestPermissionsResult(int requestCode, String permissions[],
+                                                        int[] grantResults) {
+        if (requestCode == AUDIO_PERMISSIONS_REQUEST) {
+            if (grantResults[0] != PackageManager.PERMISSION_GRANTED) {
+                // Make sure that the check box is set to false.
+                mCaptureAudioCheckBox.setChecked(false);
+            }
+            mService.setCaptureAudio(mSelectedModelUuid, mCaptureAudioCheckBox.isChecked());
+        }
+    }
+
+    public synchronized void onPlayCapturedAudioButtonClicked(View v) {
+        if (mService == null) {
+            Log.e(TAG, "Can't play captured audio: not bound to SoundTriggerTestService");
+        } else {
+            mService.playCapturedAudio(mSelectedModelUuid);
+        }
+    }
+
+    public synchronized void onRadioButtonClicked(View view) {
+        // Is the button now checked?
+        boolean checked = ((RadioButton) view).isChecked();
+        if (checked) {
+            mSelectedModelUuid = mButtonModelUuidMap.get(view);
+            showMessage("Selected " + mModelNames.get(mSelectedModelUuid), false);
+            updateSelectModelSpecificUiElements();
+        }
+    }
+
+    private synchronized void updateSelectModelSpecificUiElements() {
+        // Set the play trigger button to be enabled only if we actually have some audio.
+        mPlayTriggerButton.setEnabled(mService.modelHasTriggerAudio((mSelectedModelUuid)));
+        // Similar logic for the captured audio.
+        mCaptureAudioCheckBox.setChecked(
+                mService.modelWillCaptureTriggerAudio(mSelectedModelUuid));
+        mPlayCapturedAudioButton.setEnabled(mService.modelHasCapturedAudio((mSelectedModelUuid)));
+    }
+
+    private ServiceConnection mConnection = new ServiceConnection() {
+        @Override
+        public void onServiceConnected(ComponentName className, IBinder service) {
+            synchronized (SoundTriggerTestActivity.this) {
+                // We've bound to LocalService, cast the IBinder and get LocalService instance
+                SoundTriggerTestBinder binder = (SoundTriggerTestBinder) service;
+                mService = binder.getService();
+                mService.setUserActivity(SoundTriggerTestActivity.this);
+            }
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName arg0) {
+            synchronized (SoundTriggerTestActivity.this) {
+                mService.setUserActivity(null);
+                mService = null;
+            }
+        }
+    };
+}
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java
new file mode 100644
index 0000000..0ff95c4
--- /dev/null
+++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerTestService.java
@@ -0,0 +1,720 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.test.soundtrigger;
+
+import android.Manifest;
+import android.app.Service;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.hardware.soundtrigger.SoundTrigger.GenericSoundModel;
+import android.media.AudioAttributes;
+import android.media.AudioFormat;
+import android.media.AudioManager;
+import android.media.AudioRecord;
+import android.media.AudioTrack;
+import android.media.MediaPlayer;
+import android.media.soundtrigger.SoundTriggerDetector;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.IBinder;
+import android.util.Log;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Random;
+import java.util.UUID;
+
+public class SoundTriggerTestService extends Service {
+    private static final String TAG = "SoundTriggerTestSrv";
+    private static final String INTENT_ACTION = "com.android.intent.action.MANAGE_SOUND_TRIGGER";
+
+    // Binder given to clients.
+    private final IBinder mBinder;
+    private final Map<UUID, ModelInfo> mModelInfoMap;
+    private SoundTriggerUtil mSoundTriggerUtil;
+    private Random mRandom;
+    private UserActivity mUserActivity;
+
+    public interface UserActivity {
+        void addModel(UUID modelUuid, String state);
+        void setModelState(UUID modelUuid, String state);
+        void showMessage(String msg, boolean showToast);
+        void handleDetection(UUID modelUuid);
+    }
+
+    public SoundTriggerTestService() {
+        super();
+        mRandom = new Random();
+        mModelInfoMap = new HashMap();
+        mBinder = new SoundTriggerTestBinder();
+    }
+
+    @Override
+    public synchronized int onStartCommand(Intent intent, int flags, int startId) {
+        if (mModelInfoMap.isEmpty()) {
+            mSoundTriggerUtil = new SoundTriggerUtil(this);
+            loadModelsInDataDir();
+        }
+
+        // If we get killed, after returning from here, restart
+        return START_STICKY;
+    }
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(INTENT_ACTION);
+        registerReceiver(mBroadcastReceiver, filter);
+
+        // Make sure the data directory exists, and we're the owner of it.
+        try {
+            getFilesDir().mkdir();
+        } catch (Exception e) {
+            // Don't care - we either made it, or it already exists.
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        stopAllRecognitions();
+        unregisterReceiver(mBroadcastReceiver);
+    }
+
+    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (intent != null && INTENT_ACTION.equals(intent.getAction())) {
+                String command = intent.getStringExtra("command");
+                if (command == null) {
+                    Log.e(TAG, "No 'command' specified in " + INTENT_ACTION);
+                } else {
+                    try {
+                        if (command.equals("load")) {
+                            loadModel(getModelUuidFromIntent(intent));
+                        } else if (command.equals("unload")) {
+                            unloadModel(getModelUuidFromIntent(intent));
+                        } else if (command.equals("start")) {
+                            startRecognition(getModelUuidFromIntent(intent));
+                        } else if (command.equals("stop")) {
+                            stopRecognition(getModelUuidFromIntent(intent));
+                        } else if (command.equals("play_trigger")) {
+                            playTriggerAudio(getModelUuidFromIntent(intent));
+                        } else if (command.equals("play_captured")) {
+                            playCapturedAudio(getModelUuidFromIntent(intent));
+                        } else if (command.equals("set_capture")) {
+                            setCaptureAudio(getModelUuidFromIntent(intent),
+                                    intent.getBooleanExtra("enabled", true));
+                        } else if (command.equals("set_capture_timeout")) {
+                            setCaptureAudioTimeout(getModelUuidFromIntent(intent),
+                                    intent.getIntExtra("timeout", 5000));
+                        } else {
+                            Log.e(TAG, "Unknown command '" + command + "'");
+                        }
+                    } catch (Exception e) {
+                        Log.e(TAG, "Failed to process " + command, e);
+                    }
+                }
+            }
+        }
+    };
+
+    private UUID getModelUuidFromIntent(Intent intent) {
+        // First, see if the specified the UUID straight up.
+        String value = intent.getStringExtra("modelUuid");
+        if (value != null) {
+            return UUID.fromString(value);
+        }
+
+        // If they specified a name, use that to iterate through the map of models and find it.
+        value = intent.getStringExtra("name");
+        if (value != null) {
+            for (ModelInfo modelInfo : mModelInfoMap.values()) {
+                if (value.equals(modelInfo.name)) {
+                    return modelInfo.modelUuid;
+                }
+            }
+            Log.e(TAG, "Failed to find a matching model with name '" + value + "'");
+        }
+
+        // We couldn't figure out what they were asking for.
+        throw new RuntimeException("Failed to get model from intent - specify either " +
+                "'modelUuid' or 'name'");
+    }
+
+    /**
+     * Will be called when the service is killed (through swipe aways, not if we're force killed).
+     */
+    @Override
+    public void onTaskRemoved(Intent rootIntent) {
+        super.onTaskRemoved(rootIntent);
+        stopAllRecognitions();
+        stopSelf();
+    }
+
+    @Override
+    public synchronized IBinder onBind(Intent intent) {
+        return mBinder;
+    }
+
+    public class SoundTriggerTestBinder extends Binder {
+        SoundTriggerTestService getService() {
+            // Return instance of our parent so clients can call public methods.
+            return SoundTriggerTestService.this;
+        }
+    }
+
+    public synchronized void setUserActivity(UserActivity activity) {
+        mUserActivity = activity;
+        if (mUserActivity != null) {
+            for (Map.Entry<UUID, ModelInfo> entry : mModelInfoMap.entrySet()) {
+                mUserActivity.addModel(entry.getKey(), entry.getValue().name);
+                mUserActivity.setModelState(entry.getKey(), entry.getValue().state);
+            }
+        }
+    }
+
+    private synchronized void stopAllRecognitions() {
+        for (ModelInfo modelInfo : mModelInfoMap.values()) {
+            if (modelInfo.detector != null) {
+                Log.i(TAG, "Stopping recognition for " + modelInfo.name);
+                try {
+                    modelInfo.detector.stopRecognition();
+                } catch (Exception e) {
+                    Log.e(TAG, "Failed to stop recognition", e);
+                }
+            }
+        }
+    }
+
+    // Helper struct for holding information about a model.
+    public static class ModelInfo {
+        public String name;
+        public String state;
+        public UUID modelUuid;
+        public UUID vendorUuid;
+        public MediaPlayer triggerAudioPlayer;
+        public SoundTriggerDetector detector;
+        public byte modelData[];
+        public boolean captureAudio;
+        public int captureAudioMs;
+        public AudioTrack captureAudioTrack;
+    }
+
+    private GenericSoundModel createNewSoundModel(ModelInfo modelInfo) {
+        return new GenericSoundModel(modelInfo.modelUuid, modelInfo.vendorUuid,
+                modelInfo.modelData);
+    }
+
+    public synchronized void loadModel(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+
+        postMessage("Loading model: " + modelInfo.name);
+
+        GenericSoundModel soundModel = createNewSoundModel(modelInfo);
+
+        boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(soundModel);
+        if (status) {
+            postToast("Successfully loaded " + modelInfo.name + ", UUID=" + soundModel.uuid);
+            setModelState(modelInfo, "Loaded");
+        } else {
+            postErrorToast("Failed to load " + modelInfo.name + ", UUID=" + soundModel.uuid + "!");
+            setModelState(modelInfo, "Failed to load");
+        }
+    }
+
+    public synchronized void unloadModel(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+
+        postMessage("Unloading model: " + modelInfo.name);
+
+        GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(modelUuid);
+        if (soundModel == null) {
+            postErrorToast("Sound model not found for " + modelInfo.name + "!");
+            return;
+        }
+        modelInfo.detector = null;
+        boolean status = mSoundTriggerUtil.deleteSoundModel(modelUuid);
+        if (status) {
+            postToast("Successfully unloaded " + modelInfo.name + ", UUID=" + soundModel.uuid);
+            setModelState(modelInfo, "Unloaded");
+        } else {
+            postErrorToast("Failed to unload " +
+                    modelInfo.name + ", UUID=" + soundModel.uuid + "!");
+            setModelState(modelInfo, "Failed to unload");
+        }
+    }
+
+    public synchronized void reloadModel(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+        postMessage("Reloading model: " + modelInfo.name);
+        GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(modelUuid);
+        if (soundModel == null) {
+            postErrorToast("Sound model not found for " + modelInfo.name + "!");
+            return;
+        }
+        GenericSoundModel updated = createNewSoundModel(modelInfo);
+        boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(updated);
+        if (status) {
+            postToast("Successfully reloaded " + modelInfo.name + ", UUID=" + modelInfo.modelUuid);
+            setModelState(modelInfo, "Reloaded");
+        } else {
+            postErrorToast("Failed to reload "
+                    + modelInfo.name + ", UUID=" + modelInfo.modelUuid + "!");
+            setModelState(modelInfo, "Failed to reload");
+        }
+    }
+
+    public synchronized void startRecognition(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+
+        if (modelInfo.detector == null) {
+            postMessage("Creating SoundTriggerDetector for " + modelInfo.name);
+            modelInfo.detector = mSoundTriggerUtil.createSoundTriggerDetector(
+                    modelUuid, new DetectorCallback(modelInfo));
+        }
+
+        postMessage("Starting recognition for " + modelInfo.name + ", UUID=" + modelInfo.modelUuid);
+        if (modelInfo.detector.startRecognition(modelInfo.captureAudio ?
+                SoundTriggerDetector.RECOGNITION_FLAG_CAPTURE_TRIGGER_AUDIO :
+                SoundTriggerDetector.RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS)) {
+            setModelState(modelInfo, "Started");
+        } else {
+            postErrorToast("Fast failure attempting to start recognition for " +
+                    modelInfo.name + ", UUID=" + modelInfo.modelUuid);
+            setModelState(modelInfo, "Failed to start");
+        }
+    }
+
+    public synchronized void stopRecognition(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+
+        if (modelInfo.detector == null) {
+            postErrorToast("Stop called on null detector for " +
+                    modelInfo.name + ", UUID=" + modelInfo.modelUuid);
+            return;
+        }
+        postMessage("Triggering stop recognition for " +
+                modelInfo.name + ", UUID=" + modelInfo.modelUuid);
+        if (modelInfo.detector.stopRecognition()) {
+            setModelState(modelInfo, "Stopped");
+        } else {
+            postErrorToast("Fast failure attempting to stop recognition for " +
+                    modelInfo.name + ", UUID=" + modelInfo.modelUuid);
+            setModelState(modelInfo, "Failed to stop");
+        }
+    }
+
+    public synchronized void playTriggerAudio(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+        if (modelInfo.triggerAudioPlayer != null) {
+            postMessage("Playing trigger audio for " + modelInfo.name);
+            modelInfo.triggerAudioPlayer.start();
+        } else {
+            postMessage("No trigger audio for " + modelInfo.name);
+        }
+    }
+
+    public synchronized void playCapturedAudio(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+        if (modelInfo.captureAudioTrack != null) {
+            postMessage("Playing captured audio for " + modelInfo.name);
+            modelInfo.captureAudioTrack.stop();
+            modelInfo.captureAudioTrack.reloadStaticData();
+            modelInfo.captureAudioTrack.play();
+        } else {
+            postMessage("No captured audio for " + modelInfo.name);
+        }
+    }
+
+    public synchronized void setCaptureAudioTimeout(UUID modelUuid, int captureTimeoutMs) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+        modelInfo.captureAudioMs = captureTimeoutMs;
+        Log.i(TAG, "Set " + modelInfo.name + " capture audio timeout to " +
+                captureTimeoutMs + "ms");
+    }
+
+    public synchronized void setCaptureAudio(UUID modelUuid, boolean captureAudio) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        if (modelInfo == null) {
+            postError("Could not find model for: " + modelUuid.toString());
+            return;
+        }
+        modelInfo.captureAudio = captureAudio;
+        Log.i(TAG, "Set " + modelInfo.name + " capture audio to " + captureAudio);
+    }
+
+    public synchronized boolean hasMicrophonePermission() {
+        return getBaseContext().checkSelfPermission(Manifest.permission.RECORD_AUDIO)
+                == PackageManager.PERMISSION_GRANTED;
+    }
+
+    public synchronized boolean modelHasTriggerAudio(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        return modelInfo != null && modelInfo.triggerAudioPlayer != null;
+    }
+
+    public synchronized boolean modelWillCaptureTriggerAudio(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        return modelInfo != null && modelInfo.captureAudio;
+    }
+
+    public synchronized boolean modelHasCapturedAudio(UUID modelUuid) {
+        ModelInfo modelInfo = mModelInfoMap.get(modelUuid);
+        return modelInfo != null && modelInfo.captureAudioTrack != null;
+    }
+
+    private void loadModelsInDataDir() {
+        // Load all the models in the data dir.
+        boolean loadedModel = false;
+        for (File file : getFilesDir().listFiles()) {
+            // Find meta-data in .properties files, ignore everything else.
+            if (!file.getName().endsWith(".properties")) {
+                continue;
+            }
+            try {
+                Properties properties = new Properties();
+                properties.load(new FileInputStream(file));
+                createModelInfo(properties);
+                loadedModel = true;
+            } catch (Exception e) {
+                Log.e(TAG, "Failed to load properties file " + file.getName());
+            }
+        }
+
+        // Create a few dummy models if we didn't load anything.
+        if (!loadedModel) {
+            Properties dummyModelProperties = new Properties();
+            for (String name : new String[]{"1", "2", "3"}) {
+                dummyModelProperties.setProperty("name", "Model " + name);
+                createModelInfo(dummyModelProperties);
+            }
+        }
+    }
+
+    /** Parses a Properties collection to generate a sound model.
+     *
+     * Missing keys are filled in with default/random values.
+     * @param properties Has the required 'name' property, but the remaining 'modelUuid',
+     *                   'vendorUuid', 'triggerAudio', and 'dataFile' optional properties.
+     *
+     */
+    private synchronized void createModelInfo(Properties properties) {
+        try {
+            ModelInfo modelInfo = new ModelInfo();
+
+            if (!properties.containsKey("name")) {
+                throw new RuntimeException("must have a 'name' property");
+            }
+            modelInfo.name = properties.getProperty("name");
+
+            if (properties.containsKey("modelUuid")) {
+                modelInfo.modelUuid = UUID.fromString(properties.getProperty("modelUuid"));
+            } else {
+                modelInfo.modelUuid = UUID.randomUUID();
+            }
+
+            if (properties.containsKey("vendorUuid")) {
+                modelInfo.vendorUuid = UUID.fromString(properties.getProperty("vendorUuid"));
+            } else {
+                modelInfo.vendorUuid = UUID.randomUUID();
+            }
+
+            if (properties.containsKey("triggerAudio")) {
+                modelInfo.triggerAudioPlayer = MediaPlayer.create(this, Uri.parse(
+                        getFilesDir().getPath() + "/" + properties.getProperty("triggerAudio")));
+                if (modelInfo.triggerAudioPlayer.getDuration() == 0) {
+                    modelInfo.triggerAudioPlayer.release();
+                    modelInfo.triggerAudioPlayer = null;
+                }
+            }
+
+            if (properties.containsKey("dataFile")) {
+                File modelDataFile = new File(
+                        getFilesDir().getPath() + "/" + properties.getProperty("dataFile"));
+                modelInfo.modelData = new byte[(int) modelDataFile.length()];
+                FileInputStream input = new FileInputStream(modelDataFile);
+                input.read(modelInfo.modelData, 0, modelInfo.modelData.length);
+            } else {
+                modelInfo.modelData = new byte[1024];
+                mRandom.nextBytes(modelInfo.modelData);
+            }
+
+            modelInfo.captureAudioMs = Integer.parseInt((String) properties.getOrDefault(
+                    "captureAudioDurationMs", "5000"));
+
+            // TODO: Add property support for keyphrase models when they're exposed by the
+            // service.
+
+            // Update our maps containing the button -> id and id -> modelInfo.
+            mModelInfoMap.put(modelInfo.modelUuid, modelInfo);
+            if (mUserActivity != null) {
+                mUserActivity.addModel(modelInfo.modelUuid, modelInfo.name);
+                mUserActivity.setModelState(modelInfo.modelUuid, modelInfo.state);
+            }
+        } catch (IOException e) {
+            Log.e(TAG, "Error parsing properties for " + properties.getProperty("name"), e);
+        }
+    }
+
+    private class CaptureAudioRecorder implements Runnable {
+        private final ModelInfo mModelInfo;
+        private final SoundTriggerDetector.EventPayload mEvent;
+
+        public CaptureAudioRecorder(ModelInfo modelInfo, SoundTriggerDetector.EventPayload event) {
+            mModelInfo = modelInfo;
+            mEvent = event;
+        }
+
+        @Override
+        public void run() {
+            AudioFormat format = mEvent.getCaptureAudioFormat();
+            if (format == null) {
+                postErrorToast("No audio format in recognition event.");
+                return;
+            }
+
+            AudioRecord audioRecord = null;
+            AudioTrack playbackTrack = null;
+            try {
+                // Inform the audio flinger that we really do want the stream from the soundtrigger.
+                AudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder();
+                attributesBuilder.setInternalCapturePreset(1999);
+                AudioAttributes attributes = attributesBuilder.build();
+
+                // Make sure we understand this kind of playback so we know how many bytes to read.
+                String encoding;
+                int bytesPerSample;
+                switch (format.getEncoding()) {
+                    case AudioFormat.ENCODING_PCM_8BIT:
+                        encoding = "8bit";
+                        bytesPerSample = 1;
+                        break;
+                    case AudioFormat.ENCODING_PCM_16BIT:
+                        encoding = "16bit";
+                        bytesPerSample = 2;
+                        break;
+                    case AudioFormat.ENCODING_PCM_FLOAT:
+                        encoding = "float";
+                        bytesPerSample = 4;
+                        break;
+                    default:
+                        throw new RuntimeException("Unhandled audio format in event");
+                }
+
+                int bytesRequired = format.getSampleRate() * format.getChannelCount() *
+                        bytesPerSample * mModelInfo.captureAudioMs / 1000;
+                int minBufferSize = AudioRecord.getMinBufferSize(
+                        format.getSampleRate(), format.getChannelMask(), format.getEncoding());
+                if (minBufferSize > bytesRequired) {
+                    bytesRequired = minBufferSize;
+                }
+
+                // Make an AudioTrack so we can play the data back out after it's finished
+                // recording.
+                try {
+                    int channelConfig = AudioFormat.CHANNEL_OUT_MONO;
+                    if (format.getChannelCount() == 2) {
+                        channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
+                    } else if (format.getChannelCount() >= 3) {
+                        throw new RuntimeException(
+                                "Too many channels in captured audio for playback");
+                    }
+
+                    playbackTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
+                            format.getSampleRate(), channelConfig, format.getEncoding(),
+                            bytesRequired, AudioTrack.MODE_STATIC);
+                } catch (Exception e) {
+                    Log.e(TAG, "Exception creating playback track", e);
+                    postErrorToast("Failed to create playback track: " + e.getMessage());
+                }
+
+                audioRecord = new AudioRecord(attributes, format, bytesRequired,
+                        mEvent.getCaptureSession());
+
+                byte[] buffer = new byte[bytesRequired];
+
+                // Create a file so we can save the output data there for analysis later.
+                FileOutputStream fos  = null;
+                try {
+                    fos = new FileOutputStream( new File(
+                            getFilesDir() + File.separator + mModelInfo.name.replace(' ', '_') +
+                                    "_capture_" + format.getChannelCount() + "ch_" +
+                                    format.getSampleRate() + "hz_" + encoding + ".pcm"));
+                } catch (IOException e) {
+                    Log.e(TAG, "Failed to open output for saving PCM data", e);
+                    postErrorToast("Failed to open output for saving PCM data: " + e.getMessage());
+                }
+
+                // Inform the user we're recording.
+                setModelState(mModelInfo, "Recording");
+                audioRecord.startRecording();
+                while (bytesRequired > 0) {
+                    int bytesRead = audioRecord.read(buffer, 0, buffer.length);
+                    if (bytesRead == -1) {
+                        break;
+                    }
+                    if (fos != null) {
+                        fos.write(buffer, 0, bytesRead);
+                    }
+                    if (playbackTrack != null) {
+                        playbackTrack.write(buffer, 0, bytesRead);
+                    }
+                    bytesRequired -= bytesRead;
+                }
+                audioRecord.stop();
+            } catch (Exception e) {
+                Log.e(TAG, "Error recording trigger audio", e);
+                postErrorToast("Error recording trigger audio: " + e.getMessage());
+            } finally {
+                if (audioRecord != null) {
+                    audioRecord.release();
+                }
+                synchronized (SoundTriggerTestService.this) {
+                    if (mModelInfo.captureAudioTrack != null) {
+                        mModelInfo.captureAudioTrack.release();
+                    }
+                    mModelInfo.captureAudioTrack = playbackTrack;
+                }
+                setModelState(mModelInfo, "Recording finished");
+            }
+        }
+    }
+
+    // Implementation of SoundTriggerDetector.Callback.
+    private class DetectorCallback extends SoundTriggerDetector.Callback {
+        private final ModelInfo mModelInfo;
+
+        public DetectorCallback(ModelInfo modelInfo) {
+            mModelInfo = modelInfo;
+        }
+
+        public void onAvailabilityChanged(int status) {
+            postMessage(mModelInfo.name + "Availability changed to: " + status);
+        }
+
+        public void onDetected(SoundTriggerDetector.EventPayload event) {
+            postMessage(mModelInfo.name + "onDetected(): " + eventPayloadToString(event));
+            synchronized (SoundTriggerTestService.this) {
+                if (mUserActivity != null) {
+                    mUserActivity.handleDetection(mModelInfo.modelUuid);
+                }
+                if (mModelInfo.captureAudio) {
+                    new Thread(new CaptureAudioRecorder(mModelInfo, event)).start();
+                }
+            }
+        }
+
+        public void onError() {
+            postMessage(mModelInfo.name + "onError()");
+            setModelState(mModelInfo, "Error");
+        }
+
+        public void onRecognitionPaused() {
+            postMessage(mModelInfo.name + " onRecognitionPaused()");
+            setModelState(mModelInfo, "Paused");
+        }
+
+        public void onRecognitionResumed() {
+            postMessage(mModelInfo.name + "onRecognitionResumed()");
+            setModelState(mModelInfo, "Resumed");
+        }
+    }
+
+    private String eventPayloadToString(SoundTriggerDetector.EventPayload event) {
+        String result = "EventPayload(";
+        AudioFormat format =  event.getCaptureAudioFormat();
+        result = result + "AudioFormat: " + ((format == null) ? "null" : format.toString());
+        byte[] triggerAudio = event.getTriggerAudio();
+        result = result + "TriggerAudio: " + (triggerAudio == null ? "null" : triggerAudio.length);
+        result = result + "CaptureSession: " + event.getCaptureSession();
+        result += " )";
+        return result;
+    }
+
+    private void postMessage(String msg) {
+        showMessage(msg, Log.INFO, false);
+    }
+
+    private void postError(String msg) {
+        showMessage(msg, Log.ERROR, false);
+    }
+
+    private void postToast(String msg) {
+        showMessage(msg, Log.INFO, true);
+    }
+
+    private void postErrorToast(String msg) {
+        showMessage(msg, Log.ERROR, true);
+    }
+
+    /** Logs the message at the specified level, then forwards it to the activity if present. */
+    private synchronized void showMessage(String msg, int logLevel, boolean showToast) {
+        Log.println(logLevel, TAG, msg);
+        if (mUserActivity != null) {
+            mUserActivity.showMessage(msg, showToast);
+        }
+    }
+
+    private synchronized void setModelState(ModelInfo modelInfo, String state) {
+        modelInfo.state = state;
+        if (mUserActivity != null) {
+            mUserActivity.setModelState(modelInfo.modelUuid, modelInfo.state);
+        }
+    }
+}
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java
index 1c95c25..8e5ed32 100644
--- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java
+++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/SoundTriggerUtil.java
@@ -18,7 +18,6 @@
 
 import android.annotation.Nullable;
 import android.content.Context;
-import android.hardware.soundtrigger.SoundTrigger;
 import android.hardware.soundtrigger.SoundTrigger.GenericSoundModel;
 import android.media.soundtrigger.SoundTriggerDetector;
 import android.media.soundtrigger.SoundTriggerManager;
@@ -36,7 +35,7 @@
  * Utility class for the managing sound trigger sound models.
  */
 public class SoundTriggerUtil {
-    private static final String TAG = "TestSoundTriggerUtil:Hotsound";
+    private static final String TAG = "SoundTriggerTestUtil";
 
     private final ISoundTriggerService mSoundTriggerService;
     private final SoundTriggerManager mSoundTriggerManager;
@@ -68,10 +67,6 @@
         return true;
     }
 
-    public void addOrUpdateSoundModel(SoundTriggerManager.Model soundModel) {
-        mSoundTriggerManager.updateModel(soundModel);
-    }
-
     /**
      * Gets the sound model for the given keyphrase, null if none exists.
      * If a sound model for a given keyphrase exists, and it needs to be updated,
@@ -91,7 +86,7 @@
         }
 
         if (model == null) {
-            Log.w(TAG, "No models present for the gien keyphrase ID");
+            Log.w(TAG, "No models present for the given keyphrase ID");
             return null;
         } else {
             return model;
@@ -109,18 +104,14 @@
         try {
             mSoundTriggerService.deleteSoundModel(new ParcelUuid(modelId));
         } catch (RemoteException e) {
-            Log.e(TAG, "RemoteException in updateSoundModel");
+            Log.e(TAG, "RemoteException in deleteSoundModel");
+            return false;
         }
         return true;
     }
 
-    public void deleteSoundModelUsingManager(UUID modelId) {
-            mSoundTriggerManager.deleteModel(modelId);
-    }
-
     public SoundTriggerDetector createSoundTriggerDetector(UUID modelId,
             SoundTriggerDetector.Callback callback) {
         return mSoundTriggerManager.createSoundTriggerDetector(modelId, callback, null);
     }
-
 }
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
deleted file mode 100644
index 5fd38e9..0000000
--- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.test.soundtrigger;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-
-import android.app.Activity;
-import android.hardware.soundtrigger.SoundTrigger.GenericSoundModel;
-import android.hardware.soundtrigger.SoundTrigger;
-import android.media.AudioFormat;
-import android.media.AudioManager;
-import android.media.MediaPlayer;
-import android.media.soundtrigger.SoundTriggerDetector;
-import android.media.soundtrigger.SoundTriggerManager;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.os.UserManager;
-import android.text.Editable;
-import android.text.method.ScrollingMovementMethod;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-import android.widget.RadioButton;
-import android.widget.RadioButton;
-import android.widget.RadioGroup;
-import android.widget.ScrollView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-public class TestSoundTriggerActivity extends Activity {
-    private static final String TAG = "TestSoundTriggerActivity";
-    private static final boolean DBG = false;
-
-    private SoundTriggerUtil mSoundTriggerUtil;
-    private Random mRandom;
-
-    private Map<Integer, ModelInfo> mModelInfoMap;
-    private Map<View, Integer> mModelIdMap;
-
-    private TextView mDebugView = null;
-    private int mSelectedModelId = -1;
-    private ScrollView mScrollView = null;
-    private Button mPlayTriggerButton = null;
-    private PowerManager.WakeLock mScreenWakelock;
-    private Handler mHandler;
-    private RadioGroup mRadioGroup;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        if (DBG) Log.d(TAG, "onCreate");
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.main);
-        mDebugView = (TextView) findViewById(R.id.console);
-        mScrollView = (ScrollView) findViewById(R.id.scroller_id);
-        mRadioGroup = (RadioGroup) findViewById(R.id.model_group_id);
-        mPlayTriggerButton = (Button) findViewById(R.id.play_trigger_id);
-        mDebugView.setText(mDebugView.getText(), TextView.BufferType.EDITABLE);
-        mDebugView.setMovementMethod(new ScrollingMovementMethod());
-        mSoundTriggerUtil = new SoundTriggerUtil(this);
-        mRandom = new Random();
-        mHandler = new Handler();
-
-        mModelInfoMap = new HashMap();
-        mModelIdMap = new HashMap();
-
-        setVolumeControlStream(AudioManager.STREAM_MUSIC);
-
-        // Load all the models in the data dir.
-        for (File file : getFilesDir().listFiles()) {
-            // Find meta-data in .properties files, ignore everything else.
-            if (!file.getName().endsWith(".properties")) {
-                continue;
-            }
-            try {
-                Properties properties = new Properties();
-                properties.load(new FileInputStream(file));
-                createModelInfoAndWidget(properties);
-            } catch (Exception e) {
-                Log.e(TAG, "Failed to load properties file " + file.getName());
-            }
-        }
-
-        // Create a few dummy models if we didn't load anything.
-        if (mModelIdMap.isEmpty()) {
-            Properties dummyModelProperties = new Properties();
-            for (String name : new String[]{"One", "Two", "Three"}) {
-                dummyModelProperties.setProperty("name", "Model " + name);
-                createModelInfoAndWidget(dummyModelProperties);
-            }
-        }
-    }
-
-    private void createModelInfoAndWidget(Properties properties) {
-        try {
-            ModelInfo modelInfo = new ModelInfo();
-
-            if (!properties.containsKey("name")) {
-                throw new RuntimeException("must have a 'name' property");
-            }
-            modelInfo.name = properties.getProperty("name");
-
-            if (properties.containsKey("modelUuid")) {
-                modelInfo.modelUuid = UUID.fromString(properties.getProperty("modelUuid"));
-            } else {
-                modelInfo.modelUuid = UUID.randomUUID();
-            }
-
-            if (properties.containsKey("vendorUuid")) {
-                modelInfo.vendorUuid = UUID.fromString(properties.getProperty("vendorUuid"));
-            } else {
-                modelInfo.vendorUuid = UUID.randomUUID();
-            }
-
-            if (properties.containsKey("triggerAudio")) {
-                modelInfo.triggerAudioPlayer = MediaPlayer.create(this, Uri.parse(
-                        getFilesDir().getPath() + "/" + properties.getProperty("triggerAudio")));
-            }
-
-            if (properties.containsKey("dataFile")) {
-                File modelDataFile = new File(
-                        getFilesDir().getPath() + "/" + properties.getProperty("dataFile"));
-                modelInfo.modelData = new byte[(int) modelDataFile.length()];
-                FileInputStream input = new FileInputStream(modelDataFile);
-                input.read(modelInfo.modelData, 0, modelInfo.modelData.length);
-            } else {
-                modelInfo.modelData = new byte[1024];
-                mRandom.nextBytes(modelInfo.modelData);
-            }
-
-            // TODO: Add property support for keyphrase models when they're exposed by the
-            // service. Also things like how much audio they should record with the capture session
-            // provided in the callback.
-
-            // Add a widget into the radio group.
-            RadioButton button = new RadioButton(this);
-            mRadioGroup.addView(button);
-            button.setText(modelInfo.name);
-            button.setOnClickListener(new View.OnClickListener() {
-                public void onClick(View v) {
-                    onRadioButtonClicked(v);
-                }
-            });
-
-            // Update our maps containing the button -> id and id -> modelInfo.
-            int newModelId = mModelIdMap.size() + 1;
-            mModelIdMap.put(button, newModelId);
-            mModelInfoMap.put(newModelId, modelInfo);
-
-            // If we don't have something selected, select this first thing.
-            if (mSelectedModelId < 0) {
-                button.setChecked(true);
-                onRadioButtonClicked(button);
-            }
-        } catch (IOException e) {
-            Log.e(TAG, "Error parsing properties for " + properties.getProperty("name"), e);
-        }
-    }
-
-    private void postMessage(String msg) {
-        Log.i(TAG, "Posted: " + msg);
-        ((Editable) mDebugView.getText()).append(msg + "\n");
-        if ((mDebugView.getMeasuredHeight() - mScrollView.getScrollY()) <=
-                (mScrollView.getHeight() + mDebugView.getLineHeight())) {
-            scrollToBottom();
-        }
-    }
-
-    private void scrollToBottom() {
-        mScrollView.post(new Runnable() {
-            public void run() {
-                mScrollView.smoothScrollTo(0, mDebugView.getBottom());
-            }
-        });
-    }
-
-    private synchronized UUID getSelectedUuid() {
-        return mModelInfoMap.get(mSelectedModelId).modelUuid;
-    }
-
-    private synchronized void setDetector(SoundTriggerDetector detector) {
-        mModelInfoMap.get(mSelectedModelId).detector = detector;
-    }
-
-    private synchronized SoundTriggerDetector getDetector() {
-        return mModelInfoMap.get(mSelectedModelId).detector;
-    }
-
-    private void screenWakeup() {
-        PowerManager pm = ((PowerManager)getSystemService(POWER_SERVICE));
-        if (mScreenWakelock == null) {
-            mScreenWakelock =  pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "TAG");
-        }
-        mScreenWakelock.acquire();
-    }
-
-    private void screenRelease() {
-        PowerManager pm = ((PowerManager)getSystemService(POWER_SERVICE));
-        mScreenWakelock.release();
-    }
-
-    /** TODO: Should return the abstract sound model that can be then sent to the service. */
-    private GenericSoundModel createNewSoundModel() {
-        ModelInfo modelInfo = mModelInfoMap.get(mSelectedModelId);
-        return new GenericSoundModel(modelInfo.modelUuid, modelInfo.vendorUuid,
-                modelInfo.modelData);
-    }
-
-    /**
-     * Called when the user clicks the enroll button.
-     * Performs a fresh enrollment.
-     */
-    public void onEnrollButtonClicked(View v) {
-        postMessage("Loading model: " + mSelectedModelId);
-
-        GenericSoundModel model = createNewSoundModel();
-
-        boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(model);
-        if (status) {
-            Toast.makeText(
-                    this, "Successfully created sound trigger model UUID=" + model.uuid,
-                    Toast.LENGTH_SHORT).show();
-        } else {
-            Toast.makeText(this, "Failed to enroll!!!" + model.uuid, Toast.LENGTH_SHORT).show();
-        }
-
-        // Test the SoundManager API.
-    }
-
-    /**
-     * Called when the user clicks the un-enroll button.
-     * Clears the enrollment information for the user.
-     */
-    public void onUnEnrollButtonClicked(View v) {
-        postMessage("Unloading model: " + mSelectedModelId);
-        UUID modelUuid = getSelectedUuid();
-        GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(modelUuid);
-        if (soundModel == null) {
-            Toast.makeText(this, "Sound model not found!!!", Toast.LENGTH_SHORT).show();
-            return;
-        }
-        boolean status = mSoundTriggerUtil.deleteSoundModel(modelUuid);
-        if (status) {
-            Toast.makeText(this, "Successfully deleted model UUID=" + soundModel.uuid,
-                    Toast.LENGTH_SHORT)
-                    .show();
-        } else {
-            Toast.makeText(this, "Failed to delete sound model!!!", Toast.LENGTH_SHORT).show();
-        }
-    }
-
-    /**
-     * Called when the user clicks the re-enroll button.
-     * Uses the previously enrolled sound model and makes changes to it before pushing it back.
-     */
-    public void onReEnrollButtonClicked(View v) {
-        postMessage("Re-loading model: " + mSelectedModelId);
-        UUID modelUuid = getSelectedUuid();
-        GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(modelUuid);
-        if (soundModel == null) {
-            Toast.makeText(this, "Sound model not found!!!", Toast.LENGTH_SHORT).show();
-            return;
-        }
-        GenericSoundModel updated = createNewSoundModel();
-        boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(updated);
-        if (status) {
-            Toast.makeText(this, "Successfully re-enrolled, model UUID=" + updated.uuid,
-                    Toast.LENGTH_SHORT)
-                    .show();
-        } else {
-            Toast.makeText(this, "Failed to re-enroll!!!", Toast.LENGTH_SHORT).show();
-        }
-    }
-
-    public void onStartRecognitionButtonClicked(View v) {
-        UUID modelUuid = getSelectedUuid();
-        SoundTriggerDetector detector = getDetector();
-        if (detector == null) {
-            Log.i(TAG, "Created an instance of the SoundTriggerDetector for model #" +
-                    mSelectedModelId);
-            postMessage("Created an instance of the SoundTriggerDetector for model #" +
-                    mSelectedModelId);
-            detector = mSoundTriggerUtil.createSoundTriggerDetector(modelUuid,
-                    new DetectorCallback());
-            setDetector(detector);
-        }
-        postMessage("Triggering start recognition for model: " + mSelectedModelId);
-        if (!detector.startRecognition(
-                SoundTriggerDetector.RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS)) {
-            Log.e(TAG, "Fast failure attempting to start recognition.");
-            postMessage("Fast failure attempting to start recognition:" + mSelectedModelId);
-        }
-    }
-
-    public void onStopRecognitionButtonClicked(View v) {
-        SoundTriggerDetector detector = getDetector();
-        if (detector == null) {
-            Log.e(TAG, "Stop called on null detector.");
-            postMessage("Error: Stop called on null detector.");
-            return;
-        }
-        postMessage("Triggering stop recognition for model: " + mSelectedModelId);
-        if (!detector.stopRecognition()) {
-            Log.e(TAG, "Fast failure attempting to stop recognition.");
-            postMessage("Fast failure attempting to stop recognition: " + mSelectedModelId);
-        }
-    }
-
-    public synchronized void onRadioButtonClicked(View view) {
-        // Is the button now checked?
-        boolean checked = ((RadioButton) view).isChecked();
-        if (checked) {
-            mSelectedModelId = mModelIdMap.get(view);
-            ModelInfo modelInfo = mModelInfoMap.get(mSelectedModelId);
-            postMessage("Selected " + modelInfo.name);
-
-            // Set the play trigger button to be enabled only if we actually have some audio.
-            mPlayTriggerButton.setEnabled(modelInfo.triggerAudioPlayer != null);
-        }
-    }
-
-    public synchronized void onPlayTriggerButtonClicked(View v) {
-        ModelInfo modelInfo = mModelInfoMap.get(mSelectedModelId);
-        modelInfo.triggerAudioPlayer.start();
-        postMessage("Playing trigger audio for " + modelInfo.name);
-    }
-
-    // Helper struct for holding information about a model.
-    private static class ModelInfo {
-      public String name;
-      public UUID modelUuid;
-      public UUID vendorUuid;
-      public MediaPlayer triggerAudioPlayer;
-      public SoundTriggerDetector detector;
-      public byte modelData[];
-    };
-
-    // Implementation of SoundTriggerDetector.Callback.
-    public class DetectorCallback extends SoundTriggerDetector.Callback {
-        public void onAvailabilityChanged(int status) {
-            postMessage("Availability changed to: " + status);
-        }
-
-        public void onDetected(SoundTriggerDetector.EventPayload event) {
-            postMessage("onDetected(): " + eventPayloadToString(event));
-            screenWakeup();
-            mHandler.postDelayed(new Runnable() {
-                @Override
-                public void run() {
-                   screenRelease();
-                }
-            }, 1000L);
-        }
-
-        public void onError() {
-            postMessage("onError()");
-        }
-
-        public void onRecognitionPaused() {
-            postMessage("onRecognitionPaused()");
-        }
-
-        public void onRecognitionResumed() {
-            postMessage("onRecognitionResumed()");
-        }
-    }
-
-    private String eventPayloadToString(SoundTriggerDetector.EventPayload event) {
-        String result = "EventPayload(";
-        AudioFormat format =  event.getCaptureAudioFormat();
-        result = result + "AudioFormat: " + ((format == null) ? "null" : format.toString());
-        byte[] triggerAudio = event.getTriggerAudio();
-        result = result + "TriggerAudio: " + (triggerAudio == null ? "null" : triggerAudio.length);
-        result = result + "CaptureSession: " + event.getCaptureSession();
-        result += " )";
-        return result;
-    }
-}
diff --git a/tests/UiBench/src/com/android/test/uibench/MainActivity.java b/tests/UiBench/src/com/android/test/uibench/MainActivity.java
index 2111274..79837b6 100644
--- a/tests/UiBench/src/com/android/test/uibench/MainActivity.java
+++ b/tests/UiBench/src/com/android/test/uibench/MainActivity.java
@@ -38,6 +38,23 @@
     private static final String EXTRA_PATH = "activity_path";
     private static final String CATEGORY_HWUI_TEST = "com.android.test.uibench.TEST";
 
+    public static class TestListFragment extends ListFragment {
+        @Override
+        @SuppressWarnings("unchecked")
+        public void onListItemClick(ListView l, View v, int position, long id) {
+            Map<String, Object> map = (Map<String, Object>)l.getItemAtPosition(position);
+
+            Intent intent = (Intent) map.get("intent");
+            startActivity(intent);
+        }
+
+        @Override
+        public void onViewCreated(View view, Bundle savedInstanceState) {
+            super.onViewCreated(view, savedInstanceState);
+            getListView().setTextFilterEnabled(true);
+        }
+    }
+
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -54,22 +71,7 @@
 
         FragmentManager fm = getSupportFragmentManager();
         if (fm.findFragmentById(android.R.id.content) == null) {
-            ListFragment listFragment = new ListFragment() {
-                @Override
-                @SuppressWarnings("unchecked")
-                public void onListItemClick(ListView l, View v, int position, long id) {
-                    Map<String, Object> map = (Map<String, Object>)l.getItemAtPosition(position);
-
-                    Intent intent = (Intent) map.get("intent");
-                    startActivity(intent);
-                }
-
-                @Override
-                public void onViewCreated(View view, Bundle savedInstanceState) {
-                    super.onViewCreated(view, savedInstanceState);
-                    getListView().setTextFilterEnabled(true);
-                }
-            };
+            ListFragment listFragment = new TestListFragment();
             listFragment.setListAdapter(new SimpleAdapter(this, getData(path),
                     android.R.layout.simple_list_item_1, new String[] { "title" },
                     new int[] { android.R.id.text1 }));
diff --git a/tests/WallpaperTest/res/values/strings.xml b/tests/WallpaperTest/res/values/strings.xml
index fd21259..80a3d49 100644
--- a/tests/WallpaperTest/res/values/strings.xml
+++ b/tests/WallpaperTest/res/values/strings.xml
@@ -24,6 +24,9 @@
         Test wallpaper for use with the wallpaper test app.
     </string>
 
+    <string name="test_wallpaper_context_uri">https://www.google.com/maps/@37.8092876,-122.408986,1391m/data=!3m1!1e3</string>
+    <string name="test_wallpaper_context_description">Explore</string>
+
     <string name="dimens">Dimens: </string>
     <string name="width">Width: </string>
     <string name="height">Height: </string>
diff --git a/tests/WallpaperTest/res/xml/test_wallpaper.xml b/tests/WallpaperTest/res/xml/test_wallpaper.xml
index 9f7d714b..ba22478 100644
--- a/tests/WallpaperTest/res/xml/test_wallpaper.xml
+++ b/tests/WallpaperTest/res/xml/test_wallpaper.xml
@@ -23,4 +23,7 @@
 <wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
     android:author="@string/test_wallpaper_author"
     android:description="@string/test_wallpaper_desc"
-    android:thumbnail="@drawable/test_wallpaper_thumb" />
+    android:thumbnail="@drawable/test_wallpaper_thumb"
+    android:showMetadataInPreview="true"
+    android:contextUri="@string/test_wallpaper_context_uri"
+    android:contextDescription="@string/test_wallpaper_context_description"/>
diff --git a/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java b/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java
index 95db6d1..ab36c22 100644
--- a/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java
+++ b/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java
@@ -144,6 +144,14 @@
         @Override
         public void onSurfaceCreated(SurfaceHolder holder) {
             super.onSurfaceCreated(holder);
+
+            // Simulate some slowness, so we can test the loading process in the live wallpaper
+            // picker.
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
         }
 
         @Override
diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
index a726a15..063dd86 100644
--- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
+++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
@@ -93,7 +93,7 @@
 
         try {
             mWm.addAppToken(0, null, 0, 0, 0, false, false, 0, 0, false, false, null,
-                    Configuration.EMPTY, 0, false, false, 0);
+                    Configuration.EMPTY, 0, false, false, 0, -1);
             fail("IWindowManager.addAppToken did not throw SecurityException as"
                     + " expected");
         } catch (SecurityException e) {
diff --git a/tests/utils/testutils/Android.mk b/tests/utils/testutils/Android.mk
new file mode 100644
index 0000000..d53167f
--- /dev/null
+++ b/tests/utils/testutils/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := frameworks-base-testutils
+LOCAL_MODULE_TAG := tests
+
+LOCAL_SRC_FILES := $(call all-java-files-under,java)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android-support-test \
+    mockito-target
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tests/utils/testutils/java/android/app/test/MockAnswerUtil.java b/tests/utils/testutils/java/android/app/test/MockAnswerUtil.java
new file mode 100644
index 0000000..746c77d
--- /dev/null
+++ b/tests/utils/testutils/java/android/app/test/MockAnswerUtil.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.test;
+
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+/**
+ * Utilities for creating Answers for mock objects
+ */
+public class MockAnswerUtil {
+
+    /**
+     * Answer that calls the method in the Answer called "answer" that matches the type signature of
+     * the method being answered. An error will be thrown at runtime if the signature does not match
+     * exactly.
+     */
+    public static class AnswerWithArguments implements Answer<Object> {
+        @Override
+        public final Object answer(InvocationOnMock invocation) throws Throwable {
+            Method method = invocation.getMethod();
+            try {
+                Method implementation = getClass().getMethod("answer", method.getParameterTypes());
+                if (!implementation.getReturnType().equals(method.getReturnType())) {
+                    throw new RuntimeException("Found answer method does not have expected return "
+                            + "type. Expected: " + method.getReturnType() + ", got "
+                            + implementation.getReturnType());
+                }
+                Object[] args = invocation.getArguments();
+                try {
+                    return implementation.invoke(this, args);
+                } catch (IllegalAccessException e) {
+                    throw new RuntimeException("Error invoking answer method", e);
+                } catch (InvocationTargetException e) {
+                    throw e.getCause();
+                }
+            } catch (NoSuchMethodException e) {
+                throw new RuntimeException("Could not find answer method with the expected args "
+                        + Arrays.toString(method.getParameterTypes()), e);
+            }
+        }
+    }
+
+}
diff --git a/tests/utils/testutils/java/android/app/test/TestAlarmManager.java b/tests/utils/testutils/java/android/app/test/TestAlarmManager.java
new file mode 100644
index 0000000..e90ea1e64
--- /dev/null
+++ b/tests/utils/testutils/java/android/app/test/TestAlarmManager.java
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.test;
+
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.anyLong;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+
+import android.app.AlarmManager;
+import android.app.test.MockAnswerUtil.AnswerWithArguments;
+import android.os.Handler;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Creates an AlarmManager whose alarm dispatch can be controlled
+ * Currently only supports alarm listeners
+ *
+ * Alarm listeners will be dispatched to the handler provided or will
+ * be dispatched immediately if they would have been sent to the main
+ * looper (handler was null).
+ */
+public class TestAlarmManager {
+    private final AlarmManager mAlarmManager;
+    private final List<PendingAlarm> mPendingAlarms;
+
+    public TestAlarmManager() throws Exception {
+        mPendingAlarms = new ArrayList<>();
+
+        mAlarmManager = mock(AlarmManager.class);
+        doAnswer(new SetListenerAnswer()).when(mAlarmManager).set(anyInt(), anyLong(), anyString(),
+                any(AlarmManager.OnAlarmListener.class), any(Handler.class));
+        doAnswer(new SetListenerAnswer()).when(mAlarmManager).setExact(anyInt(), anyLong(),
+                anyString(), any(AlarmManager.OnAlarmListener.class), any(Handler.class));
+        doAnswer(new CancelListenerAnswer())
+                .when(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class));
+    }
+
+    public AlarmManager getAlarmManager() {
+        return mAlarmManager;
+    }
+
+    /**
+     * Dispatch a pending alarm with the given tag
+     * @return if any alarm was dispatched
+     */
+    public boolean dispatch(String tag) {
+        for (int i = 0; i < mPendingAlarms.size(); ++i) {
+            PendingAlarm alarm = mPendingAlarms.get(i);
+            if (Objects.equals(tag, alarm.getTag())) {
+                mPendingAlarms.remove(i);
+                alarm.dispatch();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @return if an alarm with the given tag is pending
+     */
+    public boolean isPending(String tag) {
+        for (int i = 0; i < mPendingAlarms.size(); ++i) {
+            PendingAlarm alarm = mPendingAlarms.get(i);
+            if (Objects.equals(tag, alarm.getTag())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @return trigger time of an pending alarm with the given tag
+     *         -1 if no pending alarm with the given tag
+     */
+    public long getTriggerTimeMillis(String tag) {
+        for (int i = 0; i < mPendingAlarms.size(); ++i) {
+            PendingAlarm alarm = mPendingAlarms.get(i);
+            if (Objects.equals(tag, alarm.getTag())) {
+                return alarm.getTriggerTimeMillis();
+            }
+        }
+        return -1;
+    }
+
+    private static class PendingAlarm {
+        private final int mType;
+        private final long mTriggerAtMillis;
+        private final String mTag;
+        private final Runnable mCallback;
+
+        public PendingAlarm(int type, long triggerAtMillis, String tag, Runnable callback) {
+            mType = type;
+            mTriggerAtMillis = triggerAtMillis;
+            mTag = tag;
+            mCallback = callback;
+        }
+
+        public void dispatch() {
+            if (mCallback != null) {
+                mCallback.run();
+            }
+        }
+
+        public Runnable getCallback() {
+            return mCallback;
+        }
+
+        public String getTag() {
+            return mTag;
+        }
+
+        public long getTriggerTimeMillis() {
+            return mTriggerAtMillis;
+        }
+    }
+
+    private class SetListenerAnswer extends AnswerWithArguments {
+        public void answer(int type, long triggerAtMillis, String tag,
+                AlarmManager.OnAlarmListener listener, Handler handler) {
+            mPendingAlarms.add(new PendingAlarm(type, triggerAtMillis, tag,
+                            new AlarmListenerRunnable(listener, handler)));
+        }
+    }
+
+    private class CancelListenerAnswer extends AnswerWithArguments {
+        public void answer(AlarmManager.OnAlarmListener listener) {
+            Iterator<PendingAlarm> alarmItr = mPendingAlarms.iterator();
+            while (alarmItr.hasNext()) {
+                PendingAlarm alarm = alarmItr.next();
+                if (alarm.getCallback() instanceof AlarmListenerRunnable) {
+                    AlarmListenerRunnable alarmCallback =
+                            (AlarmListenerRunnable) alarm.getCallback();
+                    if (alarmCallback.getListener() == listener) {
+                        alarmItr.remove();
+                    }
+                }
+            }
+        }
+    }
+
+    private static class AlarmListenerRunnable implements Runnable {
+        private final AlarmManager.OnAlarmListener mListener;
+        private final Handler mHandler;
+        public AlarmListenerRunnable(AlarmManager.OnAlarmListener listener, Handler handler) {
+            mListener = listener;
+            mHandler = handler;
+        }
+
+        public AlarmManager.OnAlarmListener getListener() {
+            return mListener;
+        }
+
+        @Override
+        public void run() {
+            if (mHandler != null) {
+                mHandler.post(new Runnable() {
+                        @Override
+                        public void run() {
+                            mListener.onAlarm();
+                        }
+                    });
+            } else { // normally gets dispatched in main looper
+                mListener.onAlarm();
+            }
+        }
+    }
+}
diff --git a/tests/utils/testutils/java/android/os/test/TestLooper.java b/tests/utils/testutils/java/android/os/test/TestLooper.java
new file mode 100644
index 0000000..e8ceb4a
--- /dev/null
+++ b/tests/utils/testutils/java/android/os/test/TestLooper.java
@@ -0,0 +1,283 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.test;
+
+import static org.junit.Assert.assertTrue;
+
+import android.os.Looper;
+import android.os.Message;
+import android.os.MessageQueue;
+import android.os.SystemClock;
+import android.util.Log;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ * Creates a looper whose message queue can be manipulated
+ * This allows testing code that uses a looper to dispatch messages in a deterministic manner
+ * Creating a TestLooper will also install it as the looper for the current thread
+ */
+public class TestLooper {
+    protected final Looper mLooper;
+
+    private static final Constructor<Looper> LOOPER_CONSTRUCTOR;
+    private static final Field THREAD_LOCAL_LOOPER_FIELD;
+    private static final Field MESSAGE_QUEUE_MESSAGES_FIELD;
+    private static final Field MESSAGE_NEXT_FIELD;
+    private static final Field MESSAGE_WHEN_FIELD;
+    private static final Method MESSAGE_MARK_IN_USE_METHOD;
+    private static final String TAG = "TestLooper";
+
+    private AutoDispatchThread mAutoDispatchThread;
+
+    static {
+        try {
+            LOOPER_CONSTRUCTOR = Looper.class.getDeclaredConstructor(Boolean.TYPE);
+            LOOPER_CONSTRUCTOR.setAccessible(true);
+            THREAD_LOCAL_LOOPER_FIELD = Looper.class.getDeclaredField("sThreadLocal");
+            THREAD_LOCAL_LOOPER_FIELD.setAccessible(true);
+            MESSAGE_QUEUE_MESSAGES_FIELD = MessageQueue.class.getDeclaredField("mMessages");
+            MESSAGE_QUEUE_MESSAGES_FIELD.setAccessible(true);
+            MESSAGE_NEXT_FIELD = Message.class.getDeclaredField("next");
+            MESSAGE_NEXT_FIELD.setAccessible(true);
+            MESSAGE_WHEN_FIELD = Message.class.getDeclaredField("when");
+            MESSAGE_WHEN_FIELD.setAccessible(true);
+            MESSAGE_MARK_IN_USE_METHOD = Message.class.getDeclaredMethod("markInUse");
+            MESSAGE_MARK_IN_USE_METHOD.setAccessible(true);
+        } catch (NoSuchFieldException | NoSuchMethodException e) {
+            throw new RuntimeException("Failed to initialize TestLooper", e);
+        }
+    }
+
+
+    public TestLooper() {
+        try {
+            mLooper = LOOPER_CONSTRUCTOR.newInstance(false);
+
+            ThreadLocal<Looper> threadLocalLooper = (ThreadLocal<Looper>) THREAD_LOCAL_LOOPER_FIELD
+                    .get(null);
+            threadLocalLooper.set(mLooper);
+        } catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
+            throw new RuntimeException("Reflection error constructing or accessing looper", e);
+        }
+    }
+
+    public Looper getLooper() {
+        return mLooper;
+    }
+
+    private Message getMessageLinkedList() {
+        try {
+            MessageQueue queue = mLooper.getQueue();
+            return (Message) MESSAGE_QUEUE_MESSAGES_FIELD.get(queue);
+        } catch (IllegalAccessException e) {
+            throw new RuntimeException("Access failed in TestLooper: get - MessageQueue.mMessages",
+                    e);
+        }
+    }
+
+    public void moveTimeForward(long milliSeconds) {
+        try {
+            Message msg = getMessageLinkedList();
+            while (msg != null) {
+                long updatedWhen = msg.getWhen() - milliSeconds;
+                if (updatedWhen < 0) {
+                    updatedWhen = 0;
+                }
+                MESSAGE_WHEN_FIELD.set(msg, updatedWhen);
+                msg = (Message) MESSAGE_NEXT_FIELD.get(msg);
+            }
+        } catch (IllegalAccessException e) {
+            throw new RuntimeException("Access failed in TestLooper: set - Message.when", e);
+        }
+    }
+
+    private Message messageQueueNext() {
+        try {
+            long now = SystemClock.uptimeMillis();
+
+            Message prevMsg = null;
+            Message msg = getMessageLinkedList();
+            if (msg != null && msg.getTarget() == null) {
+                // Stalled by a barrier. Find the next asynchronous message in
+                // the queue.
+                do {
+                    prevMsg = msg;
+                    msg = (Message) MESSAGE_NEXT_FIELD.get(msg);
+                } while (msg != null && !msg.isAsynchronous());
+            }
+            if (msg != null) {
+                if (now >= msg.getWhen()) {
+                    // Got a message.
+                    if (prevMsg != null) {
+                        MESSAGE_NEXT_FIELD.set(prevMsg, MESSAGE_NEXT_FIELD.get(msg));
+                    } else {
+                        MESSAGE_QUEUE_MESSAGES_FIELD.set(mLooper.getQueue(),
+                                MESSAGE_NEXT_FIELD.get(msg));
+                    }
+                    MESSAGE_NEXT_FIELD.set(msg, null);
+                    MESSAGE_MARK_IN_USE_METHOD.invoke(msg);
+                    return msg;
+                }
+            }
+        } catch (IllegalAccessException | InvocationTargetException e) {
+            throw new RuntimeException("Access failed in TestLooper", e);
+        }
+
+        return null;
+    }
+
+    /**
+     * @return true if there are pending messages in the message queue
+     */
+    public synchronized boolean isIdle() {
+        Message messageList = getMessageLinkedList();
+
+        return messageList != null && SystemClock.uptimeMillis() >= messageList.getWhen();
+    }
+
+    /**
+     * @return the next message in the Looper's message queue or null if there is none
+     */
+    public synchronized Message nextMessage() {
+        if (isIdle()) {
+            return messageQueueNext();
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Dispatch the next message in the queue
+     * Asserts that there is a message in the queue
+     */
+    public synchronized void dispatchNext() {
+        assertTrue(isIdle());
+        Message msg = messageQueueNext();
+        if (msg == null) {
+            return;
+        }
+        msg.getTarget().dispatchMessage(msg);
+    }
+
+    /**
+     * Dispatch all messages currently in the queue
+     * Will not fail if there are no messages pending
+     * @return the number of messages dispatched
+     */
+    public synchronized int dispatchAll() {
+        int count = 0;
+        while (isIdle()) {
+            dispatchNext();
+            ++count;
+        }
+        return count;
+    }
+
+    /**
+     * Thread used to dispatch messages when the main thread is blocked waiting for a response.
+     */
+    private class AutoDispatchThread extends Thread {
+        private static final int MAX_LOOPS = 100;
+        private static final int LOOP_SLEEP_TIME_MS = 10;
+
+        private RuntimeException mAutoDispatchException = null;
+
+        /**
+         * Run method for the auto dispatch thread.
+         * The thread loops a maximum of MAX_LOOPS times with a 10ms sleep between loops.
+         * The thread continues looping and attempting to dispatch all messages until at
+         * least one message has been dispatched.
+         */
+        @Override
+        public void run() {
+            int dispatchCount = 0;
+            for (int i = 0; i < MAX_LOOPS; i++) {
+                try {
+                    dispatchCount = dispatchAll();
+                } catch (RuntimeException e) {
+                    mAutoDispatchException = e;
+                }
+                Log.d(TAG, "dispatched " + dispatchCount + " messages");
+                if (dispatchCount > 0) {
+                    return;
+                }
+                try {
+                    Thread.sleep(LOOP_SLEEP_TIME_MS);
+                } catch (InterruptedException e) {
+                    mAutoDispatchException = new IllegalStateException(
+                            "stopAutoDispatch called before any messages were dispatched.");
+                    return;
+                }
+            }
+            Log.e(TAG, "AutoDispatchThread did not dispatch any messages.");
+            mAutoDispatchException = new IllegalStateException(
+                    "TestLooper did not dispatch any messages before exiting.");
+        }
+
+        /**
+         * Method allowing the TestLooper to pass any exceptions thrown by the thread to be passed
+         * to the main thread.
+         *
+         * @return RuntimeException Exception created by stopping without dispatching a message
+         */
+        public RuntimeException getException() {
+            return mAutoDispatchException;
+        }
+    }
+
+    /**
+     * Create and start a new AutoDispatchThread if one is not already running.
+     */
+    public void startAutoDispatch() {
+        if (mAutoDispatchThread != null) {
+            throw new IllegalStateException(
+                    "startAutoDispatch called with the AutoDispatchThread already running.");
+        }
+        mAutoDispatchThread = new AutoDispatchThread();
+        mAutoDispatchThread.start();
+    }
+
+    /**
+     * If an AutoDispatchThread is currently running, stop and clean up.
+     */
+    public void stopAutoDispatch() {
+        if (mAutoDispatchThread != null) {
+            if (mAutoDispatchThread.isAlive()) {
+                mAutoDispatchThread.interrupt();
+            }
+            try {
+                mAutoDispatchThread.join();
+            } catch (InterruptedException e) {
+                // Catch exception from join.
+            }
+
+            RuntimeException e = mAutoDispatchThread.getException();
+            mAutoDispatchThread = null;
+            if (e != null) {
+                throw e;
+            }
+        } else {
+            // stopAutoDispatch was called when startAutoDispatch has not created a new thread.
+            throw new IllegalStateException(
+                    "stopAutoDispatch called without startAutoDispatch.");
+        }
+    }
+}
diff --git a/tests/utils/testutils/java/android/os/test/TestLooperTest.java b/tests/utils/testutils/java/android/os/test/TestLooperTest.java
new file mode 100644
index 0000000..40d83b5
--- /dev/null
+++ b/tests/utils/testutils/java/android/os/test/TestLooperTest.java
@@ -0,0 +1,371 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.test;
+
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InOrder;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Test TestLooperAbstractTime which provides control over "time". Note that
+ * real-time is being used as well. Therefore small time increments are NOT
+ * reliable. All tests are in "K" units (i.e. *1000).
+ */
+
+@SmallTest
+public class TestLooperTest {
+    private TestLooper mTestLooper;
+    private Handler mHandler;
+    private Handler mHandlerSpy;
+
+    @Rule
+    public ErrorCollector collector = new ErrorCollector();
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+
+        mTestLooper = new TestLooper();
+        mHandler = new Handler(mTestLooper.getLooper());
+        mHandlerSpy = spy(mHandler);
+    }
+
+    /**
+     * Basic test with no time stamps: dispatch 4 messages, check that all 4
+     * delivered (in correct order).
+     */
+    @Test
+    public void testNoTimeMovement() {
+        final int messageA = 1;
+        final int messageB = 2;
+        final int messageC = 3;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageC));
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("2: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("3: messageB", messageB, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("4: messageC", messageC, equalTo(messageCaptor.getValue().what));
+
+        inOrder.verify(mHandlerSpy, never()).handleMessage(any(Message.class));
+    }
+
+    /**
+     * Test message sequence: A, B, C@5K, A@10K. Don't move time.
+     * <p>
+     * Expected: only get A, B
+     */
+    @Test
+    public void testDelayedDispatchNoTimeMove() {
+        final int messageA = 1;
+        final int messageB = 2;
+        final int messageC = 3;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB));
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageC), 5000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageA), 10000);
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what));
+
+        inOrder.verify(mHandlerSpy, never()).handleMessage(any(Message.class));
+    }
+
+    /**
+     * Test message sequence: A, B, C@5K, A@10K, Advance time by 5K.
+     * <p>
+     * Expected: only get A, B, C
+     */
+    @Test
+    public void testDelayedDispatchAdvanceTimeOnce() {
+        final int messageA = 1;
+        final int messageB = 2;
+        final int messageC = 3;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB));
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageC), 5000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageA), 10000);
+        mTestLooper.moveTimeForward(5000);
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("3: messageC", messageC, equalTo(messageCaptor.getValue().what));
+
+        inOrder.verify(mHandlerSpy, never()).handleMessage(any(Message.class));
+    }
+
+    /**
+     * Test message sequence: A, B, C@5K, Advance time by 4K, A@1K, B@2K Advance
+     * time by 1K.
+     * <p>
+     * Expected: get A, B, C, A
+     */
+    @Test
+    public void testDelayedDispatchAdvanceTimeTwice() {
+        final int messageA = 1;
+        final int messageB = 2;
+        final int messageC = 3;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB));
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageC), 5000);
+        mTestLooper.moveTimeForward(4000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageA), 1000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageB), 2000);
+        mTestLooper.moveTimeForward(1000);
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("3: messageC", messageC, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("4: messageA", messageA, equalTo(messageCaptor.getValue().what));
+
+        inOrder.verify(mHandlerSpy, never()).handleMessage(any(Message.class));
+    }
+
+    /**
+     * Test message sequence: A, B, C@5K, Advance time by 4K, A@5K, B@2K Advance
+     * time by 3K.
+     * <p>
+     * Expected: get A, B, C, B
+     */
+    @Test
+    public void testDelayedDispatchReverseOrder() {
+        final int messageA = 1;
+        final int messageB = 2;
+        final int messageC = 3;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB));
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageC), 5000);
+        mTestLooper.moveTimeForward(4000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageA), 5000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageB), 2000);
+        mTestLooper.moveTimeForward(3000);
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("3: messageC", messageC, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("4: messageB", messageB, equalTo(messageCaptor.getValue().what));
+
+        inOrder.verify(mHandlerSpy, never()).handleMessage(any(Message.class));
+    }
+
+    /**
+     * Test message sequence: A, B, C@5K, Advance time by 4K, dispatch all,
+     * A@5K, B@2K Advance time by 3K, dispatch all.
+     * <p>
+     * Expected: get A, B after first dispatch; then C, B after second dispatch
+     */
+    @Test
+    public void testDelayedDispatchAllMultipleTimes() {
+        final int messageA = 1;
+        final int messageB = 2;
+        final int messageC = 3;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageB));
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageC), 5000);
+        mTestLooper.moveTimeForward(4000);
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what));
+
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageA), 5000);
+        mHandlerSpy.sendMessageDelayed(mHandler.obtainMessage(messageB), 2000);
+        mTestLooper.moveTimeForward(3000);
+        mTestLooper.dispatchAll();
+
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("3: messageC", messageC, equalTo(messageCaptor.getValue().what));
+        inOrder.verify(mHandlerSpy).handleMessage(messageCaptor.capture());
+        collector.checkThat("4: messageB", messageB, equalTo(messageCaptor.getValue().what));
+
+        inOrder.verify(mHandlerSpy, never()).handleMessage(any(Message.class));
+    }
+
+    /**
+     * Test AutoDispatch for a single message.
+     * This test would ideally use the Channel sendMessageSynchronously.  At this time, the setup to
+     * get a working test channel is cumbersome.  Until this is fixed, we substitute with a
+     * sendMessage followed by a blocking call.  The main test thread blocks until the test handler
+     * receives the test message (messageA) and sets a boolean true.  Once the boolean is true, the
+     * main thread will exit the busy wait loop, stop autoDispatch and check the assert.
+     *
+     * Enable AutoDispatch, add message, block on message being handled and stop AutoDispatch.
+     * <p>
+     * Expected: handleMessage is called for messageA and stopAutoDispatch is called.
+     */
+    @Test
+    public void testAutoDispatchWithSingleMessage() {
+        final int mLoopSleepTimeMs = 5;
+
+        final int messageA = 1;
+
+        TestLooper mockLooper = new TestLooper();
+        class TestHandler extends Handler {
+            public volatile boolean handledMessage = false;
+            TestHandler(Looper looper) {
+                super(looper);
+            }
+
+            @Override
+            public void handleMessage(Message msg) {
+                if (msg.what == messageA) {
+                    handledMessage = true;
+                }
+            }
+        }
+
+        TestHandler testHandler = new TestHandler(mockLooper.getLooper());
+        mockLooper.startAutoDispatch();
+        testHandler.sendMessage(testHandler.obtainMessage(messageA));
+        while (!testHandler.handledMessage) {
+            // Block until message is handled
+            try {
+                Thread.sleep(mLoopSleepTimeMs);
+            } catch (InterruptedException e) {
+                // Interrupted while sleeping.
+            }
+        }
+        mockLooper.stopAutoDispatch();
+        assertTrue("TestHandler should have received messageA", testHandler.handledMessage);
+    }
+
+    /**
+     * Test starting AutoDispatch while already running throws IllegalStateException
+     * Enable AutoDispatch two times in a row.
+     * <p>
+     * Expected: catch IllegalStateException on second call.
+     */
+    @Test(expected = IllegalStateException.class)
+    public void testRepeatedStartAutoDispatchThrowsException() {
+        mTestLooper.startAutoDispatch();
+        mTestLooper.startAutoDispatch();
+    }
+
+    /**
+     * Test stopping AutoDispatch without previously starting throws IllegalStateException
+     * Stop AutoDispatch
+     * <p>
+     * Expected: catch IllegalStateException on second call.
+     */
+    @Test(expected = IllegalStateException.class)
+    public void testStopAutoDispatchWithoutStartThrowsException() {
+        mTestLooper.stopAutoDispatch();
+    }
+
+    /**
+     * Test AutoDispatch exits and does not dispatch a later message.
+     * Start and stop AutoDispatch then add a message.
+     * <p>
+     * Expected: After AutoDispatch is stopped, dispatchAll will return 1.
+     */
+    @Test
+    public void testAutoDispatchStopsCleanlyWithoutDispatchingAMessage() {
+        final int messageA = 1;
+
+        InOrder inOrder = inOrder(mHandlerSpy);
+        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
+
+        mTestLooper.startAutoDispatch();
+        try {
+            mTestLooper.stopAutoDispatch();
+        } catch (IllegalStateException e) {
+            //  Stopping without a dispatch will throw an exception.
+        }
+
+        mHandlerSpy.sendMessage(mHandler.obtainMessage(messageA));
+        assertEquals("One message should be dispatched", 1, mTestLooper.dispatchAll());
+    }
+
+    /**
+     * Test AutoDispatch throws an exception when no messages are dispatched.
+     * Start and stop AutoDispatch
+     * <p>
+     * Expected: Exception is thrown with the stopAutoDispatch call.
+     */
+    @Test(expected = IllegalStateException.class)
+    public void testAutoDispatchThrowsExceptionWhenNoMessagesDispatched() {
+        mTestLooper.startAutoDispatch();
+        mTestLooper.stopAutoDispatch();
+    }
+}
diff --git a/tests/utils/testutils/java/com/android/internal/util/test/BidirectionalAsyncChannel.java b/tests/utils/testutils/java/com/android/internal/util/test/BidirectionalAsyncChannel.java
new file mode 100644
index 0000000..25cd5b9
--- /dev/null
+++ b/tests/utils/testutils/java/com/android/internal/util/test/BidirectionalAsyncChannel.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.internal.util.test;
+
+import static org.junit.Assert.assertEquals;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Messenger;
+import android.util.Log;
+
+import com.android.internal.util.AsyncChannel;
+
+
+/**
+ * Provides an AsyncChannel interface that implements the connection initiating half of a
+ * bidirectional channel as described in {@link com.android.internal.util.AsyncChannel}.
+ */
+public class BidirectionalAsyncChannel {
+    private static final String TAG = "BidirectionalAsyncChannel";
+
+    private AsyncChannel mChannel;
+    public enum ChannelState { DISCONNECTED, HALF_CONNECTED, CONNECTED, FAILURE };
+    private ChannelState mState = ChannelState.DISCONNECTED;
+
+    public void assertConnected() {
+        assertEquals("AsyncChannel was not fully connected", ChannelState.CONNECTED, mState);
+    }
+
+    public void connect(final Looper looper, final Messenger messenger,
+            final Handler incomingMessageHandler) {
+        assertEquals("AsyncChannel must be disconnected to connect",
+                ChannelState.DISCONNECTED, mState);
+        mChannel = new AsyncChannel();
+        Handler rawMessageHandler = new Handler(looper) {
+                @Override
+                public void handleMessage(Message msg) {
+                    switch (msg.what) {
+                    case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED:
+                        if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) {
+                            Log.d(TAG, "Successfully half connected " + this);
+                            mChannel.sendMessage(AsyncChannel.CMD_CHANNEL_FULL_CONNECTION);
+                            mState = ChannelState.HALF_CONNECTED;
+                        } else {
+                            Log.d(TAG, "Failed to connect channel " + this);
+                            mState = ChannelState.FAILURE;
+                            mChannel = null;
+                        }
+                        break;
+                    case AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED:
+                        mState = ChannelState.CONNECTED;
+                        Log.d(TAG, "Channel fully connected" + this);
+                        break;
+                    case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
+                        mState = ChannelState.DISCONNECTED;
+                        mChannel = null;
+                        Log.d(TAG, "Channel disconnected" + this);
+                        break;
+                    default:
+                        incomingMessageHandler.handleMessage(msg);
+                        break;
+                    }
+                }
+            };
+        mChannel.connect(null, rawMessageHandler, messenger);
+    }
+
+    public void disconnect() {
+        assertEquals("AsyncChannel must be connected to disconnect",
+                ChannelState.CONNECTED, mState);
+        mChannel.sendMessage(AsyncChannel.CMD_CHANNEL_DISCONNECT);
+        mState = ChannelState.DISCONNECTED;
+        mChannel = null;
+    }
+
+    public void sendMessage(Message msg) {
+        assertEquals("AsyncChannel must be connected to send messages",
+                ChannelState.CONNECTED, mState);
+        mChannel.sendMessage(msg);
+    }
+}
diff --git a/tests/utils/testutils/java/com/android/internal/util/test/BidirectionalAsyncChannelServer.java b/tests/utils/testutils/java/com/android/internal/util/test/BidirectionalAsyncChannelServer.java
new file mode 100644
index 0000000..49c8332
--- /dev/null
+++ b/tests/utils/testutils/java/com/android/internal/util/test/BidirectionalAsyncChannelServer.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.util.test;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Messenger;
+import android.util.Log;
+
+import com.android.internal.util.AsyncChannel;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Provides an interface for the server side implementation of a bidirectional channel as described
+ * in {@link com.android.internal.util.AsyncChannel}.
+ */
+public class BidirectionalAsyncChannelServer {
+
+    private static final String TAG = "BidirectionalAsyncChannelServer";
+
+    // Keeps track of incoming clients, which are identifiable by their messengers.
+    private final Map<Messenger, AsyncChannel> mClients = new HashMap<>();
+
+    private Messenger mMessenger;
+
+    public BidirectionalAsyncChannelServer(final Context context, final Looper looper,
+            final Handler messageHandler) {
+        Handler handler = new Handler(looper) {
+            @Override
+            public void handleMessage(Message msg) {
+                AsyncChannel channel = mClients.get(msg.replyTo);
+                switch (msg.what) {
+                    case AsyncChannel.CMD_CHANNEL_FULL_CONNECTION:
+                        if (channel != null) {
+                            Log.d(TAG, "duplicate client connection: " + msg.sendingUid);
+                            channel.replyToMessage(msg,
+                                    AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED,
+                                    AsyncChannel.STATUS_FULL_CONNECTION_REFUSED_ALREADY_CONNECTED);
+                        } else {
+                            channel = new AsyncChannel();
+                            mClients.put(msg.replyTo, channel);
+                            channel.connected(context, this, msg.replyTo);
+                            channel.replyToMessage(msg, AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED,
+                                    AsyncChannel.STATUS_SUCCESSFUL);
+                        }
+                        break;
+                    case AsyncChannel.CMD_CHANNEL_DISCONNECT:
+                        channel.disconnect();
+                        break;
+
+                    case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
+                        mClients.remove(msg.replyTo);
+                        break;
+
+                    default:
+                        messageHandler.handleMessage(msg);
+                        break;
+                }
+            }
+        };
+        mMessenger = new Messenger(handler);
+    }
+
+    public Messenger getMessenger() {
+        return mMessenger;
+    }
+
+}
diff --git a/tools/aapt/ResourceFilter.cpp b/tools/aapt/ResourceFilter.cpp
index 8693999..ed06f60 100644
--- a/tools/aapt/ResourceFilter.cpp
+++ b/tools/aapt/ResourceFilter.cpp
@@ -54,6 +54,46 @@
     return NO_ERROR;
 }
 
+// Returns true if the locale script of the config should be considered matching
+// the locale script of entry.
+//
+// If both the scripts are empty, the scripts are considered matching for
+// backward compatibility reasons.
+//
+// If only one script is empty, we try to compute it based on the provided
+// language and country. If we could not compute it, we assume it's either a
+// new language we don't know about, or a private use language. We return true
+// since we don't know any better and they might as well be a match.
+//
+// Finally, when we have two scripts (one of which could be computed), we return
+// true if and only if they are an exact match.
+inline bool
+scriptsMatch(const ResTable_config& config, const ResTable_config& entry) {
+    const char* configScript = config.localeScript;
+    const char* entryScript = entry.localeScript;
+    if (configScript[0] == '\0' && entryScript[0] == '\0') {
+        return true;  // both scripts are empty. We match for backward compatibility reasons.
+    }
+
+    char scriptBuffer[sizeof(config.localeScript)];
+    if (configScript[0] == '\0') {
+        localeDataComputeScript(scriptBuffer, config.language, config.country);
+        if (scriptBuffer[0] == '\0') {  // We can't compute the script, so we match.
+            return true;
+        }
+        configScript = scriptBuffer;
+    } else if (entryScript[0] == '\0') {
+        localeDataComputeScript(
+                scriptBuffer, entry.language, entry.country);
+        if (scriptBuffer[0] == '\0') {  // We can't compute the script, so we match.
+            return true;
+        }
+        entryScript = scriptBuffer;
+    }
+    return (memcmp(configScript, entryScript, sizeof(config.localeScript)) == 0);
+}
+
+
 bool
 WeakResourceFilter::match(const ResTable_config& config) const
 {
@@ -75,11 +115,19 @@
             // If the locales differ, but the languages are the same and
             // the locale we are matching only has a language specified,
             // we match.
-            if (config.language[0] &&
-                    memcmp(config.language, entry.first.language, sizeof(config.language)) == 0) {
-                if (config.country[0] == 0) {
-                    matchedAxis |= ResTable_config::CONFIG_LOCALE;
-                }
+            //
+            // Exception: we won't match if a script is specified for at least
+            // one of the locales and it's different from the other locale's
+            // script. (We will compute the other script if at least one of the
+            // scripts were explicitly set. In cases we can't compute an script,
+            // we match.)
+            if (config.language[0] != '\0' &&
+                    config.country[0] == '\0' &&
+                    config.localeVariant[0] == '\0' &&
+                    config.language[0] == entry.first.language[0] &&
+                    config.language[1] == entry.first.language[1] &&
+                    scriptsMatch(config, entry.first)) {
+                matchedAxis |= ResTable_config::CONFIG_LOCALE;
             }
         } else if ((diff & entry.second) == ResTable_config::CONFIG_SMALLEST_SCREEN_SIZE) {
             // Special case if the smallest screen width doesn't match. We check that the
diff --git a/tools/aapt2/Android.mk b/tools/aapt2/Android.mk
index 3a1e2bb..4b5ea65 100644
--- a/tools/aapt2/Android.mk
+++ b/tools/aapt2/Android.mk
@@ -115,6 +115,7 @@
 
 toolSources := \
 	compile/Compile.cpp \
+	diff/Diff.cpp \
 	dump/Dump.cpp \
 	link/Link.cpp
 
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index a2fadd9..00d8aae 100644
--- a/tools/aapt2/Main.cpp
+++ b/tools/aapt2/Main.cpp
@@ -24,6 +24,7 @@
 extern int compile(const std::vector<StringPiece>& args);
 extern int link(const std::vector<StringPiece>& args);
 extern int dump(const std::vector<StringPiece>& args);
+extern int diff(const std::vector<StringPiece>& args);
 
 } // namespace aapt
 
@@ -44,12 +45,14 @@
             return aapt::link(args);
         } else if (command == "dump" || command == "d") {
             return aapt::dump(args);
+        } else if (command == "diff") {
+            return aapt::diff(args);
         }
         std::cerr << "unknown command '" << command << "'\n";
     } else {
         std::cerr << "no command specified\n";
     }
 
-    std::cerr << "\nusage: aapt2 [compile|link|dump] ..." << std::endl;
+    std::cerr << "\nusage: aapt2 [compile|link|dump|diff] ..." << std::endl;
     return 1;
 }
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp
index 9704d970..a84c306 100644
--- a/tools/aapt2/ResourceParser.cpp
+++ b/tools/aapt2/ResourceParser.cpp
@@ -152,7 +152,7 @@
                 break;
             }
 
-            spanStack.back().lastChar = builder.str().size();
+            spanStack.back().lastChar = builder.str().size() - 1;
             outStyleString->spans.push_back(spanStack.back());
             spanStack.pop_back();
 
@@ -1058,6 +1058,16 @@
 
     std::unique_ptr<Array> array = util::make_unique<Array>();
 
+    bool translateable = mOptions.translatable;
+    if (Maybe<StringPiece16> translateableAttr = xml::findAttribute(parser, u"translatable")) {
+        if (!ResourceUtils::tryParseBool(translateableAttr.value(), &translateable)) {
+            mDiag->error(DiagMessage(outResource->source)
+                         << "invalid value for 'translatable'. Must be a boolean");
+            return false;
+        }
+    }
+    array->setTranslateable(translateable);
+
     bool error = false;
     const size_t depth = parser->getDepth();
     while (xml::XmlPullParser::nextChildNode(parser, depth)) {
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index 8d734f3..e700ed9 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -189,6 +189,17 @@
     return results;
 }
 
+std::vector<ResourceConfigValue*> ResourceEntry::findValuesIf(
+        const std::function<bool(ResourceConfigValue*)>& f) {
+    std::vector<ResourceConfigValue*> results;
+    for (auto& configValue : values) {
+        if (f(configValue.get())) {
+            results.push_back(configValue.get());
+        }
+    }
+    return results;
+}
+
 /**
  * The default handler for collisions. A return value of -1 means keep the
  * existing value, 0 means fail, and +1 means take the incoming value.
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h
index 7f5c2b8..5690ea6 100644
--- a/tools/aapt2/ResourceTable.h
+++ b/tools/aapt2/ResourceTable.h
@@ -26,6 +26,7 @@
 #include "io/File.h"
 
 #include <android-base/macros.h>
+#include <functional>
 #include <map>
 #include <memory>
 #include <string>
@@ -109,6 +110,9 @@
     ResourceConfigValue* findOrCreateValue(const ConfigDescription& config,
                                            const StringPiece& product);
     std::vector<ResourceConfigValue*> findAllValues(const ConfigDescription& config);
+    std::vector<ResourceConfigValue*> findValuesIf(
+            const std::function<bool(ResourceConfigValue*)>& f);
+
 
 private:
     DISALLOW_COPY_AND_ASSIGN(ResourceEntry);
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp
index 74c48b0..a0a7efc 100644
--- a/tools/aapt2/ResourceUtils.cpp
+++ b/tools/aapt2/ResourceUtils.cpp
@@ -289,7 +289,7 @@
 std::unique_ptr<BinaryPrimitive> tryParseFlagSymbol(const Attribute* flagAttr,
                                                     const StringPiece16& str) {
     android::Res_value flags = { };
-    flags.dataType = android::Res_value::TYPE_INT_DEC;
+    flags.dataType = android::Res_value::TYPE_INT_HEX;
     flags.data = 0u;
 
     if (util::trimWhitespace(str).empty()) {
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index dd7ff01..c10b134 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -39,6 +39,14 @@
 RawString::RawString(const StringPool::Ref& ref) : value(ref) {
 }
 
+bool RawString::equals(const Value* value) const {
+    const RawString* other = valueCast<RawString>(value);
+    if (!other) {
+        return false;
+    }
+    return *this->value == *other->value;
+}
+
 RawString* RawString::clone(StringPool* newPool) const {
     RawString* rs = new RawString(newPool->makeRef(*value));
     rs->mComment = mComment;
@@ -66,6 +74,15 @@
 Reference::Reference(const ResourceId& i, Type type) : id(i), referenceType(type) {
 }
 
+bool Reference::equals(const Value* value) const {
+    const Reference* other = valueCast<Reference>(value);
+    if (!other) {
+        return false;
+    }
+    return referenceType == other->referenceType && privateReference == other->privateReference &&
+            id == other->id && name == other->name;
+}
+
 bool Reference::flatten(android::Res_value* outValue) const {
     outValue->dataType = (referenceType == Reference::Type::kResource) ?
             android::Res_value::TYPE_REFERENCE : android::Res_value::TYPE_ATTRIBUTE;
@@ -97,6 +114,10 @@
     }
 }
 
+bool Id::equals(const Value* value) const {
+    return valueCast<Id>(value) != nullptr;
+}
+
 bool Id::flatten(android::Res_value* out) const {
     out->dataType = android::Res_value::TYPE_INT_BOOLEAN;
     out->data = util::hostToDevice32(0);
@@ -111,15 +132,15 @@
     *out << "(id)";
 }
 
-String::String(const StringPool::Ref& ref) : value(ref), mTranslateable(true) {
+String::String(const StringPool::Ref& ref) : value(ref) {
 }
 
-void String::setTranslateable(bool val) {
-    mTranslateable = val;
-}
-
-bool String::isTranslateable() const {
-    return mTranslateable;
+bool String::equals(const Value* value) const {
+    const String* other = valueCast<String>(value);
+    if (!other) {
+        return false;
+    }
+    return *this->value == *other->value;
 }
 
 bool String::flatten(android::Res_value* outValue) const {
@@ -144,15 +165,24 @@
     *out << "(string) \"" << *value << "\"";
 }
 
-StyledString::StyledString(const StringPool::StyleRef& ref) : value(ref), mTranslateable(true) {
+StyledString::StyledString(const StringPool::StyleRef& ref) : value(ref) {
 }
 
-void StyledString::setTranslateable(bool val) {
-    mTranslateable = val;
-}
+bool StyledString::equals(const Value* value) const {
+    const StyledString* other = valueCast<StyledString>(value);
+    if (!other) {
+        return false;
+    }
 
-bool StyledString::isTranslateable() const {
-    return mTranslateable;
+    if (*this->value->str == *other->value->str) {
+        const std::vector<StringPool::Span>& spansA = this->value->spans;
+        const std::vector<StringPool::Span>& spansB = other->value->spans;
+        return std::equal(spansA.begin(), spansA.end(), spansB.begin(),
+                          [](const StringPool::Span& a, const StringPool::Span& b) -> bool {
+            return *a.name == *b.name && a.firstChar == b.firstChar && a.lastChar == b.lastChar;
+        });
+    }
+    return false;
 }
 
 bool StyledString::flatten(android::Res_value* outValue) const {
@@ -174,11 +204,22 @@
 
 void StyledString::print(std::ostream* out) const {
     *out << "(styled string) \"" << *value->str << "\"";
+    for (const StringPool::Span& span : value->spans) {
+        *out << " "<< *span.name << ":" << span.firstChar << "," << span.lastChar;
+    }
 }
 
 FileReference::FileReference(const StringPool::Ref& _path) : path(_path) {
 }
 
+bool FileReference::equals(const Value* value) const {
+    const FileReference* other = valueCast<FileReference>(value);
+    if (!other) {
+        return false;
+    }
+    return *path == *other->path;
+}
+
 bool FileReference::flatten(android::Res_value* outValue) const {
     if (path.getIndex() > std::numeric_limits<uint32_t>::max()) {
         return false;
@@ -209,6 +250,14 @@
     value.data = data;
 }
 
+bool BinaryPrimitive::equals(const Value* value) const {
+    const BinaryPrimitive* other = valueCast<BinaryPrimitive>(value);
+    if (!other) {
+        return false;
+    }
+    return this->value.dataType == other->value.dataType && this->value.data == other->value.data;
+}
+
 bool BinaryPrimitive::flatten(android::Res_value* outValue) const {
     outValue->dataType = value.dataType;
     outValue->data = util::hostToDevice32(value.data);
@@ -228,7 +277,7 @@
             *out << "(integer) " << static_cast<int32_t>(value.data);
             break;
         case android::Res_value::TYPE_INT_HEX:
-            *out << "(integer) " << std::hex << value.data << std::dec;
+            *out << "(integer) 0x" << std::hex << value.data << std::dec;
             break;
         case android::Res_value::TYPE_INT_BOOLEAN:
             *out << "(boolean) " << (value.data != 0 ? "true" : "false");
@@ -253,6 +302,21 @@
     mWeak = w;
 }
 
+bool Attribute::equals(const Value* value) const {
+    const Attribute* other = valueCast<Attribute>(value);
+    if (!other) {
+        return false;
+    }
+
+    return this->typeMask == other->typeMask && this->minInt == other->minInt &&
+            this->maxInt == other->maxInt &&
+            std::equal(this->symbols.begin(), this->symbols.end(),
+                       other->symbols.begin(),
+                       [](const Symbol& a, const Symbol& b) -> bool {
+        return a.symbol.equals(&b.symbol) && a.value == b.value;
+    });
+}
+
 Attribute* Attribute::clone(StringPool* /*newPool*/) const {
     return new Attribute(*this);
 }
@@ -365,6 +429,14 @@
             << "]";
     }
 
+    if (minInt != std::numeric_limits<int32_t>::min()) {
+        *out << " min=" << minInt;
+    }
+
+    if (maxInt != std::numeric_limits<int32_t>::max()) {
+        *out << " max=" << maxInt;
+    }
+
     if (isWeak()) {
         *out << " [weak]";
     }
@@ -445,6 +517,21 @@
     return true;
 }
 
+bool Style::equals(const Value* value) const {
+    const Style* other = valueCast<Style>(value);
+    if (!other) {
+        return false;
+    }
+    if (bool(parent) != bool(other->parent) ||
+            (parent && other->parent && !parent.value().equals(&other->parent.value()))) {
+        return false;
+    }
+    return std::equal(entries.begin(), entries.end(), other->entries.begin(),
+                      [](const Entry& a, const Entry& b) -> bool {
+        return a.key.equals(&b.key) && a.value->equals(b.value.get());
+    });
+}
+
 Style* Style::clone(StringPool* newPool) const {
     Style* style = new Style();
     style->parent = parent;
@@ -484,6 +571,18 @@
     return out;
 }
 
+bool Array::equals(const Value* value) const {
+    const Array* other = valueCast<Array>(value);
+    if (!other) {
+        return false;
+    }
+
+    return std::equal(items.begin(), items.end(), other->items.begin(),
+                      [](const std::unique_ptr<Item>& a, const std::unique_ptr<Item>& b) -> bool {
+        return a->equals(b.get());
+    });
+}
+
 Array* Array::clone(StringPool* newPool) const {
     Array* array = new Array();
     array->mComment = mComment;
@@ -500,6 +599,21 @@
         << "]";
 }
 
+bool Plural::equals(const Value* value) const {
+    const Plural* other = valueCast<Plural>(value);
+    if (!other) {
+        return false;
+    }
+
+    return std::equal(values.begin(), values.end(), other->values.begin(),
+                      [](const std::unique_ptr<Item>& a, const std::unique_ptr<Item>& b) -> bool {
+        if (bool(a) != bool(b)) {
+            return false;
+        }
+        return bool(a) == bool(b) || a->equals(b.get());
+    });
+}
+
 Plural* Plural::clone(StringPool* newPool) const {
     Plural* p = new Plural();
     p->mComment = mComment;
@@ -515,12 +629,42 @@
 
 void Plural::print(std::ostream* out) const {
     *out << "(plural)";
+    if (values[Zero]) {
+        *out << " zero=" << *values[Zero];
+    }
+
+    if (values[One]) {
+        *out << " one=" << *values[One];
+    }
+
+    if (values[Two]) {
+        *out << " two=" << *values[Two];
+    }
+
+    if (values[Few]) {
+        *out << " few=" << *values[Few];
+    }
+
+    if (values[Many]) {
+        *out << " many=" << *values[Many];
+    }
 }
 
 static ::std::ostream& operator<<(::std::ostream& out, const std::unique_ptr<Item>& item) {
     return out << *item;
 }
 
+bool Styleable::equals(const Value* value) const {
+    const Styleable* other = valueCast<Styleable>(value);
+    if (!other) {
+        return false;
+    }
+    return std::equal(entries.begin(), entries.end(), other->entries.begin(),
+                      [](const Reference& a, const Reference& b) -> bool {
+        return a.equals(&b);
+    });
+}
+
 Styleable* Styleable::clone(StringPool* /*newPool*/) const {
     return new Styleable(*this);
 }
diff --git a/tools/aapt2/ResourceValues.h b/tools/aapt2/ResourceValues.h
index 43354ac..aa1b550 100644
--- a/tools/aapt2/ResourceValues.h
+++ b/tools/aapt2/ResourceValues.h
@@ -54,6 +54,18 @@
         mWeak = val;
     }
 
+    // Whether the value is marked as translateable.
+    // This does not persist when flattened.
+    // It is only used during compilation phase.
+    void setTranslateable(bool val) {
+        mTranslateable = val;
+    }
+
+    // Default true.
+    bool isTranslateable() const {
+        return mTranslateable;
+    }
+
     /**
      * Returns the source where this value was defined.
      */
@@ -84,6 +96,8 @@
         mComment = std::move(str);
     }
 
+    virtual bool equals(const Value* value) const = 0;
+
     /**
      * Calls the appropriate overload of ValueVisitor.
      */
@@ -103,6 +117,7 @@
     Source mSource;
     std::u16string mComment;
     bool mWeak = false;
+    bool mTranslateable = true;
 };
 
 /**
@@ -158,6 +173,7 @@
     explicit Reference(const ResourceNameRef& n, Type type = Type::kResource);
     explicit Reference(const ResourceId& i, Type type = Type::kResource);
 
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* outValue) const override;
     Reference* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
@@ -168,6 +184,7 @@
  */
 struct Id : public BaseItem<Id> {
     Id() { mWeak = true; }
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* out) const override;
     Id* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
@@ -183,6 +200,7 @@
 
     RawString(const StringPool::Ref& ref);
 
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* outValue) const override;
     RawString* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
@@ -193,17 +211,10 @@
 
     String(const StringPool::Ref& ref);
 
-    // Whether the string is marked as translateable. This does not persist when flattened.
-    // It is only used during compilation phase.
-    void setTranslateable(bool val);
-    bool isTranslateable() const;
-
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* outValue) const override;
     String* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
-
-private:
-    bool mTranslateable;
 };
 
 struct StyledString : public BaseItem<StyledString> {
@@ -211,17 +222,10 @@
 
     StyledString(const StringPool::StyleRef& ref);
 
-    // Whether the string is marked as translateable. This does not persist when flattened.
-    // It is only used during compilation phase.
-    void setTranslateable(bool val);
-    bool isTranslateable() const;
-
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* outValue) const override;
     StyledString* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
-
-private:
-    bool mTranslateable;
 };
 
 struct FileReference : public BaseItem<FileReference> {
@@ -235,6 +239,7 @@
     FileReference() = default;
     FileReference(const StringPool::Ref& path);
 
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* outValue) const override;
     FileReference* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
@@ -250,6 +255,7 @@
     BinaryPrimitive(const android::Res_value& val);
     BinaryPrimitive(uint8_t dataType, uint32_t data);
 
+    bool equals(const Value* value) const override;
     bool flatten(android::Res_value* outValue) const override;
     BinaryPrimitive* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
@@ -268,6 +274,7 @@
 
     Attribute(bool w, uint32_t t = 0u);
 
+    bool equals(const Value* value) const override;
     Attribute* clone(StringPool* newPool) const override;
     void printMask(std::ostream* out) const;
     void print(std::ostream* out) const override;
@@ -290,6 +297,7 @@
 
     std::vector<Entry> entries;
 
+    bool equals(const Value* value) const override;
     Style* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
 };
@@ -297,6 +305,7 @@
 struct Array : public BaseValue<Array> {
     std::vector<std::unique_ptr<Item>> items;
 
+    bool equals(const Value* value) const override;
     Array* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
 };
@@ -314,6 +323,7 @@
 
     std::array<std::unique_ptr<Item>, Count> values;
 
+    bool equals(const Value* value) const override;
     Plural* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
 };
@@ -321,6 +331,7 @@
 struct Styleable : public BaseValue<Styleable> {
     std::vector<Reference> entries;
 
+    bool equals(const Value* value) const override;
     Styleable* clone(StringPool* newPool) const override;
     void print(std::ostream* out) const override;
 };
diff --git a/tools/aapt2/ValueVisitor.h b/tools/aapt2/ValueVisitor.h
index ea2aa55..b8bc5db 100644
--- a/tools/aapt2/ValueVisitor.h
+++ b/tools/aapt2/ValueVisitor.h
@@ -127,6 +127,11 @@
     }
 };
 
+template <typename T>
+const T* valueCast(const Value* value) {
+    return valueCast<T>(const_cast<Value*>(value));
+}
+
 /**
  * Returns a valid pointer to T if the Value is of subtype T.
  * Otherwise, returns nullptr.
@@ -141,7 +146,6 @@
     return visitor.value;
 }
 
-
 inline void visitAllValuesInPackage(ResourceTablePackage* pkg, RawValueVisitor* visitor) {
     for (auto& type : pkg->types) {
         for (auto& entry : type->entries) {
diff --git a/tools/aapt2/compile/PseudolocaleGenerator.cpp b/tools/aapt2/compile/PseudolocaleGenerator.cpp
index 99c2077..d080e16 100644
--- a/tools/aapt2/compile/PseudolocaleGenerator.cpp
+++ b/tools/aapt2/compile/PseudolocaleGenerator.cpp
@@ -128,23 +128,6 @@
             mPool(pool), mMethod(method), mLocalizer(method) {
     }
 
-    void visit(Array* array) override {
-        std::unique_ptr<Array> localized = util::make_unique<Array>();
-        localized->items.resize(array->items.size());
-        for (size_t i = 0; i < array->items.size(); i++) {
-            Visitor subVisitor(mPool, mMethod);
-            array->items[i]->accept(&subVisitor);
-            if (subVisitor.mItem) {
-                localized->items[i] = std::move(subVisitor.mItem);
-            } else {
-                localized->items[i] = std::unique_ptr<Item>(array->items[i]->clone(mPool));
-            }
-        }
-        localized->setSource(array->getSource());
-        localized->setWeak(true);
-        mValue = std::move(localized);
-    }
-
     void visit(Plural* plural) override {
         std::unique_ptr<Plural> localized = util::make_unique<Plural>();
         for (size_t i = 0; i < plural->values.size(); i++) {
@@ -164,10 +147,6 @@
     }
 
     void visit(String* string) override {
-        if (!string->isTranslateable()) {
-            return;
-        }
-
         std::u16string result = mLocalizer.start() + mLocalizer.text(*string->value) +
                 mLocalizer.end();
         std::unique_ptr<String> localized = util::make_unique<String>(mPool->makeRef(result));
@@ -177,10 +156,6 @@
     }
 
     void visit(StyledString* string) override {
-        if (!string->isTranslateable()) {
-            return;
-        }
-
         mItem = pseudolocalizeStyledString(string, mMethod, mPool);
         mItem->setWeak(true);
     }
@@ -238,14 +213,26 @@
     }
 }
 
+/**
+ * A value is pseudolocalizable if it does not define a locale (or is the default locale)
+ * and is translateable.
+ */
+static bool isPseudolocalizable(ResourceConfigValue* configValue) {
+    const int diff = configValue->config.diff(ConfigDescription::defaultConfig());
+    if (diff & ConfigDescription::CONFIG_LOCALE) {
+        return false;
+    }
+    return configValue->value->isTranslateable();
+}
+
 } // namespace
 
 bool PseudolocaleGenerator::consume(IAaptContext* context, ResourceTable* table) {
     for (auto& package : table->packages) {
         for (auto& type : package->types) {
             for (auto& entry : type->entries) {
-                std::vector<ResourceConfigValue*> values = entry->findAllValues(
-                        ConfigDescription::defaultConfig());
+                std::vector<ResourceConfigValue*> values = entry->findValuesIf(isPseudolocalizable);
+
                 for (ResourceConfigValue* value : values) {
                     pseudolocalizeIfNeeded(Pseudolocalizer::Method::kAccent, value,
                                            &table->stringPool, entry.get());
diff --git a/tools/aapt2/diff/Diff.cpp b/tools/aapt2/diff/Diff.cpp
new file mode 100644
index 0000000..20b7b59
--- /dev/null
+++ b/tools/aapt2/diff/Diff.cpp
@@ -0,0 +1,411 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Flags.h"
+#include "ResourceTable.h"
+#include "io/ZipArchive.h"
+#include "process/IResourceTableConsumer.h"
+#include "process/SymbolTable.h"
+#include "unflatten/BinaryResourceParser.h"
+
+#include <android-base/macros.h>
+
+namespace aapt {
+
+class DiffContext : public IAaptContext {
+public:
+    const std::u16string& getCompilationPackage() override {
+        return mEmpty;
+    }
+
+    uint8_t getPackageId() override {
+        return 0x0;
+    }
+
+    IDiagnostics* getDiagnostics() override {
+        return &mDiagnostics;
+    }
+
+    NameMangler* getNameMangler() override {
+        return &mNameMangler;
+    }
+
+    SymbolTable* getExternalSymbols() override {
+        return &mSymbolTable;
+    }
+
+    bool verbose() override {
+        return false;
+    }
+
+private:
+    std::u16string mEmpty;
+    StdErrDiagnostics mDiagnostics;
+    NameMangler mNameMangler = NameMangler(NameManglerPolicy{});
+    SymbolTable mSymbolTable;
+};
+
+class LoadedApk {
+public:
+    LoadedApk(const Source& source, std::unique_ptr<io::IFileCollection> apk,
+              std::unique_ptr<ResourceTable> table) :
+            mSource(source), mApk(std::move(apk)), mTable(std::move(table)) {
+    }
+
+    io::IFileCollection* getFileCollection() {
+        return mApk.get();
+    }
+
+    ResourceTable* getResourceTable() {
+        return mTable.get();
+    }
+
+    const Source& getSource() {
+        return mSource;
+    }
+
+private:
+    Source mSource;
+    std::unique_ptr<io::IFileCollection> mApk;
+    std::unique_ptr<ResourceTable> mTable;
+
+    DISALLOW_COPY_AND_ASSIGN(LoadedApk);
+};
+
+static std::unique_ptr<LoadedApk> loadApkFromPath(IAaptContext* context, const StringPiece& path) {
+    Source source(path);
+    std::string error;
+    std::unique_ptr<io::ZipFileCollection> apk = io::ZipFileCollection::create(path, &error);
+    if (!apk) {
+        context->getDiagnostics()->error(DiagMessage(source) << error);
+        return {};
+    }
+
+    io::IFile* file = apk->findFile("resources.arsc");
+    if (!file) {
+        context->getDiagnostics()->error(DiagMessage(source) << "no resources.arsc found");
+        return {};
+    }
+
+    std::unique_ptr<io::IData> data = file->openAsData();
+    if (!data) {
+        context->getDiagnostics()->error(DiagMessage(source) << "could not open resources.arsc");
+        return {};
+    }
+
+    std::unique_ptr<ResourceTable> table = util::make_unique<ResourceTable>();
+    BinaryResourceParser parser(context, table.get(), source, data->data(), data->size());
+    if (!parser.parse()) {
+        return {};
+    }
+
+    return util::make_unique<LoadedApk>(source, std::move(apk), std::move(table));
+}
+
+static void emitDiffLine(const Source& source, const StringPiece& message) {
+    std::cerr << source << ": " << message << "\n";
+}
+
+static bool isSymbolVisibilityDifferent(const Symbol& symbolA, const Symbol& symbolB) {
+    return symbolA.state != symbolB.state;
+}
+
+template <typename Id>
+static bool isIdDiff(const Symbol& symbolA, const Maybe<Id>& idA,
+                     const Symbol& symbolB, const Maybe<Id>& idB) {
+    if (symbolA.state == SymbolState::kPublic || symbolB.state == SymbolState::kPublic) {
+        return idA != idB;
+    }
+    return false;
+}
+
+static bool emitResourceConfigValueDiff(IAaptContext* context,
+                                        LoadedApk* apkA,
+                                        ResourceTablePackage* pkgA,
+                                        ResourceTableType* typeA,
+                                        ResourceEntry* entryA,
+                                        ResourceConfigValue* configValueA,
+                                        LoadedApk* apkB,
+                                        ResourceTablePackage* pkgB,
+                                        ResourceTableType* typeB,
+                                        ResourceEntry* entryB,
+                                        ResourceConfigValue* configValueB) {
+    Value* valueA = configValueA->value.get();
+    Value* valueB = configValueB->value.get();
+    if (!valueA->equals(valueB)) {
+        std::stringstream strStream;
+        strStream << "value " << pkgA->name << ":" << typeA->type << "/" << entryA->name
+                << " config=" << configValueA->config << " does not match:\n";
+        valueA->print(&strStream);
+        strStream << "\n vs \n";
+        valueB->print(&strStream);
+        emitDiffLine(apkB->getSource(), strStream.str());
+        return true;
+    }
+    return false;
+}
+
+static bool emitResourceEntryDiff(IAaptContext* context,
+                                  LoadedApk* apkA,
+                                  ResourceTablePackage* pkgA,
+                                  ResourceTableType* typeA,
+                                  ResourceEntry* entryA,
+                                  LoadedApk* apkB,
+                                  ResourceTablePackage* pkgB,
+                                  ResourceTableType* typeB,
+                                  ResourceEntry* entryB) {
+    bool diff = false;
+    for (std::unique_ptr<ResourceConfigValue>& configValueA : entryA->values) {
+        ResourceConfigValue* configValueB = entryB->findValue(configValueA->config);
+        if (!configValueB) {
+            std::stringstream strStream;
+            strStream << "missing " << pkgA->name << ":" << typeA->type << "/" << entryA->name
+                    << " config=" << configValueA->config;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        } else {
+            diff |= emitResourceConfigValueDiff(context, apkA, pkgA, typeA, entryA,
+                                                configValueA.get(), apkB, pkgB, typeB, entryB,
+                                                configValueB);
+        }
+    }
+
+    // Check for any newly added config values.
+    for (std::unique_ptr<ResourceConfigValue>& configValueB : entryB->values) {
+        ResourceConfigValue* configValueA = entryA->findValue(configValueB->config);
+        if (!configValueA) {
+            std::stringstream strStream;
+            strStream << "new config " << pkgB->name << ":" << typeB->type << "/" << entryB->name
+                    << " config=" << configValueB->config;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        }
+    }
+    return false;
+}
+
+static bool emitResourceTypeDiff(IAaptContext* context,
+                                 LoadedApk* apkA,
+                                 ResourceTablePackage* pkgA,
+                                 ResourceTableType* typeA,
+                                 LoadedApk* apkB,
+                                 ResourceTablePackage* pkgB,
+                                 ResourceTableType* typeB) {
+    bool diff = false;
+    for (std::unique_ptr<ResourceEntry>& entryA : typeA->entries) {
+        ResourceEntry* entryB = typeB->findEntry(entryA->name);
+        if (!entryB) {
+            std::stringstream strStream;
+            strStream << "missing " << pkgA->name << ":" << typeA->type << "/" << entryA->name;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        } else {
+            if (isSymbolVisibilityDifferent(entryA->symbolStatus, entryB->symbolStatus)) {
+                std::stringstream strStream;
+                strStream << pkgA->name << ":" << typeA->type << "/" << entryA->name
+                        << " has different visibility (";
+                if (entryB->symbolStatus.state == SymbolState::kPublic) {
+                    strStream << "PUBLIC";
+                } else {
+                    strStream << "PRIVATE";
+                }
+                strStream << " vs ";
+                if (entryA->symbolStatus.state == SymbolState::kPublic) {
+                    strStream << "PUBLIC";
+                } else {
+                    strStream << "PRIVATE";
+                }
+                strStream << ")";
+                emitDiffLine(apkB->getSource(), strStream.str());
+                diff = true;
+            } else if (isIdDiff(entryA->symbolStatus, entryA->id,
+                                entryB->symbolStatus, entryB->id)) {
+                std::stringstream strStream;
+                strStream << pkgA->name << ":" << typeA->type << "/" << entryA->name
+                        << " has different public ID (";
+                if (entryB->id) {
+                    strStream << "0x" << std::hex << entryB->id.value();
+                } else {
+                    strStream << "none";
+                }
+                strStream << " vs ";
+                if (entryA->id) {
+                    strStream << "0x " << std::hex << entryA->id.value();
+                } else {
+                    strStream << "none";
+                }
+                strStream << ")";
+                emitDiffLine(apkB->getSource(), strStream.str());
+                diff = true;
+            }
+            diff |= emitResourceEntryDiff(context, apkA, pkgA, typeA, entryA.get(),
+                                          apkB, pkgB, typeB, entryB);
+        }
+    }
+
+    // Check for any newly added entries.
+    for (std::unique_ptr<ResourceEntry>& entryB : typeB->entries) {
+        ResourceEntry* entryA = typeA->findEntry(entryB->name);
+        if (!entryA) {
+            std::stringstream strStream;
+            strStream << "new entry " << pkgB->name << ":" << typeB->type << "/" << entryB->name;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        }
+    }
+    return diff;
+}
+
+static bool emitResourcePackageDiff(IAaptContext* context, LoadedApk* apkA,
+                                    ResourceTablePackage* pkgA,
+                                    LoadedApk* apkB, ResourceTablePackage* pkgB) {
+    bool diff = false;
+    for (std::unique_ptr<ResourceTableType>& typeA : pkgA->types) {
+        ResourceTableType* typeB = pkgB->findType(typeA->type);
+        if (!typeB) {
+            std::stringstream strStream;
+            strStream << "missing " << pkgA->name << ":" << typeA->type;
+            emitDiffLine(apkA->getSource(), strStream.str());
+            diff = true;
+        } else {
+            if (isSymbolVisibilityDifferent(typeA->symbolStatus, typeB->symbolStatus)) {
+                std::stringstream strStream;
+                strStream << pkgA->name << ":" << typeA->type << " has different visibility (";
+                if (typeB->symbolStatus.state == SymbolState::kPublic) {
+                    strStream << "PUBLIC";
+                } else {
+                    strStream << "PRIVATE";
+                }
+                strStream << " vs ";
+                if (typeA->symbolStatus.state == SymbolState::kPublic) {
+                    strStream << "PUBLIC";
+                } else {
+                    strStream << "PRIVATE";
+                }
+                strStream << ")";
+                emitDiffLine(apkB->getSource(), strStream.str());
+                diff = true;
+            } else if (isIdDiff(typeA->symbolStatus, typeA->id, typeB->symbolStatus, typeB->id)) {
+                std::stringstream strStream;
+                strStream << pkgA->name << ":" << typeA->type << " has different public ID (";
+                if (typeB->id) {
+                    strStream << "0x" << std::hex << typeB->id.value();
+                } else {
+                    strStream << "none";
+                }
+                strStream << " vs ";
+                if (typeA->id) {
+                    strStream << "0x " << std::hex << typeA->id.value();
+                } else {
+                    strStream << "none";
+                }
+                strStream << ")";
+                emitDiffLine(apkB->getSource(), strStream.str());
+                diff = true;
+            }
+            diff |= emitResourceTypeDiff(context, apkA, pkgA, typeA.get(), apkB, pkgB, typeB);
+        }
+    }
+
+    // Check for any newly added types.
+    for (std::unique_ptr<ResourceTableType>& typeB : pkgB->types) {
+        ResourceTableType* typeA = pkgA->findType(typeB->type);
+        if (!typeA) {
+            std::stringstream strStream;
+            strStream << "new type " << pkgB->name << ":" << typeB->type;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        }
+    }
+    return diff;
+}
+
+static bool emitResourceTableDiff(IAaptContext* context, LoadedApk* apkA, LoadedApk* apkB) {
+    ResourceTable* tableA = apkA->getResourceTable();
+    ResourceTable* tableB = apkB->getResourceTable();
+
+    bool diff = false;
+    for (std::unique_ptr<ResourceTablePackage>& pkgA : tableA->packages) {
+        ResourceTablePackage* pkgB = tableB->findPackage(pkgA->name);
+        if (!pkgB) {
+            std::stringstream strStream;
+            strStream << "missing package " << pkgA->name;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        } else {
+            if (pkgA->id != pkgB->id) {
+                std::stringstream strStream;
+                strStream << "package '" << pkgA->name << "' has different id (";
+                if (pkgB->id) {
+                    strStream << "0x" << std::hex << pkgB->id.value();
+                } else {
+                    strStream << "none";
+                }
+                strStream << " vs ";
+                if (pkgA->id) {
+                    strStream << "0x" << std::hex << pkgA->id.value();
+                } else {
+                    strStream << "none";
+                }
+                strStream << ")";
+                emitDiffLine(apkB->getSource(), strStream.str());
+                diff = true;
+            }
+            diff |= emitResourcePackageDiff(context, apkA, pkgA.get(), apkB, pkgB);
+        }
+    }
+
+    // Check for any newly added packages.
+    for (std::unique_ptr<ResourceTablePackage>& pkgB : tableB->packages) {
+        ResourceTablePackage* pkgA = tableA->findPackage(pkgB->name);
+        if (!pkgA) {
+            std::stringstream strStream;
+            strStream << "new package " << pkgB->name;
+            emitDiffLine(apkB->getSource(), strStream.str());
+            diff = true;
+        }
+    }
+    return diff;
+}
+
+int diff(const std::vector<StringPiece>& args) {
+    DiffContext context;
+
+    Flags flags;
+    if (!flags.parse("aapt2 diff", args, &std::cerr)) {
+        return 1;
+    }
+
+    if (flags.getArgs().size() != 2u) {
+        std::cerr << "must have two apks as arguments.\n\n";
+        flags.usage("aapt2 diff", &std::cerr);
+        return 1;
+    }
+
+    std::unique_ptr<LoadedApk> apkA = loadApkFromPath(&context, flags.getArgs()[0]);
+    std::unique_ptr<LoadedApk> apkB = loadApkFromPath(&context, flags.getArgs()[1]);
+    if (!apkA || !apkB) {
+        return 1;
+    }
+
+    if (emitResourceTableDiff(&context, apkA.get(), apkB.get())) {
+        // We emitted a diff, so return 1 (failure).
+        return 1;
+    }
+    return 0;
+}
+
+} // namespace aapt
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index 953e87e..77a949f 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -180,7 +180,6 @@
 
     manifestAction[u"uses-configuration"];
     manifestAction[u"uses-feature"];
-    manifestAction[u"uses-library"];
     manifestAction[u"supports-screens"];
     manifestAction[u"compatible-screens"];
     manifestAction[u"supports-gl-texture"];
@@ -189,6 +188,9 @@
     xml::XmlNodeAction& applicationAction = (*executor)[u"manifest"][u"application"];
     applicationAction.action(optionalNameIsJavaClassName);
 
+    // Uses library actions.
+    applicationAction[u"uses-library"];
+
     // Activity actions.
     applicationAction[u"activity"].action(requiredNameIsJavaClassName);
     applicationAction[u"activity"][u"intent-filter"] = intentFilterAction;
diff --git a/tools/aapt2/proto/TableProtoDeserializer.cpp b/tools/aapt2/proto/TableProtoDeserializer.cpp
index 82e4fb0..1ec48f0 100644
--- a/tools/aapt2/proto/TableProtoDeserializer.cpp
+++ b/tools/aapt2/proto/TableProtoDeserializer.cpp
@@ -234,6 +234,8 @@
                 const pb::Attribute& pbAttr = pbCompoundValue.attr();
                 std::unique_ptr<Attribute> attr = util::make_unique<Attribute>(isWeak);
                 attr->typeMask = pbAttr.format_flags();
+                attr->minInt = pbAttr.min_int();
+                attr->maxInt = pbAttr.max_int();
                 for (const pb::Attribute_Symbol& pbSymbol : pbAttr.symbols()) {
                     Attribute::Symbol symbol;
                     deserializeItemCommon(pbSymbol, &symbol.symbol);
diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
index 04a59bc..4e4da8b 100644
--- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
+++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
@@ -78,7 +78,8 @@
     @Override
     public void addAppToken(int arg0, IApplicationToken arg1, int arg2, int arg3, int arg4,
             boolean arg5, boolean arg6, int arg7, int arg8, boolean arg9, boolean arg10,
-            Rect arg11, Configuration arg12, int arg13, boolean arg14, boolean arg15, int arg16)
+            Rect arg11, Configuration arg12, int arg13, boolean arg14, boolean arg15, int arg16,
+            int arg17)
             throws RemoteException {
         // TODO Auto-generated method stub
     }
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
index 3f276c9..ab73a8b 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
@@ -16,11 +16,13 @@
 
 package com.android.layoutlib.bridge.android;
 
+import com.android.internal.inputmethod.IInputContentUriToken;
 import com.android.internal.view.IInputContext;
 import com.android.internal.view.IInputMethodClient;
 import com.android.internal.view.IInputMethodManager;
 import com.android.internal.view.InputBindResult;
 
+import android.net.Uri;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.ResultReceiver;
@@ -239,4 +241,11 @@
         // TODO Auto-generated method stub
         return null;
     }
+
+    @Override
+    public IInputContentUriToken createInputContentUriToken(IBinder token, Uri contentUri,
+            String packageName) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index b614a86..08ad35e 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -375,7 +375,15 @@
             return false;
         }
 
+        // wpa_supplicant can update the anonymous identity for these kinds of networks after
+        // framework reads them, so make sure the framework doesn't try to overwrite them.
+        boolean shouldNotWriteAnonIdentity = mEapMethod == WifiEnterpriseConfig.Eap.SIM
+                || mEapMethod == WifiEnterpriseConfig.Eap.AKA
+                || mEapMethod == WifiEnterpriseConfig.Eap.AKA_PRIME;
         for (String key : mFields.keySet()) {
+            if (shouldNotWriteAnonIdentity && ANON_IDENTITY_KEY.equals(key)) {
+                continue;
+            }
             if (!saver.saveValue(key, mFields.get(key))) {
                 return false;
             }
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 1cd32b6..bbc3d2f 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -561,6 +561,12 @@
     public static final String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
 
     /**
+     * Internally used Wi-Fi lock mode representing the case were no locks are held.
+     * @hide
+     */
+    public static final int WIFI_MODE_NO_LOCKS_HELD = 0;
+
+    /**
      * In this Wi-Fi lock mode, Wi-Fi will be kept active,
      * and will behave normally, i.e., it will attempt to automatically
      * establish a connection to a remembered access point that is
diff --git a/wifi/java/android/net/wifi/WifiScanner.java b/wifi/java/android/net/wifi/WifiScanner.java
index 2636c3f..716f1d3 100644
--- a/wifi/java/android/net/wifi/WifiScanner.java
+++ b/wifi/java/android/net/wifi/WifiScanner.java
@@ -656,6 +656,40 @@
         void onPnoNetworkFound(ScanResult[] results);
     }
 
+    /**
+     * Register a listener that will receive results from all single scans
+     * Either the onSuccess/onFailure will be called once when the listener is registered. After
+     * (assuming onSuccess was called) all subsequent single scan results will be delivered to the
+     * listener. It is possible that onFullResult will not be called for all results of the first
+     * scan if the listener was registered during the scan.
+     *
+     * @param listener specifies the object to report events to. This object is also treated as a
+     *                 key for this request, and must also be specified to cancel the request.
+     *                 Multiple requests should also not share this object.
+     * {@hide}
+     */
+    public void registerScanListener(ScanListener listener) {
+        Preconditions.checkNotNull(listener, "listener cannot be null");
+        int key = addListener(listener);
+        if (key == INVALID_KEY) return;
+        validateChannel();
+        mAsyncChannel.sendMessage(CMD_REGISTER_SCAN_LISTENER, 0, key);
+    }
+
+    /**
+     * Deregister a listener for ongoing single scans
+     * @param listener specifies which scan to cancel; must be same object as passed in {@link
+     *  #registerScanListener}
+     * {@hide}
+     */
+    public void deregisterScanListener(ScanListener listener) {
+        Preconditions.checkNotNull(listener, "listener cannot be null");
+        int key = removeListener(listener);
+        if (key == INVALID_KEY) return;
+        validateChannel();
+        mAsyncChannel.sendMessage(CMD_DEREGISTER_SCAN_LISTENER, 0, key);
+    }
+
     /** start wifi scan in background
      * @param settings specifies various parameters for the scan; for more information look at
      * {@link ScanSettings}
@@ -1129,6 +1163,10 @@
     public static final int CMD_STOP_PNO_SCAN               = BASE + 25;
     /** @hide */
     public static final int CMD_PNO_NETWORK_FOUND           = BASE + 26;
+    /** @hide */
+    public static final int CMD_REGISTER_SCAN_LISTENER      = BASE + 27;
+    /** @hide */
+    public static final int CMD_DEREGISTER_SCAN_LISTENER    = BASE + 28;
 
     private Context mContext;
     private IWifiScanner mService;
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java b/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
index ca737f9..32673c7 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
@@ -146,7 +146,6 @@
                 }
 
                 if (nameValue[0].equals("persistent")) {
-                    mOwner = new WifiP2pDevice(sa);
                     mNetId = Integer.parseInt(nameValue[1]);
                     continue;
                 }